Skip to content

test: the stage-8 test half — suites stop depending on the four catalog row objects (#15204 stage 8, S8-T) - #22962

Draft
objectstack-fleet[bot] wants to merge 6 commits into
mainfrom
claude/issue-15204-s8t-tests
Draft

objectstack-fleet[bot] wants to merge 6 commits into
mainfrom
claude/issue-15204-s8t-tests

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Clause-②: no

Part of #15204 (C3 stage 8, the test half: S8-T). The code half (S8, branch claude/issue-15204-s8-catalog-objects) opens after #22900 (D) is on main; this PR lands after D and just before S8. #15204 remains open.

What this changes

Test files only. Every edit keeps the suite green on today's main and on main + D + 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).

  • A testkit for the retired tables. plugin-security/src/__tests__/legacy-catalog-objects.testkit.ts holds 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). 42 suites point their imports at it instead of ./objects/sys-*.object.js. withLegacyCatalogTables() adds the shapes a plugin no longer declares.
  • Deleted, because they pin what S8 removes: the object-declaration pins (sys-*.organization-unique, sys-capability-deactivation-claim, clone-carryover, the junction/position cases of rbac-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 deletes isRowActive), pin 6 of packaged-permission-set-lock.test.ts (the retired object's clone action), 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.
  • Fixtures moved off the rows: dogfood suites that authored a permission set through POST /api/v1/data/sys_permission_set now use PUT /api/v1/meta/permission/:name (or protocol.saveMetaItem); checks that a set "was seeded" read the engine registry; vestigial sys_position row inserts are gone; censuses of a retired table answer "no rows" when the object is not registered.
  • Pins made to span the change: the clone-route refusal prose (POST /api/v1/data/sys_permission_set → the catalog's clone door) is pinned around the route; the uninstall-cleanup runner request may carry declared; page/registry floors drop by the retired page and the four names; the tenancy-inventory and dangling-reference fixtures use surviving security tables; cleanup-package-permissions.test.ts passes the package's declared set names and asserts what holds both ways (grants naming the sets revoked, suggestion rows removed).
  • New pins:
    • bootstrap-platform-admin-fresh-boot.golden.test.ts — a fresh single-posture engine holding only the plugin's own objects promotes its first human (E6's first pin). Ablation on the integration tree: with D's bootstrap-platform-admin.ts (the legacy-row read) put back, both cases go red (adminPromoted: false); restored, green; git diff HEAD empty after restore. E6's second pin (an unnamed legacy admin grant mints no second administrator) is the existing grant-readers-unnamed-grant.test.ts case, green on both sides.
    • permission-metadata-door-reaches-catalog.dogfood.test.ts — a create, an edit and a delete through /api/v1/meta/permission each reach the security catalog the resolver reads, and a grant naming the set is accepted exactly while the catalog holds it. Green on main (projector wired) and on main + D + S8 (projector unwired): the premise E1 → A rested on.

After D lands

D rewrites several of the same files, so this branch takes a main merge before it lands. The resolutions were made and run on a local integration tree (main + D + this PR + S8): take this PR's deletions over D's edits; in activity-text-predicate, approval-snapshot-masked-field, sharing-rule-org-less-caller and showcase-crud-persona-matrix keep D's catalogPermissionSet reads; in showcase-fls-read-mask-strip and showcase-permission-zoo take this PR's side; delete ensureLegacyPermissionSetRow from D's catalog-permission-set.ts (no caller left); guard the row census in D's showcase-permission-seeding with getObject('sys_permission_set').

Verification

skip-changeset: only test files, a test-only testkit under src/__tests__ (no entry imports it; files ships dist only) and the private dogfood package change.


Generated by Claude Code

…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>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 12, 2026
os-steve pushed a commit that referenced this pull request Oct 12, 2026
# 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
This was referenced Oct 12, 2026
@objectstack-fleet objectstack-fleet Bot assigned os-steve and unassigned marchtian Oct 13, 2026
…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>
…s declared names shape

D (#22900) landed the uninstall cleanup's declared names as
`UninstallDeclared` ({ permission: string[] }), not the bare name array the
stage-8 branch was built against. The suite now passes that shape and drops
its signature cast; D's two named-grant pins are restated over S8-T's fixture
so each holds whether the sweep also reaches the package's catalog rows
(main) or reaches its sets by the declared names alone (after C3 stage 8).
The runner suite's comment attributes `declared` to the names D captures.

Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see

Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 02bec6ca86e9f1237a3f82a9efff9cb3a53562ef → packageMentionDocs.

Which tree this was computed on

This run read content/docs from aae5d625ae4506d9877e33bb05d94f5080d5e1a7 — the merge of head d426f922eda9787b28bea0274138bb3fecb84ef0 into base 02bec6ca86e9f1237a3f82a9efff9cb3a53562ef, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin aae5d625ae4506d9877e33bb05d94f5080d5e1a7 && git checkout aae5d625ae4506d9877e33bb05d94f5080d5e1a7
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 02bec6ca86e9f1237a3f82a9efff9cb3a53562ef d426f922eda9787b28bea0274138bb3fecb84ef0 && git checkout -B drift-repro 02bec6ca86e9f1237a3f82a9efff9cb3a53562ef && git merge --no-ff d426f922eda9787b28bea0274138bb3fecb84ef0

node scripts/docs-audit/affected-docs.mjs --json 02bec6ca86e9f1237a3f82a9efff9cb3a53562ef

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

…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>
os-steve pushed a commit that referenced this pull request Oct 13, 2026
…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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protocol:system size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants