Skip to content

t27f: deps_cycles lists every spec on an import cycle (Closes #10693) - #10694

Merged
gHashTag merged 1 commit into
masterfrom
claude/t27f-deps-cycles
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/t27f-deps-cycles

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10693

The T27F dependencies view (specs/t27f/spec_deps.t27) flagged only its focus. This PR adds deps_cycles, which answers the question the way dependency-cruiser no-circular and madge --circular do: list every spec that is on an import cycle.

  • It walks each importer once. A spec that imports nothing is on no cycle, so it is not walked.
  • It reuses deps_walk and deps_on_cycle, and in_set / set_add from ci::affected. No body is copied.
  • If the list, a walk's set or the walked list does not fit, or a walk goes past DEPS_MAX_DEPTH, the answer is refused whole (cap + 1). Nothing is cut off.

Tests (6 new, 19 total)

  • The old igla pair (a and b import each other, c imports b) lists a and b, but not c.
  • Negative control: a DAG (DEPS_FIXTURE) gives an empty list.
  • A cycle that the first spec is not on lists only b and c.
  • A self-import is a cycle of one.
  • Two separate cycles plus a repeated line list each spec once.
  • Negative control: the list, the done list and a walk's set each refuse whole when they do not fit. The exact boundary is tested: a cap of 9 is refused and a cap of 10 fits.

Verification (Railway lab)

  • t27c test-report specs/t27f/spec_deps.t27: 19/19 pass, with 0 vacuous tests.
  • Corpus check, using a scratch test that embeds the real t27c use-edges --specs-dir specs list. It was not committed.
    • Master f7efbc2, 2462 edge lines: the list is exactly specs/igla/race/backend.t27 and specs/igla/race/rtl.t27.
    • With igla race: break the backend <-> rtl import cycle (Closes #10682) #10689's rtl.t27, which drops use igla::race::backend;: the list is empty.
    • Negative control: on the fixed edges, the test that expects the pair FAILS.
    • That run's 2465 lines include the scratch spec's own 4 use lines, which were in the tree at the time.
  • python3 tools/dupe_scan.py: ok. There is no new duplicate body.
  • The seal .trinity/seals/t27f_t27f_spec_deps.json was refreshed with t27c seal --save. Its md5 is the same on the lab and in the commit.

Not covered

  • Nothing runs deps_cycles on every PR. No t27c subcommand runs a spec's main (t27c: no subcommand runs a spec's main, so T27F views have no host #10692), and a CI job would be a gate file. Until one of those lands, the scratch-test recipe is the host. It is written up in .claude/skills/t27f/SKILL.md, "Check the whole corpus for import cycles".
  • The header's 2461-line measurement is kept as written for e607228, and the new measurement is added after it.

Epic gHashTag/trinity#1648.

🤖 Generated with Claude Code

The dependencies view flagged only its focus. deps_cycles walks each importer once,
reusing deps_walk and deps_on_cycle, and lists every spec on a cycle, refused whole
when anything does not fit. Six tests, two negative controls. On the lab it lists
exactly igla race backend and rtl on master f7efbc2, and none with #10689.

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 22:33:16 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 45
PRs with All Checks Green 5
READY 3
FAILING 45
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 45 + 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)=fad12492937a != 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 enabled auto-merge (squash) October 18, 2026 22:34
@gHashTag
gHashTag merged commit cf660f1 into master Oct 18, 2026
34 of 35 checks passed
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.

t27f: list every spec on an import cycle (deps_cycles in spec_deps.t27)

1 participant