Repository navigation
test: the stage-8 test half — suites stop depending on the four catalog row objects (#15204 stage 8, S8-T) - #22962
Conversation
…og row objects (#15204 stage 8, S8-T) Every touched suite stays green on main and on main + D + S8, where sys_position, sys_permission_set, sys_position_permission_set and sys_capability are no longer registered (ADR-0131 D3). - a testkit holds the retired tables' shapes for suites that model an existing database; - pins of the retired declarations, the unwired data-door write-throughs, the projection, the row lock and the junction gates are deleted; - fixtures author permission sets through the metadata door; - prose and floor pins span the route move and the retired page; - new: a fresh-boot promotion golden (E6) and a metadata-door-reaches- the-catalog dogfood test (the premise of E1). Claude-Session: https://claude.ai/code/session_01MGoWgeE8rhsrig77V4oUZn Co-authored-by: Claude <noreply@anthropic.com>
# Conflicts: # packages/plugins/plugin-security/src/bootstrap-platform-admin-authenticable-target.test.ts # packages/plugins/plugin-security/src/bootstrap-platform-admin-promotion-selection.test.ts # packages/plugins/plugin-security/src/bootstrap-platform-admin-refused-existence-read.test.ts # packages/plugins/plugin-security/src/objects/rbac-objects.test.ts # packages/plugins/plugin-security/src/per-organization-catalog.test.ts # packages/plugins/plugin-security/src/position-write-through.test.ts # packages/qa/dogfood/test/activity-text-predicate.dogfood.test.ts # packages/qa/dogfood/test/approval-snapshot-masked-field.dogfood.test.ts # packages/qa/dogfood/test/permission-set-lock-row-provenance.dogfood.test.ts # packages/qa/dogfood/test/permission-set-write-through-package-binding.dogfood.test.ts # packages/qa/dogfood/test/sharing-rule-org-less-caller.dogfood.test.ts # packages/qa/dogfood/test/showcase-crud-persona-matrix.dogfood.test.ts # packages/qa/dogfood/test/showcase-fls-read-mask-strip.dogfood.test.ts # packages/qa/dogfood/test/showcase-permission-projection.dogfood.test.ts # packages/qa/dogfood/test/showcase-permission-zoo.dogfood.test.ts # packages/qa/dogfood/test/two-doors-permission.dogfood.test.ts
…8 test half resolved onto main Conflicts resolved by the stage-8 report's D-merge recipe: - S8-T's deletions taken over main's edits: bootstrap-platform-admin- refused-existence-read, position-write-through, and the dogfood files permission-set-lock-row-provenance, permission-set-write-through- package-binding, showcase-permission-projection, two-doors-permission; rbac-objects keeps S8-T's removal of the retired declaration pins. - main's catalogPermissionSet reads kept in activity-text-predicate, approval-snapshot-masked-field, sharing-rule-org-less-caller and showcase-crud-persona-matrix. - showcase-permission-zoo takes S8-T's side; showcase-fls-read-mask-strip takes S8-T's metadata-door authoring and keeps main's catalog read. - plugin-security imports keep main's seedLegacyPlatformBucket and point the object shapes at the legacy-catalog-objects testkit. - ensureLegacyPermissionSetRow leaves the dogfood catalog helper: every caller is deleted. showcase-permission-seeding's row census runs only where sys_permission_set is still registered. - the runtime seeder-copy suite keeps main's "no row" pin beside S8-T's registered-object guard; the record-page label-map floor is restated for B2's two dropped maps and the retired position page. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
…he four catalog row objects Three files that reached main after S8-T's base read the retired objects: - walled-catalog-data-door.test.ts is deleted: it pins the walled catalog refusal's data-door registration on sys_position, sys_permission_set and sys_capability, which stage 8 unregisters with the write-throughs (the precedent of position-write-through.test.ts); - wall-catalog-refusal's data-door case answers 403 PERMISSION_DENIED while the row objects are registered and 404 OBJECT_NOT_FOUND once they are retired, and asserts no definition either way; - mail-message-pool-read-gate reads its fixture sets from the security catalog: no boot has written a sys_permission_set row since D, so the row read failed on main as well. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
…h: the stage-8 test half under the code half S8-T is draft PR #22962 and carries a merge of main at f931e76, after D (c8a9783). Clean merge, no file in common with stage 8's own diff; every one of S8-T's 93 files here is byte-identical to its head. Until S8-T lands on main this branch's diff also carries its hunks. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
Measured on a local main + S8-T + S8 tree: - plugin-auth's two grant-reader suites seed the legacy platform-bucket rows only where sys_permission_set is still registered; - builtin-positions expects the walled tenant create refusal while the plugin declares the sys_position row object, which stage 8 retires together with that refusal; - the record-page label-map floor is 38, the count with B2's two maps and the retired position page gone. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
… data-door create out Seat ruling: the walled scenarios no longer judge a tenant's create of the hand-registered legacy sys_position row. That data-door refusal retires with the object in stage 8, as walled-catalog-data-door.test.ts did, and the walled create refusal is pinned at the /meta wall (wall-catalog-refusal.dogfood.test.ts). Replaces the previous commit's declares-the-object switch; every other key of the golden is unchanged. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
…ermission_set table before seeding its bucket rows Seat ruling: the two suites model an existing database whose platform-bucket rows outlive the object declaration, so each registers the legacy sys_permission_set table shape (a test-only copy under src/__tests__, the shape plugin-security's testkit holds) whenever the plugin no longer declares it, and seeds the rows unconditionally. Replaces the previous commit's skip of the seed after stage 8; the walled organization copies and the legacy-id write read their rows on both trees again, as on main. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
…ed object list The plugin's manifest hands its objects as unknown[], so the helper reads each entry's name defensively; the test layer compiles again under tsconfig.test.json (check:test-typecheck). Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
Contract reviewServed-tier: Read-only inputs: PR #22962's body, file list (94) and commits since ① Derived judgmentsTest-only, confirmed. 74 modified, 16 removed, 4 added. Every path is a The 16 deletions against E1 → A, E3 → A, E4 → A and the deletion clause. Reading applied: the epic seat ruled "Tests go in T-PRs ahead of" stage 8 (6110777865), so a pin whose code S8 removes is deleted here; the clause is then met in substance, not in letter, and the window between S8-T and S8 is the ruled cost. Per file:
No deleted file pins a behaviour that survives S8 without a pin at a layer at least as close to the code. Not a FAIL. The clause finding, Weakened or removed assertions in kept files.
The testkits. The mail-pool hunk. Both trees. Tree A ( ② Semver levelNo changeset, ③ Boundary flags
Adopted by Implemented-by: VERDICT: PASS |
…sitions judges the walled create while sys_position is declared Patch round 1 (contract review on e40fe49, seat ruling): - walled-catalog-data-door.test.ts is restored with main's bytes: five of its six cases have no other pin until stage 8 removes the door, and the deletion clause asks for one. Stage 8 deletes it together with the door. - builtin-positions.boot keeps the walled `control: create a position row` key (403 PERMISSION_DENIED) wherever the plugin declares sys_position, and leaves it out only once the object is retired. Its comments name the door that refuses the create: walled-catalog-data-door.ts, pinned by that suite and by wall-catalog-refusal's data-door case. Every other key unchanged. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
Contract reviewServed-tier: Delta record after the PASS 6140381269 on ① Derived judgmentsThe delta is exactly the two files the patch round named.
The deletion clause (ruling record 6120820653, as the prior record read it under 6110777865). The walled finding is closed: The PR body's corrected passages are true at this head. The Deleted bullet no longer lists the walled suite among the deletions and ends with it staying at The prior record's ① judgments hold on this head. Test-only: every one of the 93 paths is a ② Semver levelUnchanged. No changeset, ③ Boundary flags
Adopted by Implemented-by: VERDICT: PASS |
维护者速读 · PR #22962(S8-T,C3 第 8 阶段的测试半边)·
|
Clause-②: no
Part of #15204 (C3 stage 8, the test half: S8-T). The code half (S8) is built ahead on
claude/issue-15204-s8-catalog-objectsand lands right after this PR. #15204 remains open.What this changes
Test files only. Every edit keeps the suite green on
mainand onmain+ S8, where the four security-catalog row objects (sys_position,sys_permission_set,sys_position_permission_set,sys_capability) are no longer registered (ADR-0131 D3).plugin-security/src/__tests__/legacy-catalog-objects.testkit.tsholds the four tables' shapes (fields, indexes, validations only), for suites that model an existing database whose rows outlive the object declarations until the organization-ownership migration (ADR-0131 D10). The suites that registered the object declarations import the shapes from it;withLegacyCatalogTables()adds the shapes a plugin no longer declares. plugin-auth's two grant-reader suites register thesys_permission_setshape the same way (plugin-auth/src/__tests__/legacy-catalog-objects.testkit.ts, a test-only copy: the plugin-security file is no export, and a relative import would make a test read another package's source) before seeding the platform-bucket rows.sys-*.organization-unique,sys-capability-deactivation-claim,clone-carryover, the junction/position cases ofrbac-objects,reserved-identity-names,managed-by-system-data,sys-security-assignment-display-title,rbac-objects-bulk-exposure),position-write-through.test.ts(S8 unwires that middleware; 7b deletes the module),bootstrap-platform-admin-refused-existence-read.test.ts(the legacy-row read S8 removes),row-active.test.ts(S8 deletesisRowActive), pin 6 ofpackaged-permission-set-lock.test.ts, and the dogfood files for the data-door write-throughs, the projection, the row lock and the junction gates:two-doors-permission,declared-position-provenance,permission-set-lock-row-provenance,permission-set-write-through-package-binding,showcase-permission-projection,position-environment-write-through,position-held-name-setup-create.ensureLegacyPermissionSetRowleaves the dogfood catalog helper with its last callers.walled-catalog-data-door.test.ts(fix(security)!: under a wall the security catalog is the platform operator's — tenants are refused catalog writes and may only assign (ADR-0131 D3) #22895) stays withmain's bytes: S8 deletes it together with the walled data-door refusal it pins.POST /api/v1/data/sys_permission_setusePUT /api/v1/meta/permission/:name(orprotocol.saveMetaItem); checks that a set "was seeded" read the security catalog (catalogPermissionSet) or the registry; vestigialsys_positionrow inserts are gone.mail-message-pool-read-gatereads its fixture sets from the catalog (split out and landed onmainas test(dogfood): the inbound-mail pool suite reads its fixture sets from the security catalog #23159,b8f226c440, the same blob).showcase-permission-seeding, the runtime seeder-copy suite,permission-set-clone-door,showcase-d7-default-profile);wall-catalog-refusal's data-door case answers403 PERMISSION_DENIEDwhile the row objects are registered and404 OBJECT_NOT_FOUNDonce they are retired, with no definition either way;builtin-positions.boot's walled golden keepscontrol: create a position row(403 PERMISSION_DENIED, the walled data-door refusal ofwalled-catalog-data-door.ts) wherever the plugin declaressys_position, and leaves it out only once the object is retired; every other key is unchanged;cleanup-package-permissions.test.tshands the sweep D'sUninstallDeclaredshape ({ permission: [...] }) and asserts what holds both ways; D's two named-grant pins are restated over this fixture;declared; page/registry floors drop by the retired page and the four names (the record-page label-map floor is 38, with B2's two maps gone); the tenancy-inventory and dangling-reference fixtures use surviving security tables.bootstrap-platform-admin-fresh-boot.golden.test.ts: a freshsingle-posture engine holding only the plugin's own objects promotes its first human (E6's first pin). E6's second pin is the existinggrant-readers-unnamed-grantsuite.permission-metadata-door-reaches-catalog.dogfood.test.ts: a create, an edit and a delete through/api/v1/meta/permissioneach reach the security catalog the resolver reads (the premise E1 → A rested on).Merge of
mainafter D, and the re-check against DMerge commit
a805619472takesmainatf931e765b7(D #22900 isc8a9783eca). No rebase, no force-push; generated files went throughscripts/pm/os-regen-merge.sh(this branch touches none; the rerun's step 2 took nothing). Conflicts, all hand-written test files:main's edit:bootstrap-platform-admin-refused-existence-read(D),position-write-through(fix(security)!: under a wall the security catalog is the platform operator's — tenants are refused catalog writes and may only assign (ADR-0131 D3) #22895), and the dogfoodpermission-set-lock-row-provenance,permission-set-write-through-package-binding,showcase-permission-projection,two-doors-permission(T2, and feat(spec,metadata-protocol)!: rename the type registry's allowOrgOverride to allowEnvironmentOverlay, on the registry and on GET /meta/types #22874's rename);rbac-objects: S8-T's removal of the retired declaration pins (mainhad only dropped one case inside them);activity-text-predicate,approval-snapshot-masked-field,sharing-rule-org-less-caller,showcase-crud-persona-matrix:main'scatalogPermissionSetreads kept, S8-T'ssys_positioninsert removals kept;showcase-permission-zoo: S8-T's side;showcase-fls-read-mask-strip: S8-T's metadata-door authoring plusmain's catalog read;bootstrap-platform-admin-authenticable-target,-promotion-selection,per-organization-catalog:main'sseedLegacyPlatformBucketimport (and T1's removal ofbootstrapDeclaredPermissions) with the testkit imports;standalone-stack-seeder-declaration-copy:main's "no row" pin kept beside S8-T's registered-object guard;platform-page-i18n-parity: the label-map floor restated for B2 and the retired page.D changed after
fcaedfdaa1, the base S8-T was first built against. Every case the stage-8 report pinned against D was re-checked on this merge:catalogPermissionSetreads in the four dogfood filesshowcase-fls-read-mask-strip,showcase-permission-zoomain's catalog read); green on both treesensureLegacyPermissionSetRowgit grep)showcase-permission-seedingcensusgetObject('sys_permission_set'); green on both treesseedLegacyPlatformBucketplus the testkit; green on both treesUninstallDeclared({ permission }), not the bare array S8-T was written against:cleanup-package-permissions.test.tsnow passes that shape, D's two named-grant pins restated; green on both treesgrant-readers-unnamed-grant, plugin-security and plugin-auth)permission-metadata-door-reaches-catalog)declaredSuites
mainbrought in or changed after S8-T's base that read the four objects, made to hold on both trees here:wall-catalog-refusal,mail-message-pool-read-gate, plugin-auth's two grant-reader suites (legacy table registered before the T2 bucket seed, seat ruling),builtin-positions.boot(walled create judged whilesys_positionis declared, seat ruling).walled-catalog-data-door.test.tsis kept withmain's bytes: green onmain+ S8-T, red onmain+ S8-T + S8 by design, and S8 deletes it with the door.Verification
Two trees, built locally through
scripts/pm/os-verify-lock.sh:main+ S8-T: this branch.main+ S8-T + S8: a local, never-pushed scratch tree, S8's own commitdbae752f6ereplayed onto this branch, its conflicts with D's final form resolved the way the S8 build-ahead resolved them (D'scaptureUninstallDeclared/UninstallDeclaredkept; the walled data-door refusal unregistered with the write-throughs).main+ S8-Tmain+ S8-T + S89d55c0589a,walled-catalog-data-door.test.tsincluded)builtin-positions.boot(at S8-T008ca32a75), fixed belowbuiltin-positions.boot9d9bdd96b2; the walled create key judged,403 PERMISSION_DENIED)walled-catalog-data-door(main's bytes)9d9bdd96b2)Cannot find module './objects/sys-position.object.js'); S8 deletes it with the doorcleanup-package-permissionsgrant-readers-by-name.golden,grant-readers-unnamed-grante40fe491c1)008ca32a75("Object 'sys_permission_set' not found"); 9 passed ate40fe491c1organization-ownership-inventory,platform-page-i18n-parity)008ca32a75(38 label maps under a floor of 39); 35 passed with the floor at 38src/securityd426f922ed); plugin-auth again ate40fe491c1Every file changed after a full run was re-run on both trees at the final head. E6 ablation on the
main+ S8-T + S8 tree: withmain's (D's)bootstrap-platform-admin.tsput back (blobedf2a164d9, on disk by hash), the fresh-boot golden goes red, 2 of 2 (adminPromoted: false); restored (blob56166db769,git diff HEADempty), green, 2 of 2.Dogfood
PR and queue CI do not run the dogfood shards (#22998), so this is their first record before
main's full battery. The 24 files S8-T touches or that read the four objects, on the showcase boot:main+ S8-T9d55c0589a, the red onemail-message-pool-read-gate(main's own red since D; this branch carries the hunk #23159 landed onmain); atc0dc292ae8that file andwall-catalog-refusalgreen,activity-text-predicatetimed out once (5000 ms, contended box) and passed alone (22 of 22) atd426f922edmain+ S8-T + S8No dogfood file changed after
008ca32a75.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderives 89 commands for this diff at9d9bdd96b2(the same 89 as the dispatch's list at0d43004100). All 89 ran after the final commit and exit 0 (check:dual-build-cjs-loadsfirst answered PREREQUISITE NOT MET, exit 3, and exit 0 once every package was built);--ranwith each exit code recorded: "89 derived, 89 run, 0 NOT-MEASURED, 0 UNRUN".check:entry-nameabilitykeeps its existing note that@objectstack/spec/api-assembledand/qahave no callable export to measure;packages/specis untouched.Size
93 files, +1,255 / −3,950 = 5,205 changed lines against the merge base
f931e765b7, almost all deletion: over the 3,000-line line, so this lands by the maintainer's approval.mail-message-pool-read-gateleaves the diff at the nextmainmerge (maincarries the same blob).skip-changeset: only test files, a test-only testkit undersrc/__tests__(no entry imports it;filesshipsdistonly) and the private dogfood package change.维护者速读(草稿)
改了什么
C3 第 8 阶段的"测试半边"(S8-T),只改测试文件:93 个文件,+1,255 / −3,950 行,绝大部分是删除。四个已退役的安全目录行对象(
sys_position、sys_permission_set、sys_position_permission_set、sys_capability)将在 S8 中取消注册;本 PR 先让测试不再依赖它们:删除只钉住"S8 要拆掉的行为"的测试,夹具改为走元数据门(/api/v1/meta)或读安全目录,少数断言改成无论对象是否注册都成立。本轮还把 D 落地后的main合进来,并修了main新带进来、依赖这四个对象的 5 个测试文件。为什么改
ADR-0131 D3 规定权限集、岗位、能力只有一个归宿:安全目录(注册表)。S8 取消注册这四个行对象;测试若不先迁走,S8 一落地就会大面积变红。测试半边单独先落,S8 本身的代码改动才能保持可审。
风险与代价(含回滚)
main上少了几条钉"即将被拆掉的行为"的单元测试(如数据门写穿);走廊下数据门的创建拒绝(walled-catalog-data-door.ts)仍由原样保留的walled-catalog-data-door.test.ts和builtin-positions.boot钉着,S8 连同该门一起删除它们。S8 紧随其后落地。main的完整测试组是它们在 CI 上的首次记录。席位意见
你要做的
批准本 PR(授权批准或亲自合并);之后席位接着落 S8。
Generated by Claude Code