Skip to content

chore(depgraph): stop re-deriving the layering inversion baseline - #2241

Merged
thymikee merged 3 commits into
mainfrom
claude/depgraph-single-source-inversions
Sep 2, 2026
Merged

chore(depgraph): stop re-deriving the layering inversion baseline#2241
thymikee merged 3 commits into
mainfrom
claude/depgraph-single-source-inversions

Conversation

@thymikee

@thymikee thymikee commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

Removes the duplicate whole-tree equality check between the dependency-graph report and the layering inversion ratchet.

The layering gate remains the sole owner of the R6 ratchet. The depgraph report keeps inversion counts as report data and tests its own counting model, without claiming parity with the gate.

Validation

At 4b6d591a5f9c83331544d1af4f0c0c8f385f9981:

  • pnpm depgraph:test — 24/24 passed.
  • pnpm check:affected --run — all runnable checks passed; GitHub-authoritative and parked device lanes were reported separately.
  • Fresh-worktree pnpm install --frozen-lockfile and pnpm build completed successfully.
  • The two stale ownership comments identified in review now state the single-owner design directly.

Touched scope: six workflow/depgraph/layering files; no runtime or device-facing behavior.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.58 MB 2.58 MB 0 B
JS gzip 868.4 kB 868.4 kB 0 B
npm bundled raw 2.58 MB 2.58 MB 0 B
npm bundled gzip 868.4 kB 868.4 kB 0 B
npm tarball 1.02 MB 1.02 MB -2 B
npm unpacked 3.46 MB 3.46 MB 0 B
npm clean-installed 3.46 MB 3.46 MB 0 B

npm unpacked components

Component Base Current Diff
JS / dist source 2.74 MB 2.74 MB 0 B
Apple runner source/project 544.4 kB 544.4 kB 0 B
Apple snapshot presentation source 33.8 kB 33.8 kB 0 B
macOS helper source 54.8 kB 54.8 kB 0 B
Android helper artifacts 43.3 kB 43.3 kB 0 B
Other package files 46.3 kB 46.3 kB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 31.6 ms 31.3 ms -0.3 ms
CLI --help 80.4 ms 80.8 ms +0.4 ms

Top changed chunks: no changes in the largest emitted chunks.

Top changed packed files

No changed packed files.

@thymikee

thymikee commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

BLOCKED — [P2] remove the stale parity-check claims. The duplicate detector itself is correctly deleted, but scripts/layering/check.ts still says TYPE_INVERSION_BASELINE is exported for depgraph’s baseline-parity test, and scripts/depgraph/model.ts still says its count feeds a CI equality check. Both are now false and directly contradict the new single-owner design. Update both comments so the layering gate alone owns the ratchet and depgraph only reuses the counting model. The workflow/catalog rename, synthetic regression, and exact-head CI are otherwise clean.

The report's typeInversionsByPair and the gate's checkTypeInversions run the
same loop over the same resolveImportEdges output, so asserting that the
report reproduces TYPE_INVERSION_BASELINE over the real tree checked one
code path against itself. Replace the tree-wide cross-check with a synthetic
test of the report's own counting rule (raw edges, once per file pair).
The Layering Guard step no longer claims to agree the report with the gate;
it runs the depgraph model and blast-radius tests, which the gate manifest
requires a registered check to own.
@thymikee
thymikee force-pushed the claude/depgraph-single-source-inversions branch from f8f78e8 to 4b6d591 Compare September 2, 2026 19:14
@thymikee

thymikee commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Addressed the blocking review at 4b6d591a5f9c83331544d1af4f0c0c8f385f9981:

  • scripts/layering/check.ts now states that the layering gate solely owns and enforces the R6 ratchet.
  • scripts/depgraph/model.ts now states that inversion counts are report data only, not a CI equality check.
  • Rebased onto current main.
  • pnpm depgraph:test: 24/24 passed.
  • pnpm check:affected --run: all runnable checks passed.

Exact-head GitHub CI is now authoritative.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 2, 2026
@thymikee

thymikee commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

READY at 4b6d591a5f9c83331544d1af4f0c0c8f385f9981. The stale ratchet-ownership comments are corrected, the branch is conflict-free with current main, local affected validation passed, and every exact-head GitHub check is green. ready-for-human is applied.

@thymikee
thymikee merged commit 6a24dc1 into main Sep 2, 2026
19 checks passed
@thymikee
thymikee deleted the claude/depgraph-single-source-inversions branch September 2, 2026 19:31
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-02 19:32 UTC

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

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant