fix: fail-closed submodule policy (#34)#37
Conversation
|
REJECTED — root exact-head review of d3fdb77 Evidence
Please fix these four findings on the same branch and add production-entry tests that reproduce the target-preservation, recognized-read-flag, and nested-helper paths. Any new head requires a fresh review. — codex-125550 · root review |
|
REJECTED — root re-review of exact r1 head 3ecf0f0 Evidence
Production fixes for target preservation and helper depth are present, but three bounded blockers remain:
r2 can stay small: whitelist recognized leading flags and deny unknown flags; make target/depth/audit assertions fail on old behavior; add one foreign write-deny/read-routing real-entry pair; fix the two clippy lines. No unrelated refactor. — codex-125550 · root review |
|
REJECTED — root exact-head review of Evidence
Fixed from r1: target/depth/audit assertions, foreign write deny, leading/flag-only unknown forms, and all-targets clippy. Bounded r3 only:
No unrelated changes. |
|
VERIFIED — root exact-head review of Evidence
All prior root blockers are fixed. GitHub currently reports the branch as DIRTY against the base, so a mechanical rebase is still required. Any head move invalidates this exact-head verdict and requires bounded freshness/equivalence review. |
|
VERIFIED — independent adversarial exact-head review of Evidence
The reviewer observed one test-only |
Squashed for mechanical rebase onto post-lib/bin-split base. RED-first tests + GREEN implementation + r1/r2/r3 review fixes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agend-Agent: archfix-opus-3 Agend-Task: t-20260717024227345704-55600-3 Agend-Branch: fix/34-submodule-policy Agend-Issued-At: 2026-07-17T03:40:01.057900+00:00
2e00720 to
568cb7a
Compare
|
VERIFIED — root bounded freshness/equivalence review of rebased exact head Evidence
The r2 grammar/foreign-CWD blockers remain fixed; helper depth, target preservation, snapshot and audit coverage all pass. Any further head move invalidates this verdict. Independent freshness review is still running before merge. |
|
VERIFIED — independent freshness/equivalence review of exact rebased head Evidence
Both required exact-head freshness verdicts are now VERIFIED. Any further head move invalidates them; merge remains gated only on the branch CI event. |
Summary
classify()arms forsubmodule(read/write discriminated) andsubmodule--helper(always Deny at depth 0), closing the fail-open gap where both fell to the_default armargs.first()→subcommand_index(&args)for rooted subcommand extraction at both call sites inshim_mainis_mutating_local,destructive_op_slug,bypass_op_is_audited, and add an explicit deny exception inapply_foreign_repo_passthroughfor foreign-repo submodule writesDesign
Fail-closed submodule grammar (
submodule_op_is_write):submodule,submodule status,submodule summaryinit,update,deinit,add,set-branch,set-url,sync,foreach,absorbgitdirs, and any unknown/future sub-operationTest plan
218add2) now all GREEN — 7 flipped from FAIL to PASS, 1 stayed PASScargo clippy -- -D warningscleanmain.rsandsnapshot.rschanged (65 insertions, 11 deletions)Closes #34
🤖 Generated with Claude Code