chore(test): retire the field-consumer scanner and its guard — detection belongs to the platform (#1543) - #1580
Merged
Conversation
Deletion leg only — the rosters that name these files are reconciled in the next commit, so this commit is the ablation that proves they are enforced. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TezFG8ZMrNH6n5VTNpPpdH
…omment test/script-main-guard.test.ts drops its scan-field-consumers.ts entry and test/verify-log-decoy-pin.test.ts drops the deleted suite from KNOWN_SPAWNING_FILES; the dated decoy-line table keeps its measured figures and gains a tombstone. scripts/lib/main-module.d.mts stops citing the retired script as its reason and states the one measured with tsc --listFiles. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TezFG8ZMrNH6n5VTNpPpdH
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
os-zhuang
marked this pull request as ready for review
September 5, 2026 14:57
This was referenced Sep 5, 2026
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1543
Maintainer ruling of 2026-09-05, option F (recorded on #1543, verbatim 「1543 选 F」): retire this repo's field-consumer scanner and its guard outright, rather than re-point, redesign or partially keep it. The basis is the standing 2026-08-31 ruling in
AGENTS.md§ "Scope — a pure metadata application", rule 3: "Lint, validation, gates and diagnostics belong to the platform, uniformly … Tests in this repo pin this repo's own business facts and nothing else … ⛔ Do not grow a gate farm." "Does a declared field have any consumer" is a property of every metadata app, not a HotCRM business fact. The scanner (created 2026-08-17) predates that ruling and was never reconciled with it.Platform successor: objectstack#15922 — a "declared field with zero consumers" diagnostic in
os lint/os validate, with HotCRM as the measured corpus and the retired scanner as design input. Not part of this PR.⛔ No metadata is deleted here.
crm_product.tax_rateand every other field are untouched; #1198 and #1199 stay separate cards, released after this merges.What changed
scripts/scan-field-consumers.tstest/field-consumer-scan.test.tspackage.jsonscan:fieldsscript dropped (pnpm verifynever referenced it)test/script-main-guard.test.tsGUARDEDentry for the retired script removed; a tombstone added where the doc comment records its entry-point spellingtest/verify-log-decoy-pin.test.tsKNOWN_SPAWNING_FILESdrops the deleted suite; the dated table keeps its figures and gains a tombstonescripts/lib/main-module.d.mts.changeset/retire-the-field-consumer-scanner.md916 lines deleted, 41 added. The empty frontmatter is the route
.github/workflows/changeset-check.ymldocuments for a PR that releases nothing ("on par with theskip-changesetlabel"), so no label is applied.The rosters are enforced — measured, not assumed
Reverse verification in three legs on committed trees,
pnpm exec vitest run test/script-main-guard.test.ts test/verify-log-decoy-pin.test.ts:b1599507—Test Files 2 passed (2) · Tests 14 passed (14), exit 0.fd7f2b9d, rosters untouched — exit 1,Tests 4 failed | 10 passed (14):exercises every guarded script found on disk(expected [ …(3) ] to deeply equal [ …(2) ]), both symlinked spawn legs for the deleted script, and decoy-pin rule C (expected [ 'test/field-consumer-scan.test.ts' ] to deeply equal []). Neither roster is decorative.93044cfe—Test Files 2 passed (2) · Tests 12 passed (12), exit 0. Twelve, not fourteen: the two spawn cases belonged to the retired script.Why the two dated tables keep their numbers
test/verify-log-decoy-pin.test.ts's✗-line table is a measurement of a specific tree (ec4c5ac6) whose total is asserted in prose to reconcile at 64, andtest/script-main-guard.test.ts's three-spellings table is the record of why the shared entry-point helper exists. Editing a figure out of either would falsify a dated measurement rather than reconcile a roster. Both keep their rows and gain a tombstone naming #1543; only the live rosters —GUARDEDandKNOWN_SPAWNING_FILES— changed.scripts/lib/main-module.d.mtsjustified itself by the deleted.tsscript. The replacement reason is measured withtsc --noEmit --listFiles, which still lists the declaration after the deletion: first-party TypeScript reaches the helper through the gate it imports (test/source-token-ratchet.test.tsimportsscripts/check-source-token-ratchet.mjsunderallowJs, and tsc resolves that gate's own./lib/main-module.mjsto this file).Gates — the repo's own chain, each command run separately, exit code captured by redirect
pnpm validatepnpm typechecktsc --noEmit, silentpnpm lint90 warning(s), 12 suggestion(s)— pre-existingpnpm lint:i18n-gate✓ i18n lint gate: 0 i18n/missing-* issuespnpm hygiene✓ source hygiene cleanpnpm hygiene:tokens✓ source token ratchet cleanpnpm buildArtifact: dist/objectstack.json (2012.2 KB)pnpm testTest Files 159 passed (159) · Tests 3380 passed | 1 skipped (3381)One dispatch assumption falsified. The token ratchet was expected to fall with ~900 deleted lines. It cannot: its surface is
src/**/*.tsminussrc/translationsandsrc/data, and nothing underscripts/ortest/is measured. Both figures are identical before and after — business semantics ~84,060 · interaction layer ~37,429 · authored total ~135,830 — the second measured by running the gate against the base checkout. No ceiling was touched.content/docs/**never referencedpnpm scan:fields(grepped; the only surviving mentions areCHANGELOG.mdand two existing.changeset/*.md, all history, all left alone).src/**,content/docs/**and every governed surface are untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01TezFG8ZMrNH6n5VTNpPpdH