fix(codex): keep Codex's own trust tables in OpenRig's hook block, and don't re-add hook groups Codex moved #2035
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 552 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.378
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2035"
general
weight: 0.35
openrig-review
Stacked on #2034 until #2034 merges; review only the commits after it.
What a person gets
After this, a person's own Codex hook trust survives OpenRig's next seat launch, so Codex stops asking them to trust the same hooks again every launch. OpenRig never adds a second set of its activity hooks either.
Before:
[hooks.state]when it saves trust. That's its "Trust all", aConfigEdit::SetPathonhooks.state.toml_editthen prints the rewritten table after the last hook group, which is inside OpenRig's# BEGIN/# END OPENRIG MANAGED ACTIVITY HOOKSblock, ahead of the END comment. The END comment was the prefix of OpenRig's first trust table, and it moves with that table.Reported by @borfast in #17. #2028 fixed the other half of that report, the trust key's group position.
If Codex already shows OpenRig's hook twice, from a config the old code doubled, remove the extra
[[hooks.<event>]]groups that run OpenRig's relay, once. This change stops new copies; it doesn't remove old ones.What changed
[[hooks."Stop"]]. A group is OpenRig's when it's for one of OpenRig's four events and runs nothing but OpenRig's relay. A person's own group for the same event, inside the markers or not, is theirs.[hooks.state]tables stay.- Only the
commandline of each one's own handler is pointed at the current relay, so an upgrade still works.- No second set is appended.
- Their trust is keyed by their own positions.
[features].hooksflag changed and that the file still parses. Otherwise the config is left as it is, with a line in the daemon log. A config that doesn't parse is left as it is too.Tests
codex-hook-trust.test.ts, "#17":[hooks.state]and every entry, sorted, with literal-quoted keys and values, printed after the last hook group, with the END comment travelling with OpenRig's first trust table. A first case checks the person's trust really is inside the markers.- the person's trust;
- their groups and order;
- exactly one set of OpenRig's groups, with correct trust.
- It's also idempotent.
Read as TOML (
codex-hook-trust.test.ts, "OpenRig's groups are found by what they are, not by their text"):[[hooks.Stop]]example stays whole, and the file stays readable;With #2034's source, the four behaviour cases above them fail. With this PR's first revision, the seven new cases fail.
🤖 Generated with Claude Code