Skip to content

ci: run only affected specs -- the selection rule as specs/ci/affected.t27 (Closes #6604) - #6605

Merged
gHashTag merged 4 commits into
masterfrom
ci-affected-specs
Oct 6, 2026
Merged

gHashTag merged 4 commits into
masterfrom
ci-affected-specs

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #6604

Item E of epic #6595: the rule for which specs a change affects, in t27.

  • specs/ci/affected.t27 -- input is one buffer, the same shape as specs/policy/own_language.t27: git diff --name-status lines, then --graph and one importer<TAB>imported edge per line (the union of the base and head trees, so a deleted spec still has its importers), then --corpus and the head tree's spec paths. select_affected() writes the affected specs in corpus order and returns their count, or RUN_ALL.
  • Rule: anything outside specs/ -> run all; a changed .t27/.tri -> it plus every spec that transitively uses it; prose under specs/ -> nothing; any other file under specs/ -> run all; a deleted spec runs nothing itself but selects its importers; a rename seeds both paths; an unreadable line, a status letter other than A C D M R T, a quoted path, a missing marker, or a set/output that does not fit -> run all.
  • gen/c/ci/affected.c is t27c gen-c output, untouched.

Checks on the t27c lab (master 1f9b370, t27c built there, zig 0.16.0):

  • t27c test-report specs/ci/affected.t27: 13 tests, pass 13, FAIL 0, 1 invariant.
  • Mutation: reversing the edge direction in closure() fails 6 tests; classifying an outside path as a seed fails 3.
  • The generated C, fed the real master graph (1287 specs, 812 edges): specs/base/types.t27 -> 396, specs/numeric/gf16.t27 -> 29, specs/math/constants.t27 -> 274, a leaf port spec -> 1, bootstrap/src/compiler.rs -> RUN_ALL. Worst case 44 ms.

Found on the way: t27c does not read "\r" as a string escape (gen-zig emits a backslash and an r), so the CRLF test sets its bytes by number.

Not in this PR (hand-written glue, owner decision): the CI wiring, a t27c command that prints the path-keyed use graph, and a way to hand t27c suite a list of specs. Listed in #6604.

🤖 Generated with Claude Code

…d.t27 (Closes #6604)

Item E of epic #6595. Given `git diff --name-status`, the union of the base
and head `use` edges, and the head corpus, the spec returns the specs to run:
a changed spec plus every spec that transitively `use`s it; anything outside
specs/ (and any non-spec, non-prose file under specs/) means run everything;
deleted and renamed specs select their importers; unreadable input fails
closed. Same one-buffer input shape as specs/policy/own_language.t27.

gen/c/ci/affected.c is `t27c gen-c` output (t27c lab, master 1f9b370).
test-report on the lab: 13/13, FAIL 0; two mutations fail 6 and 3 tests.

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

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 19:18:13 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=ab873301be9c != 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 22:43:21 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3c78f3c7ffb7 != 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).

@gHashTag

gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

Merge train: skipped for now. After updating onto master 56814bf, duplicate-bodies (Duplicate Body Ratchet, run 37384113313) is red on this PR and green on master:

##[error]a body written under has_prefix is now copied [2] time(s) and was in no ledger
##[error]a body written under is_letter_of is now copied [2] time(s) and was in no ledger

has_prefix and is_letter_of in specs/ci/affected.t27 duplicate a body that already exists on master (likely the spec just merged in #6603). Reuse the existing function, or move the ledger in the same commit with python3 tools/dupe_scan.py --bless if the copy is deliberate.

…nguage (Refs #6604)

Both bodies were byte-for-byte copies of specs/policy/own_language.t27, so
duplicate-bodies was red. The spec now says `use policy::own_language;`
and calls own_language::has_prefix / own_language::is_letter_of; gen-c and
gen-zig inline the imported definitions, so the generated C stays
self-contained. gen/c/ci/affected.c regenerated with t27c gen-c.

Lab: t27c test-report specs/ci/affected.t27 -> 13 tests, 13 pass, 0 FAIL.

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

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 23:54:06 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3c78f3c7ffb7 != 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 23:59:18 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3c78f3c7ffb7 != 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).

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.

ci: run only affected specs -- the selection rule as specs/ci/affected.t27

1 participant