Repository navigation
feat(spec)!: retire the never-consumed CurrencyValueSchema / CurrencyValue export (ADR-0104 D1) - #27233
Conversation
…Value export (ADR-0104 D1)
A currency field's value is a bare number everywhere; the {value, currency}
shape was deprecated, unread, and contradicted the enforced contract. Route 3
(no carrier key): RETIRED_DEFS_BY_MAJOR[18] data/CurrencyValue plus the D3
semantic entry currency-value-schema-retired, a tree-scoped retirement pin,
regenerated baselines and docs, the ADR-0104 dated note and the strictness
ledger re-grade.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 148 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0834f37e2bd1d12a9b527ef48aacd8dc66733d56 && git checkout 0834f37e2bd1d12a9b527ef48aacd8dc66733d56
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7858c1d16bb27ac9a5a6d3ae9db9d6dd7331d43d a4f0d9098b1a39ae9b84e1f27a89678d2c47f0a2 && git checkout -B drift-repro 7858c1d16bb27ac9a5a6d3ae9db9d6dd7331d43d && git merge --no-ff a4f0d9098b1a39ae9b84e1f27a89678d2c47f0a2
node scripts/docs-audit/affected-docs.mjs --json 7858c1d16bb27ac9a5a6d3ae9db9d6dd7331d43d
|
…ved, not deprecated Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
…on broke Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
Contract reviewServed-tier: Inputs: card #27182 (body, claim 6467480691, dev report 6468102269), PR #27233 (body, 25-file list, net diff against Gate verdicts on this head, as the check-runs conclude them. Green: ① Derived judgmentsAccept-set and public-surface changes the diff implies, each judged against the tree:
Nothing in the diff widens anything; no accept-set outside the one export is touched; ② Semver level
③ Boundary flags
④ Design judgmentThe narrowing itself, read against the published spec on
Must-fix: none. Should-fix (non-blocking):
Implemented-by: VERDICT: PASS |
…_GUIDANCE tombstone Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
席位核对 · ACCEPT ·
|
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Triage seat, under the gap rule (#27062) condition (b): no record and no claim on this head after one round. The review runs at Generated by Claude Code |
Contract reviewServed-tier: Inputs: card #27182 (body, claim 6467480691, dev report 6468102269), PR #27233 (body, 26-file list, net diff against Gate verdicts on this head, as the check-runs conclude them. 50 check-runs: 41 Moved head: the delta
|
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
…-g1qmlm # Conflicts: # packages/spec/src/type-alias-convention.pin.test.ts
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziAkt9vZhLphG64TmD
席位核对 · ACCEPT ·
|
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Triage seat, under gap rule (b) (#27062): this head is over 60 minutes old with no record and no claim; a delta re-review from triage's FAIL on Generated by Claude Code |
Contract reviewServed-tier: Inputs: card #27182 (body, claim 6467480691, dev report 6468102269; ruling 6465431966 read by Gate verdicts on this head, as the check-runs conclude them. 50 check-runs, all Moved head: the delta
|
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbfVSc1hXtxLUPHZ2f
The authorable-surface baseline is taken from main (#27233 retired `CurrencyValue`) and rebuilt, keeping `currencyConfig.currencyField`; the field reference page is regenerated from the merged tree. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbfVSc1hXtxLUPHZ2f
Requested by Yibo Wang · project thread
Fixes #27182
Ruling-ref: 6465431966
Claim: 6467480691
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — REASON: no authoring surface.
git grep CurrencyValue -- skillson base finds only the generatedskills/*/references/_index.mdexport lists (regenerated here bygen:skill-refs, which now nameUniqueScopeSchemain its place); no rule, example or table teaches the shape.维护者速读
field.zod.ts仍导出的CurrencyValueSchema与CurrencyValue类型;登记RETIRED_DEFS_BY_MAJOR[18]的data/CurrencyValue与 D3 语义条目currency-value-schema-retired(FROM{value, currency}→ 裸数字,币种写在currencyConfig.defaultCurrency)。packages/spec/src/migrations/entries/semantic/18.currency-value-schema-retired.ts、packages/spec/src/data/currency-value-retirement.test.ts。git grep -n CurrencyValueSchema -- packages ':!**/CHANGELOG.md'→ 只剩登记条目、退役 pin 和散文;pnpm --filter @objectstack/spec exec vitest run --project repo src/data/currency-value-retirement.test.ts全绿。docs/adr/0104、生成的skills/*/references/_index.md),按治理需 os-zhuang 或 hotlong 的批准,之后由席位落地。What changes
@objectstack/spec, minor, BREAKING for TypeScript imports only).CurrencyValueSchemaandexport type CurrencyValueare deleted frompackages/spec/src/data/field.zod.ts. Route 3 of thespec-property-retirementkit (theApiKeySchemaand document-family precedent): no carrier key and no metadata type ever held the shape, so there is noretiredKey()tombstone, noUNKNOWN_KEY_GUIDANCEentry and no D2 conversion.retired-defs/18.data__CurrencyValue.tsand the D3 semantic entrysemantic/18.currency-value-schema-retired.ts, which carries the card's note: a currency value is a bare number ({ value: 1000.5, currency: 'USD' }→1000.5), the code iscurrencyConfig: { currencyMode: 'fixed', defaultCurrency: 'USD' }, andvalueSchemaFor(field, 'stored')types a value. NoSTEP18_RATIONALEfragment (theidentity-api-key-schema-retiredprecedent has none).json-schema.manifest/data.jsonlosesdata/CurrencyValueandauthorable-surface/data.jsonits two rows (both deliberate, as the build's manifest and gate (a) deletion checks require);api-surface,export-origins,declaration-map, the reference docs, the strictness-ledger counts (data/165 → 164 sites,field.zod.ts14 → 13) andskills/*/references/_index.mdregenerated bycheck:generated --fix.authorable-surface.base.json(the released anchor) is untouched.CurrencyValuenever had a liveness-ledger row (never walked). The strictness-ledgerfield.zod.tsrow is re-graded with a dated note:CurrencyValueSchemadeleted,LocationCoordinatesSchemathe one site left under the existing verdict; the spec: remove the deprecatedLocationCoordinatesSchema/CurrencyValueSchemadead exports at the next spec major (ADR-0104) #8562 follow-up line now says one.field.test.tsdrops itsCurrencyValueSchemablock;type-alias-convention.pin.test.tsdropsIso_data_field__CurrencyValueSchemaand its census goes 798 → 797 (title, header,toHaveLengthwith the history line). Thefield-value.zod.tsdocblock now says the object shape is deleted.packages/spec/src/data/currency-value-retirement.test.ts(added tovitest.repo-tests.json): the def and D3 entry are registered; the export is gone from/dataand the root entry,CurrencyConfigSchemasurvives (lit control);valueSchemaFor({ type: 'currency' })accepts1000.5and refuses{ value, currency }; tree-scoped absence over the declared radius with an anti-vacuity matcher test.Why
ADR-0104 D1 decided "
currencyis a scalar number —CurrencyValueSchemais deleted", but the export shipped through 18.2.0 as@deprecated. The multi-currency epic #8345 (shape C′, ruling 6465431966 on #27119) needs it gone first, so that no author or AI reads{value, currency}as the way a record keeps its currency.Verification
Base
origin/mainfd73f2b39; headbf9ae4435.Measure first (base)
git grep -n CurrencyValueoutside CHANGELOGs:field.zod.ts(declaration and alias),field.test.ts, theIso_pin row,api-surface/export-origins/declaration-map/json-schema.manifest/authorable-surface/authorable-surface.base.json, generated reference docs, and prose (field-value.zod.tsdocblock,field-value.test.tstest name,content/docs/protocol/objectql/types.mdx, ADR-0104, the strictness ledger). Nothing underui/orskills/**rules. Control:CurrencyConfigSchemahas live readers (validator, formula, ui i18n).Gates
pnpm --filter @objectstack/spec build→ exit 0 (after the deliberate manifest and authorable-surface deletions; the build refused each first, as designed).pnpm --filter @objectstack/spec check:generated→ 14 of 14 fresh after--fix.pnpm --filter @objectstack/spec test→ Test Files 740 passed | 1 skipped (741), Tests 22240 passed | 1 skipped | 1 todo.pnpm --filter @objectstack/spec test:repo→ Test Files 82 passed (82), Tests 1331 passed.pnpm --filter @objectstack/spec typecheck→ exit 0.check:liveness,check:empty-state,check:exported-any,check:dual-source-exports→ exit 0.check:skill-examples→ exit 3 (prerequisite: needs a full-repo build; not measured).node scripts/check-adr-0087-registration.mjs --base origin/main→ ✓registered currency-value-schema-retired (new here).check-changeset-no-major(pull_request event) → ✓ narrowing shipsminor;check-spec-parsed-alias→ 797 pinned, OK;check-cross-package-test-inputs,check-doc-authoring,check-role-word,check-skills-token-ratchet→ OK.Serial note
Seat 3's #27218 (#27157) narrows
CurrencyConfigSchemaabout 30 lines above this edit infield.zod.tsand touchesmigrations/registry.ts.template. Whichever lands second merges main (no rebase) and re-runs the generated files.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code