Repository navigation
Commit d089dac
docs(spec): the record-page timeline total is an upper bound of the drawn 动态 entries (#29120)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb9gurNw6gZxbtcW3PW4QG67)_
Fixes #28998
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:记录页 `timeline`
计数的文档注释改为说明总数统计的是各来源表定义的行数,是「动态」面板实际绘制条目数的上界,并点名两种少画的情形;API 参考页同步重新生成。
- **为什么改**:总监对 PR #28991 的契约复核记录 6570231752 的 ④-1
指出原注释读起来像「面板画出的条目数」,而面板会因 `showCompleted` / `types` 配置与无可显示差异的台账行少画。
- **风险与回滚**:仅注释与生成文档,不动 schema 形状、`.describe()` 文本与运行时行为;回滚即 revert 本
PR。
-
**先看**:`packages/spec/src/api/record-page.zod.ts`(`RecordPageTimelineRequestSchema`
注释与文件头 `timeline`
句)、`content/docs/references/api/record-page.mdx`(生成结果)、`.changeset/28998-timeline-count-upper-bound.md`。
- **两分钟验证**:`pnpm --filter @objectstack/spec build && pnpm --filter
@objectstack/spec check:generated`,预期 All 14 generated artifacts are up
to date。
- **需要你做的**:无,席位落地。
## What changes
- `packages/spec/src/api/record-page.zod.ts`, comments only:
- the `RecordPageTimelineRequestSchema` docblock: "The total is their
sum" now goes on to say the total counts the sources' rows as the table
defines them, so it is an upper bound of the entries the 动态 panel draws,
not their number, and names the two cases where the panel draws fewer
(its `showCompleted` / `types` configuration, and a ledger row with no
displayable diff);
- the file header's `timeline` sentence carries the same statement. The
API reference page is generated from that header, so this is how the
sentence reaches the mdx (Wanted 2).
- `content/docs/references/api/record-page.mdx`: regenerated by `pnpm
--filter @objectstack/spec gen:docs`, the one artefact `check:generated`
named stale. It is not hand-edited.
- `.changeset/28998-timeline-count-upper-bound.md`: `@objectstack/spec:
patch`. The docblock ships in the published `dist/api/index.d.ts` /
`.d.mts` (and in `src/**/*.zod.ts`, both in the package's `files`), so
the published bytes move.
No `.describe()` string, schema shape or behaviour changes.
## Tests
No behaviour changed, so there is no new test and no ablation.
<details><summary>spec typecheck + api tests (at 36952b4, before the
main merge)</summary>
`pnpm --filter @objectstack/spec typecheck && pnpm --filter
@objectstack/spec exec vitest run --maxWorkers=2 src/api` under the
verify lock: VERDICT command-exit 0, Test Files 59 passed (59), Tests
1804 passed (1804). The rest of the spec suite is left to CI's Test
Core.
</details>
## Acceptance notes
- **Deviation from the claimed surface, declared.** The claim names the
`RecordPageTimelineRequestSchema` docblock as the one comment in
`record-page.zod.ts`. `content/docs/references/` is generated
(AGENTS.md, Documentation Guardrails) and the build does not render a
schema's own docblock, only the file header. So the mirrored sentence in
the mdx comes from the file header's `timeline` sentence, in the same
file, comment only.
- **Finding, not changed here: one `.describe()` string reads the same
wrong way.** `RecordPageTimelineCountSchema.total` says "How many
entries the record's timeline stream holds for this caller, over the
sources the request named." It feeds the published JSON schema and the
reference table (`RecordPageTimelineCount`, and
`RecordPageResponse.timeline[option 1]`). Per the ruling it stays, and
moving it owes a contract review.
- **Finding, not changed here: the `RecordPageTimelineCountSchema`
docblock** ("how many entries the record's 动态 stream holds") is the same
misreading in a comment outside the claimed surface.
## Verification
<details><summary>generated artefacts</summary>
- Before regeneration: `check:generated` exit 1, "1 of 14 artifact(s)
stale: content/docs/references/**".
- After `gen:docs`: `check:generated` exit 0, "All 14 generated
artifacts are up to date".
- After merging main (c566f35): spec rebuilt under the lock,
`check:generated` "All 14 generated artifacts are up to date"; the
branch delta vs main is still these 3 files (+27 / -3).
</details>
<details><summary>dispatch-gates, at c566f35</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 97 commands. All were run on
c566f35 with exit codes captured before any pipe. 96 exited 0. `pnpm
check:dual-build-cjs-loads` exited 3 (PREREQUISITE NOT MET: 8 workspace
packages have no `dist/`) and is NOT MEASURED locally; CI's Lint and
Repo Gates runs it. `--ran` reconciliation: "97 derived famil(ies)
accounted for — 96 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit
3)". The same 97 also ran on 36952b4 before the merge, with the same
result.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jRs3fMDRLr3zkuDuVo)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0c0d3b6 commit d089dac
3 files changed
Lines changed: 27 additions & 3 deletions
File tree
- .changeset
- content/docs/references/api
- packages/spec/src/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| |||
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
170 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
171 | 180 | | |
172 | 181 | | |
173 | 182 | | |
| |||
0 commit comments