Repository navigation
test(spec): shared test titles state each cited decision in words instead of a tracker number (stage 12) - #21750
Merged
Conversation
…tead of a tracker number (stage 12) Class (e), the third area: the 85 string literals under packages/spec/src/shared/ that carried a tracker id (95 ids) now carry none. Where the number stood in for a decision, the literal states it (for example "the two maps the first fold MISSED", "the fix-first order survives the new set", "the prescription must not point at the retired ETL layer"); where the title already says the decision, the number is dropped. Three placeholder ids (#0000) in synthetic fixtures cite no record and are dropped. Text only: 73 test titles and 12 declared non-title strings, one line per literal. No comment, assertion, identifier or non-test file moves. Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
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.
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 in5902360492on #20513. This stage takes the wholeshared/directory. Its 85 test-title and test-string literals carried 95 tracker ids: 92 cite 49 records, and 3 are a#0000placeholder 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(md59d08602ab972b4b8643c90d64d40fa41) and stage 9'scensus.cjs(md56e42a45a926d375013c32d62f16a296e), 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 adescribe/it/testcall,.each/.skip/.onlychains 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.data/ui/api/system/src/)shared/(this PR)contracts/conversions/security/ai/identity/integration/migrations/marketplace/,meta-spelling/,studio/shared/duration.test.ts:45reads one message with spec: closed duration typesDurationMs/DurationSecondsbesideEpochMs— step ① of ruling A on #18115 (declared shape for the unit-in-key census) #18122. Lit, anexpectmessage:shared/retry-policy.test.ts:113reads one message. Dark: the comment atshared/alias-integrity.test.ts:519("把 44 个strictUnknownKeyError直调点批量迁到strictObject,棘轮降到 0(路线 1 消不掉手抄数组与 shape 的漂移) #5593 migrated the last of them") reads 0; the file's messages sit at:516,:770and onwards. Planted in a scratch copy: an id added to a title reads 1 / 1, and an id in an added comment reads 0.#plus digits) reads 87 / 97 undershared/at the base. The two extra hits are(#1)placeholders in two fixtures ofretired-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.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) andsystem/(165). The files directly insrc/(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 insrc/(one, 120),contracts/withconversions/(one, 108), andsecurity/,ai/,identity/,integration/,migrations/,marketplace/,meta-spelling/andstudio/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
#0000placeholders. 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.historystrings in the reachability self-test read "n/a — planted for the reachability self-test". Nothing reads them:unreachableAliasRowsreads onlyaliasesandguidanceSets. Dropped from the 2 titles that state the check.expectmessage that already explains the blind spot.js, retired in favour of ScriptBody". #3278 retired thejsexpression dialect as redundant with the L2ScriptBody.lazySchema, so descriptions no longer depend on which generator ran. Dropped once.strictObject. Dropped from "accept set is unchanged".expectmessage reads "the prescription must not point at the retired ETL layer": #6414 retired L2ETLPipeline.historyreads "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.visibleWhenshapes the first sweep never enumerated". #7832 was the reverse direction of the action shapes' alias table. Dropped twice.enabled: falsefirst". #7816 noted that the boolean case must point atenabled, or the hint just moves the confusion.026101660: the dialect table dropsjs, addstemplateand states it IS the enum), #10485 (35ad101: thethemescarrier key andThemeSchemaretired,/meta/themerefused), #11166 (735f5c709:SchemaDiffEntrygains a distinctunreachablekind). Each title already carries what landed.#0000retired-key.test.ts:26,:28; the planted source inretired-key-migrate-sentence.test.ts:342), cited no record. Dropped. The tworetired-key.test.tsconstants 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
-tand--testNamePatternfinds onlypackages/qa/dogfood/README.md:142(-t "owner-scoped"), which is unrelated.shared/has no__snapshots__, and no.snapfile is tracked underpackages/spec.scripts/check-future-spec-major.mjskeeps a witnessed ledger entry forretired-key.test.ts(witness: /was removed in @objectstack\/spec 99/,covers: 4). The rewritten constants still carry that sentence.check:future-spec-majorwas derived for this diff and exits 0, "every witness still matching".packages/spec/vitest.repo-tests.jsonlistsretired-key-migrate-sentence.test.ts, so that file runs in therepoproject. It was run there at the base and at the head.packages/cli/test/format-zod-union.test.ts:301([#5389] formatZodErrors …) andpackages/metadata-protocol/src/protocol.unrecognised-meta-type.test.ts:171([#10485] \theme` …`).packages/spec/src/ai/knowledge-source.test.ts:97, anit.eachrow name with "retired at formula: retire thejsexpression dialect — redundant with L2 ScriptBody;hasDialectalso mis-reports the stub as real #3278".scripts/check-future-spec-major.mjs:767-768that copies the tworetired-key.test.tsconstants with(#0000). It is its own text and does not read the file.strict-object.ts:71docblock example andsuggestions.zod.ts:319.scripts/check-doc-authoring.mjs:2507.Text-only proof
Stage 10's scratch tool (
textonly10.cjs, md5d5e4801dbb4329ab1984da91e92fc47c) compares base and head file by file on three legs:#plus digits after. The declared lines are:historystrings atalias-integrity.test.ts:917,:939,:952andstrict-object.test.ts:16,:196;expectmessages atalias-integrity.test.ts:1100andretry-policy.test.ts:113;retired-key.test.ts:26,:28and the planted source atretired-key-migrate-sentence.test.ts:342;union-branch-policy.parity.test.ts:164,:169, which reachittitles through a template.expectmessage 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
localproject and one inrepo. 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-changesetMeasured, not assumed:
npm pack --dry-runof@objectstack/speclists 2068 files underfiles[]. 0 of the 21 touched files are in it, and 0*.test.tsat all. The controlsrc/shared/expression.zod.tsis in it.dist/, four new phrases read in 0 files. Of three old ones, two read in 0, and the third reads only inshared/index.d.ts/.d.mts, from thestrict-object.tsdocblock comment, not from a test. The controlUnrecognized key(s) onreads in 42.So this PR publishes nothing, and no changeset is added.
Verification (at
fd8fd92d13)pnpm turbo run buildover all packages: 71 / 71.@objectstack/spec:vitest run --project local: 613 files, 18215 passed, 1 todo.typecheckexit 0, includingcheck:test-typecheck. Its program holds all 21 touched files, counted withtsc --listFilesOnly.dispatch-gates --commandsderived 80 families, and all 80 exit 0. That is stage 11's 79 pluscheck:future-spec-major.--ranreconciles: 80 derived, 80 run, 0 NOT-MEASURED, 0 UNRUN.check:meta-url-spelling,check:spec-changes,check:authz-resolver,check:error-code-casingandcheck:filter-alias-parity.--no-inline-configover the 21 files, 0 errors and 0 warnings. The population comes from ESLint's own config: 21 configured, 0 ignored. NoparserOptions.projectorprojectService, so no untouched file's verdict can move.check-governed-merges --test: NOT governed, 170 changed lines.Acceptance notes
shared/sources. One of them ships: thestrict-object.ts:71docblock example quotes the old widgethistorywith#4001, and it is emitted intodist/shared/index.d.ts. Comments are not this card's share and are untouched here.cli'sformat-zod-union.test.ts:301,metadata-protocol'sprotocol.unrecognised-meta-type.test.ts:171). Each is its own lane's test-string stage.spec'sai/knowledge-source.test.ts:97is this card's later small-directories stage.scripts/check-future-spec-major.mjs:767-768keeps 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 fromretired-key.test.ts.origin/mainmoved seven commits past the base before this PR opened (fix(metadata-protocol)!: the ADR-0010 _lock gate reads the row the read serves for the request's organization (#21716) #21737, docs(qa): re-point 17 platform-checklist clauses the 17.7 pre-release runs proved stale or mis-asserted #21741, fix(cli): os migrate plan/apply compose the requires-supplied provider a connector hard-depends on #21739, fix(driver-sql): connect reads PRAGMA auto_vacuum first and sets it only when the file is not already INCREMENTAL #21744, fix(runtime): a refused flow resume answers its engine's code — INVALID_SCREEN_INPUT, INVALID_SIGNAL, RUN_NOT_FOUND #21740, fix(service-automation): a flow saved through the metadata API is armed on the running engine at once #21746, docs(qa): record A1 of crud-permission-matrix as a known v18 gap #21749). One touchespackages/spec(api/error-code-ledger.zod.ts); none touches a file in this diff, so nothing was merged.Generated by Claude Code