Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .changeset/retire-the-field-consumer-scanner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
---

Repo tooling only — this PR releases nothing to HotCRM users, so the frontmatter
above is deliberately empty (the sanctioned "releases nothing" declaration that
`.github/workflows/changeset-check.yml` documents, on par with the
`skip-changeset` label). No metadata changes: `crm_product.tax_rate` and every
other field are untouched here.

The field-consumer scanner is retired outright — `scripts/scan-field-consumers.ts`,
`test/field-consumer-scan.test.ts` and the `pnpm scan:fields` script. "Does a
declared field have any consumer" is a property of every metadata app, not a
HotCRM business fact, and `AGENTS.md` § "Scope — a pure metadata application"
rule 3 puts lint, validation, gates and diagnostics on the platform: *"A
drift-class or validation-class gap you find is a platform problem and goes
upstream … ⛔ Do not grow a gate farm."* The scanner (2026-08-17) predates that
2026-08-31 ruling and was never reconciled with it. Maintainer ruling of
2026-09-05 on #1543, option F. The detection moves upstream as objectstack#15922.

Two rosters name the deleted files and are reconciled with them:
`test/script-main-guard.test.ts` drops its `scan-field-consumers.ts` entry (its
coverage assertion compares `GUARDED` against the guarded scripts found on disk,
so the entry cannot outlive the file), and `test/verify-log-decoy-pin.test.ts`
drops `test/field-consumer-scan.test.ts` from `KNOWN_SPAWNING_FILES`. Both
measured: with the files deleted and the rosters untouched the two suites go red
in four places, which is what makes this an edit and not a formality. The dated
`✗`-line table in the decoy pin keeps its measured figures — it records a run on
`ec4c5ac6` and its total still reconciles — and gains a tombstone instead.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"test:e2e": "playwright test",
"hygiene": "node scripts/check-source-hygiene.mjs",
"hygiene:tokens": "node scripts/check-source-token-ratchet.mjs",
"scan:fields": "tsx scripts/scan-field-consumers.ts",
"reconcile:analytics": "tsx scripts/analytics-reconcile/run.ts",
"verify": "pnpm validate && pnpm typecheck && pnpm lint && pnpm lint:i18n-gate && pnpm hygiene && pnpm hygiene:tokens && pnpm build && pnpm test",
"changeset": "changeset",
Expand Down
10 changes: 7 additions & 3 deletions scripts/lib/main-module.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
*
* The implementation is `.mjs` because `scripts/*.mjs` gates run under bare
* `node` with no build step — CI invokes them as `node scripts/<gate>.mjs`.
* `scripts/scan-field-consumers.ts` runs under `tsx` and imports the same
* helper, and `tsconfig.json` typechecks `scripts/**\/*.ts`, so the helper needs
* a declaration. One shared guard beats two spellings of the same comparison.
* A declaration is still needed because first-party TypeScript reaches this
* helper THROUGH those gates: `test/source-token-ratchet.test.ts` imports
* `scripts/check-source-token-ratchet.mjs` under `allowJs`, and tsc resolves
* that gate's own `./lib/main-module.mjs` import to this file — measured with
* `tsc --noEmit --listFiles`, which lists it. The last `.ts` script to import
* the helper directly was `scripts/scan-field-consumers.ts`, retired in #1543.
* One shared guard beats two spellings of the same comparison.
*/

/**
Expand Down
Loading
Loading