Repository navigation
Commit d994002
docs: the docs and spec comments describe trackHistory by the field-history model (#38238)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoUmHUYZvTYLKjq2dHpiHW6x)_
Part of #38154
repo:objectstack#3 · os-tesla · session_01L9qibwWRQzuBbuvfHQMtYc
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 读数据建模文档、协议页和规范注释的搭建者和
AI,现在读到的是对的字段历史说法:字段改动的新旧值默认就显示,对象上的那个开关只管在记录页显示审计台账;以前这些页把它讲成「开了才有字段历史」。
- 接上一张已合入的卡(拒收提示已改成同一说法),替照文档写配置的人和 AI 解决被文档指错开关的问题。
- 只改文档和注释文字,平台行为完全不变;说法若有误,最多是文档不准,可以直接撤回。
- 无
## What changes
- Docs, each sentence restated in the model `resolveFieldHistory`
enforces (the refusals merged in PR #38064 say the same):
- `content/docs/data-modeling/field-types.mdx`: the field `trackHistory`
row now says it opts a media or JSON field into old → new values, that
other fields show them already, and that `false` does not hide them
(`fieldHistory: false` does).
- `content/docs/data-modeling/objects.mdx` (code comment and the
`enable` table row), `content/docs/data-modeling/schema-design.mdx`,
`content/docs/protocol/objectql/index.mdx`,
`content/docs/concepts/metadata-driven.mdx`: object
`enable.trackHistory` is glossed as showing the audit ledger's field
changes on the record page, not as "field history tracking". The
`objects.mdx` row adds the `history` verb and says that every write is
recorded either way and that values on the activity stream are
`fieldHistory`'s.
- `content/docs/protocol/objectql/schema.mdx`: the same gloss on the
`enable` example; the "Performance Impact" bullet no longer says
`trackHistory: true` adds inserts to the audit table (the ledger records
every write either way); the "When to enable" bullet says what it shows.
- Spec comments: `packages/spec/src/system/index.ts` and the
`security-context.zod.ts` module docblock no longer list field
`trackHistory` as part of the audit authoring surface. They name the
object's `enable.trackHistory` (ledger view, `history` verb) beside the
lifecycle `audit` retention, and say that field-change values are
`fieldHistory`'s.
- `content/docs/references/system/security-context.mdx` regenerated from
that docblock (`gen:schema` then `gen:docs`; this one file changed).
- `@objectstack/spec` patch changeset: the edited `.zod.ts` docblock
ships in the package's `files[]`.
- No schema, accepted key, refusal or runtime text changes.
## Tests
- No test changes: the diff is prose and comments only, and no test pins
any of the edited sentences. The regenerated reference page is held by
`check:generated` / `check:docs` (readings below).
<details><summary>Readings at 92b38c0 (base origin/main
9957484)</summary>
- Acceptance grep (the card's): `git grep -n -i "trackHistory" --
content/docs packages/spec/src/system skills/objectstack-project/evals
':!content/docs/releases' ':!content/docs/references'`, filtered for
"field history", "history track", "track field", "field-level history",
"timeline switch", "object/field": 0 hits in `content/docs` and
`packages/spec/src/system`. The one remaining hit is the project skill's
eval line, which is PR 2 of this card (below).
- Regenerated page diff
(`content/docs/references/system/security-context.mdx`):
```diff
- **Audit** (`audit.zod.ts` — REMOVED): the live audit path is plugin-audit's
- always-on capture + object/field `trackHistory` + lifecycle `audit` retention
+ always-on capture (an object's `enable.trackHistory` shows its field
+ changes on the record page) + lifecycle `audit` retention
```
- `pnpm --filter @objectstack/spec build` exit 0 (lock VERDICT
command-exit 0).
- Derived local gate set at 92b38c0: `dispatch-gates --ran` reconciles
101 derived, 99 run (all exit 0), 2 NOT MEASURED (exit 3), 0 unrun. Five
gates first answered PREREQUISITE NOT MET and were re-run after `turbo
run build` of `@objectstack/formula`, `@objectstack/lint...`,
`@objectstack/objectql`, `@objectstack/client`,
`@objectstack/client-react` (47/47 tasks):
`check:doc-formula-expressions`, `check:doc-security-posture`,
`check:skill-examples`, `check:docs-transcript-drift`,
`check:lean-entry-closure`, each exit 0. `check:generated` and
`check:docs` exit 0 with the regenerated page.
- Left to CI: `check-plugin-teardown-shape.mjs --self-test` (its fixture
commit is out of this shallow clone's reach) and
`check:dual-build-cjs-loads` (needs a full `pnpm build`; this diff moves
no package's build shape).
</details>
## Acceptance notes
- Scope beyond the card's list, as the claim set it:
`protocol/objectql/schema.mdx` "Performance Impact" (false: capture is
always on) and "When to enable" bullets, same file and defect class.
- Left as they are, by the claim: `content/docs/releases/**` (release
history), `content/docs/ui/pages.mdx` (it already describes the object
flag's ledger changes in the timeline),
`packages/lint/src/rule-explanations.ts` (object meaning, correct), and
the generated references other than the regenerated one (already in the
#38064 wording).
- N3 (folded spellings), checked and not built: since PR #38064 no
refusal points an author at `trackHistory`. `trackChanges`,
`feedTracked` and `tracked` get the `fieldHistory` answer; their case
and underscore variants (`trackchanges`, `track_changes`, `FeedTracked`,
`Tracked`, …) get only the generic unrecognized-key refusal. Adding
guidance for them is runtime refusal text, out of this card.
- PR 2 of this card (`Fixes #38154`), after this one merges: the
`skills/objectstack-project/evals/project-process.json` eval id 9 line
that still "sets `trackHistory` where field-level history is wanted".
## Verification
Read first (by risk):
1. `content/docs/data-modeling/objects.mdx`: the `enable` table's
`trackHistory` row (the longest restatement).
2. `content/docs/protocol/objectql/schema.mdx`: the "Performance Impact"
bullet.
3. `packages/spec/src/system/index.ts`: the audit-surface comment.
Two-minute check: `git grep -n -i "field history track\|track field
history\|enable field history" -- content/docs` prints nothing.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibwWRQzuBbuvfHQMtYc)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent c06dac7 commit d994002
10 files changed
Lines changed: 31 additions & 14 deletions
File tree
- .changeset
- content/docs
- concepts
- data-modeling
- protocol/objectql
- references/system
- packages/spec/src/system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | | - | |
| 1063 | + | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments