Skip to content

ci: test only the specs a change can affect -- t27c use-edges feeds specs/ci/affected.t27 (Closes #7565) - #7566

Merged
gHashTag merged 4 commits into
masterfrom
claude/affected-use-closure
Oct 8, 2026
Merged

gHashTag merged 4 commits into
masterfrom
claude/affected-use-closure

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Closes #7565

What

  • t27c use-edges [--specs-dir specs]: every use edge as importer<TAB>imported, sorted, repo-relative, from use_resolve::use_targets, the resolver t27c compiles with. There is no second resolver.
  • spec-guards, "Affected specs" step: feeds git diff --name-status, the union of base and head edges, and the head corpus into gen/c/ci/affected.c (selection logic stays in specs/ci/affected.t27). It then runs t27c test-report on the selected specs only, in both trees with the same t27c.
    • The step is red if a spec fails more tests than on the base, or if it stops building.
    • On RUN_ALL (a change outside specs/), the step leaves the whole corpus to corpus-ratchet.

Measured (Railway lab)

value
use-edges 946 edges / 1575 specs, 28 ms
select, change to policy/text_lines.t27 3 of 1575, 3 ms
select, change to base/types.t27 (worst fan-in) 412 of 1575, 51 ms
test-report per spec 0.3-0.6 s
negative control (assert 1 == 2 added) red: 1 failing vs 0 on base

Foreign lines: 57 of 80 (main.rs 7, use_resolve.rs 21, spec-guards.yml 29). All three files are listed in tools/policy/foreign-exceptions.txt.

Not in this PR: gating corpus-ratchet off for selective PRs. corpus-ratchet.yml is not on the exception list, so that is the owner's call.

🤖 Generated with Claude Code

…pecs/ci/affected.t27 (Closes #7565)

specs/ci/affected.t27 (#7529) had no producer and no consumer. Now:

- `t27c use-edges` prints every `use` edge as "importer<TAB>imported" from
  use_resolve::use_targets, the resolver t27c compiles with -- no second
  resolver. 946 edges over 1575 specs in 28 ms on the lab.
- spec-guards feeds the diff, the base+head edge union and the corpus into
  gen/c/ci/affected.c, then runs `t27c test-report` on the selected specs only,
  in both trees with the same t27c: red if a spec fails more tests than on the
  base or stops building. RUN_ALL leaves the corpus to corpus-ratchet.

Measured on the lab: a change to specs/policy/text_lines.t27 selects 3 of
1575 specs (~1 s of tests vs ~10 min for the corpus at ~0.4 s/spec); the
negative control (an added `assert 1 == 2`) goes red, 1 failing vs 0.
Fan-in is the long tail: base/types.t27 selects 412, math/constants.t27 277.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag gHashTag added the owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR label Oct 7, 2026
@gHashTag
gHashTag enabled auto-merge (squash) October 7, 2026 15:33
…b compiles it too (Refs #7565)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n: step (Refs #7565)

shell: run: steps 302 -> 303. quiet: one more step in a quiet shape (gated on
a file existing, a variable in the path) and one more that names a path.
Written by `tri census pin --bless` on the lab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-07 16:34:14 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 39
PRs with All Checks Green 11
READY 1
FAILING 39
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 39 + 0 + 0 = 40, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=66b6e1375e37 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-07 17:02:37 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 38
PRs with All Checks Green 12
READY 1
FAILING 38
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 38 + 0 + 0 = 39, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=66b6e1375e37 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

This was referenced Oct 7, 2026
@gHashTag
gHashTag disabled auto-merge October 8, 2026 17:58
@gHashTag
gHashTag changed the base branch from master to shep-tmp-base-7566 October 8, 2026 17:58
@gHashTag
gHashTag changed the base branch from shep-tmp-base-7566 to master October 8, 2026 17:58
@gHashTag gHashTag added the ci label Oct 8, 2026
@gHashTag

gHashTag commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Merge shepherd: own-language was red only because of the stale base.sha trap (#7489). The PR's base.sha was 2749341, so the gate counted master's own foreign changes since then, such as service.rs and lower.rs. This PR's own diff against current master is spec-guards.yml +29, main.rs +27 and use_resolve.rs +6. Master's check_budget() allows it at 62 foreign lines, and check_all() gives exit 0. I did not change the branch. Auto-merge was off; the base was flipped to a temporary branch and back to master and checked, the ci label was added, the temporary branch was deleted, and then auto-merge was turned back on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: wire specs/ci/affected.t27 -- t27c use-edges + test only the affected specs

2 participants