Repository navigation
fix(spec): retired-key refusals prescribe the field-history model, not trackHistory - #38064
Conversation
…t trackHistory The enable.trash, versioning, audit and auditTrail refusals sent authors to per-field trackHistory for field history. Values show by default; the object's off switch is enable.fieldHistory: false and a field's is its own fieldHistory: false. The two object tombstones share one sentence, and each new sentence is pinned with a no-trackHistory guard and a cross-check against resolveFieldHistory. Claude-Session: https://claude.ai/code/session_01L9qibybKQ9ZAg8zN9fVBEN Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 22 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 5 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 177 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 f58148ca242236b42cbf4eca2ab6db89fa0006a2 && git checkout f58148ca242236b42cbf4eca2ab6db89fa0006a2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 447757d051446c3826158153f48b52b5a24d1e55 d2313e1dc9960c077454e895ef2ff1c8762da869 && git checkout -B drift-repro 447757d051446c3826158153f48b52b5a24d1e55 && git merge --no-ff d2313e1dc9960c077454e895ef2ff1c8762da869
node scripts/docs-audit/affected-docs.mjs --json 447757d051446c3826158153f48b52b5a24d1e55
|
|
repo:objectstack#3 · os-tesla · session_01L9qibybKQ9ZAg8zN9fVBEN Final head: CI on that head, read from the check-runs endpoint at 2026-11-28 01:10Z: 69 check runs, 58 success, 11 skipped, 0 failed, 0 pending. All eleven required contexts are success ( The Docs Drift Check comment lists |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 396a54f · 2026-11-28T01:12Z L1-a (the seat's L1 thread) runs the isolated |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Inputs read: card #36776 with its three comments (triage 7114582275, claim 7230446042, os-dev report 7231083102), the PR body and its three comments, the net diff against ① Derived judgments
② Semver level
Changeset prose, sentence by sentence against the tree: the account of field ③ Boundary flags
④ Design judgmentRead against True as written:
Findings: S1 (should-fix) — S2 (should-fix) — card done-when 2 is not met, while the PR says Nits (no effect on the contract, accepted as deviations or a follow-up):
Pins: each new refusal sentence is pinned and goes red on the old text, by reading. No must-fix. S1 and S2 are open on this head. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 The filled brief the record above was rendered from (L1-a, isolated Contract review brief — PR #38064 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1 REWORK at What holds.
Owed before ACCEPT.
Nits (not blocking).
Follow-ups for the seat (not this PR). These in-repo texts still prescribe
The fix head owes a same-reviewer delta. |
…eedTracked with fieldHistory The shared enable.trash / versioning prescription said field history needs no key; a media or structured-JSON field shows values only with fieldHistory: true, so the sentence now says so and the cross-check pins the opt-in. The trackChanges and feedTracked field spellings renamed onto trackHistory, whose false turns nothing off; they now take the tracked answer (both stay refused). Claude-Session: https://claude.ai/code/session_01L9qibybKQ9ZAg8zN9fVBEN Co-authored-by: Claude <noreply@anthropic.com>
…6 changeset Claude-Session: https://claude.ai/code/session_01L9qibybKQ9ZAg8zN9fVBEN Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibybKQ9ZAg8zN9fVBEN New head: CI on that head, read from the check-runs endpoint at 2026-11-28 02:49Z: 73 check runs, 60 success, 13 skipped, 0 failed, 0 pending. Every required context is success ( The red |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 9978932 · 2026-11-28T02:51Z |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Delta record. It covers the two fix commits ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS1: closed
New in the fix, a nit only:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a delta: ACCEPT at
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head d2313e1 · 2026-11-28T03:33Z |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Merge-main record. This head merges main ① Derived judgments
② Semver levelUnchanged and still right: ③ Boundary flags
④ Design judgmentS1: closed Nothing main brought in changes what the six refusal texts say or when they are shown. The accepted nits N1 and N3 stand as recorded. No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a: ACCEPT at
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-28T03:37Z · zone
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Requested by Tesla · project thread
Fixes #36776
repo:objectstack#3 · os-tesla · session_01L9qibybKQ9ZAg8zN9fVBEN
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/spec/src/data/object.zod.ts:FIELD_HISTORY_PRESCRIPTIONconstant, shared by theenable.trashtombstone (CAPABILITIES_RETIRED_KEY_GUIDANCE.trash) and the top-levelversioningtombstone, so the two cannot drift: "Field history is on by default: a changed field's old → new values show on the record activity timeline, except a media or structured-JSON field, which opts in withfieldHistory: true.enable.fieldHistory: falseturns them off for the object, and a field opts out with its ownfieldHistory: false." Each tombstone keeps its retention half (lifecycle). The constant's docblock namesresolveFieldHistoryandFIELD_HISTORY_DEFAULT_OFF_TYPESas the model it states and says why it never namestrackHistory.activityMilestonesTSDoc no longer callstrackHistory"field-level"; it names the field-change rows and their two off switches.packages/spec/src/data/authoring-key-lint.ts:FIELD_KEY_GUIDANCE.auditand.auditTrailnow say to delete the key, that a changed field's values already show by default, and thatfieldHistory: falseis the field's off switch (fieldHistory: trueopts a media or structured-JSON field in). They no longer send the author totrackHistory.packages/spec/src/data/field-key-aliases.tsandpackages/spec/src/data/field.zod.ts: thetrackChangesandfeedTrackedfield spellings no longer rename ontotrackHistory(whosefalseturns nothing off). The two alias rows are gone, and both keys take the same prose answer as the existingtrackedrow, now built by onefieldHistorySpellingAnswer(key)helper (tracked's text is unchanged). All three keys stay refused..describe()changes.patchchangeset for@objectstack/spec.Tests
packages/spec/src/data/object.test.ts, newdescribe"retired history-promising keys prescribe the field-history model that runs":enable.trashand forversioning: the message carries the default sentence, the default-off exception with itsfieldHistory: trueopt-in, both off switches and the retention half; and it does not containtrackHistory;resolveFieldHistoryagrees with the sentence: a text field on by default,enable.fieldHistory: falseoff, a field'sfieldHistory: falseoff,trackHistory: falsenot an off switch, and ajsonand animagefield off by default and on withfieldHistory: true.versioningneedle moves from'trackHistory'to'fieldHistory'.packages/spec/src/data/authoring-key-lint.test.ts, newdescribeforaudit/auditTrailthroughFieldSchema.safeParse: the refusal carries the three sentences and notrackHistory.packages/spec/src/data/field.test.ts, in the existingtrackeddescribe:trackChangesandfeedTrackedare refused with thefieldHistoryanswer and notrackHistory, andfieldSchemaAliases()has no row for either.Readings at fa487d2 (base origin/main 27ee984); head 9978932 changes only the changeset prose
ObjectCapabilities.safeParse({ trash: false })said "For history use per-fieldtrackHistory(audit trail)…";ObjectSchema.create({ versioning })said "Use per-fieldField.trackHistoryfor field-level history…";FIELD_KEY_GUIDANCE.audit/.auditTrailsaid "UsetrackHistoryfor the activity timeline.";fieldSchemaAliases()renamedtrackChanges/feedTrackedontotrackHistory.scripts/ablation-replace.mjson the committed fix, each restoreblob == HEADandgit diff HEADempty:vitest run src/data/object.test.ts src/data/authoring-key-lint.test.ts:enable.trashold text2 failed;versioningold text3 failed(its two pins and the 16.0 table needle);auditold text2 failed;auditTrailold text2 failed.vitest run src/data/object.test.ts src/data/field.test.ts: the default-off exception removed fromFIELD_HISTORY_PRESCRIPTION2 failed(trash and versioning); thetrackChangesguidance row deleted1 failed; thefeedTrackedrow deleted1 failed; the two alias rows restored2 failed(vitest run src/data/field.test.ts).pnpm --filter @objectstack/spec buildexit 0;check:generatedexit 0 ("All 14 generated artifacts are up to date");typecheckexit 0;test:Test Files 909 passed (909),Tests 28811 passed | 1 todo (28812);eslinton the six changed.tsexit 0.Acceptance notes
dispatch-gates --ranreconciles 93 derived, 92 run, 1 NOT MEASURED, 0 unrun. Two run families exited 1 in the sweep,check:dts-closureandcheck:dual-build-cjs-loads, because an earlierOS_SKIP_DTS=1build in this worktree had left.d.ts-less dists; afterturbo run build --forceof the@objectstack/formula,@objectstack/lintand@objectstack/objectqlclosures both exit 0, as docheck:doc-formula-expressionsandcheck:lean-entry-closure. Left to CI:check-plugin-teardown-shape.mjs --self-test(its fixture commit is out of this shallow clone's reach).audit/auditTrailfield-key refusals and thetrackChanges/feedTrackedrename rows (done-when 2), and theactivityMilestonesTSDoc in the same file.enable.activities: falsewrites no activity row at all, a credential field never shows values, and computed types are never diffed.skills/objectstack-project/evals/project-process.json:145; the docs pagescontent/docs/data-modeling/field-types.mdx:1063,objects.mdx:81,94,schema-design.mdx:68,content/docs/protocol/objectql/schema.mdx:239,index.mdx:89,content/docs/concepts/metadata-driven.mdx:487; and the comments inpackages/spec/src/system/index.ts:45andsecurity-context.zod.ts:17.Verification
Read first (by risk):
packages/spec/src/data/object.zod.ts:FIELD_HISTORY_PRESCRIPTIONand its two uses (thetrashandversioningtombstones).packages/spec/src/data/field.zod.tsandfield-key-aliases.ts:fieldHistorySpellingAnswerand the two alias rows it replaces.packages/spec/src/data/object.test.ts: the new describe and theresolveFieldHistorycross-check.Two-minute check:
pnpm --filter @objectstack/spec exec vitest run src/data/object.test.ts src/data/authoring-key-lint.test.ts src/data/field.test.tsshows every test passing; put "Use per-fieldField.trackHistoryfor field-level history" back into theversioningtombstone and the same command shows 3 failing.Generated by Claude Code