Repository navigation
fix(organizations)!: retire claimOrphanOrgRows — the first organization no longer adopts organization-less rows - #25246
Conversation
Claude-Session: https://claude.ai/code/session_0146UznqonWCqNdiHePZ9Xy3 Co-authored-by: Claude <noreply@anthropic.com>
…zation-less row Claude-Session: https://claude.ai/code/session_0146UznqonWCqNdiHePZ9Xy3 Co-authored-by: Claude <noreply@anthropic.com>
…changeset Claude-Session: https://claude.ai/code/session_0146UznqonWCqNdiHePZ9Xy3 Co-authored-by: Claude <noreply@anthropic.com>
…he retired claim site Claude-Session: https://claude.ai/code/session_0146UznqonWCqNdiHePZ9Xy3 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 16 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 6 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 43 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 44600bdf33fa0e82278195369dd4f6c7055a3fa9 && git checkout 44600bdf33fa0e82278195369dd4f6c7055a3fa9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3e073894db7e6cd7b7e8fdae3da3d81743159515 edd58828f36822bae48e7fa82eb3941f25c3a288 && git checkout -B drift-repro 3e073894db7e6cd7b7e8fdae3da3d81743159515 && git merge --no-ff edd58828f36822bae48e7fa82eb3941f25c3a288
node scripts/docs-audit/affected-docs.mjs --json 3e073894db7e6cd7b7e8fdae3da3d81743159515
|
Contract reviewServed-tier: Reading: head ① Derived judgments
② Semver level
③ Boundary flagsFrom the measurement os-dev-report 6342754850:
From the build os-dev-report 6344758046:
Raised by this review:
Implemented-by: VERDICT: PASS |
|
Seat ACCEPT · epic PM Seat check
|
Fixes #25204
Clause-②: no (narrowing)
Metadata-protocol: none
The build of decision A (retire) on #25204, from the measurement os-dev-report 6342754850 and the seat's decision 6342853688.
What changes
claimOrphanOrgRowsis retired.packages/plugins/organizations/src/claim-orphan-org-rows.tsand its test (8 mock-engine cases) are deleted. Inorganizations-plugin.ts, Middleware B's "Fallback A" is removed together with itsclaimed N orphan seed row(s) for first organizationlog line, and header item 2b is replaced by a statement of why both retired paths (the donor clone and the orphan claim) must not come back. The false "Idempotent: a no-op once an organization-tagged row exists" sentence lived only in the deleted file's header.limit: 2onsys_organization). A first organization with no seed replay now logs the same "starts empty" line every later organization already logs.claimOrphanOrgRowsleaves@objectstack/organizations'sindex.ts, and its README row goes with it.scripts/engine-double-contract.pinned.json(node scripts/check-engine-double-contract.mjs --write: the deleted test's row lost, the new pin's row added) and the tenant-audit census (node scripts/tenant-audit-census.mjs --write: theclaim-orphan-org-rows.tsrow leavescounts.md, 237 sites become 236). The census page's hand-written prose counts were restated to match, ascheck-tenant-audit-censusrequires (the historical carried figures in the first column are left as quoted).claim-org-seed-ownership.tsheader,org-scoping-engine.tsheader, plugin-securityclaim-seed-ownership.tsheader,security-plugin.ts(which also named the retiredcloneOrgSeedData), and the runtimeapp-plugin.tspassage that quoted the plugin-security header (reworded rather than left quoting text that no longer exists).claim-org-seed-ownership.tschanges in its header prose only. No ceremony change, noORGANIZATION_OWNERSHIP_SHAPE_GENERATIONchange.Pins
packages/plugins/organizations/src/first-organization-orphan-rows.pin.test.ts, against the real plugin's Middleware B over an in-memory engine whoseupdate()opens withassertEngineUpdateDispatch:update.claimOrgSeedOwnershipstill re-owns exactly the rows the replay reported, and touches no organization-less row.Ablation (Fallback A put back through
scripts/ablation-replace.mjs, withclaim-orphan-org-rows.tsrestored fromorigin/mainunder a trap; marker count 1 on disk before the run; restore proven by blob == HEAD and an emptygit diff HEAD):Tests 1 failed | 3 passed (4), the failure being the seedless case,expected [] to deeply equal [ 'crm_account:acc_orphan', …(2) ]: the claim wrote all three rows. The replay case stays green under the ablation by construction (the claim ran only when the replay landed nothing).Changeset
@objectstack/organizationspatch, with a BREAKING banner, the FROM/TO line for the retired export, and the ADR-0087 markernot-required (runtime-export-retired @objectstack/organizations#claimOrphanOrgRows).Acceptance notes
check-governed-merges --branch: 0 of 15 paths hit the register, not governed; 691 changed lines.Generated by Claude Code