feat(permissions): a planned per-seat permission account, and setup's router-line question #1843
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.80) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.80 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.080
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1843"
general
weight: 0.35
mvschwarz
What a user gets
Before anything changes, an honest view of each seat's planned permissions, and a saved yes or no for the one line OpenRig can add to shared guidance files.
rig seat status <seat>shows what the seat's next managed launch will ask for:- the native permission argument, verbatim;
- where it comes from;
- what OpenRig adds;
- which recorded policy an explicit seat choice is used instead of;
- the existing commands that change it;
- what isn't known.
It's labelled planned, not observed.
rig setupshows the exact line OpenRig can add to each seat'sCLAUDE.mdorAGENTS.md, which files it goes in, and what a no gives up. It saves the person's answer withrig setup --router-line yes|no. No answer isn't a yes: nothing is added.This is a partial step towards letting a person choose how much OpenRig changes and how freely its agents act. It doesn't move OpenRig's other writes out of the project or isolate a person's own sessions. It names those writes instead.
The change
The planned permission account (
permission-account.ts, onrig seat statusaspermissions.account):NativePermissionStore.apply,claudePostureFlag/codexPostureArg, and the team and kernel allowance lists. It adds no new rule, runs no harness and probes nothing.- an explicit seat choice, with its actor and reason;
- the member's or rig's policy;
- the kernel default;
- OpenRig's team default;
- the floor, or a named Codex profile.
A seat with no policy launches at the floor even when the daemon has
OPENRIG_YOLOset, and the account says so. ~~An earlier head listed "the daemon'sOPENRIG_YOLO" as a source and showed full bypass for such a seat~~: that was wrong, since every launch path binds the floor when no policy is recorded. Both reviewers caught it.- the team or kernel lists (exact, in JSON);
- Codex's extra writable roots;
- the non-interruptive flags where they apply.
- native settings OpenRig doesn't manage (the person's user, project and managed Claude settings, and Codex's configuration, profiles and requirements);
- whether the harness applies the argument;
- Codex's network default, which is decided at launch from Codex's own configuration;
- that this is the saved plan for a fresh launch: a restore re-reads a custom policy file, and a Codex rebuild handover can carry the previous occupant's observed sandbox and approvals instead, without the extra roots or network setting.
Setup's router-line question:
router_linestep reports the saved answer, or saves the one given with--router-line yes|no, asskills.router_line.enabled, and reads it back. It says when the environment'sOPENRIG_SKILLS_ROUTER_LINE_ENABLEDoverrides the saved answer. A dry run saves nothing.routerLine):- the line verbatim;
- the file rule;
- what a no gives up;
- the limit: a later no doesn't remove a line already written, and
rig downremoves OpenRig's blocks unless a seat of another active rig, or a still-running seat of this one, uses the file;- that the answer covers only this line.
@openrig/daemon/router-line) for the CLI.Setup's "OpenRig may modify" list is now complete, each entry checked at the code that writes it. It adds:
CLAUDE.md/AGENTS.md(culture, the OpenRig Start identity pointer, onboarding at a fresh start, and guidance a team merges);.openrig/context-collector.cjs;.git/info/excludeentries, written only for new openrig-core plugin files (for another new file, OpenRig prints how to ignore it);It drops the old "acceptEdits floor fragment", which nothing writes any more.
Guidance and docs:
getting-started.mdtells the installing agent to show the router-line preview, ask, and save the answer.cli-reference.mdlists--router-line.Cost: source +304/−13 across 6 files, tests +231/−3 across 3 files, docs and guidance +20/−6 across 3 files (numstat).
How you verified it
New tests:
permission-account.test.ts, one case each:- the team default (the exact team lists, not "OpenRig default");
- the kernel default;
- an explicit Claude mode beating a recorded member policy, with its actor and reason;
- a member's full-bypass policy;
- Codex's team default (its roots, with network unknown);
- a Codex profile;
- Claude and Codex:
OPENRIG_YOLOdoesn't widen a seat with no policy, and the account's argument matches what the real adapter emits for the binding a fresh launch builds;- Pi, which has no native argument;
- a Codex member asking for
auto, which keeps the resolver's "launches at the floor" reason;- a Codex profile supplying the argument under a policy;
- the account on
rig seat status.setup.test.ts, with a real config file in a temporary folder:- an unanswered question saves nothing and isn't a yes;
-
--router-line yesandnoare saved and read back, and a later bare run reports them;- a dry run saves nothing;
- an environment override is named;
- an answer other than yes or no is refused before setup runs.
seat.test.ts: the human status output with an account, labelled planned, with the unknowns and controls, and without the old mode line.Results, in a network-off Linux container at the exact commit (
24d184f3):permission-account,seat-status-service,s03-native-permissions,declarative-permission-modes,team-permission-default,seat-route-oracle-injection;setup,setup-output,seat,seat-lifecycle-verbs,config-store-extended,skill-loadout-seat;tsc) passed with no type errors.Two later commits came after that run, with CI as their proof: the
seat.test.tscase (1bc54372, test only), and three review fixes (e8780420: the Codexautofallback reason, a Codex profile under a policy, and a dry run skipping a saved answer).Review round 1 (
86f503a6): the no-policy floor, the fresh-launch scope, and the text corrections. On the executor at exact commits: without it (e8780420plus the new account test), daemon 10 of 12, with both new Claude and Codex checks failing on the old account's bypass claim; with it (86f503a6), daemon 93 of 93 across 5 files, CLI 124 of 124 across 3, and the full build with no type errors. A run without the change would only show the new modules missing, so none was made. No live launch was run, which is why the account says planned.Anything you were unsure about
rig policy permissions current --specalready says per site what applies, team default included. A per-member account there needs each member's runtime from its agent spec, and isn't in this change.skills.router_line.enabled), its first. It only does so when--router-lineis given.CHANGELOG.mdedit🤖 Generated with Claude Code