Skip to content

feat(affected-set): no-reader paths give READERS, not ALL (ALL 18->14 of 20; Refs #5809) - #5815

Closed
noahgift wants to merge 25 commits into
mainfrom
batch-cand/affected-set-noread
Closed

noahgift wants to merge 25 commits into
mainfrom
batch-cand/affected-set-noread

Conversation

@noahgift

@noahgift noahgift commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Refs #5809.

keep-open: #5809 is the umbrella five-whys; this PR is one narrowing step of several. Stacked on #5802 (the affected-set tool is not on main yet); retarget to main when #5802 merges.

What

scripts/affected_set.sh: a diff whose non-crate paths are only ci/shard-step-costs.tsv, .claude/** or docs/findings/** now gives READERS (plus any touched crates' closure) instead of ALL. Any other path beside them still decides ALL; so does a CORE crate.

Why it is safe (measured)

git grep of crates/**/*.rs for the run-time readers of each path: .claude: orchestrate, core, mcp, apr-cli; docs/findings: contracts-cli (and core's spec scan, ci-tools' dag_status read docs/ in general); ci/shard-step-costs.tsv: none. All are in READERS, which every non-ALL set already carries; check_affected_readers.sh is green. Not covered: readers that build a path at run time without a literal (a grep cannot see those) and the ci/explicit-test-commands.d / scripts self-tests, which run outside nextest.

Predicted effect (replay of the last 20 first-parent merges of main)

  • After dropping ci/sections.yml (it holds the CI job bodies, per seat 1), ALL stays 19/20 on this window: 0 of the 19 flip. The three remaining paths appear only beside other ALL triggers here (1 PR is non-ALL both before and after). Predicted affected-crates drop: 0 today.
  • The earlier 18/20 -> 14/20 figure was almost entirely ci/sections.yml-only PRs and is WITHDRAWN.
  • So this PR is safe but buys nothing measurable yet; the drivers are contracts/*.yaml, contracts.nt, witness, README.md, scripts/, crate non-.rs files, Cargo.lock.

Checks

scripts/check_affected_set.sh green (new rows incl. lookalike docs/findings-x.md -> ALL, no-reader beside docs/x.md -> ALL, beside CORE -> ALL, and a mutant that widens the list to docs/*); check_affected_readers.sh, check_guards_are_wired, check_shell_lint_ratchet green.

Retargeted to main (02:2xZ): CI pull_request is filtered to branches: [main, master], so a PR based on work/e5-affected-set never got checks. The PR now carries #5802's commits too (15 commits); do NOT arm it before #5802 merges, or it would land #5802 unreviewed.

Adds a blocking check: NO. The affected-set guards (check_affected_set.sh, check_affected_readers.sh and its --self-test) run in the guards-nightly LAB lane (manifest line added), not on the PR or merge path. No gate is added, so the C324 new-GATE terms do not apply. The duplicate explicit-test fragment and the dead docs/findings/* arm are gone.

🤖 Generated with Claude Code

noahgift and others added 13 commits October 20, 2026 17:39
…e + nextest filter (E5)

Rows checked against a cargo-tree oracle. Core crate, Cargo.lock, Cargo.toml
and any unknown path give ALL. The closure uses until(fixpoint): the earlier
recurse(f; cond) form stopped one step short and under-selected dependents
(aprender-tsp/monte-carlo missed behind apr-cli).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(Refs #5802)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…es! mapping (Refs #5802)

A rename out of a crate showed only its destination (git rename detection), so the source crate was skipped; --no-renames reports both paths. A docs/*.md file a crate embeds with include_str!/include_bytes!(literal) was dropped by the docs skip; it now counts as the embedding crate (aprender-review-experiment prereg.rs). Rows plus a RED mutant for each.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d-set scripts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ts ALL; check runs with safe.directory

Tests read README.md, CLAUDE.md, ci/sections.yml and docs/ at run time, so skipping them
emptied the set. The include_str! scan is gone: docs are ALL. Rows and mutants for each.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…o guard-cargo-steps

Other crates' tests read crates/*/README.md and aprender-serve/kernel-registry.json.
check_affected_set.sh runs cargo metadata/tree, so it cannot live in the cargo-free guard-tree-steps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(other crates' tests read its sources)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eader edges), with rows and a mutant

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ched or jq failure prints ALL; rows + RED mutants

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…) in every non-ALL set; readers guard; res= fallback row

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ERS is the only list; file:line allow; one case per w5404 probe

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e positive

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…/, docs/findings/ give READERS, not ALL (Refs #5809)

Run-time readers of these paths (grep of crates/**/*.rs) are all in READERS, which every
non-ALL set already carries. Last 20 first-parent main merges: ALL 18 -> 14; the 4 that flip
go from 85 to 48 crates. Rows + a widening mutant added (102 ok).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat 1 (w5032) @074bc4c7a65f1c7fde41b2f07c0441c86addfe3f: CHANGES-NEEDED. Opus lane: ci/sections.yml is not a no-reader path (it holds the CI job bodies incl. the workspace-test-shard nextest command, ci/sections.yml:540; an edit changes how all crates' tests run). Drop it from the skip arm and restore the ALL row; other 3 paths verified. Minors: wrong reader names in the comment, no .. arm. Receipt: handoff/w5032-quorum-5815-074bc4c7a6.md. Not armed.

…ies) (Refs #5809)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@noahgift
noahgift changed the base branch from work/e5-affected-set to main October 21, 2026 02:12
…n/master)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift and others added 2 commits October 21, 2026 04:36
…10 b) (#5823)

* ci(affected): contracts/, docs/ and root *.md give READERS, not ALL (FLOW-010 b)

Adds the 12 crates that read contracts/, docs/ or README at run time to READERS.
contracts/**/binding.yaml and contracts/model-families stay ALL: build.rs inputs
whose generated code reaches dependents. Replay of the last 30 main merges: ALL 28 -> 19;
a flipped merge runs 60 of 85 crates.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* ci(affected): root contracts files compiled into a crate stay ALL; checker derives them (Refs #5823)

aprender-serve build.rs generates code from architecture-requirements, tensor-names and
arch-constraints; apr-cli embeds others via include_str!. BUILD_CONTRACTS names them (ALL);
check_affected_readers.sh scans build.rs and include*! for root contracts files and is RED
on one the list omits. Stale header lines fixed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w5032 @a1ba24ed8c: my CHANGES-NEEDED from @074bc4c7a6 is resolved. ci/sections.yml now maps to ALL in scripts/affected_set.sh, with a row in check_affected_set.sh. Lifted. This is not a seat: the #5823 code in this PR is mine.

🤖 Generated with Claude Code

noahgift and others added 2 commits October 21, 2026 04:56
…5809)

A missing --diff-from file (rc 1), --diff-from with no FILE, no cargo (rc 127) and a failing
git rev-parse (rc 128) exited with no output, which a caller reads as 'nothing affected'.
Each is now ALL; a RED row for each plus two mutants.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…of rc 2 (Refs #5809)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w5404 (claude-sonnet-5-5) seat 1 at head 8554ed3. 3/3 quorum (agy+Opus+Haiku) APPROVE; --diff-from ../x reproduced as ALL rc 0, both guards rc 0, RED row fails on 91b7b00. Non-blocking LOW: missing awk/paste on PATH still rc127 (pre-existing). Receipt: cop-inbox/handoff/w5404-quorum-5815-8554ed31c8.md. Not armed.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-triage-worker @8554ed31c8 APPROVE (gate change; bound to this sha; non-author; quorum receipt handoff/w5404-quorum-5815-8554ed31c8.md 3/3, seat 1 w5404 at same sha). Delta 91b7b00..8554ed3 per receipt: '..' --diff-from prints ALL. Reproduced at this head: --diff-from ../x and /tmp/a..b both print ALL on stdout, rc 0 (stderr refusal). check_affected_set + check_affected_readers (+self-tests) green. Not run: full CI, quorum (cop-owned); Opus LOW notes (no awk/paste on PATH -> rc127) are pre-existing, non-blocking. Not armed.

@noahgift
noahgift enabled auto-merge October 21, 2026 03:20
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5815 head=8cfd74b1ef9518b2689e2aabf3e14bd62e6800e5 verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

…-test too, SEC010-clean mutant (Refs #5809)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat 1 (aprender-wsweep, non-author) @8cfd74b1ef9518b2689e2aabf3e14bd62e6800e5: NOT approved yet. check_affected_set.sh, check_affected_readers.sh (+ --self-test) and check_no_pipe_into_grep_q.sh (42/42) pass at this head, but scripts/check_guard_steps_isolated.sh still exits 1 on ci/sections.yml:1953 (setsid --wait bash -c '...&& ...--self-test' is not read as isolating both invocations; #4133). Likely fix: setsid --wait bash scripts/check_affected_readers.sh && setsid --wait bash scripts/check_affected_readers.sh --self-test. Will re-seat on the next head.

…#5809)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat 1 (aprender-wsweep, non-author): APPROVE @ae952c8a38af18d969ddb8e586f15674b452c73a. Delta over 8cfd74b is one line (ci/sections.yml:1953: each invocation now carries its own setsid --wait). At this head check_guard_steps_isolated.sh, check_affected_readers.sh (+ self-test), check_no_pipe_into_grep_q.sh (42/42) and check_affected_set.sh all exit 0. Non-blocking nits as in the quorum round (duplicate run of check_affected_set.sh on the PR path; READERS keyed on directory).

noahgift and others added 3 commits October 21, 2026 07:54
…d_set (Refs #5809)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…AB lane (Refs #5809)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…efs #5809)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@noahgift
noahgift disabled auto-merge October 21, 2026 06:46

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-triage-worker @5094be1960 APPROVE (bound to this sha; non-author; receipt handoff/w5404-quorum-5815-5094be1960.md AGREED 3/3 agy+Opus+Haiku, no same-family degrade). Delta vs my 8554ed3 seat read (7 files): the two affected-set guard steps leave sections.yml and the 815 .cmd fragment is deleted; they run only in guards-nightly.yml (+2 lines in guards_nightly_manifest.txt), i.e. LAB, off the PR/merge path; small edits to affected_set.sh / check_affected_readers.sh / check_affected_set.sh. Ran at this head: check_affected_set ok + self-test, check_affected_readers ok + self-test (mutants caught); --diff-from ../x and /tmp/a..b still print ALL rc 0. Not run: full CI. Per the receipt, CI red ci/gate = 'sovereign-ci gate section: missing' and cancelled shards were not measured as a diff defect: I did not verify that, so this seat is not a CI verdict. w5404's non-blocking notes stand. Branch not updated; not armed.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat 1 (aprender-wsweep, claude-sonnet-5-5, non-author): APPROVE @5094be196094b6007083824bb6a8b4b0ed2f5029. Read the diff (guards-nightly.yml step + LAB ticket opener, manifest row, 3 scripts). Ran at that sha: check_affected_set, check_affected_readers, check_guard_steps_isolated, check_no_pipe_into_grep_q, check_guards_nightly_manifest all rc=0. check_baseline_ratchets rc=1 on this sha AND on origin/main (pre-existing, unrelated). Privacy scan of PR files (tier text / flow-manifest): clean. Step is LAB-only, off the PR path, ticket opener present (C324). Quorum receipt handoff/w5404-quorum-5815-5094be1960.md noted. Branch not touched.

@noahgift

Copy link
Copy Markdown
Member Author

superseded by #5929 (EMG-001 epic; this ticket's commit is in its range)

@noahgift noahgift closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant