Repository navigation
Commit 5787df4
test(dogfood): pin access-security checklist clauses at the oracle's layer, slice 2 (#26823)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8YSjPf3hTSLEBa52VUBikb4)_
Refs #26571 (slice 2 of about 4, items:
access-security.anonymous-deny-surfaces,
access-security.public-form-withdrawal-layers,
access-security.activation-write-operator-gate,
access-security.platform-owner-email-anchor,
access-security.record-view-read-audit)
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:给 access-security 区接下来 5 个清单条目补上 dogfood 断言(进程内 HTTP
与进程日志,正是这些条款的 api / log oracle 层),共钉住 24 条此前只靠现场手跑的条款;扩写 2 个现有用例文件,新增 3
个隔离用例文件;5 个条目的 `automated.ref` 改写成逐条款对应、`revision` 加一、`history` 记本卡。
- 为什么改:18.2.0 Tier 1 记录 #26468 里这 5 条全是 PARTIAL,其中 3 条此前只有单元级 pin,HTTP
层完全靠手跑;钉住后每次发版不必再重跑。
- 风险与回滚:只加测试和改清单文字,不动任何产品代码;新增断言全部按现行行为写成并跑绿。没有新 CI 通道。回滚即 revert 本 PR。
- 先看:① `platform-owner-email-anchor.dogfood.test.ts`(同一数据库按变量值逐次重启,含
`[authz]` 日志捕获);②
`activation-write-operator-gate-single.dogfood.test.ts`(两个开关入口的拒绝原句与
manage_metadata 持有者放行);③
`record-view-read-audit.dogfood.test.ts`(默认不审计与按对象开启两次启动)。
- 两分钟验证:`cd packages/qa/dogfood && pnpm exec vitest run
test/platform-owner-email-anchor.dogfood.test.ts`(需先按 dogfood 惯例 build
依赖闭包),预期 `Tests 6 passed`。
- 需要你做的:无,席位落地。
## What changes
Pins at the layer each clause's oracle names: `api` is the in-process
HTTP stack of `@objectstack/verify`, and `log` is the process output
captured during the boot. Everything is in `packages/qa/dogfood/**`,
with no product code changes. Every new assertion was written against
today's behaviour and is green.
| item | clauses newly pinned | where |
|---|---|---|
| anonymous-deny-surfaces | acceptance[4], [5], negative[0] |
`showcase-anonymous-deny-surfaces` (shared project): the member's `GET
/meta` now asserts 200 instead of `.not.toBe(401)`. On the same
platform-default boot, an anonymous `GET /forms/contact-us` answers 200
and serves the `showcase_inquiry` form. After the anonymous `DELETE
/automation/showcase_reassign_wizard` is refused, the admin reads the
flow at its own route and gets 200 |
| public-form-withdrawal-layers | acceptance[0] (its live leg),
negative[1] | `showcase-public-form-withdrawal-layers`: after the
withdrawal save, the test makes no organization active and reads `GET
/meta/view/showcase_inquiry.contact`, which serves `allowAnonymous:
false` with the link kept; then the organization is made active again.
The save message is asserted to name no organization id |
| activation-write-operator-gate | acceptance[0]–[3], negative[0]–[2] |
New `activation-write-operator-gate-single` (isolated boot). A plain
member is refused 403 `PERMISSION_DENIED` at both doors, each with its
own exact sentence. An invalid body still gets the 403, and no ledger
row is written. A member holding `manage_metadata` through a set
authored at runtime, with no `platform_admin` position, is admitted with
200 at both doors. Each of that member's writes lands one row whose key
set has no `organization_id`. No refusal names the posture. The admin
gets 200 |
| platform-owner-email-anchor | acceptance[0]–[3], acceptance[4]'s live
leg, negative[0], negative[2] | New `platform-owner-email-anchor`: one
database file, restarted once per value in the steps' order, with the
datasource admin routes mounted the way `serve` mounts them. The
variants are unset, unverified M, a non-matching address, verified M
(200 plus the declared envelope), and a malformed list. The malformed
list's `[authz]` line is captured once, M is refused while verified, and
the admin is served. The test also asserts that
`ADMIN_STANDING_NON_TABLE_INPUTS` declares the variable |
| record-view-read-audit | acceptance[0]–[4] | New
`record-view-read-audit`, two boots. The stock boot runs an option-less
`AuditPlugin`: there is no install line (INFO lines are present as a
control), and a 200 detail read lands no `read` row after the flush. The
configured boot sets `readAudit.objects` to `showcase_account` and
`sys_job`. Its install line names `showcase_account` only, and `sys_job`
draws the exclusion warning. One detail read lands one row with who,
which and when, null values, and `created_at` set to the view instant. A
list read and a read of an object that is not opted in land nothing |
Ledger: each of the five items gets a rewritten `automated.ref` that
maps clauses to cases, `revision` +1, and a `history` row citing #26571.
`automated.kind` stays `unit` on the three items that carried it,
because this slice's claimed edit surface is `ref`, `revision` and
`history`. Their refs now name the dogfood pin first.
Clauses left as they are, each with its reason in the item's
`automated.ref`:
- anonymous-deny-surfaces acceptance[6]: procedural (one verdict per
variant in the run record).
- public-form-withdrawal-layers acceptance[2]–[5]: no stock fixture
(knownGaps), so they stay test-scored. negative[3]–[5] are procedural.
- activation-write-operator-gate acceptance[4]: its live leg needs a
walled boot (knownGaps[0]), so it is scored from the pin. acceptance[5]
is test-scored. negative[3] is procedural.
- platform-owner-email-anchor acceptance[5] and negative[1] are
test-scored. negative[3] is out of scope.
- record-view-read-audit acceptance[5] is test-scored. negative[0] needs
a broken ledger. negative[1] is the unit pin's no-principal skip.
negative[2] is a cross-reference.
## Tests
Head `f3aa3510`, the five touched files, under `os-verify-lock`: `Test
Files 5 passed (5)`, `Tests 103 passed (103)` (`VERDICT command-exit
0`). `pnpm --filter @objectstack/dogfood typecheck`: exit 0. The full
dogfood battery is CI's.
## Acceptance notes
- platform-owner-email-anchor: the variants restart one deployment on
one database, because the item's steps restart one deployment too.
Measured on this head, a fresh database booted with a well-formed
`OS_PLATFORM_OWNER_EMAIL` promotes only the declared owner
(`bootstrap-platform-admin.ts`, the declared-owner branch). The seeded
admin then answers 403 on `GET /datasources`, so the admin contrast in
acceptance[2] exists only on a deployment first booted unset. The pin
follows the steps, and the ref records why.
- M's verification is a system-context engine update of
`email_verified`. This is the doorway the item's knownGaps names,
because no HTTP door verifies a second account. Before the malformed
variant runs, the pin asserts that M holds no `admin_full_access` grant,
so M's refusal there comes from the malformed entry alone.
- record-view-read-audit: the configured half uses `bootShowcase`'s
`extraPlugins` instead of the knownGaps scratch-copy recipe. It is the
same constructor call the docs snippet puts in an app's `plugins` array,
and the measured install line is the one the item quotes.
## Verification
Local gate subset on head `f3aa3510` (origin/main `c8583f80` contained):
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derives 55 families. All 55 ran and exited
0, and `--ran` reconciles `55 derived famil(ies) accounted for — 55 run,
0 NOT-MEASURED`. Repository-wide scans (`pnpm lint`, the full dogfood
battery) are CI's.
`node scripts/check-platform-checklist.mjs`: `check-platform-checklist:
OK — 16 areas, 329 items (324 active, 1 planned)`.
Changeset: none. `@objectstack/dogfood` is private and `docs/qa/**`
ships in no package, so this PR carries `skip-changeset`.
Template note: `.github/PULL_REQUEST_TEMPLATE.md`'s `Why` section is
folded into 维护者速读 and What changes. Its Human Minimum items: 1 n/a (no
spec); 2 yes; 3 no formatter ran, and `pnpm lint` is left to CI; 4 yes;
5 n/a (publishes nothing); 6 n/a; 7 yes; 8 yes.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbWKBLcQCG7FBS17aMA)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent dabe771 commit 5787df4
6 files changed
Lines changed: 662 additions & 11 deletions
File tree
- docs/qa/platform-checklist/areas
- packages/qa/dogfood/test
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 | + | |
| 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 | + | |
0 commit comments