Repository navigation
fix(objectql)!: an object_extension amount naming a sibling currencyField the served object does not hold is refused at the save - #35538
Conversation
…r at the save door Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
…er against its object as served Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
…g and its changeset Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 6 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 — 176 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 4c17477143143457fc61a885d50e69422b4dd3e3 && git checkout 4c17477143143457fc61a885d50e69422b4dd3e3
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin bf69cb41cc1f6351b0b0365ad7842a561611190f eb4c293266785438310dfe89120f442a9a6d2919 && git checkout -B drift-repro bf69cb41cc1f6351b0b0365ad7842a561611190f && git merge --no-ff eb4c293266785438310dfe89120f442a9a6d2919
node scripts/docs-audit/affected-docs.mjs --json bf69cb41cc1f6351b0b0365ad7842a561611190f
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Final green head for L1 + L2:
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Contract reviewServed-tier: Inputs read: card #33911 (body, triage first touch, claim, os-dev-report), PR #35538 (body, the four-file list, the net diff against merge-base 895dd43), and the check-runs on the head. The changeset is prose and is not reviewed; it is quoted once below only because it carries a sentence the reviewed files have to agree with. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing itself, against the published spec on
Findings:
Implemented-by: VERDICT: PASS |
…e-save refusal; say which doors compare Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt L2 delta brief · 2026-11-19T16:32Z · handed to the isolated Contract review brief — PR #35538 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Final green head for the L1 delta + L2 delta:
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Contract reviewServed-tier: Delta round on record 7013686819 (head ① Derived judgments
② Semver levelUnchanged by the delta: ③ Boundary flags
④ Design judgmentS1: closed The entry, sentence by sentence against the code at this head:
S2: closed
No must-fix, no should-fix.
Security: nothing security-shaped found. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob L2 adoption · 2026-11-19T16:36Z · The seat checked the area's isolated
Verdict: PASS. S1 and S2 are closed. N1 and N2 are accepted deviations. N3 (stale PR body) is fixed on the body without moving the head. N4 rides the escalation below. The escalation in ③, the destructive-change door possibly answering 409 to an unchanged owner re-save while an extension adds a column, predates this diff. It is filed as its own measure-first card. Landing waits on the L1 delta ACCEPT for this head. |
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — ACCEPT (L1-a, delta) · repo:objectstack#1 · head
|
Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Landing · 2026-11-19T17:18Z · area b1-B. The head
State: ready and auto-merge now. #33911 closes on merge. Follow-ups: #35562 (two-segment pointer led by a non-master_detail field), #35566 (per-item publish of an extension draft), #35589 (destructive-change 409 on an unchanged owner re-save). |
Fixes #33911
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none —
skills/objectstack-data/rules/field-types.mdalready says a record-mode amount's code lives in thetextfieldcurrencyFieldnames, declaringvalueDomain: 'iso_4217_currency', with no carve-out for an extension; the refusal now makes that true for an extension's amount, and its text carries the prescription维护者速读
What changes
packages/objectql/src/record-currency-aggregate-door.ts: the follow door (recordCurrencyFollowRefusal) gains pair (b): a record-mode amount whosecurrencyFieldis ONE segment is judged against the object AS SERVED (owner, every enabled extension, and the incoming body in its slot). A pointer naming no other field, or a field that is not a code field (isRecordCurrencyCodeField), is refusedRecordCurrencyFollowRefusedError(INVALID_METADATA/ 422), naming the amount, the pointer and the served object's code-field candidates. An amount an extension adds is also named with its package when an owner re-registration is what breaks it (R6's wording). The R7beforecomparison applies unchanged, and only to an install, upgrade or reload run: such a run is not refused over a pair it leaves as it found it. A single save and the batch writers judge with the slot left empty (judgeRegistrationDoorspassesbefore: null). So re-publishing an unchanged extension whose pointer a cold boot admitted is refused, and so is a published save of the owner while an extension's amount dangles; the fix is to correct or uninstall the extension, then save the owner again.protocol-save.ts'sobject_extensionbranch already asksobjectRegistrationRefusal(..., { againstRegistry: true }), which reaches this door with the served fold.packages/spec/src/migrations/entries/semantic/18.record-currency-sibling-extension-judged-as-served.ts: the ADR-0087 semantic entry the narrowing owes (check:adr-0087-registrationrefusesno-migration-prescriptionon aMetadata-protocol: narrowedchangeset). Itsreasonstates the run-only R7 comparison and the single-save behaviour above, and itsreplacementgives the unchanged-owner prescription, followingrecord-currency-follow-extension-judged-as-served. This file is OUTSIDE the claim's declared file surface; see Acceptance notes..changeset/33911-extension-sibling-currency-field.md:@objectstack/objectqlminor, the two declaration lines,Skills-docs:, and theregistereddisposition.packages/spec/src/data/object.zod.tsis untouched: the schema carve-out for extensions stays.Read first (by risk):
record-currency-aggregate-door.ts, the new(b)loop insidefollowRefusalsOf: it runs for every layer the follow door judges, not only extensions, so an owner layer is judged too (an own body already passed the spec's sibling refusal, so only a field another layer removes can trip it).recordCurrencySiblingCodeErrorin the same file: the refusal sentence.protocol-batch-object-registration.test.ts, and the new sibling-pair describe inmanifest-service-artifact-refusal-restores.test.ts.Two-minute check:
pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/protocol-batch-object-registration.test.ts src/manifest-service-artifact-refusal-restores.test.ts— expectTest Files 2 passed (2),Tests 84 passed (84).Tests
New top-level describe in
packages/objectql/src/protocol-batch-object-registration.test.ts(real kernel, realSchemaRegistry, real protocolsaveMetaItemon themeta-envelopeface inpublishmode — the facePUT /api/v1/meta/object_extension/NAMEuses):status: 422,code: 'INVALID_METADATA', names'zz_missing'andcandidates: 'currency_code', and stores no row and registers no field;textfield without the value domain;currency_codesaves and is served;saveMetaItemanswers 422INVALID_METADATA(RecordCurrencyFollowRefusedError) and stores nothing. The owner's unchanged body is refused at the registry seam the save asks (objectRegistrationRefusal, own layer,againstRegistry: true). Through the protocol save, the destructive-change door answers 409 first, because it reads the extension's column as one the owner's body would drop. That is filed separately as a measure-first card.New top-level describe in
packages/objectql/src/manifest-service-artifact-refusal-restores.test.ts(manifest.registerruns), next to pair (a)'s run-level cases:'zz_missing'answers 422 with the candidates;Premise re-measured first, on unmodified
origin/main895dd43 (pins committed alone as 12f52fa): the three refused cases and the owner case failed (expected undefined to match object { status: 422, ... }: the save resolved, i.e. 200), the two controls passed.Ablation (once, committed head c4d3d82, through
scripts/ablation-replace.mjs; the suite imports the door fromsrc/by relative path, so no dist rebuild is in the path): the sibling judge's message forced toundefined(anchor 1 -> 0, blob 564929038d45 -> f520e509f87f) turned exactly the four refusal cases red (Tests 4 failed | 24 passed (28)); restored to blob == HEAD withgit diff HEADempty. Round 2: the R7 comparison ablated (if (!already.has(pair)) return refusal;→void already; return refusal;, blob 564929038d45 → 3cd8063dcc73) turned only the R7 pin red (Tests 1 failed | 3 passed | 51 skipped); restored to blob == HEAD.Package runs
pnpm --filter @objectstack/objectql typecheck(tsc --noEmit && pnpm check:test-typecheck) thenvitest run --maxWorkers=2: lock VERDICT command-exit 0,Test Files 616 passed (616),Tests 13911 passed (13911)on61d6e23b.pnpm --filter @objectstack/spec buildthenvitest run --maxWorkers=2: lock VERDICT command-exit 0,Test Files 947 passed (947),Tests 28948 passed | 1 todo (28949).Acceptance notes
protocol-save.tscaller, tests and one changeset. AMetadata-protocol: narrowedchangeset cannot carryno-migration-prescription(check:adr-0087-registration), so the narrowing owes aregisteredsemantic entry, which lives inpackages/spec/src/migrations/entries/semantic/. That one new file is the only path outside the surface; it adds no schema key or export, and the changeset bumps@objectstack/objectqlalone, as.changeset/34864-seed-unknown-object-save-door.mddoes for its entry.master_detailof the served object is still not judged by this door (path.master === undefinedstays skipped, as on main). Filed as An object_extension amount whose two-segment currencyField starts with a non-master_detail field is not judged at the save, though an object body refuses the same pointer at parse #35562. Per-item publish of anobject_extensiondraft is filed as Publishing an object_extension draft per item may skip the record-currency follow door that a published save asks #35566.manifest-service-artifact-refusal-restores.test.ts, a test of the door inside the claim's "their tests". L2 records: 7013686819 (b64d1bdf, S1/S2 open) and the delta 7015428256 (61d6e23b, PASS, S1/S2 closed).Verification
Final head
61d6e23b(one commit overb64d1bdf; the door file is byte-identical between them), base895dd437. The derived gate list below was run onb64d1bdf; round 2 re-derived the same 91 commands on61d6e23band re-ran the ADR-0087, upgrade-guide, spec-changes, changeset and prose gates (all exit 0).overlap-check: merges cleanly.61d6e23b(the claim carries(narrowing)), and earlier onb64d1bdfwith the same counts:--filter '@objectstack/dogfood^...' buildthenpnpm --filter @objectstack/dogfood testunder the verify lock: VERDICT command-exit 0,Test Files 482 passed | 3 skipped (485),Tests 4092 passed | 68 skipped (4160).dispatch-gates.mjs --commands, 91): first pass 87 exit 0;check:dual-build-cjs-loadsandcheck:lean-entry-closureexit 3 (PREREQUISITE NOT MET: unbuilt dist) and the climigrate-meta-engine-guidancetest exit 1 (MODULE_NOT_FOUND: unbuilt@objectstack/mcp), each re-run after the dogfood closure build: exit 0, exit 0,Tests 3 passed (3).--ranreconciliation of the first pass: 91 accounted, 88 run, 3 NOT-MEASURED (the exit 3 rows).node scripts/check-plugin-teardown-shape.mjs --self-test(exit 3, its pinned positive control is unreachable in this shallow clone; checker-health only, CI runs it).check:adr-0087-registration:1 declared-breaking changeset(s), each carrying an ADR-0087 disposition ... registered record-currency-sibling-extension-judged-as-served (new here).check:upgrade-guideandcheck:spec-changesgenerate green.check:nul-bytesOK.test:reponot run locally (no diff in that project; CITest Coreruns it). Every other CI family: read from this PR's check-runs.Gate list
The 91 derived commands are the stdout of
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackonc4d3d829with the changeset and the entry staged (the same four filesb64d1bdfcommits); the run used that list verbatim.Generated by Claude Code