Repository navigation
Commit abecc12
test(dogfood): pin five more api-backend checklist items at their oracle's layer (#26829)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8VsCYkn9rw8Z1i5vq5MHxL4)_
Refs #26572 (slice 2 of about 3, items:
packaged-action-disabled-dispatch, action-activation-door-contract,
rest-crud-config-contract, rest-batch-config-contract,
rest-metadata-config-contract)
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:给 api-backend 清单里又 5 个被 18.2.0 Tier 1 扫描判为 PARTIAL
的条目补钉子:动作停用与激活门在真实 HTTP、MCP 和冷重启上验证,三个 REST 配置契约的默认挂载在启动的服务上验证、非默认配置在真实
RestServer 上验证;并更新这 5 条的 automated.ref、verify、revision 和 history。
- 为什么改:这些条款的判据在 HTTP 层或真实 RestServer
上,旧钉子只到单元层或根本没有,每次发版扫描都要人工补跑;现在变成常驻、可重跑的证明。
- 风险与回滚:只加测试、一个 scratch fixture 和清单文本,不改任何产品代码;回滚就是 revert 本 PR。dogfood
只在 main 的定时/推送批次跑,不进 PR 和合并队列。
-
先看:`packages/qa/dogfood/test/packaged-action-disabled-dispatch-live.dogfood.test.ts`(MCP
与冷重启)、`packages/qa/dogfood/test/rest-config-contract-harness.test.ts`(真实
RestServer
的路由表与缓存分支)、`docs/qa/platform-checklist/areas/api-backend.json`。
- 两分钟验证:`pnpm --filter @objectstack/dogfood exec vitest run
--maxWorkers=2 test/rest-config-contract-harness.test.ts`,预期 7 个用例全绿。
- 需要你做的:无,席位落地。
## What changes
Five more api-backend checklist items that the release-18.2.0 Tier 1
sweep (#26468) scored PARTIAL now carry pins at the layer their oracle
names. The `api` legs drive a booted stack through
`@objectstack/verify`'s real HTTP surface (Hono request injection), plus
the live MCP transport and a cold boot on one database file. The `test`
legs construct a real `RestServer`, which is the method the three config
items prescribe because no shipped boot path authors a
`RestServerConfig` (the #15543 posture).
| Item | Clauses pinned | Pin |
|---|---|---|
| `api-backend.packaged-action-disabled-dispatch` | acceptance[0]–[6],
negative[0]–[2]: exact 409 `ACTION_DISABLED` and sentence with the task
re-read unchanged, the param-gallery 409/400 ordering pair, the
byte-identical 403s, a live `POST /api/v1/mcp` `run_action` refusal
carrying the REST door's exact message, the flow-type action's own
switch, the anonymous 401, and the cold-boot durability leg |
`packaged-action-disabled-dispatch-live.dogfood.test.ts` (new) |
| `api-backend.action-activation-door-contract` | acceptance[0]–[6],
negative[0]–[2]: authority before body and lookup, the 2-/4-segment
shapes against the routing-404 control, the `fields[0]` codes, `{}`
enabling, zero ledger rows after refusals, exactly one row updated in
place, and the ambiguity arm live |
`action-activation-door-live.dogfood.test.ts` +
`fixtures/activation-ambiguity-fixture.ts` (new) |
| `api-backend.rest-crud-config-contract` | acceptance[0] (six default
mounts vs the control), [2] (live `OBJECT_API_DISABLED` body vs the
control, and the switched-off route absent), [3] (the whole table
re-based at `dataPrefix: '/records'`), [4] (both tombstones' schema and
prescription) | `rest-config-contract-live.dogfood.test.ts`,
`rest-config-contract-harness.test.ts` (new) |
| `api-backend.rest-batch-config-contract` | acceptance[0] (four bulk
doors and `/batch` vs the control), [4] (201 records → 400
`BATCH_TOO_LARGE` max 200, nothing created), [5] (both tombstones'
schema and replacement) | same two files |
| `api-backend.rest-metadata-config-contract` | acceptance[0] (default
`/meta` mounts vs the control), [1] (whole table re-based at `prefix:
'/metadata'`), [3] (the `client_liaison` member's served
`showcase_project` schema omits budget, spent and budget_remaining), [4]
(`enableCache` and each of its carve-outs), [5] (both tombstones' schema
and replacement) | same two files |
Each item's `automated.ref` names the new pins and what they assert. The
verify texts that said "unit only" or "no pin" now name the pin that
carries the clause, `revision` is bumped and a `history` row cites
#26572. `action-activation-door-contract`'s `fixtures.knownGaps[0]`
gains one sentence saying the colliding scratch package now exists. No
clause text changed. No product code changed.
## Why
The card's ruled scope (triage 6437722483) is to pin the 11 api-backend
Tier 1 clauses the 18.2.0 sweep scored PARTIAL at the layer their oracle
names. The pins go in `packages/qa/dogfood/**`, with the checklist item
revisions bumped, in slices of about five items, and with no new CI
lane. Slice 1 landed as #26787. This is slice 2, the next five items in
card order. `rest-route-generation-tombstones` is left for slice 3.
## Tests
The touched test files on head 14a3213 (after merging `main` and
rebuilding the dogfood closure), under the verify lock:
```
pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 test/rest-config-contract-harness.test.ts test/rest-config-contract-live.dogfood.test.ts test/action-activation-door-live.dogfood.test.ts test/packaged-action-disabled-dispatch-live.dogfood.test.ts
Test Files 4 passed (4)
Tests 29 passed (29)
```
Every expectation was first measured against the live answer on a probe
boot, then checked against the clause text before it was written down.
No ablation was run: the diff changes no tested behaviour, it only adds
pins over behaviour that already holds.
## Acceptance notes
- Dogfood runs only in `main`'s scheduled and push battery (`Dogfood
Regression Gate`'s `if:` excludes `pull_request` and `merge_group`), so
the PR's CI does not run these files. The local run above is their
evidence until the next `main` battery.
- The harness file imports `RestServer` through `@objectstack/runtime`'s
re-export. `@objectstack/rest` is not a dogfood dependency, and adding
one would move `pnpm-lock.yaml`, which is outside this card's file
surface.
- The MCP leg composes `MCPServerPlugin` the way
`showcase-mcp-http-identity.dogfood.test.ts` does.
`showcase_portfolio_snapshot` is the only stock `ai.exposed` action, so
the MCP refusal is read on it, and the REST door's message for the same
action is compared byte for byte.
- The cold-boot leg stops the stack and boots it again on the same
`databaseFile`, the shape
`automation-authoring-doors-durable.dogfood.test.ts` uses.
- The ambiguity fixture declares `actamb_archive` inside two objects'
own `actions`. The door refuses from either object, names both, writes
no row, and the action still dispatches afterwards.
- Still not covered, as the items already record: the activation door's
metadata-plane 503 and its 501/503 durability arms (no stock door).
## Verification
<details><summary>Gates (dispatch-gates --commands, reconciled with
--ran)</summary>
- `node scripts/check-platform-checklist.mjs`: exit 0, `OK — 16 areas,
329 items (324 active, 1 planned)`.
- 55 derived commands at 37105b7 (measured on the identical tree before
its message was reworded): 54 exit 0; 1 exit 3 (prerequisite not met,
nothing measured): `pnpm check:dual-build-cjs-loads`, which reads built
output of packages outside the dogfood closure. It runs in CI's `Lint &
Repo Gates`.
- After merging `main` (0ea90c7), the derived list is unchanged. The
gates whose scripts the merge moved, plus the checklist gate, were
re-run on the merge head: `check-closing-keyword-parity` (and
`--self-test`), `check:platform-checklist`, `check-issue-citations`, all
exit 0.
- `pnpm --filter @objectstack/dogfood run typecheck`: exit 0.
- eslint over the five touched TypeScript files: exit 0.
- `dispatch-gates --ran`: 55 derived families accounted for, 54 run, 1
NOT-MEASURED, 0 unrun.
</details>
No changeset: `@objectstack/dogfood` is private and `docs/qa/**` ships
in no package, so this PR carries `skip-changeset`.
## 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. (eslint over the touched
files)
- [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)
- [x] 6. `packages/spec` touched: n/a.
- [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.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JQwxbWUpGqdpDRiD79LqXV
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbWUpGqdpDRiD79LqXV)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent e1bfde3 commit abecc12
6 files changed
Lines changed: 978 additions & 22 deletions
File tree
- docs/qa/platform-checklist/areas
- packages/qa/dogfood/test
- fixtures
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments