Repository navigation
refactor(plugin-security): delete the position write-through and the row-only position backfill (C3 stage 7b) - #23302
Conversation
…row-only position backfill, and stop the boot reference report reading position rows (ADR-0131 D3, C3 stage 7b) Stage 8 stopped registering the sys_position row object, its data-door write-through and the row-only position backfill. Nothing references position-write-through.ts or position-environment-backfill.ts any more, so both go. PositionNameConflictError, which only the write-through raised, goes with its module. The catalog reference report drops its two position-row categories (a position row with no definition, and a position name several rows carry) and the posture input only they used. No composition provisions sys_position after stage 8, so those categories could never read a row; legacy position rows are the upgrade ceremony's (ADR-0131 D10). The report still lists every unresolved assignment, every unresolved grant and every grant that names nothing. The system-context page loses row 11b, and the tenant-audit census drops the write-through's untyped-receiver row; the census and its prose figures are regenerated. Claude-Session: https://claude.ai/code/session_01287UbjvrigpWwNfGDmdwpS Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 44 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 15 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin c1315fc943e8ace4d8f6bd74d97794c2042f85e8 && git checkout c1315fc943e8ace4d8f6bd74d97794c2042f85e8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9c7cfbf0a962ad690f1b4cbe271c95d909000d64 8c7ee7f06aaf4cc75d3a1b2536a2ac18196de4dd && git checkout -B drift-repro 9c7cfbf0a962ad690f1b4cbe271c95d909000d64 && git merge --no-ff 8c7ee7f06aaf4cc75d3a1b2536a2ac18196de4dd
node scripts/docs-audit/affected-docs.mjs --json 9c7cfbf0a962ad690f1b4cbe271c95d909000d64
|
Contract reviewServed-tier: PR #23302 (#22975 slice 7b, re-cut) on branch ① Derived judgmentsDead before deletion — yes, every symbol, measured on
The package entry — no deleted symbol was ever reachable from it. The reference report ( Behaviour a deployment loses — each already unreachable after S8; no guarantee leaves without a door-side home.
Regenerated files — consistent with the diff. The census script loses the write-through's Published text. Corrected here: The deletion clause. No test file is deleted. The three deleted ② Semver levelThe changeset grades ③ Boundary flags
Adopted by
Implemented-by: VERDICT: PASS |
Refs #22975
Clause-②: no
C3 (#15204) stage 7b: delete the position write-through and the row-only position backfill. Stage 8 left both unreferenced, so this is dead-code deletion. It is the parallel half of 7a; 8-post follows once both have landed. #22975 stays open.
What this changes
Stage 8 (#23222) stopped registering the
sys_positionrow object, thesys_positiondata-door write-through and the row-only position backfill. Their modules stayed in the tree with no caller. This PR deletes them.Deleted:
position-write-through.tsandposition-environment-backfill.ts. Measured onmainbefore this PR: no file importsposition-environment-backfill, and onlycatalog-reference-report.tsimportsposition-write-through(forPOSITION_OBJECTandmetadataDoorAcceptsPositionName). The backfill is deleted rather than switched to core'spositionDefinitionFromRow. That mapper (feat(core): pure row-to-definition mappers for the ADR-0131 upgrade ceremony (C7b build-ahead, PR 1 of 2) #22959) stays in core for the upgrade ceremony; no boot path calls it.PositionNameConflictErrorgoes with the write-through, its only thrower (ruling Q4 → A). It was never exported from the package's entry.The catalog reference report (
catalog-reference-report.ts) drops categories 4 and 5:It also drops the
postureinput, which only those two categories read. No composition registerssys_positionafter stage 8, so those categories could never read a row. Legacy position rows are the upgrade ceremony's to convert and report (ADR-0131 D10). The report still lists, per organization:The report is not exported. Seat answer Q1 → A.
Generated, regenerated with the repo's own tools:
content/docs/permissions/system-context.mdx;UNTYPED_RECEIVERSrow leavesscripts/tenant-audit-census.mjs;node scripts/tenant-audit-census.mjs --write, and the prose figures the gate names are updated (228 → 225 sites).No export of
@objectstack/plugin-security's entry changes. The changeset is apatch, so no ADR-0087 marker is needed.Acceptance notes
security-plugin.tsregions. Whichever PR lands second mergesmain, re-runsnode scripts/tenant-audit-census.mjs --writeand updates the census prose figures.Verification
On head
8c7ee7f06a(main026391d5d8merged in), unless noted:plugin-securityunit suite: 188/188 files, 3,854 passed (45 skipped). Typecheck: exit 0. eslint on the changed files: exit 0.check:tenant-audit-censusandcheck:system-context-census: exit 0.dispatch-gates --commands): 114 derived and 114 run, all exit 0;--ranreconciles with 0 NOT-MEASURED and 0 UNRUN. This was measured on05dee10c89, the head before the last merge ofmain, whose five commits touch none of these files.check:dual-build-cjs-loadson a full build (74/74 tasks): exit 0.check:platform-checklist: exit 1 with 8 reds. The same 8 reds appear onmain(they are pre-existing).--project integration): 119/119 files, 1,036 tests passed.@objectstack/plugin-security's entry changes, so nothing the console imports moves. CI's Console Pin Gate covers it.Generated by Claude Code