Repository navigation
Commit 56b0a58
test(dogfood): re-measure the authz census for the approval record-lock read (#26406)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBRzZP1k46z6vHf1CGVyw2uH)_
Fixes #26400
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:只改 dogfood 的两个 authz 普查测试文件里的计数与说明文字,记下 #26361 新增的审批记录锁读取路由(81
行台账、rest-server 行 70 / 19 / 51、总盲点 65 / 70)。
- 为什么改:#26361 加了一条路由但没同步普查,`main` 的 Dogfood Regression Gate (1/3) 和
(3/3) 从那以后一直红,发版闸门读的正是这两条。
- 风险与回滚:只动测试文件,不动任何发布包和路由代码;回滚即 revert 本 PR,`main` 会回到红。
- 先看:`packages/qa/dogfood/test/authz-probe-blind-spot.census.ts` 的
rest-server.ts 行(新盲点 50 → 51 的判定),其次台账行,再看 `authz-conformance.matrix.ts`
第 27 行。
- 两分钟验证:`pnpm --filter @objectstack/dogfood exec vitest run
test/authz-probe-blind-spot.test.ts test/authz-conformance.test.ts`,预期 2
个文件、108 个测试全绿(`main` 上是 10 个红)。
- 需要你做的:无,席位落地。
## What changes
Census bookkeeping for the route #26361 added, `GET
{basePath}/approvals/records/:object/:recordId/lock` in
`packages/rest/src/approvals-routes.ts`. Each figure below was measured
with `deriveProbeFileCensus()` on this tree, not copied from the card or
from the server seat's reading (6431978738). The reading agreed with the
server seat on every figure it gave.
| Row / figure | Before | After | Why |
|---|---|---|---|
| `rest-route-ledger.ts` population / reachable / blindSpot | 80 / 80 /
0 | 81 / 81 / 0 | one new ledger row carrying `family: 'approvals'`, a
family the other approval rows already carry |
| `rest-route-ledger.ts` `keys` | 18 | 18 | no new family, so no new key
|
| `rest-route-ledger.ts` controls `route: '` / `family: '` | 80 / 80 |
81 / 81 | the same row |
| `rest-server.ts` population / reachable / blindSpot | 69 / 19 / 50 |
70 / 19 / 51 | **a new blind spot**: one direct
`this.routeManager.register(` site in `registerApprovalsEndpoints`,
outside `registerMetadataEndpoints` and the `/meta` subset, the same as
its seven siblings |
| `rest-server.ts` controls `this.routeManager.register(` /
`approvals-routes.ts: …` / `enforceAuth` | 62 / 7 / 115 | 63 / 8 / 116 |
the new site, and its handler opens with `this.enforceAuth(…)` (the only
`enforceAuth` line #26361 added) |
| `BLIND_SPOT_TOTAL_STATIC` / `_RUNTIME` | 64 / 69 | 65 / 70 | one call
site and one runtime mount; it is a direct registration, not a route
factory, so the 5-mount static/runtime delta holds |
| `authz-conformance.matrix.ts` docblock (the figure #17111 parses) | 80
rows / 18 families | 81 rows / 18 families | plus a line in the dated
drift note |
Every edited figure has a provenance comment in the row, in the shape
the earlier re-measurements use.
## Why
`Dogfood Regression Gate (1/3)` and `(3/3)` have been red on every
`main` push run that runs them since #26361 (`6a2866af`). This is the
main-red stop-bleed under convention ①. It moves the census forward and
does not revert #26361.
## Tests
Both files, under the verify lock, on `1cc4fa20`:
<details><summary>before (origin/main b33dd25): 2 files failed, 10
tests failed, 98 passed</summary>
```
Test Files 2 failed (2)
Tests 10 failed | 98 passed (108)
os-verify-lock: VERDICT command-exit 1
AssertionError: expected 81 to be 80 (rest-route-ledger.ts population)
AssertionError: expected 70 to be 69 (rest-server.ts population)
control "route: '" moved in packages/rest/src/rest-route-ledger.ts: expected 81 to be 80
control "this.routeManager.register(" moved in packages/rest/src/rest-server.ts: expected 63 to be 62
"packages/rest/src/rest-route-ledger.ts: docblock says 80 rows, the table holds 81" (#17111 pin and its 5 doctoring cases)
```
</details>
<details><summary>after (1cc4fa2): 2 files passed, 108 tests
passed</summary>
```
Test Files 2 passed (2)
Tests 108 passed (108)
os-verify-lock: VERDICT command-exit 0 · held the lock 21s
```
</details>
## Acceptance notes
- The order named a docblock figure in
`packages/rest/src/rest-route-ledger.ts`. The figure the #17111 pin
reads is in `authz-conformance.matrix.ts` line 27, so that is the one
that moved. No `packages/rest/**` file changes, as the claim requires.
- Shards 1/3 and 3/3 were not run whole locally: the title carries no
`!` and no `(narrowing)` arm, so the full battery is not owed. The two
files above hold all 10 failures. The card's acceptance (the first
`main` push run and the next scheduled run green) can only be read after
landing.
- The census pins still sit outside PR and merge-queue CI, which is how
#26361 merged green. Seat 1 answered that question on the card
(6432031749). It is not in this PR.
## Verification
Local derived gate set (`dispatch-gates.mjs` on `1cc4fa20`, 50
families): 48 exit 0, 2 NOT MEASURED, 0 red.
<details><summary>NOT MEASURED (exit 3, prerequisite not met in this
container)</summary>
- `node scripts/check-plugin-teardown-shape.mjs --self-test`: its
positive control is pinned to a commit that this shallow clone cannot
reach.
- `pnpm check:dual-build-cjs-loads`: it reads built output, and seven
packages outside this diff have no `dist/`.
Both run in CI's `Lint & Repo Gates`. `--ran` reconciliation: `50
derived famil(ies) accounted for — 48 run, 2 NOT-MEASURED`.
</details>
## 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. (no names
added)
- [x] 3. No formatter ran; `pnpm lint` passes. (CI-owned)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset.
(`@objectstack/dogfood` is private, test files only: `skip-changeset`)
- [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, except the 维护者速读
block.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzfNhdx3xRKeaa8e7JB)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent dada291 commit 56b0a58
2 files changed
Lines changed: 37 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
391 | 397 | | |
392 | 398 | | |
393 | | - | |
| 399 | + | |
394 | 400 | | |
395 | 401 | | |
396 | 402 | | |
| |||
401 | 407 | | |
402 | 408 | | |
403 | 409 | | |
404 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
405 | 413 | | |
406 | 414 | | |
407 | 415 | | |
| |||
535 | 543 | | |
536 | 544 | | |
537 | 545 | | |
538 | | - | |
| 546 | + | |
539 | 547 | | |
540 | | - | |
| 548 | + | |
541 | 549 | | |
542 | 550 | | |
543 | 551 | | |
| |||
952 | 960 | | |
953 | 961 | | |
954 | 962 | | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
955 | 972 | | |
956 | 973 | | |
957 | | - | |
| 974 | + | |
958 | 975 | | |
959 | 976 | | |
960 | 977 | | |
961 | | - | |
| 978 | + | |
962 | 979 | | |
963 | 980 | | |
964 | 981 | | |
| |||
991 | 1008 | | |
992 | 1009 | | |
993 | 1010 | | |
994 | | - | |
| 1011 | + | |
995 | 1012 | | |
996 | 1013 | | |
997 | 1014 | | |
| |||
1276 | 1293 | | |
1277 | 1294 | | |
1278 | 1295 | | |
1279 | | - | |
| 1296 | + | |
1280 | 1297 | | |
1281 | 1298 | | |
1282 | 1299 | | |
| |||
1294 | 1311 | | |
1295 | 1312 | | |
1296 | 1313 | | |
1297 | | - | |
1298 | | - | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1299 | 1320 | | |
1300 | 1321 | | |
1301 | 1322 | | |
| |||
0 commit comments