Repository navigation
fix(policy): v1.2.19 read-only commands stay out of state-change classes [t_6f335dd6] - #33
Merged
Merged
Conversation
…asses [t_6f335dd6] Incident 13.09.2026: lexical classifier routed four families of pure-read terminal commands into fail-closed lanes (40+ false denies, runs burned). - git config query forms / worktree list / merge-base => read_only; MUTATOR merge no longer matches merge-base; config writes stay state_change - git -C wrapper tolerated symmetrically in READ_COMMAND and MUTATOR (case-sensitive; -c stays fail-closed); git -C repo push cannot reach the read lane - cat joins stdout-only read utilities; redirect/tee still write-marked - gh api --jq/-q (space + fused =) joins read-safe option allowlist; method writes, hostname overrides, absolute URLs, unknown options still fail closed (v1.2.7 F-01 --jq case replaced by --permissive) - VAR=value env prefix before pytest deliberately stays fail-closed - version bump 1.2.17 -> 1.2.19 (pyproject, 2x plugin.yaml, __init__, version-match test); CHANGELOG entry; 42 contract tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.2.19 — read-only commands stay out of state-change classes
Task: t_6f335dd6 (fleet-ops). Incident 13.09.2026: the lexical classifier routed four families of pure-read terminal commands into fail-closed lanes; 40+ false denies burned worker runs.
Root causes fixed (src/fleet_policy/policy.py)
git configquery forms (--get*,--list, barekeywithout value),git worktree list,git merge-basenow classify read_only. MUTATOR'smergeno longer matchesmerge-base(also in the release-rule regex and repository_change check). Agit configwrite (value argument /--unset) remains a state change.git -C <path>wrapper is tolerated on read verbs AND symmetrically on MUTATOR's git verbs, sogit -C repo pushcannot dodge the mutator scan into the read lane. Wrapper match is case-sensitive:-c(per-invocation config injection, e.g. core.pager) stays fail-closed.catjoins the stdout-only read utilities; redirect/tee/in-place forms are still caught by the write-marker scan.gh api --jq/-q(space and fused=forms) joins the read-safe option allowlist — it only projects the JSON response and cannot change the HTTP method or carry a payload. Exact-head probes (gh api repos/o/r/commits/HEAD --jq .sha) are reads again. Method writes,--hostnameoverrides, absolute URLs, and unknown options still fail closed; the v1.2.7 F-01 test case that pinned--jqas fail-closed is replaced by--permissive.Deliberately NOT relaxed: bare
VAR=valueenv prefixes in front ofpython -m pyteststay fail-closed — PATH/LD_PRELOAD rebind the executed binary.Verification
python -m pytest -q→ 582 passed, exit 0 (Windows, python 3.11.16), including 42 new contract tests intests/test_v1219_read_classifier.py(4 incident families + adversarial variants) and the full pre-existing suite (v1.2.6/v1.2.7 read-lane regressions, F-01/F-02 gh-api smuggles, pristine manifest).__init__.__version__, and the version-match test.Notes
manifest-pristine-v1211.txthashes are pinned to PRISTINE_REF git blobs, so policy.py edits do not invalidate them; the file is untouched in this diff.src/fleet_policy/policy.py— open PRs feat(policy): v1.2.18 token hard caps raise (owner GO 2026-09-08) #31/feat(policy): human-boundary v2 delta (v1.2.46) — X1 deny, decision-namespace forge guard, approvals v2 tuple, A4 non-blocking notice [t_c91076d0, refresh t_f68e8bed] #32 also touch it; rebase needed after first merge.Base: codex/company-os @ 7538369. task_type: code