Skip to content

refactor(layering): one retired-paths rule for src/utils and src/replay - #2240

Merged
thymikee merged 1 commit into
mainfrom
claude/layering-retired-paths-rule
Sep 2, 2026
Merged

refactor(layering): one retired-paths rule for src/utils and src/replay#2240
thymikee merged 1 commit into
mainfrom
claude/layering-retired-paths-rule

Conversation

@thymikee

@thymikee thymikee commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

Layering rules R14 (src-utils-retirement) and R71 (replay-ownership) were the same predicate, a path-prefix denylist for a retired directory, written twice in two modules with two tests. They now live in one module, scripts/layering/retired-paths-policy.ts, driven by a table keyed by rule id (R14, R71) that holds the retired prefix and the owner guidance. Adding a retired directory is one table row.

Gate behavior is unchanged: both rule ids, both messages, and both inputs survive as-is (R14 still scans every tracked path under src/utils, including the exact root entry; R71 still scans production sources under src/replay/). check.ts keeps its keyed rule record and reporting order. rule-ids.ts still sees each id declared exactly once as a whole literal.

6 files touched, all under scripts/layering/; no fallow baseline entries referenced the deleted modules.

Validation

  • pnpm check:layering (folded test file plus rule-ids and check-wiring tests, then the guard): green, 1579 source files.
  • pnpm check:quick, pnpm format:check, pnpm check:fallow: green.
  • Planted red at fd4d0f0 with src/utils/planted.ts and src/replay/planted.ts staged, then node --experimental-strip-types scripts/layering/check.ts (exit 1):
    • ::error file=src/utils/planted.ts,line=1,title=Layering drift (R14 src-utils-retirement)::src/utils is retired; move this path to its owning package or command zone
    • ::error file=src/replay/planted.ts,line=1,title=Layering drift (R71 replay-ownership)::src/replay/ is retired; caller source acquisition belongs under src/commands/replay/ and replay-test presentation belongs under src/cli/replay-test/.
      Planted files removed afterwards.
  • Full affected gate: pending (serialized gate stage will append the result)

R14 (src-utils-retirement) and R71 (replay-ownership) were the same
path-prefix denylist instantiated in two modules. Fold both into
scripts/layering/retired-paths-policy.ts, driven by a table keyed by rule
id; ids, messages, inputs (tracked src/utils paths vs production sources)
and check.ts wiring are unchanged.
@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 -5 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 27.4 ms 26.2 ms -1.2 ms
CLI --help 71.9 ms 68.0 ms -3.9 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

READY — clean review at this exact head. R14/R71 retain their exact identities, messages, inputs and wiring; the shared retired-path owner preserves the original behaviors and the planted regressions exercise both real tracked zones. Deleted modules have no consumers and all exact-head CI is green. No code findings. The PR body still lists the local full affected gate as pending, but GitHub’s code-owning lanes are complete.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 2, 2026
@thymikee
thymikee merged commit 5eebba5 into main Sep 2, 2026
18 checks passed
@thymikee
thymikee deleted the claude/layering-retired-paths-rule branch September 2, 2026 18:51
@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 18:51 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