Repository navigation
Commit 3c2187f
test(dogfood): pin five records-forms checklist items at the REST door (slice 2) (#26813)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8EZuqRp2sWT5mEbwB3fUdmh)_
Refs #26573 (items `action-param-widgets`,
`cascading-multilevel-and-clear`, `cascading-options`,
`conditional-rules-header`, `field-history-tracking`; slice 2)
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:records-forms 区按卡片顺序的下 5 个清单项,新增 5 个 dogfood 测试文件,在原样启动的 showcase
上经 REST 门断言它们的 api 条款,并把 5 项的 `automated.ref` 指向新钉测(revision 各加
1,history 引本卡)。
- 为什么改:18.2.0 Tier 1 扫描把这些 api 条款判为 PARTIAL(没有 oracle 层的钉测);钉在 HTTP
层后每次发版可直接复跑。
- 风险与回滚:只加测试和清单文字,不动产品代码、不加 CI 车道;新文件落在 dogfood 现有的 isolated 项目里。回滚即
revert 本 PR。
- 先看:`cascade-server-boundary.dogfood.test.ts`(两个 KNOWN GAP
按现状钉住:服务端哪天开始拦截就会变红,按条目自己的话应另开卡,而不是算通过);`field-history-tracking-activity.dogfood.test.ts`(未追踪字段的实测摘要是
#25787 通用框架,会写出字段标签 Website 但不写值)。
- 两分钟验证:先建依赖闭包,再 `pnpm --filter @objectstack/dogfood exec vitest run
--maxWorkers=2 test/action-param-gallery-dispatch.dogfood.test.ts
test/cascade-server-boundary.dogfood.test.ts
test/cascade-role-gated-option.dogfood.test.ts
test/invoice-conditional-rules-server.dogfood.test.ts
test/field-history-tracking-activity.dogfood.test.ts`,预期 5 个文件 14
个用例全绿;`node scripts/check-platform-checklist.mjs` 预期 OK。
- 需要你做的:无,席位落地。
## What changes
Five new dogfood files, each booting the showcase as shipped through
`@objectstack/verify` and driving its REST doors:
| Item (rev → new) | Clauses now pinned over REST | Pin |
|---|---|---|
| `action-param-widgets` (4 → 5) | acceptance[2], negative[1],
acceptance[3] server half |
`action-param-gallery-dispatch.dogfood.test.ts`: the gallery action's
body has no side effect and echoes `received`, so every refusal asserts
the echo is absent (the body never ran); a bag missing only `p_text` is
its own case |
| `cascading-multilevel-and-clear` (8 → 9) | acceptance[2], [4], [5],
negative[2] (plus negative[0]–[1] as the control) |
`cascade-server-boundary.dogfood.test.ts`: the two recorded gaps pinned
as they stand today |
| `cascading-options` (6 → 7) | acceptance[2] persistence and server
halves, acceptance[4], negative[1] |
`cascade-role-gated-option.dogfood.test.ts`: a member graded `admin`
(positions read back with `org_admin`) vs a plain member |
| `conditional-rules-header` (5 → 6) | acceptance[1], acceptance[2]
server half, acceptance[5] API half, negative[0]–[1] |
`invoice-conditional-rules-server.dogfood.test.ts`: requiredWhen refusal
and readonlyWhen strip on seeded `INV-1003` |
| `field-history-tracking` (7 → 8) | acceptance[0], [1], [3],
negative[0], [2] | `field-history-tracking-activity.dogfood.test.ts`:
the sys_activity summary rows and `GET /auth/me/permissions` |
Each item's `automated.ref` keeps the pins it already named and adds the
new one with what it scores. One history row per item, citing #26573. No
clause text, fixture, step or `knownGaps` line was edited (the claim's
file surface).
**Skipped, by the slice-2 order:**
- `record-discussion-mentions`: waits on #26625 (the walled
two-organization recipe).
- `adhoc-filter-sort-builder`: next in card order, but every clause is a
network/dom oracle; it needs Playwright, and the ruling adds no lane.
- Browser legs inside the five items, left unpinned:
`action-param-widgets` acceptance[0], [1], acceptance[3] dialog half,
negative[0]; `cascading-multilevel-and-clear` acceptance[0], [3];
`cascading-options` acceptance[0], [3] and acceptance[2]'s "sees" half;
`conditional-rules-header` acceptance[0], [2] client lock, [3], [4],
negative[2]; `field-history-tracking` acceptance[2], negative[1].
`cascading-*` acceptance[1] stays on the objectui live spec and
`field-history-tracking` acceptance[4] on its unit pin.
## Why
The 18.2.0 release-candidate Tier 1 run scored these api clauses
PARTIAL: no pin asserted them at the oracle's layer, so each sweep drove
them by hand. The triage ruling allows ~5-item slices and no new CI
lane; the new files fall under the dogfood package's existing `isolated`
vitest project and run where the dogfood legs run today.
## Tests
Measured answers the pins now hold (all first read live, then pinned
exactly):
- gallery dispatch: the conformant bag → `200` with the body's
`received` echo; out-of-set `p_priority` + undeclared `bogus` → `400`
naming both, no echo; only `p_text` missing → `400` naming `p_text`, no
echo.
- cascade: create `{cn, zj}` then PATCH `{country:'us'}` → `200`,
re-read holds `province: 'zj'`; the same pair in the payload → `400`
`province` / `invalid_option`. Invoice on Contoso with an existing
Northwind contact → `201`, stored as sent; a fabricated contact → `400`
`contact` / `reference_not_found`, nothing stored.
- role gate: the graded member's `tier: 'restricted'` → `201`, re-reads;
the plain member's → `400 VALIDATION_FAILED` `tier` / `invalid_option`,
nothing stored; `tier: 'standard'` → `201`.
- invoice: `status: 'sent'` without `issued_on` → `400` with exactly
`[issued_on, required]`, nothing stored; draft and dated-sent → `201`.
PATCH `tax_rate: 99` on paid `INV-1003` → `200`, re-read unchanged; the
same PATCH on a draft persists.
- history: PATCH industry retail → finance lands `summary: 'Industry:
Retail → Finance'` (message key `fieldChanges`); a website-only PATCH
lands `Updated Account (Success Overlay) "<name>": Website` (key
`activityUpdatedFields`, no arrow, neither URL). `/auth/me/permissions`
→ `objects.showcase_account.apiOperations` contains `history`;
`showcase_task`'s contains `get`, not `history`.
<details><summary>Runs</summary>
- Dependency closure on `8b276385` (the restarted branch): `pnpm exec
turbo run build --filter='@objectstack/dogfood^...' --concurrency=2`
under `os-verify-lock.sh`, held 8m34s.
- First run of the five files: `Tests 11 passed | 3 failed (14)`, all
three in the history file: `Object 'sys_activity' not found` (the
showcase boot composes no audit plugin) and `apiOperations` read from
the wrong key. Fixed by adding `AuditPlugin` and reading
`objects.<name>.apiOperations`; the untracked-edit case was then
re-pinned to the measured #25787 generic frame.
- Commit head: the five files → `Test Files 5 passed (5)`, `Tests 14
passed (14)`; `pnpm typecheck` in `packages/qa/dogfood` (`tsc --noEmit`)
→ exit 0.
- Final head `efe6101e` (after merging `origin/main` `c8583f80`, which
brought #26797 and #26796: dogfood tests, the access-security area file
and create-objectstack, none in this diff's pins' closure): the five
files → `Test Files 5 passed (5)`, `Tests 14 passed (14)`, then the
dogfood typecheck, one locked command, VERDICT command-exit 0.
</details>
No ablation was run: this diff adds tests and changes no behaviour they
pin. Each refusal assertion has a same-door admitted control beside it,
so none passes on a door that refuses everything.
## Acceptance notes
- `field-history-tracking`: the showcase boot composes no audit plugin,
so this file adds `AuditPlugin` the way `objectstack serve` composes it
(as `activity-withheld-update.dogfood.test.ts` does). acceptance[1] says
"no field-diff summary naming website"; the measured row is the #25787
generic frame, which names the changed field's label and never its
values, so the pin asserts no old → new for website. The clause text was
not reworded (outside the claim's surface).
- `cascading-multilevel-and-clear` acceptance[2] and [4] are KNOWN GAP
clauses: the pins assert today's 200/201, so new server enforcement
turns them red, which by the item's own text is new enforcement to file,
not a pass.
- `cascading-options` acceptance[2]: the seeded admin is `org_owner`,
which does not imply `org_admin`, so the admin persona is a signed-up
member whose `sys_member` row is graded `admin`, read back from the
resolved positions before any write.
## Verification
- `node scripts/check-platform-checklist.mjs` → exit 0, `OK — 16 areas,
329 items (324 active, 1 planned)`, on the commit head and again on the
final head.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` → 55 commands on the tree of this PR's
commit `38c2de88` (run before a message-only reword), each run and
reconciled with `--ran`: `55 derived famil(ies) accounted for — 55 run,
0 NOT-MEASURED`, all exit 0.
- CI families are read from this PR's check-runs, not re-run locally.
`Dogfood Regression Gate` does not run on pull_request, so the local
runs above are this PR's evidence for the new pins.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (CI-owned run)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset — nothing publishes
here (`@objectstack/dogfood` is private; `docs/qa/**` ships in no
package), so `skip-changeset`; both declaration lines are filled in
above.
- [x] 6. `packages/spec` not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the maintainer brief
above is Chinese by the repo's communication rule).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbZ3oTCkvGGTMNd5XYU)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent f1cd529 commit 3c2187f
6 files changed
Lines changed: 521 additions & 10 deletions
File tree
- docs/qa/platform-checklist/areas
- packages/qa/dogfood/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
851 | | - | |
| 851 | + | |
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
| |||
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
927 | | - | |
| 927 | + | |
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
964 | 970 | | |
965 | 971 | | |
966 | 972 | | |
| |||
1105 | 1111 | | |
1106 | 1112 | | |
1107 | 1113 | | |
1108 | | - | |
| 1114 | + | |
1109 | 1115 | | |
1110 | 1116 | | |
1111 | 1117 | | |
| |||
1175 | 1181 | | |
1176 | 1182 | | |
1177 | 1183 | | |
1178 | | - | |
| 1184 | + | |
1179 | 1185 | | |
1180 | 1186 | | |
1181 | 1187 | | |
| |||
1218 | 1224 | | |
1219 | 1225 | | |
1220 | 1226 | | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1221 | 1233 | | |
1222 | 1234 | | |
1223 | 1235 | | |
| |||
1506 | 1518 | | |
1507 | 1519 | | |
1508 | 1520 | | |
1509 | | - | |
| 1521 | + | |
1510 | 1522 | | |
1511 | 1523 | | |
1512 | 1524 | | |
| |||
1575 | 1587 | | |
1576 | 1588 | | |
1577 | 1589 | | |
1578 | | - | |
| 1590 | + | |
1579 | 1591 | | |
1580 | 1592 | | |
1581 | 1593 | | |
| |||
1607 | 1619 | | |
1608 | 1620 | | |
1609 | 1621 | | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
1610 | 1628 | | |
1611 | 1629 | | |
1612 | 1630 | | |
| |||
4038 | 4056 | | |
4039 | 4057 | | |
4040 | 4058 | | |
4041 | | - | |
| 4059 | + | |
4042 | 4060 | | |
4043 | 4061 | | |
4044 | 4062 | | |
| |||
4116 | 4134 | | |
4117 | 4135 | | |
4118 | 4136 | | |
4119 | | - | |
| 4137 | + | |
4120 | 4138 | | |
4121 | 4139 | | |
4122 | 4140 | | |
| |||
4174 | 4192 | | |
4175 | 4193 | | |
4176 | 4194 | | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
| 4198 | + | |
| 4199 | + | |
| 4200 | + | |
4177 | 4201 | | |
4178 | 4202 | | |
4179 | 4203 | | |
| |||
4816 | 4840 | | |
4817 | 4841 | | |
4818 | 4842 | | |
4819 | | - | |
| 4843 | + | |
4820 | 4844 | | |
4821 | 4845 | | |
4822 | 4846 | | |
| |||
4883 | 4907 | | |
4884 | 4908 | | |
4885 | 4909 | | |
4886 | | - | |
| 4910 | + | |
4887 | 4911 | | |
4888 | 4912 | | |
4889 | 4913 | | |
| |||
4933 | 4957 | | |
4934 | 4958 | | |
4935 | 4959 | | |
| 4960 | + | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
4936 | 4966 | | |
4937 | 4967 | | |
4938 | 4968 | | |
| |||
0 commit comments