Skip to content

t27f: deps view answers why A imports B -- one shortest use chain (Closes #10705) - #10715

Merged
gHashTag merged 3 commits into
masterfrom
claude/t27f-deps-why
Oct 18, 2026
Merged

gHashTag merged 3 commits into
masterfrom
claude/t27f-deps-why

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10705

What

deps_why a b in specs/t27f/spec_deps.t27 answers the question the dependencies view could not: why does spec A import spec B. It writes one shortest chain of t27c use-edges lines from A to B:

why	A	B	hops=N
edge	A	x	exact
...
edge	y	B	exact
  • Each hop is an edge-list line, labelled exact.
  • A tie is taken in edge-list order, so the same list always gives the same chain.
  • why A B none when A does not reach B.
  • refused full|deep A when the walk does not fit, and cap + 1 when the output does not fit. Nothing is ever cut.

This is the query cargo tree -i, npm explain, pnpm why and Bazel somepath answer for their ecosystems.

deps_find is split out of deps_in_range so the backtrack can take the first edge line in a range whose importer sits one layer closer to A.

Tests (6 new, 31 total)

  • the shortest chain over DEPS_FIXTURE: f to d in 4 hops;
  • a tie broken in edge-list order: two lists that differ only in order give two different chains;
  • a spec to itself in 0 hops;
  • negative control: none against the direction of the edges and for a spec off the graph;
  • a cycle crossed both ways;
  • negative control: an output one byte short is refused whole, and a full walk room is refused full.

Evidence (Railway lab)

  • t27c test-report specs/t27f/spec_deps.t27: 31 pass, 0 FAIL, 0 vacuous (md5 9aef3a30).
  • A scratch corpus check over 2466 edge lines (never committed) checked every spec reached from lesson_reel, spec_deps and t27f_gate. Each chain was as long as the spec's layer, every hop was an edge-list line, and the hops joined up. The one-hop-more control failed, and dropping the last edge failed two tests.
  • t27c seal ... --verify: all hashes MATCH.
  • t27c suite --ratchet --corpus-only: RATCHET CLEAN, 2319 specs.

Skill

.claude/skills/t27f/SKILL.md gets three additions:

  • the why recipe;
  • the finding that all 13 specs with a dropped use line fail test-report for other reasons first, so repairing an import alone fixes none of them;
  • the trap where pkill -f matches its own ssh session.

The merge commit only takes master's squash of #10704. Master's copies of the three files were byte-identical to the branch's base.

🤖 Generated with Claude Code

gHashTag and others added 3 commits October 19, 2026 06:00
…Closes #10702)

deps_unknown reads the focus spec's source next to the use-edges list and
writes one `unknown<TAB>path` line per use line with no edge to its whole
path or its single fallback, mirroring bootstrap/src/use_resolve.rs.

Measured on the Railway lab, master f33f269: 2489 use lines, 23 unknown
in 13 specs, byte for byte the `t27c gen` "resolves to no spec" warnings;
the drop-one and empty controls both fail. Spec 25/25 tests, 0 vacuous;
corpus ratchet CLEAN. The t27f skill gains the oracle recipe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oses #10705)

deps_why a b writes one shortest chain of edge-list lines from a to b,
each exact, a tie taken in edge-list order; `none` when a does not
reach b; refused whole when the walk or the output does not fit. It
answers the question cargo tree -i, npm explain and pnpm why answer.

deps_find is split out of deps_in_range so the backtrack can pick the
first edge line in a range whose importer sits one layer closer.

Six tests: the shortest chain over DEPS_FIXTURE, a tie in edge-list
order, a spec to itself in no hops, none against the edges and off the
graph, a cycle crossed both ways, and an output one byte short refused
whole. Lab: test-report 31/31, 0 vacuous; a scratch corpus check over
2466 edge lines held hop count = layer and joined hops for every spec
reached from lesson_reel, spec_deps and t27f_gate; the one-hop-more
control and the last-edge mutation fail. Seal re-saved and verified;
corpus ratchet CLEAN.

The t27f skill gets the why recipe, the finding that all 13 specs with
a dropped use line fail for other reasons first, and the pkill
self-match trap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	.claude/skills/t27f/SKILL.md
#	.trinity/seals/t27f_t27f_spec_deps.json
#	specs/t27f/spec_deps.t27
@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 23:20
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 23:20:13 UTC

Summary

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

These columns do not partition: 4 + 45 + 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)=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 merged commit 1228cf0 into master Oct 18, 2026
35 checks passed
gHashTag added a commit that referenced this pull request Oct 18, 2026
Master's SKILL.md is the squash of #10715, byte-identical to this
branch's base, so the branch copy is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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: deps view answers why A imports B -- one shortest use chain

1 participant