Skip to content

Commit 866b439

Browse files
test(spec): shared test titles state each cited decision in words instead of a tracker number (stage 12) (#21750)
Part of #20749 Clause-②: no Stage 12 of this card, and the third area of class (e): the test strings shipped under `packages/spec/src`, as ruled in `5902360492` on #20513. This stage takes the whole `shared/` directory. Its 85 test-title and test-string literals carried 95 tracker ids: 92 cite 49 records, and 3 are a `#0000` placeholder that cites none. Each id now either states what its record decided, in words (form D), or is dropped where the title already says it. Text only: no assertion, identifier, test count or code comment changes. ## Census at the base (`72b6333cd8`, the claim's base) Instrument: stage 10's `census10.cjs` (md5 `9d08602ab972b4b8643c90d64d40fa41`) and stage 9's `census.cjs` (md5 `6e42a45a926d375013c32d62f16a296e`), both byte-identical to the copies stages 10 and 11 used. A literal counts as a test title when its folded message is argument 0 of a `describe` / `it` / `test` call, `.each` / `.skip` / `.only` chains included. Everything else is an "other" string. Both instruments read **1594 messages / 1701 ids in 369 files at the base**, which is stage 11's reading at its head exactly. `shared/` reads 85 / 95, also stage 11's figure. | directory | files | messages / ids | titles | other | |:--|--:|--:|--:|--:| | `data/` | 95 | 468 / 501 | 445 / 475 | 23 / 26 | | `ui/` | 81 | 392 / 415 | 374 / 397 | 18 / 18 | | `api/` | 40 | 189 / 201 | 181 / 193 | 8 / 8 | | `system/` | 34 | 154 / 165 | 128 / 138 | 26 / 27 | | (files directly in `src/`) | 30 | 118 / 120 | 117 / 119 | 1 / 1 | | **`shared/`** (this PR) | 21 | **85 / 95** | 73 / 81 | 12 / 14 | | `contracts/` | 25 | 63 / 74 | 59 / 70 | 4 / 4 | | `conversions/` | 9 | 34 / 34 | 34 / 34 | 0 | | `security/` | 8 | 28 / 28 | 28 / 28 | 0 | | `ai/` | 9 | 18 / 20 | 13 / 15 | 5 / 5 | | `identity/` | 6 | 15 / 15 | 14 / 14 | 1 / 1 | | `integration/` | 4 | 14 / 14 | 13 / 13 | 1 / 1 | | `migrations/` | 2 | 9 / 12 | 9 / 12 | 0 | | `marketplace/`, `meta-spelling/`, `studio/` | 5 | 7 / 7 | 7 / 7 | 0 | | **total** | **369** | **1594 / 1701** | **1495 / 1596** | **99 / 105** | - **Controls.** Lit, a title: `shared/duration.test.ts:45` reads one message with #18122. Lit, an `expect` message: `shared/retry-policy.test.ts:113` reads one message. Dark: the comment at `shared/alias-integrity.test.ts:519` ("#5593 migrated the last of them") reads 0; the file's messages sit at `:516`, `:770` and onwards. Planted in a scratch copy: an id added to a title reads 1 / 1, and an id in an added comment reads 0. - **A wider pattern** (any `#` plus digits) reads 87 / 97 under `shared/` at the base. The two extra hits are `(#1)` placeholders in two fixtures of `retired-key-migrate-sentence.test.ts` (`:378`, `:380`, the "accepts the two legal shapes" case). They fall outside the gate's 3-to-5-digit pattern and the claim's surface, and are untouched. At the head the wider pattern reads only those two, and the gate pattern reads 0 / 0. - **At the head:** 1509 messages / 1606 ids in 348 files. `shared/` reads 0 / 0. Nothing else moved. ## How the area was chosen Stage 10's rule: rank whole first-level directories by ids, and take the busiest one within about 10% of the ~100-id bound. The four busiest each exceed the bound alone: `data/` (501), `ui/` (415), `api/` (201) and `system/` (165). The files directly in `src/` (120) are 20% over. `shared/` (95) is the busiest whole directory within the bound, and its census reads exactly stage 11's 95, so the rule needed no second pass. **Named for the next stages:** `data/` (about five stages, by subdirectory or file group; `data/driver/` alone is 52), `ui/` (about four), `api/` (two), `system/` (two), the files directly in `src/` (one, 120), `contracts/` with `conversions/` (one, 108), and `security/`, `ai/`, `identity/`, `integration/`, `migrations/`, `marketplace/`, `meta-spelling/` and `studio/` together (one, 96). ## What each id became 22 ids now state a decision in words, one per literal. 73 are dropped: 67 where the title already says what a live record decided, 3 dead numbers whose decisions were read from what landed, and the 3 `#0000` placeholders. Every cited record was read with its comments through REST. 46 answer 200. Three answer 404, and their decisions were read from their landing commits. | record | ids | result | |:--|--:|:--| | #7889 | 3 of 5 | The three synthetic `history` strings in the reachability self-test read "n/a — planted for the reachability self-test". Nothing reads them: `unreachableAliasRows` reads only `aliases` and `guidanceSets`. Dropped from the 2 titles that state the check. | | #6416 | 1 of 2 | "the three hand-written error maps are FOLDED and judged here". Dropped from the `expect` message that already explains the blind spot. | | #6619 | 1 of 6 | "the two maps the first fold MISSED": #6619 folded three maps, and #6805 found two more. Dropped from 5 literals that state the fold. | | #7887 | 1 of 4 | "editability lives on fields — the boundary prescription an author actually sees". That is the maintainer's boundary ruling: sections and page components gate visibility only. Dropped from 3 titles. | | #5955 | 1 of 2 | "(the fix-first order survives the new set)": the history sentence is emitted last, so the author reads the fix first. Dropped once. | | #15811 | 1 of 2 | "evaluated-slot population — no declaring position still mounts the persistence schema". Dropped once, where the title states the rule. | | #3278 | 1 | "never re-advertises `js`, retired in favour of ScriptBody". #3278 retired the `js` expression dialect as redundant with the L2 `ScriptBody`. | | #7739 | 1 | "EXTERNAL_ERROR_HTTP_STATUS — each external error carries an HTTP status". The title was the symbol alone. Its landing gave the whole family one status table, so none can leak as a bare 500. | | #19101 | 1 of 2 | "lazySchema × z.toJSONSchema — a lazy reference keeps its metadata". The ruling fixed the root cause in `lazySchema`, so descriptions no longer depend on which generator ran. Dropped once. | | #8421 | 1 of 2 | "(flipped once unknown type names were refused)", where the title said "#8421 flipped this". Dropped once. | | #16845 | 1 of 2 | "ProtectionSchema — unknown-key refusal names the surface and the rename": the block adopted `strictObject`. Dropped from "accept set is unchanged". | | #12840 | 1 | "acceptRetiredDefaultResidue — a retired default parses as inert residue". The title was the symbol alone. | | #17109 | 1 | "enumWithRetiredValues — value-level retirement beside retiredKey()": the maintainer chose a generic helper, not a one-enum refinement. | | #6414 | 1 | The `expect` message reads "the prescription must not point at the retired ETL layer": #6414 retired L2 `ETLPipeline`. | | #4001 | 2 | The synthetic widget `history` reads "Until unknown keys were refused, these were dropped silently". Both copies change together. The test asserts the message ends with that exact constant, so the fixture and its expectation move as one. | | #7832 | 3 of 5 | "the reverse-direction alias curation added here", "already curated before the reverse-direction sweep", and "the two `visibleWhen` shapes the first sweep never enumerated". #7832 was the reverse direction of the action shapes' alias table. Dropped twice. | | #7816 | 1 | "the boolean `enabled: false` first". #7816 noted that the boolean case must point at `enabled`, or the hint just moves the confusion. | | dropped only (live) | 49 | #4661 (2), #4962, #4964, #4971, #4990, #5389 (3), #5481 (2), #5552, #5593 (2), #6630, #6805 (4), #6856, #7030, #8201, #8202 (2), #8318 (4), #8382 (2), #8424, #9529 (3), #7894 (4), #10096, #10848, #13859 (3), #15028, #15035, #15423, #15430, #16320, #18122. Each title already states the pinned decision. | | dropped only (404) | 3 | #6085 (landing `026101660`: the dialect table drops `js`, adds `template` and states it IS the enum), #10485 (`35ad101`: the `themes` carrier key and `ThemeSchema` retired, `/meta/theme` refused), #11166 (`735f5c709`: `SchemaDiffEntry` gains a distinct `unreachable` kind). Each title already carries what landed. | | `#0000` | 3 | A placeholder in synthetic fixtures (`retired-key.test.ts:26`, `:28`; the planted source in `retired-key-migrate-sentence.test.ts:342`), cited no record. Dropped. The two `retired-key.test.ts` constants are both input and expectation, so the byte-for-byte assertions move with them. It is the same reasoning by which #17109's patch round took the made-up `(ADR-0000)` out of these fixtures: a made-up number squats on a real one. | ## Readers - **Test-name filters:** none. A tracked-tree search for `-t` and `--testNamePattern` finds only `packages/qa/dogfood/README.md:142` (`-t "owner-scoped"`), which is unrelated. - **Snapshots:** none. `shared/` has no `__snapshots__`, and no `.snap` file is tracked under `packages/spec`. - **Gates that read a touched file:** - `scripts/check-future-spec-major.mjs` keeps a witnessed ledger entry for `retired-key.test.ts` (`witness: /was removed in @objectstack\/spec 99/`, `covers: 4`). The rewritten constants still carry that sentence. `check:future-spec-major` was derived for this diff and exits 0, "every witness still matching". - `packages/spec/vitest.repo-tests.json` lists `retired-key-migrate-sentence.test.ts`, so that file runs in the `repo` project. It was run there at the base and at the head. - **Titles by substring:** every old literal, plus a window around each id (221 needles), was searched across the tracked tree outside its own file. No gate, doc, filter or script reads one. The 21 needle hits land on 8 lines: - Sibling titles in other lanes' files: `packages/cli/test/format-zod-union.test.ts:301` (`[#5389] formatZodErrors …`) and `packages/metadata-protocol/src/protocol.unrecognised-meta-type.test.ts:171` (`[#10485] \`theme\` …`). - A later stage's row in this package: `packages/spec/src/ai/knowledge-source.test.ts:97`, an `it.each` row name with "retired at #3278". - A self-test fixture in `scripts/check-future-spec-major.mjs:767-768` that copies the two `retired-key.test.ts` constants with `(#0000)`. It is its own text and does not read the file. - Code comments: the `strict-object.ts:71` docblock example and `suggestions.zod.ts:319`. - A self-test fixture with a different string in `scripts/check-doc-authoring.mjs:2507`. ## Text-only proof Stage 10's scratch tool (`textonly10.cjs`, md5 `d5e4801dbb4329ab1984da91e92fc47c`) compares base and head file by file on three legs: 1. **Skeleton:** the full AST, with string pieces masked. It must be identical. 2. **Comments:** every comment, byte-equal. 3. **Strings:** each string leaf that changed must sit in a test-call title position, or on one of the 12 declared lines. Each changed leaf must carry a tracker id before and no `#` plus digits after. The declared lines are: - the synthetic `history` strings at `alias-integrity.test.ts:917`, `:939`, `:952` and `strict-object.test.ts:16`, `:196`; - the `expect` messages at `alias-integrity.test.ts:1100` and `retry-policy.test.ts:113`; - the fixture constants at `retired-key.test.ts:26`, `:28` and the planted source at `retired-key-migrate-sentence.test.ts:342`; - the fixture names at `union-branch-policy.parity.test.ts:164`, `:169`, which reach `it` titles through a template. - **Result:** 21 of 21 files SAME, 85 changed (73 title, 12 declared), on all three legs. - **Diff hunks:** exactly the 85 planned lines, with every file keeping its line count. - **Controls (10 of 10 as predicted, on scratch copies, each anchor hit once):** identifier rename DIFF; numeric literal DIFF; comment edit COMMENT DIFF; a non-title string with an id VIOLATION; a rewritten title given a new id VIOLATION; a title that was id-free at base edited VIOLATION; one title reverted to base SAME; a declared string keeping an id VIOLATION; an undeclared `expect` message changed VIOLATION; a title re-split into a `+` chain DIFF. **Test counts:** the 21 files were run at the base (in a separate base worktree) and at the head, 20 in the `local` project and one in `repo`. Both sides read 567 / 567 passed, with the same count and status sequence per file in 21 of 21. 450 full test names change, and each equals the base name with the planned replacements applied. ## Changeset: `skip-changeset` Measured, not assumed: - `npm pack --dry-run` of `@objectstack/spec` lists 2068 files under `files[]`. 0 of the 21 touched files are in it, and 0 `*.test.ts` at all. The control `src/shared/expression.zod.ts` is in it. - In `dist/`, four new phrases read in 0 files. Of three old ones, two read in 0, and the third reads only in `shared/index.d.ts` / `.d.mts`, from the `strict-object.ts` docblock comment, not from a test. The control `Unrecognized key(s) on` reads in 42. So this PR publishes nothing, and no changeset is added. ## Verification (at `fd8fd92d13`) - `pnpm turbo run build` over all packages: 71 / 71. - `@objectstack/spec`: - `vitest run --project local`: 613 files, 18215 passed, 1 todo. - `typecheck` exit 0, including `check:test-typecheck`. Its program holds all 21 touched files, counted with `tsc --listFilesOnly`. - **Gates:** `dispatch-gates --commands` derived 80 families, and all 80 exit 0. That is stage 11's 79 plus `check:future-spec-major`. `--ran` reconciles: 80 derived, 80 run, 0 NOT-MEASURED, 0 UNRUN. - Five roster families whose rosters sit under a touched directory were also run, and each exits 0: `check:meta-url-spelling`, `check:spec-changes`, `check:authz-resolver`, `check:error-code-casing` and `check:filter-alias-parity`. - **ESLint, a proven narrowing:** `--no-inline-config` over the 21 files, 0 errors and 0 warnings. The population comes from ESLint's own config: 21 configured, 0 ignored. No `parserOptions.project` or `projectService`, so no untouched file's verdict can move. - `check-governed-merges --test`: NOT governed, 170 changed lines. ## Acceptance notes - **Code comments still carry ids** in these 21 files and in the `shared/` sources. One of them ships: the `strict-object.ts:71` docblock example quotes the old widget `history` with `#4001`, and it is emitted into `dist/shared/index.d.ts`. Comments are not this card's share and are untouched here. - **Sibling titles in other packages** repeat two rewritten titles' ids (`cli`'s `format-zod-union.test.ts:301`, `metadata-protocol`'s `protocol.unrecognised-meta-type.test.ts:171`). Each is its own lane's test-string stage. `spec`'s `ai/knowledge-source.test.ts:97` is this card's later small-directories stage. - **`scripts/check-future-spec-major.mjs:767-768`** keeps its own self-test copy of the two fixture constants with `(#0000)`. It is a non-test file outside this claim's surface, and it reads nothing from `retired-key.test.ts`. - **`origin/main` moved** seven commits past the base before this PR opened (#21737, #21741, #21739, #21744, #21740, #21746, #21749). One touches `packages/spec` (`api/error-code-ledger.zod.ts`); none touches a file in this diff, so nothing was merged. --- _Generated by [Claude Code](https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1289925 commit 866b439

21 files changed

Lines changed: 85 additions & 85 deletions

‎packages/spec/src/shared/alias-integrity.test.ts‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ describe('alias integrity — coverage', () => {
513513
expect(unreached, 'these alias tables are not reachable from any module export, so nothing judges them').toEqual([]);
514514
});
515515

516-
it('NOTHING in packages/spec calls `strictUnknownKeyError` directly any more (#5593)', () => {
516+
it('NOTHING in packages/spec calls `strictUnknownKeyError` directly any more', () => {
517517
// This was a shrink-only ratchet at 44 — the pre-helper wiring, which hands
518518
// the factory a hand-transcribed `knownKeys` array instead of a shape.
519519
// #5593 migrated the last of them, so it is a hard ZERO and the assertion
@@ -767,7 +767,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
767767
expect(broken.sort()).toEqual([]);
768768
});
769769

770-
it('no two alias keys in one table collapse onto the same probe (#5481)', () => {
770+
it('no two alias keys in one table collapse onto the same probe', () => {
771771
// The table is indexed by `aliasProbe(key)`, so a colliding pair does not
772772
// produce two entries — it produces one, decided by source order, with the
773773
// earlier key gone before any author can reach it. Judged with the REAL
@@ -809,7 +809,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
809809
expect([...PROSE_ALIAS_TARGETS].filter((x) => !used.has(x)).sort()).toEqual([]);
810810
});
811811

812-
it('no guidance SET member is itself a declared key, and no two entries claim one key (#6619)', () => {
812+
it('no guidance SET member is itself a declared key, and no two entries claim one key', () => {
813813
// The set-keyed guidance form arrived with #6619's fold of the three
814814
// hand-written `$ZodErrorMap`s — maps that, being hand-rolled, no registry
815815
// saw and nothing judged (#6416's blind spot). Folding them in is only
@@ -849,7 +849,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
849849
expect(broken.sort()).toEqual([]);
850850
});
851851

852-
it('every pattern-keyed set carries examples that really match it and are really rejected (#6619)', () => {
852+
it('every pattern-keyed set carries examples that really match it and are really rejected', () => {
853853
// A pattern is an OPEN family, so the dead-entry question cannot be asked
854854
// of its membership the way it is of a list — the visibility pattern
855855
// deliberately also matches the canonical `visibleWhen`, which the shape
@@ -880,7 +880,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
880880
expect(broken.sort()).toEqual([]);
881881
});
882882

883-
it('no alias row is dead on arrival because a guidanceSet in the same table already consumes it (#7889)', () => {
883+
it('no alias row is dead on arrival because a guidanceSet in the same table already consumes it', () => {
884884
// The live-table verdict. If this ever turns red on a real schema, the fix
885885
// is at the authoring site (drop the row, or fold the key into the set's
886886
// prescription) — never here, and never a change to the predicate that
@@ -904,7 +904,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
904904
).toBeGreaterThan(0);
905905
});
906906

907-
it('the guidanceSet-reachability check can actually go red — a planted dead row, no live schema touched (#7889)', () => {
907+
it('the guidanceSet-reachability check can actually go red — a planted dead row, no live schema touched', () => {
908908
// Self-test, per the triage ruling: prove the gate can fail before trusting
909909
// that it passing on the live table means anything. Entirely synthetic —
910910
// `unreachableAliasRows` only reads `options.aliases` / `options.guidanceSets`,
@@ -914,7 +914,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
914914
const planted: StrictObjectDeclaration[] = [{
915915
options: {
916916
surface: 'synthetic reachability probe',
917-
history: 'n/a — planted for #7889 self-test',
917+
history: 'n/a — planted for the reachability self-test',
918918
aliases: { visibleIf: 'visibleWhen' },
919919
guidanceSets: [{
920920
name: 'SYNTHETIC_VIS_PATTERN',
@@ -936,7 +936,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
936936
const reachable: StrictObjectDeclaration[] = [{
937937
options: {
938938
surface: 'synthetic reachability probe (no set)',
939-
history: 'n/a — planted for #7889 self-test',
939+
history: 'n/a — planted for the reachability self-test',
940940
aliases: { visibleIf: 'visibleWhen' },
941941
},
942942
shape: emptyShape,
@@ -949,7 +949,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
949949
const nonMatching: StrictObjectDeclaration[] = [{
950950
options: {
951951
surface: 'synthetic reachability probe (non-matching set)',
952-
history: 'n/a — planted for #7889 self-test',
952+
history: 'n/a — planted for the reachability self-test',
953953
aliases: { disabled: 'readonly' },
954954
guidanceSets: [{
955955
name: 'SYNTHETIC_VIS_PATTERN',
@@ -963,7 +963,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
963963
expect(unreachableAliasRows(nonMatching)).toEqual([]);
964964
});
965965

966-
it('the three #6416 hand-written maps are FOLDED and judged here — the blind spot stays closed (#6619)', () => {
966+
it('the three hand-written error maps are FOLDED and judged here — the blind spot stays closed', () => {
967967
// The reason #6619 existed: `strictVisibilityError`,
968968
// `strictWidgetAnalyticsError` and `strictTenancyError` were hand-rolled
969969
// `$ZodErrorMap`s, so their alias pointers and prescriptions registered in
@@ -1008,7 +1008,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
10081008
.toEqual(['crossTenantAccess', 'organizationField', 'strategy']);
10091009
});
10101010

1011-
it('no live surface still reports the shared view/page FAMILY name (#8202)', () => {
1011+
it('no live surface still reports the shared view/page FAMILY name', () => {
10121012
// `VISIBILITY_STRICT_OPTIONS.surface` is the family's name, and every
10131013
// consumer overrides it with its own shape's (`'this form field'` /
10141014
// `'this form section'` / `'this page component'`) — because since #7887
@@ -1028,7 +1028,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
10281028
).toEqual([]);
10291029
});
10301030

1031-
it('the two maps #6619 MISSED are folded and judged here too (#6805)', () => {
1031+
it('the two maps the first fold MISSED are folded and judged here too', () => {
10321032
// #6619's inventory was two short, and both survivors were the same shape
10331033
// as the three above — `unrecognized_keys` prescription tables attached to
10341034
// a `.strict()` object through `{ error: … }`, seen by no registry. The
@@ -1055,7 +1055,7 @@ describe('alias integrity — every table is a true claim about its schema', ()
10551055
expect(Object.keys(capabilities!.options.guidance ?? {}).sort()).toEqual(['mru', 'trash']);
10561056
});
10571057

1058-
it('NO module outside the shared helpers writes its own `unrecognized_keys` map (#6805)', () => {
1058+
it('NO module outside the shared helpers writes its own `unrecognized_keys` map', () => {
10591059
// The class, not the instances. Both closure pins above name surfaces, so
10601060
// each only holds the line it was written for — #6416 named three, and the
10611061
// inventory that produced the number was two short. A pin over the SHAPE
@@ -1097,11 +1097,11 @@ describe('alias integrity — every table is a true claim about its schema', ()
10971097
offenders.sort(),
10981098
'build the shape with `strictObject(options, shape)` and put the prescriptions in '
10991099
+ '`guidance` / `guidanceSets` — a hand-rolled map registers in no registry, so its '
1100-
+ 'aliases and prescriptions are unmeasured rather than clean (#6416/#6619/#6805)',
1100+
+ 'aliases and prescriptions are unmeasured rather than clean',
11011101
).toEqual([]);
11021102
});
11031103

1104-
it('…and that scan is alive: the pre-fold shape is found, prose and the two out-of-class maps are not (#6805)', () => {
1104+
it('…and that scan is alive: the pre-fold shape is found, prose and the two out-of-class maps are not', () => {
11051105
// Anti-vacuity for the verdict above, which asserts that a search came back
11061106
// EMPTY — the shape that passes just as well when the instrument is dead.
11071107
// Four controls, each closing a different way it could be.

‎packages/spec/src/shared/duration.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export type IsoDurationSeconds = Assert<
4242
Eq<z.input<typeof DurationSeconds>, z.infer<typeof DurationSeconds>>
4343
>;
4444

45-
describe('the closed duration vocabulary — exactly two units (#18122)', () => {
45+
describe('the closed duration vocabulary — exactly two units', () => {
4646
it('declares milliseconds and seconds, and no speculative third unit', async () => {
4747
// ⛔ `DurationMinutes` / `DurationHours` / `DurationDays` are added when a
4848
// real row needs one, in the PR that converts it — the unit set is derived

‎packages/spec/src/shared/editability-boundary.test.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const EDITABILITY_KEYS = ['disabled', 'disabledWhen', 'readonly', 'readOnly', 'r
9999
// ===========================================================================
100100
// 1. The guidance reaches an author — on the real parse error
101101
// ===========================================================================
102-
describe('#7887 — the boundary prescription an author actually sees', () => {
102+
describe('editability lives on fields — the boundary prescription an author actually sees', () => {
103103
it.each(VISIBILITY_ONLY)('%s answers `disabled` with the boundary, not a bare refusal', (_n, schema, base) => {
104104
const m = unknownKeyMessage(schema, { ...base, disabled: true });
105105
expect(m).toContain('Editability is a FIELD-level concern');
@@ -128,7 +128,7 @@ describe('#7887 — the boundary prescription an author actually sees', () => {
128128
for (const key of ['disabled', 'readonly', 'editable']) expect(m).toContain(`\`${key}\``);
129129
});
130130

131-
it.each(VISIBILITY_ONLY)('%s still puts the history sentence last (the #5955 order survives the new set)', (_n, schema, base) => {
131+
it.each(VISIBILITY_ONLY)('%s still puts the history sentence last (the fix-first order survives the new set)', (_n, schema, base) => {
132132
const m = unknownKeyMessage(schema, { ...base, disabled: true });
133133
const history = 'Before ADR-0089 D3a these were dropped silently';
134134
expect(m.indexOf('Editability is a FIELD-level concern')).toBeLessThan(m.indexOf(history));
@@ -138,7 +138,7 @@ describe('#7887 — the boundary prescription an author actually sees', () => {
138138
// ===========================================================================
139139
// 2. It names `readonlyWhen` — and must never name `disabledWhen`
140140
// ===========================================================================
141-
describe('#7887 — the prescription points at a key that exists', () => {
141+
describe('the prescription points at a key that exists', () => {
142142
it.each(VISIBILITY_ONLY)('%s names the field-level `readonly` / `readonlyWhen` pair', (_n, schema, base) => {
143143
const m = unknownKeyMessage(schema, { ...base, disabled: true });
144144
expect(m).toContain('`readonly: true`');
@@ -168,7 +168,7 @@ describe('#7887 — the prescription points at a key that exists', () => {
168168
// ===========================================================================
169169
// 3. The field surface is UNCHANGED — the shared-table trap
170170
// ===========================================================================
171-
describe('#7887 — `FormFieldSchema` sees exactly what it saw before', () => {
171+
describe('`FormFieldSchema` sees exactly what it saw before', () => {
172172
it('`disabled` on a form field still renames onto `readonly`, with no boundary text', () => {
173173
const m = unknownKeyMessage(FormFieldSchema, { ...FORM_FIELD, disabled: true });
174174
expect(m).toContain('Did you mean `disabled` → `readonly`?');
@@ -217,7 +217,7 @@ describe('#7887 — `FormFieldSchema` sees exactly what it saw before', () => {
217217
// ===========================================================================
218218
// 4. Acceptance is byte-identical — a guidance string is not a key
219219
// ===========================================================================
220-
describe('#7887 — no acceptance change', () => {
220+
describe('no acceptance change', () => {
221221
it.each(VISIBILITY_ONLY)('%s still REJECTS every editability spelling', (_n, schema, base) => {
222222
for (const key of EDITABILITY_KEYS) {
223223
expect(
@@ -277,7 +277,7 @@ describe('#7887 — no acceptance change', () => {
277277
// ===========================================================================
278278
// 5. #8202 — every shape names ITSELF, so the two answers cannot be swapped
279279
// ===========================================================================
280-
describe('#8202 — the rejection says WHICH shape refused the key', () => {
280+
describe('the rejection says WHICH shape refused the key', () => {
281281
/** Each shape, a probe body, and the name its rejection must give itself. */
282282
const NAMED: ReadonlyArray<[string, { safeParse: (v: unknown) => { success: boolean; error?: unknown } }, object, string]> = [
283283
['FormFieldSchema', FormFieldSchema, FORM_FIELD, 'this form field'],
@@ -341,7 +341,7 @@ describe('#8202 — the rejection says WHICH shape refused the key', () => {
341341
// ===========================================================================
342342
// 6. #8201 — `SelectOptionSchema` inherits the ruling, with its OWN answer
343343
// ===========================================================================
344-
describe('#8201 — an option is offered or withheld, never shown-but-unselectable', () => {
344+
describe('an option is offered or withheld, never shown-but-unselectable', () => {
345345
const OPTION_TEXT = 'Editability is not a per-OPTION concern';
346346

347347
it('`disabled` on an option reaches the boundary, rendered as the template bullet', () => {

‎packages/spec/src/shared/error-map.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ describe('formatZodError', () => {
187187
// mistake = the same key reported N times, which is why `view.zod.ts`'s
188188
// `submitBehavior` reached for `discriminatedUnion` in the first place. Both
189189
// directions are pinned below.
190-
describe('[#4971] formatZodError expands invalid_union branches', () => {
190+
describe('formatZodError expands invalid_union branches', () => {
191191
// The campaign's shape: a string form OR a closed object form.
192192
//
193193
// [#19581] The closed arm is a REAL PRODUCT DOOR — `NormalizedFilterSchema`,
@@ -402,7 +402,7 @@ describe('safeParsePretty', () => {
402402
// `z.record` key schema there is `z.string()` or an enum — #5389's dormancy
403403
// table), which is why these fixtures are local schemas: the defect is in the
404404
// CONSUMER, and the consumer is reachable from any caller's schema.
405-
describe('[#5389] formatZodError descends invalid_key / invalid_element', () => {
405+
describe('formatZodError descends invalid_key / invalid_element', () => {
406406
const SnakeKey = z
407407
.string()
408408
.regex(/^[a-z][a-z0-9_]*$/, "Invalid identifier. Must be lowercase snake_case (e.g. 'first_name').");

‎packages/spec/src/shared/evaluated-expression.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function issuesOf(value: unknown) {
3636
return result.success ? [] : result.error.issues.map((i) => ({ code: i.code, path: i.path.map(String).join('.'), message: i.message }));
3737
}
3838

39-
describe('EvaluatedExpressionSchema — an evaluated slot requires a non-blank `source` (#15430)', () => {
39+
describe('EvaluatedExpressionSchema — an evaluated slot requires a non-blank `source`', () => {
4040
it('REFUSES an `ast`-only envelope: one issue, at `source`, the published sentence', () => {
4141
expect(issuesOf(AST_ONLY)).toEqual([
4242
{ code: 'invalid_type', path: 'source', message: EVALUATED_EXPRESSION_SOURCE_REQUIRED },

‎packages/spec/src/shared/evaluated-slot-population.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function persistenceSchemaCodeLines(): string[] {
107107
return hits;
108108
}
109109

110-
describe('#15811 population — no declaring position still mounts the persistence schema', () => {
110+
describe('evaluated-slot population — no declaring position still mounts the persistence schema', () => {
111111
const hits = persistenceSchemaCodeLines();
112112

113113
it('LIT CONTROL — the scan does find the name where it legitimately lives', () => {
@@ -242,7 +242,7 @@ const POSITIONS: ReadonlyArray<readonly [string, () => z.ZodType]> = [
242242
['system/settings-manifest.zod.ts:SettingsManifestSchema.visible', () => slot(SettingsManifestSchema, 'visible')],
243243
];
244244

245-
describe('#15811 — every evaluated slot refuses the two shapes no engine can run', () => {
245+
describe('every evaluated slot refuses the two shapes no engine can run', () => {
246246
it('reaches exactly the 34 declaring positions the census enumerated', () => {
247247
// A position that stops being reachable must red here rather than fall out
248248
// of the table: that silent drop is the #17630 failure in another costume.

‎packages/spec/src/shared/expression-dialect-docs.pin.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function dialectRowsInDocTable(): string[] {
6464
return names;
6565
}
6666

67-
describe('[#6085] expression.zod.ts dialect table === ExpressionDialect', () => {
67+
describe('expression.zod.ts dialect table === ExpressionDialect', () => {
6868
const rows = dialectRowsInDocTable();
6969

7070
it('finds the table at all (anti-vacuity)', () => {
@@ -79,7 +79,7 @@ describe('[#6085] expression.zod.ts dialect table === ExpressionDialect', () =>
7979
expect([...rows].sort()).toEqual([...ExpressionDialect.options].sort());
8080
});
8181

82-
it('never re-advertises `js`, retired at #3278', () => {
82+
it('never re-advertises `js`, retired in favour of ScriptBody', () => {
8383
// The specific regression this pin was written for. `js` is not an
8484
// expression dialect at all — procedural JavaScript is the L2 authoring
8585
// surface (`ScriptBody { language: 'js' }`), so a row here would send an

‎packages/spec/src/shared/external-errors.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('External error codes (ADR-0015)', () => {
2929
// REACHABLE by a client.
3030
// ---------------------------------------------------------------------------
3131

32-
describe('[#7739] EXTERNAL_ERROR_HTTP_STATUS', () => {
32+
describe('EXTERNAL_ERROR_HTTP_STATUS — each external error carries an HTTP status', () => {
3333
it('covers every code in the family — no gate can leak as a bare 500', () => {
3434
// The `satisfies Record<ExternalErrorCode, number>` makes a missing entry a
3535
// compile error; this is the runtime twin, so a code added to the map but
@@ -112,7 +112,7 @@ describe('renderDiffMessage', () => {
112112
* schema fact) and renders like every other kind: the raw kind name plus the
113113
* carried error text, so an unknown-to-a-consumer entry is still loud.
114114
*/
115-
it('renders the `unreachable` kind with the carried error text (#11166)', () => {
115+
it('renders the `unreachable` kind with the carried error text', () => {
116116
const diffs: SchemaDiffEntry[] = [
117117
{
118118
kind: 'unreachable',

‎packages/spec/src/shared/lazy-schema.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe('lazySchema × z.toJSONSchema identity', () => {
127127
* real instance, so before the facade aliased it every lazy reference lost its
128128
* `description` while `OS_EAGER_SCHEMAS=1` (no Proxy at all) kept it.
129129
*/
130-
describe('lazySchema × z.toJSONSchema metadata (#19101)', () => {
130+
describe('lazySchema × z.toJSONSchema — a lazy reference keeps its metadata', () => {
131131
it('a lazy reference converts exactly like the eager instance — nested and as the root', () => {
132132
const factory = () => z.record(z.string(), z.unknown()).describe('lazy-described record');
133133
const lazy = lazySchema(factory);
@@ -168,7 +168,7 @@ describe('lazySchema × z.toJSONSchema metadata (#19101)', () => {
168168
* components gain 2 descriptions, the
169169
* `os generate` IDE schema 445; description is the only key that moved.
170170
*/
171-
describe('lazy == eager on the real contract (#19101)', () => {
171+
describe('lazy == eager on the real contract', () => {
172172
const PKG_ROOT = fileURLToPath(new URL('../..', import.meta.url));
173173
const CONTRACT = new URL('../api/contract.zod.ts', import.meta.url).href;
174174
const METADATA_TYPES = new URL('../kernel/metadata-type-schemas.ts', import.meta.url).href;

‎packages/spec/src/shared/mapping.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('FieldMappingSchema', () => {
7272
// so without the tombstone an authored `transform` is either accepted or
7373
// silently stripped — never named).
7474

75-
describe('[#5552] FieldMapping.transform is retired, and says so', () => {
75+
describe('FieldMapping.transform is retired, and says so', () => {
7676
const RETIRED = {
7777
source: 'order_value',
7878
target: 'order_total',

0 commit comments

Comments
 (0)