Repository navigation
Commit c8583f8
test(dogfood): pin access-security checklist clauses at the api oracle's layer, slice 1 (#26797)
<!-- 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 1 of about 4, items: access-security.rls-both-sides,
access-security.write-path-guards,
access-security.crud-permission-matrix,
access-security.owd-sharing-matrix, access-security.fls-mask-and-strip)
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:给 access-security 区前 5 个清单条目补上 dogfood 断言(进程内 HTTP,正是这些条款的 oracle
层),共钉住 19 条此前只靠现场手跑的条款;5 个条目的 `automated.ref` 改写成逐条款对应、`revision`
加一、`history` 记本卡。
- 为什么改:18.2.0 Tier 1 记录 #26468 里这 5 条全是
PARTIAL——旧断言只看状态码、不复读行,或只覆盖部分对象/人设;每次发版都要重新手跑。钉住后成为可重复跑的常备证明。
- 风险与回滚:只加测试和改清单文字,不动任何产品代码;新增断言全部按现行行为写成并跑绿。dogfood 仍在原有位置运行,没有新 CI
通道。回滚即 revert 本 PR。
- 先看:① `showcase-crud-persona-matrix.dogfood.test.ts` 新增的 delegate ×
sys_* 16 格用例(含 sys_user 的 405);②
`showcase-readonly-when-parent.dogfood.test.ts` 的 updateMany 逐行用例;③
`access-security.json` 里 crud-permission-matrix 的新 `automated.ref`。
- 两分钟验证:`cd packages/qa/dogfood && pnpm exec vitest run
test/showcase-crud-persona-matrix.dogfood.test.ts`(需先按 dogfood 惯例 build
依赖闭包),预期 `Tests 49 passed`。
- 需要你做的:无,席位落地。
## What changes
Pins at the layer each clause's oracle names (`api`: the in-process HTTP
stack of `@objectstack/verify`), in `packages/qa/dogfood/**` only. No
product code changes. Every new assertion was written against today's
behaviour and is green.
| item | clauses newly pinned | where |
|---|---|---|
| rls-both-sides | acceptance[2], acceptance[3], negative[0] |
`showcase-private-owd`: the admin re-reads the foreign note after the
refused PATCH (whole record equal), and the admin's filtered list
carries every note the file created |
| write-path-guards | acceptance[0], [4], [5], [6], negative[0] |
`showcase-static-readonly`: INSERT strip advertised in body
`droppedFields` and the `X-ObjectStack-Dropped-Fields` header.
`owner-anchor-and-bulk-writes`: member REST `createMany` stamps the
caller on all three rows; the admin's forge-insert and disown pass.
`showcase-readonly-when-parent`: the paid line's `product` is held; a
mixed `updateMany` reports `results[i].droppedFields` (`readonly_when`)
on the locked row only, and the open row lands; `updateMany` with
`continueOnError: true` fails the row below `min: 0` alone
(`VALIDATION_FAILED`, unchanged) and applies both neighbours, with the
default stop shape (tail `NOT_ATTEMPTED`) pinned beside it |
| crud-permission-matrix | acceptance[0], [1], [3], [6], negative[0] |
`showcase-crud-persona-matrix`: the auditor's viewAllRecords over a
foreign inquiry, invoice and line (by id and filtered list) against a
contributor who holds read without the bit; the first denied cell of
every set re-run as the admin answers 2xx; and the 16
`showcase_field_ops_delegate` × `sys_*` cells driven by a member holding
exactly that set, with `sys_user` create and delete scored 405
`OBJECT_API_METHOD_NOT_ALLOWED` for the delegate and the admin |
| owd-sharing-matrix | acceptance[0], [1], [4], [5] |
`showcase-private-owd` / `showcase-public-read-owd`: non-2xx by-id read,
PATCH at least 400, admin re-read unchanged. New
`showcase-invoice-line-contributor-pair` (shared-showcase project): two
stock `showcase_contributor` members C1/C2 and a stock
`showcase_auditor`; C2's filtered list excludes C1's line while C1's
identical list carries it, C2's by-id read and PATCH are refused with
the row unchanged, C1 reads and edits it, the auditor lists and reads it
|
| fls-mask-and-strip | acceptance[0], [2] | `showcase-permission-zoo`:
the contributor's name edit re-reads changed; the admin's budget write
on a seeded project lands and re-reads changed (raised, then put back) |
Ledger: each of the five items gets a rewritten `automated.ref` that
maps clauses to cases, `revision` +1, and a `history` row citing #26571.
The owd-sharing-matrix ref also names two existing
`showcase-crud-persona-matrix` cases that already pinned its
acceptance[2] (modifyAllRecords) and acceptance[3]
(`showcase_contributor` / `showcase_member_default` × `showcase_project`
edit cells), which revision 5 recorded as unpinned.
`vitest.config.ts`: the new file joins `SHARED_SHOWCASE`. It meets that
list's three eligibility rules: plain showcase boot, only
`sys_user_permission_set` rows for its own sign-ups, and every list
filtered to its own row.
Clauses left as they are, each with its reason in the item's
`automated.ref`:
- rls-both-sides acceptance[5], negative[1], negative[2]: procedural (a
reading of the verify report, run-record rules), and the D11 spot-check
needs the private write-up.
- crud-permission-matrix acceptance[5]: `blocked(fixture)` per
knownGaps[2] (the guest anchor intake is not observable on a member
persona).
- owd-sharing-matrix acceptance[6]: procedural (run-record
completeness).
- fls-mask-and-strip acceptance[3] and the UI half of acceptance[4]:
`dom` / browser oracle. The dogfood suite drives no browser and the
ruling adds no CI lane, so they stay a run's browser leg.
## Tests
Head `fd634911`, the eight touched files, under `os-verify-lock`: `Test
Files 8 passed (8)`, `Tests 103 passed (103)` (`VERDICT command-exit
0`). `pnpm --filter @objectstack/dogfood typecheck`: exit 0. The full
dogfood battery is CI's (no `!` in the title, no narrowing arm).
## Acceptance notes
- crud-permission-matrix `acceptance[6].verify` and `steps[6]` still
describe the 16 delegate cells as hand-driven, and the same file's
header comment said "6 delegate rows" (now corrected to 4 in the test
header). The two item-text fields sit outside this slice's claimed edit
surface (`automated.ref`, `revision`, `history`); the history row says
so.
- Measured on head `fd634911`: the delegate's 16 cells answer exactly
the matrix, unioned with nothing — `sys_business_unit`,
`sys_business_unit_member` and `sys_user` read 200, every withheld verb
403 `PERMISSION_DENIED`, `sys_user` create and delete 405,
`sys_user_position` create 201 and read/edit/delete 200 on the
delegate's own in-subtree row.
## Verification
Local gate subset on head `fd634911` (origin/main merged, including
#26337): `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` is folded into
维护者速读 and `What changes`; its Human Minimum items hold as follows: 1 n/a
(no spec), 2 yes, 3 no formatter ran, `pnpm lint` 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 0f0b9f5 commit c8583f8
10 files changed
Lines changed: 554 additions & 26 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 | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 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 | + | |
163 | 199 | | |
164 | 200 | | |
165 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
553 | 555 | | |
554 | 556 | | |
555 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
556 | 712 | | |
557 | 713 | | |
558 | 714 | | |
| |||
632 | 788 | | |
633 | 789 | | |
634 | 790 | | |
635 | | - | |
| 791 | + | |
636 | 792 | | |
637 | 793 | | |
638 | 794 | | |
| |||
0 commit comments