fix: make unattended authority consistent across the shipping workflow - #305
Conversation
|
Independent Codex review — session PASS — no blockers found for PR #305 at exact head Read the review skill fully, PR body, and complete Advisory: No additional findings. Scripted workflow and shipping-prose tests establish their stated contracts; they do not prove live-model behavior or an actual GitHub merge. All verification used
Four sequential mutants were tested with
Every mutant and restoration received a full Original bytes match HEAD exactly; tracked, index and untracked state are clean. All review subprocesses completed. PR head and remote main remained unchanged; main is |
|
Independent Claude Code review — session Review of PR #305 at head d7014ed. Verdict: pass, no blockers. Base origin/main stayed at 9591b1b for the whole review, so there was no delta to re-review. BlockersNone. I found no concrete correctness or security regression against the revised unattended contract. Explicit denies, sandbox refusal, MCP definition pinning, project trust, automated-answer provenance and live child inheritance all hold in code and are each pinned by a test that a targeted mutant fails. Advisory (optional, not defects against the contract)
EvidenceWorktree confirmed: HEAD d7014ed, porcelain clean, node_modules present, all runs with the requested TMPDIR.
Mutants, run one at a time with the relevant test file, each restored by byte-copy and hash-verified, core dist rebuilt after restore:
Other checks: no new event types, so the zod/renderEvent rule is untouched. Serving clients can only lower budgets, so YOLO on an MCP server remains an operator setting. The diagnostics tool classifies by exec class, not executable name, so swapping tsc for the Node binary changes nothing in permissions or sandbox. Startup trust uses only user, profile and argv state, and an explicit --no-yolo restores the prompt. PR body claims verified: fail-first core regression behavior (via mutants 1, 2, 5), configured answer-policy forwarding and human-provenance rejection, MCP pinning refusal without dialog, supervisor escalation omission, trust suppression without project config load. Not verifiable here: Windows coverage and the live-session fix for the original ENOENT symptom. CI on the exact head at report time: scripted-structure pass, ubuntu pass, macOS and Windows still pending. Pending CI is not a code defect. Final state: HEAD unchanged at d7014ed, tracked tree and index clean, all mutant originals restored, no agents spawned, nothing pushed, no PRs or issues created. Worktree cleanup left to the conductor. |
Focused CI fixture correction — e24fbd2The macOS and Windows failures both identified the scoped MCP fixture's aliased temporary root. Reproduced the same list_sessions refusal locally under an aliased TMPDIR; canonicalizing only the fixture root fixes it. No production permission or assertion changes. Full build/typecheck/test pass again (3,830 passed / 4 skipped). Claude Code deltaDelta verdict for d7014ed..e24fbd2: pass. The delta is exactly the described change in packages/cli/test/mcp-serve-cli.test.ts: a realpath import and canonicalizing the fixture cwd before deriving the root, home and memory paths. No assertion, permission, sandbox or production source changed. The fixture still runs with a scoped write allow rather than blanket yolo, so the scoped-read check it exercises stays in force. Reproduction with the aliased TMPDIR symlink:
The failure without realpath is the same lexical scoped-read mismatch reported from macOS CI: the CLI's canonical cwd and the aliased --root spell the same directory differently, so the read policy refuses it. Canonicalizing the fixture is the right fix; it does not widen what the server may read. Restored state: the test file hash matches its pre-mutant value, porcelain is clean, HEAD is unchanged at e24fbd2. Nothing pushed, no agents spawned. CI on the updated head is left to the conductor. Codex deltaThe first resumed runtime check lacked the original writable review launch setting and stopped at EROFS before executing tests. It did not count as verification. Relaunched in the same exclusive writable setup, with no code or test waiver: Focused delta PASS at Ran each state with: TMPDIR=/var/tmp/agentrig-unattended-tests-alias pnpm exec vitest run packages/cli/test/mcp-serve-cli.test.ts
Static verdict unchanged: no assertion, permission, production or sandbox weakening. HEAD is unchanged, fixture bytes match HEAD exactly, working/index state is clean, and all subprocesses completed. No broader review, agents, pushes or merges. |
Final updated-main integration — a791243Main PR #304 merged as 030e35f. Only STATUS conflicted; both delivery records are retained. Full local build/typecheck/test exited zero at the integrated head: 3,834 passed / 4 skipped in 252 files. Exact-head and main CI are still running. Claude Code (same independent reviewer session)Integration verdict for merge head a791243: pass, integration is clean. The merge has exactly the expected parents: the reviewed branch head e24fbd2 and main's PR #304 commit 030e35f, which is current origin/main. Comparing the merge against each parent, the branch side reproduces the previously approved unattended diff byte for byte, and the main side reproduces PR #304's version support byte for byte, excluding STATUS. The only differences are hunk line offsets in program.ts and vitest.windows.config.ts, which is what two independent edits to different regions of the same files look like. STATUS was the sole conflict. It resolves to both delivery entries: the unattended entry first, the PR #304 version entry second, with the earlier sections intact and no text lost from either side.
No resolution or semantic change beyond the STATUS concatenation. Nothing from the merge touches the permission, sandbox, question, trust or MCP paths reviewed earlier, and the version code from main does not intersect them. Final state: HEAD unchanged at a791243, porcelain clean, nothing pushed, no agents spawned. Exact-head and post-merge CI remain conductor-owned and pending; this verdict covers the local integration only. Codex (same independent reviewer session)Final-head integration PASS at
HEAD unchanged; working tree and index clean. No blockers or advisory findings. Exact-head/post-merge CI remains pending and conductor-owned; no future CI success claimed. |
Completed — merged, green main, local build updated
Existing processes retain their loaded runtime: restart the old session with |
Summary
One user-directed correction for the entire unattended workflow: startup, external-input authority, real child inheritance, background tests, diagnostics, optional bookkeeping, clarification/supervisor human gates, and authorized shipping. Builder: Codex/operator with isolated helper worktrees, outside AgentRig. The existing AgentRig session
86ce6bc6and its separate PR #304 are preserved.Authorization and scope
Latest human request: “Fix it. Cover the entire workflow.”
Standing end-to-end instruction: “Then when everything is green and everything passes, you merge the PR.”
These apply to this corrective PR for the unattended harness workflow, not unrelated work. Tool permission/YOLO alone is not merge authorization; later revocation or narrowing wins.
Contract amendment / plan departures
This is a direct user-requested correction, not an R13c or R17 roadmap-row implementation. It deliberately supersedes R13c's mandatory fresh human consent under explicit operator YOLO. Default interactive behavior is unchanged. The amendment is recorded in PLAN, DEFAULTS, R13c's historical contract and docs/plans/unattended-workflow.md.
Risk: explicit operator blanket authority remains broad even after untrusted content. Provenance is not promoted, but this increases prompt-injection exposure. It applies consistently to explicitly YOLO-configured MCP serving; do not expose that authority to untrusted clients. Scoped/default serving retains the fresh-consent restriction. No security-default flip.
Flag meanings changed:
--yoloand its--dangerously-skip-permissionsspelling now actually suppress human gates across the workflow, preserving denials and isolation restrictions. No new flag, model or budget default.Verification
a7912434db1d95fd14e3413488b96da011cf98bd:pnpm build,pnpm typecheckandTMPDIR=/var/tmp/agentrig-unattended-tests.KEBvMC pnpm testall exited zero; 3,834 passed / 4 skipped across 252 files.realpathcanonicalization fixes it without widening reads or dropping assertions. Both reviewers independently reversed it and caught the failure. No blind rerun or production permission change.a7912434db1d95fd14e3413488b96da011cf98bdUbuntu/macOS/Windows CI and structure check all passed.93b65ee7c4c54fc51432904939a6e37f69c105a0, tree identical to the reviewed head. Post-merge Ubuntu/macOS/Windows CI and post-merge structure all passed on the first attempt. Local main fast-forwarded and rebuilt, 24 installed-tree smoke tests passed; personal profile resolves YOLO on, checkpoints off, trusted local TypeScript path. No user configuration was changed; the completed version branch and session are preserved. No open PRs remain.