Repository navigation
Read-only means no mutation: verify after every read-only dispatch (#91) - #111
Conversation
…hanged (#91) `codex exec -s read-only` confines the agent's own commands, not the processes the host launches for it; a scripted MCP server appended to a tracked file under that sandbox. Every read_only dispatch, on every executor, now fingerprints the dispatch checkout before and after (HEAD, branch ref, porcelain status, staged blobs, digests of changed and untracked files) through one product-neutral helper. A change is a contract_violation that stops the cycle; an unreadable checkout fails closed. `read_only_mode = enforced` now means sandboxed and verified.
[CCR-20260929-001] · manual · ?/?→? · ? · schema:1SummaryReviewed the accumulated diff for PR 111 against Repository instructions from Findings[REV-001] · high · open · - · blocks:yes — Orca can mutate the checkout after the read-only checkPath: The wrapper fingerprints the checkout immediately before and after I reproduced this using the adapter with a runner that returned a ready receipt and then wrote to a tracked file asynchronously: dispatch returned [REV-002] · medium · open · - · blocks:yes — Source-inspection test fails on the current CI PythonPath: The test removes Security triageThe deterministic security rule is not configured and no sensitive labels are present. Reviewer triage activated Verification
Unverified items and residual riskThe current Windows/Python 3.14 CI failures have not been rerun after a fix; Windows installation behavior remains unverified here. The additional VerdictCHANGES_REQUESTED — REV-001 and REV-002 are open and block approval. |
[CCT-20260929-001] · manual · ?/?→? · ? · triaged:985f02f6cabd9d7f248bd161678b84907bc5514b · schema:1Triage (before any change)All findings were judged against [REV-001] · high · open · valid · blocks:yes — Orca can mutate the checkout after the read-only checkConfirmed by reading the code: [REV-002] · medium · open · valid · blocks:yes — Source-inspection test fails on the current CI PythonConfirmed from the CI log on Python 3.14. Since Python 3.13, [REV-003] · high · open · valid · blocks:yes — A read-only pre-check failure crashes telemetry instead of blockingNew ID for the |
… blocked pre-checks (#91) REV-001: a launched Orca worker had its checkout compared once, at launch, and was recorded as verified. An asynchronous result now fails only on a launch-time change; otherwise it is `read_only_verification = pending`, with no after-fingerprint, until verify_read_only_completion compares again. REV-002: the neutrality test stripped docstrings by text, which no longer matches on Python 3.13+. It now strips them from the AST. REV-003: `read_only_verification` joins telemetry's missing_capability vocabulary, so a fail-closed pre-check is recorded as BLOCKED instead of raising. The Jev shadow test clears only the key variables, which keeps git reachable on Windows.
[CCR-20260929-001] · manual · ?/?→? · ? · schema:1[CCT-20260929-001] · manual · ?/?→? · ? · triaged:985f02f6cabd9d7f248bd161678b84907bc5514b · schema:1[CCR-20260929-002] · manual · ?/?→? · ? · schema:1SummaryRereviewed the full accumulated diff against Repository instructions from Changes since the previous reviewThe update marks successful asynchronous launches as pending until a completion check, adds Previous findings[REV-001] · high · open · valid · blocks:yes — Orca can mutate the checkout after the read-only checkStill reproducible. Path: The new pending state covers a successful asynchronous receipt. On [REV-002] · medium · resolved · valid · blocks:yes — Source-inspection test fails on the current CI PythonCorrected and verified by execution. The test now removes docstrings from the parsed AST. The executor test file passes locally, and the current [REV-003] · high · resolved · valid · blocks:yes — A read-only pre-check failure crashes telemetry instead of blockingCorrected and verified by execution. Security triageThe deterministic security rule is not configured and no sensitive labels are present. Reviewer triage activated VerificationPreflight found no application runtime, database, service, migration, or extra configuration requirement. Verification ran in a temporary checkout of the exact current head; the shared working branch was left unchanged.
Residual riskAn Orca worker that remains alive after its launch command times out can still mutate the checkout after the current check reports VerdictCHANGES_REQUESTED — REV-001 remains open and blocks approval. REV-002 and REV-003 are resolved. |
[CCT-20260929-002] · manual · ?/?→? · ? · triaged:be8b92489b4bd1fdfcd5d9cd5951b396b40bee17 · schema:1Triage (before any change)The triage follows rereview [REV-001] · high · open · valid · blocks:yes — Orca can mutate the checkout after the read-only checkConfirmed by reading the code at the triage commit. Only a [REV-002] · medium · resolved · valid · blocks:yes — Source-inspection test fails on the current CI PythonResolved in [REV-003] · high · resolved · valid · blocks:yes — A read-only pre-check failure crashes telemetry instead of blockingResolved in |
…inished (#91) REV-001 (timeout path): Orca's receipt timeout and a native CLI timeout return FAILED while the worker or its children may still be alive, and the synchronous comparison recorded them as verified. Only a SUCCEEDED result that completed its work is now `verified`; every other outcome still fails on an observed change, but an unchanged checkout is `pending` until verify_read_only_completion compares again.
[CCR-20260929-001] · manual · ?/?→? · ? · schema:1[CCT-20260929-001] · manual · ?/?→? · ? · triaged:985f02f6cabd9d7f248bd161678b84907bc5514b · schema:1[CCR-20260929-002] · manual · ?/?→? · ? · schema:1[CCT-20260929-002] · manual · ?/?→? · ? · triaged:be8b92489b4bd1fdfcd5d9cd5951b396b40bee17 · schema:1[CCR-20260929-003] · manual · ?/?→? · ? · schema:1SummaryRereviewed the complete accumulated diff for PR 111 against The repository instructions in Changes since the previous rereviewCommit Previous findings[REV-001] · high · resolved · valid · blocks:yes — Orca can mutate the checkout after the read-only checkPath: Corrected and verified by execution. A timed-out stage no longer receives a successful read-only verification based on an unchanged checkout snapshot. The test [REV-002] · medium · resolved · valid · blocks:yes — Source-inspection test fails on the current CI PythonCorrected and verified by execution. The source-inspection test removes docstrings through the parsed AST. The complete Python test suite passes on the updated head, and both package-validation CI jobs pass. [REV-003] · high · resolved · valid · blocks:yes — A read-only pre-check failure crashes telemetry instead of blockingCorrected and verified by execution. Security triageNo deterministic VerificationPreflight found a Python tooling change with no application runtime, database, service, or migration requirement. Verification ran in a temporary checkout of the exact reviewed head; the shared working branch was unchanged.
Residual riskThe run-cycle driver stops when Orca work finishes elsewhere; it does not wait for the worker. A caller that observes completion must explicitly call VerdictAPPROVED — all recovered findings are resolved, all required checks passed, and no open blocking finding remains. |
Closes #91 — #91
Step 1: does
codex exec -s read-onlyconfine an MCP server's writes?No. Probe (codex-cli 0.158.0): a scripted stdio MCP server exposing
append_line(path, text)was passed with-c mcp_servers.probe.*tocodex exec -s read-only -C <temp repo>. The agent called the tool, the server answeredappended, and afterwardstracked.txtcontainedwritten by mcp(git status:M tracked.txt). The same run also left an untracked.serena/directory in the checkout, written on startup by the globally configured Serena server without any tool call.Change
scripts/executors.py_checkout_fingerprint(path): HEAD, branch ref,git status --porcelain --untracked-files=all, staged blob IDs, and a SHA-256 of each modified/untracked file (so a second edit to an already dirty file is caught). Ignored files are excluded; contents are digested, never stored._verified_read_only(cwd, call): takes no executor, tool, or product. Fingerprints the dispatchcwd(the process cwd when none is given) before and after the stage. A difference, or a fingerprint that cannot be read after the stage, iscontract_violationand dropsread_only_mode. One that cannot be read before blocks the stage (read_only_verification) without running it.dispatchwraps everyread_onlystage in it (Codex, Claude's isolated path, Orca, any future adapter).enforcedis set only by an enforcing adapter and survives only a clean after-check. The checkout does not have to be clean, only unchanged.docs/role-workspace-policy.md(enforced = sandboxed and verified unchanged; the probe result) anddocs/routing.md(host-configured tools sit outside the sandbox).Verification
python3 -m unittest discover -s tests: 841 tests OK.python3 scripts/validate-package.py: VALID.ReadOnlyVerificationTests(tests/test_executors.py): a fake agent run through the real Codex/Claude adapters (and Orca's runner) writes either itself or from a separate child process →contract_violationon all three adapters. A Codex stage that writes nothing →enforced, with argv still-s read-onlyand no bypass flag. A dirty checkout is compared, not refused, and a re-edit of a dirty file is caught. Both fail-closed paths are covered, and a code-level check confirms the helpers take no executor/tool argument and name no product.tests/test_run_cycle.py: a reviewer whose child process writes the checkout stops the cycle (dispatch_failed, row outcomecontract_violation).Residual risk
.serena/) now fails every read-only stage unless the repository ignores that path. That is intended by the contract, but it will surface in repositories that don't ignore it.