Repository navigation
feat(plugin-security): a position declares its earlier names in renamedFrom, and its holders move with it at boot - #33008
Conversation
…er the field renamedFrom refusals Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
…t boot, as the system, in every organization Holders only (ruling A1): an old name two positions claim, that a position still declares, that another package or the environment holds or is recorded as owning, or that is switched off is not carried and is named. Every other stored reference to an old name is named in the boot log and never rewritten. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
…ts for renamedFrom Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
…ssion record renamedFrom Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
…nant census counts the new system write Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
📓 Docs Drift CheckThis PR changes 2 package(s): 55 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 19 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 174 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 6055aa67ff09e716051a47ba2f3d5648aa0704db && git checkout 6055aa67ff09e716051a47ba2f3d5648aa0704db
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 64c426ab22aa1f13290240aff1cd02dc1bf56027 9b3d8b8169fd170b316d7fda7ea7a0c5907caca6 && git checkout -B drift-repro 64c426ab22aa1f13290240aff1cd02dc1bf56027 && git merge --no-ff 9b3d8b8169fd170b316d7fda7ea7a0c5907caca6
node scripts/docs-audit/affected-docs.mjs --json 64c426ab22aa1f13290240aff1cd02dc1bf56027
|
…14 top-level properties The degenerate-derivation control pins each served type's top-level property count. PositionSchema gained `renamedFrom` (the earlier names whose holders the security plugin moves at boot), so `position` serves 14. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
|
domain:spec#3 · os-elon-musk · session_016WV4d1T5HEokjRgR6vCBX8 Contract reviewServed-tier: Read, not reviewed (outside the diff): ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe dev's flagged judgment: is the activation-ledger evidence for a dead old name sufficient and safe?
The schema files against the ruling: hold. The key, its grammar and the four parse refusals follow the field precedent's shape ( The ADR addendum against its first consumer. The line states the write, the scope and the refusals. Two of its statements are wider than the code: "another package ... holds" is not true for a disabled package (must-fix 1), and it does not say that a dead name nobody is recorded as owning is carried for its one claimant (should-fix 3). First consumer. The carry is the only reader of the key, and the liveness row grades it Implemented-by: card thread session_016WV4czhuyaTe2ySbAbhCjq Verdict: FAIL Items:
A delta review by the same reviewer is owed on the head that fixes items 1 and 2. Landing also waits for the head's check-runs to finish green (14 in progress when read) and for the Tier H approval. |
… against a rename claim Contract review of the holder carry: - condition 2 is judged over every installed package: a position of a disabled package is a holder (the catalog hides it, the registry does not), and a disabled claimant is counted for claimed-twice and not carried alone (claimant-disabled); - holders and ledger owners are read through catalogEntryAddress, so the environment's `sys_metadata` sentinel is never reported as a package; - a failed claim is that claim's: the others still run, and the rows it moved before failing are logged; - a row a second replica already moved is not reported as a twin; the twin warning names the time-boxed delegation case; only carried names have their other references reported, counted a page at a time; - the grammar reuses SnakeCaseIdentifierSchema, the liveness evidence anchors the rules' own module, the census reads the written object; - ADR-0150 addendum: the one-claimant carry of a dead name, the loaded-only limit and the boot-only timing are stated. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
|
domain:spec#3 · os-elon-musk · session_016WV4d1T5HEokjRgR6vCBX8 Contract reviewServed-tier: Round 2, a delta review of Read, not reviewed (outside the diff): ① Derived judgmentsThe round-1 items, one by one.
The order's other checks.
② Semver levelUnchanged by the delta, and still correct. The changeset is ③ Boundary flags
④ Design judgmentIs The ledger read after the normalisation (new item 1). The activation door stores a position's package as the catalog entry spells it, the environment sentinel included ( The residual, in the words this review would put to the maintainer. Condition 2 of the ruling says a package cannot claim an old name it never owned. For a name that is still a position, of any installed package (disabled ones included) or of the environment, the head enforces it. For a name that is no position any more it cannot, because the platform keeps no record of who owned a position that no longer exists, except an activation-ledger row for a position somebody once switched on or off. So when no installed position holds the old name and no ledger row records it under another package, the people still assigned to that name are moved to the one position that claims it, whichever package ships that position, and the move is not undone. A ledger row that records the environment's own position does not stop a package's claim. A package that failed to load at a boot does not hold its names for that boot. The case for accepting it: any package may already declare a free position name and take the same people that way. The alternative is no carry without positive evidence of ownership, which would also stop the ruled HotCRM case, whose old names have no ledger row, unless an ownership record is added first. The schema files and the ADR against the code. The entry grammar is now one declaration. The key's docblock and Implemented-by: card thread session_016WV4czhuyaTe2ySbAbhCjq Verdict: PASS Both must-fix items of round 1 are closed and the delta raises no new must-fix. New items:
Landing still waits for the Tier H approval on |
… package's rename claim; a failed row no longer holds back the rows after it Round-2 review of the holder carry: - a `sys_metadata_activation` row carrying the environment's sentinel is the record that the environment authored the old name: a package's claim is refused owned-by-other, an environment position's is not (a row naming no package stays no evidence); - inside one claim, a row whose write fails is named and skipped, so the rows after it still move; - ADR-0150 addendum states what the loaded-only limit carries; the changeset prose covers the disabled-package rule, the dead-name carry, the loaded-only limit, boot-only timing and the twin-row wording. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
|
domain:spec#3 · os-elon-musk · session_016WV4d1T5HEokjRgR6vCBX8 Maintainer confirmation · 2026-11-13T05:54Z · the maintainer chose 「接受,按现状落地」 on the seat's decision card 「岗位改名带任职人:接受「无归属记录的旧名迁给唯一认领者」吗?」 What is accepted (the condition-2 residual of ruling A1, recorded in ADR-0150 D7's addendum line and in contract review 6845170316 ④): an old name that no installed position holds (any package, disabled included, or the environment) and that the activation ledger does not record under another package or the environment is carried for its one claimant, whichever package that is, and is not carried back. A package that failed to load at that boot does not hold its names for that boot. Holders are carried at boot only; a hot install, upgrade or enable carries at the next restart. Not covered by this confirmation: the Tier H approval of |
Conflicts: the tenant-audit census pages (regenerated on the merged tree with `tenant-audit-census.mjs --write`; the page's prose counts moved to 310 sites with it) and the metadata-protocol card counts (main's `object` 50 kept, `position` 13 -> 14 applied on top). Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq
|
domain:spec#3 · os-elon-musk · session_016WV4d1T5HEokjRgR6vCBX8 席位核对 · ACCEPT · PR #33008 · head
|
…medFrom (objectstack-ai#33480) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XN1KQUNRJ7VHD5gA6zvtVHD)_ Fixes objectstack-ai#33044 domain:skills#1 · os-project-manager · session_01FEkQ5k9eHen9BJozXn3f7Q Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`skills/objectstack-data/rules/security.md` 的「Renaming or removing a shipped access item」节末新增一段:岗位改名要在新岗位上声明 `renamedFrom: ['old_name']`,不要删了重建;启动时平台在每个组织里把旧名的持有人(`sys_user_position`)挪到新名,幂等;只挪持有人,共享规则/队列/记录共享接收方、待审批人、邀请里的旧名只在启动日志里列给管理员;列出不挪的五种情况。 - 为什么改:PR objectstack-ai#33008 给 `PositionSchema` 加了 `renamedFrom`,但对外发布的技能没教,AI 写应用时改岗位名会删了重建,所有持有人静默失去权限集。 - 风险与回滚:纯技能文本(+1 changeset),不动代码与 schema;token 天花板未抬,在同一文件里删等量的示例和旁注付账;回滚即还原本 PR。 - 先看:`skills/objectstack-data/rules/security.md` 文末新段;其次同文件的付账删减(下方表格逐条列出去处)。 - 两分钟验证:`node scripts/check-skills-token-ratchet.mjs | grep rules/security.md`,预期 `3959 / 3959`,exit 0。 - 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。 ## What changes `skills/objectstack-data/rules/security.md`, § Renaming or removing a shipped access item, gains one paragraph, **Renaming a position**: - declare `renamedFrom: ['old_name']` on the renamed position, never delete and re-add (holders name a position by its bare name, so a deleted one leaves them granted nothing); - at boot the old name's holders (`sys_user_position`) move to the new name in every organization, idempotently; - holders only: the boot log lists the old name's other references (sharing-rule, queue and record-share recipients, pending approvers, invitations) for an administrator; - not carried, warned: an old name still a position anywhere, claimed twice, recorded under another package, switched off, or a disabled claimant. One changeset, `.changeset/33044-skills-position-renamed-from.md`, `'@objectstack/skills': patch`. ### Paid in place (token ceiling unchanged) `rules/security.md` was 15828 bytes (3957 tokens, ceiling 3959, headroom 2) on the merge base `34c05229`; it is now 15834 bytes, 3959 tokens, headroom 0. The card carries no maintainer words that order the text, so no raise; the new paragraph is paid by deletions in the same file: | Cut | Where the fact still lives | |---|---| | `(ADR-0090 D12)` after the delegated-admin clause | ADR-0090 | | `(explaining another user needs manage_users)` | an operator detail of the explain door, not an authoring rule; its contract is `packages/spec/src/security/explain.zod.ts` | | `(no read on the roster needed)` on membership keys | "as a system read" in the same sentence says it | | the `com.acme.crm` / `hd_agent` example of `outside-closure` | eval `hooks-security-seeds-datasources.json` asks exactly this scenario; the rule sentence stays | | the `hr` / `ops` / `auditor` example of `ambiguous-in-closure` | illustrative; the install refusal of a second shipper is KEPT (that eval expects it) | | `Ciphertext lives in sys_secret, only an opaque ref on the row.` | `rules/field-types.md` `secret` row (encrypted at rest, masked, fail-closed, ADR-0100) | | `e.g. identity tables a plugin writes via its own adapter (sys_sso_provider, OAuth clients)` and `(adapter-written rows often lack it)` | plugin-internal; the rule (a null `organization_id` row is denied) stays | | `— the list renders empty` | UI symptom of the denial stated beside it | | `an app-declared default profile, a customer-authored set` | "any set with a wildcard read grant" states the rule; `viewer_readonly` and the `member_default` contrast stay | Whole-file reading: 327 → 329 lines, 3957 → 3959 tokens. Whole-package reading (every `skills/**/SKILL.md`): unchanged, no `SKILL.md` is touched (4602 lines at the merge base). ## Acceptance notes Every claim in the paragraph was read from the code on `origin/main` (`34c05229`): | Claim | Read from | |---|---| | `renamedFrom` is a list of earlier position names | `packages/spec/src/identity/position.zod.ts` (`renamedFrom`, its JSDoc and `.describe`) | | own name / repeated entry refused at parse; still-declared and claimed-twice refused per collection | `packages/spec/src/identity/position-renamed-from.ts` (`refuseSelfRenamedFrom`, `refuseDishonestPositionRenamedFrom`) | | moves holders at boot, as the system, every organization, `position` column only, idempotent | `packages/plugins/plugin-security/src/position-renamed-holder-carry.ts` header § What it does | | the six boot refusals (`claimed-twice`, `claimant-disabled`, `still-declared`, `held-by-other`, `owned-by-other`, `switched-off`), each logged at `warn`, holders left | same file, `PositionRenameRefusal` and `logPositionRenameCarry` | | other references named, never rewritten: sharing-rule, queue-member and record-share recipients, pending approver slots, pending invitations, activation-ledger rows | same file, header § What it names and never writes, and the `leftBehind` warning | | deleting the position leaves holders granted nothing | same file, header § Why | - The code also carries after a marketplace hot install or upgrade (`metadata:reloaded`, objectstack-ai#33238); the paragraph says "at boot" only, which always holds, since a reload carries a narrower scope and some install doors do not announce a reload. - Not taught (detail an author does not act on): a holder who already holds the new name keeps both rows and is warned; a failed row write is retried at the next boot. - Serial constraints held: this PR does not touch `skills/objectstack-data/evals/objects-fields-relationships.json` (PR objectstack-ai#33394) or `skills/objectstack-data/SKILL.md` (PR objectstack-ai#33458). No eval added: no existing eval asks about renaming a position. ## Verification <details><summary>Derived gates on head 47d3f8e (42 of 44 exit 0, 2 NOT MEASURED)</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 44 commands; each ran with its exit captured before any pipe. `--ran`: "44 derived famil(ies) accounted for — 42 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)". `check:doc-formula-expressions` ran after `turbo run build --filter=@objectstack/formula --filter=@objectstack/lint` under the lock (VERDICT command-exit 0). `check:dual-build-cjs-loads` and `check:lean-entry-closure` read every package's `dist/` and exit 3 without a full build; this diff touches no package, so no build closure is owed and CI measures them. ``` node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-doc-route-spelling.mjs --advisory :: exit 0 node scripts/check-doc-route-spelling.mjs --self-test :: exit 0 node scripts/check-dts-emitted.mjs --self-test :: exit 0 node scripts/check-empty-changeset.mjs --base origin/main :: exit 0 node scripts/check-empty-changeset.mjs --self-test :: exit 0 node scripts/check-skills-token-ratchet.mjs :: exit 0 node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0 node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0 node scripts/ci/snapshot-next.mjs --self-test :: exit 0 node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0 node scripts/release-pending-publish.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:corpus-claim-drift :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:dts-closure :: exit 0 pnpm check:dual-build-cjs-loads :: exit 3 pnpm check:gitlink-declared :: exit 0 pnpm check:lean-entry-closure :: exit 3 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:published-files :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:role-word :: exit 0 pnpm check:skill-compatibility :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:skill-links :: exit 0 pnpm check:sourcemap-no-sources-content :: exit 0 pnpm check:watch-hint-literal :: exit 0 node scripts/pm/check-skill-line-ratchet.mjs :: exit 0 ``` `check:dts-closure` and `check:sourcemap-no-sources-content` exit 0 over the packages built here only (formula, lint and their closure). </details> <details><summary>Tier and governed-merge verdicts</summary> - `dispatch-gates --tier`: MANDATORY contract-review tier for `skills/**` (no one-line exit). This card thread ran on the claim's default tier; named as a deviation in the report, and the seat's in-seat contract review at tier is the owed record. - `check-governed-merges.mjs --branch claude/project-thread-6ouxnr`: exit 3, GOVERNED, landing tier H (人合), `skills/** ×1`; 52 changed lines, under the 3000 threshold. - Changeset: `'@objectstack/skills': patch` (`skills/**` ships in `@objectstack/skills`). </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5k9eHen9BJozXn3f7Q)_ <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
Fixes #32983
Clause-②: yes (widening) —
PositionSchemagains an optionalrenamedFrom(a list of the position's earlier names). A position that does not declare it parses and behaves exactly as before; a declaration is refused only under rules that are new with the key.Metadata-protocol: added
Skills-docs: follow-up owed — #33044 (skills/objectstack-data/rules/security.md does not yet teach that a renamed position declares its earlier names in
renamedFromso its holders move with it)维护者速读
renamedFrom)。新版本启动时,平台以系统身份把每个组织里挂在旧名上的任职记录(sys_user_position)改到新名下,只改岗位名这一列,重启第二次什么都不再改。这是裁决 A1(6841971722):只搬任职人;共享规则、队列成员、记录共享、在途审批、待接受邀请和停用台账里的旧名,只在启动日志里按表点名,不改写。packages/plugins/plugin-security/src/position-renamed-holder-carry.ts(判定顺序在carryRenamedPositionHolders,写入只在carryHolders)、packages/spec/src/identity/position-renamed-from.ts(解析期的四条拒绝)、packages/plugins/plugin-security/src/security-plugin-start-hooks.ts(在启动报告之前运行,失败不影响启动)。pnpm --filter @objectstack/plugin-security exec vitest run src/position-renamed-holder-carry.test.ts,预期 23 条全过;其中「condition 1」「condition 2」「condition 3」三组各自同时钉了拒绝和放行两个方向。docs/adr/一行,按 Tier H 走批准)。What changes
Ruling A1 on #32983 (record 6841971722), executed as the seat's re-claim 6841987296 describes.
packages/spec— the key.PositionSchema.renamedFrom: an optional list of earlier names in the position-name grammar (^[a-z][a-z0-9_]*$, two characters or more, the same grammar asname). Its docblock and.describe()state what reads it and what it never rewrites.packages/spec— the refusals (condition 3), modelled on the fieldrenamedFrom'srefuseDishonestRenamedFrom. One position alone (refuseSelfRenamedFrom, asuperRefineonPositionSchema): never the position's own name, each entry once. Thepositionscollection (refuseDishonestPositionRenamedFrom, asuperRefineonObjectStackDefinitionSchema.positions): never a name another position of the collection still declares, which also rules out a cycle, and never an old name a second position claims (reported on the later claimant, naming the first). Both live inidentity/position-renamed-from.ts, whichidentity/index.tsdoes not re-export, so the public surface is the key alone (check:api-surfaceunchanged).packages/spec— the ledgers the new key and its refinements owe.liveness/position.jsongainsrenamedFrom: livewith the executor named;dropped-refinements.baseline.jsondeclares the new refinement sites (identity/Positionroot and the four installed-package API schemas'manifest.positions) and its header totals; the form reconciliation records why the Setup position form does not offer the key (a package author's declaration, like the fieldrenamedFrom). Regenerated:authorable-surface/identity.json,content/docs/references/identity/position.mdx,liveness/state-counts/position.md.packages/plugins/plugin-security— the carry.position-renamed-holder-carry.ts, run atkernel:bootstrappedfromSecurityPlugin's start hooks, before the catalog reference report (so a moved holder is not reported as naming no position). It reads every position'srenamedFromfrom the security catalog and judges each old name over the one catalog, since a parse sees one package body:claimed-twice— two positions claim it: neither carries;still-declared/held-by-other— it is a current position of the same holder, or of another package or the environment (condition 2, and condition 3 across packages). A DISABLED package's positions count: the catalog hides them, but a disabled package is still installed and the registry's one-holder rule says it still holds its names, so they are read from the registry withincludeDisabledPackages;claimant-disabled— the one position claiming it belongs to a disabled package: nothing is carried onto a position switched off with its package, and the first boot after it is enabled carries (a disabled claimant also counts forclaimed-twice);owned-by-other— it is no position now, but the activation ledger (sys_metadata_activation.package_id, ADR-0150 D8 R4) records it under another package, or under any package for an environment position, or as the environment's own (thesys_metadatasentinel the activation door stores) for a package's claim (condition 2). A ledger row naming no package is no evidence either way (it may predate the column);switched-off—readDisabledCatalogNames, the authorization resolver's own read, says the old name is switched off: its holders would come back active under the new name (condition 1).Every holder and ledger owner is read through core's
catalogEntryAddress, so the environment'ssys_metadatasentinel reads as the environment, never as a package. A row whose write fails is named and skipped, so the rows after it still move; a read that fails ends that claim only. Either way the other claims run, and what moved is logged with its organizations.An old name it may carry has each holder row's
positionmoved, as the system ({ isSystem: true }, the way every boot pass writes), one row at a time by id. A holder who already holds the new name in that organization keeps both rows: the old row is left and named (read first, and the(user_id, position, organization_id)unique key backs the read). Idempotent: a carried name has no rows left to read, and a row another replica moved after this one read it is skipped, not named as a twin.sys_sharing_rule,sys_queue_memberandsys_record_sharerecipients of typeposition;sys_approval_approver.approverand pendingsys_approval_request.pending_approversslotsposition:NAME; pendingsys_invitation.positions; activation-ledger rows. A table the composition does not register is skipped; a read that fails is reported as not read. No file in plugin-sharing, plugin-approvals or platform-objects is changed.docs/adr/0150— one dated addendum line under D7 records the system write that changes who holds a position (condition 4).@objectstack/specand@objectstack/plugin-security. The ADR-0087 record of an addition is theadded[]projectioncheck:spec-changescomputes from the authorable surface; an addition needs noadr-0087:marker (that gate judges breaking changesets only), so the changeset carries the two declaration lines and no marker.Tests
packages/spec/src/identity/position-renamed-from.test.ts(new, 15): an honest rename parses and keeps the key; a position renamed twice; the key is optional; the grammar refuses CamelCase, a leading underscore (field keys allow it, position names do not), a leading digit, one character, a space and a bare string; the own name and a repeated entry are refused at the entry; in a collection, two honest renames parse, a still-declared name is refused naming it, a cycle is refused on both members, and a second claimant is refused naming the first.packages/plugins/plugin-security/src/position-renamed-holder-carry.test.ts(new, 23), on a realObjectQLengine over better-sqlite3: holders in two organizations move and onlypositionchanges (reason and validity window kept, rows of other names untouched); a second run moves nothing and calls noupdate; a twin holder keeps both rows and the old one is named; norenamedFromanywhere reads nothing; condition 1 both ways (switched off: stays; recorded active: moves) through the resolver's own ledger read; condition 2 both ways (another package's or the environment's current name: refused; a dead name recorded under another package: refused; under the claiming package, or under no package: moved; an environment position claiming a name recorded under a package: refused); condition 3 across the catalog (two claimants: neither moves, both named; a cycle: nothing moves); holders only (a sharing-rule recipient and a pending approval slot are named with their organization counts and stay as they were, a non-pending request and a longer name are not matched); the boot wrapper never throws. Through the REAL reader (createSecurityCatalogReader) over the engine's ownSchemaRegistry: a position of a disabled package is refused as held, and the same claim carries once that package is uninstalled; a disabled package's lone claim isclaimant-disabled, and beside an enabled claimant both areclaimed-twice; an environment position stampedsys_metadatais "the environment" as a holder andnullas a claimant. A row whose write is refused is named and skipped: the rows after it move, and the next claim is carried. A ledger row carrying the environment's sentinel refuses a package's claim and lets an environment position's through. A row another replica already moved is neither moved again nor named as a twin.packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts: the servedpositioncard counts 14 top-level properties (13 +renamedFrom).scripts/dropped-refinements.test.ts(header totals) andsrc/system/metadata-form-zod-reconciliation.test.ts(the position form's omission entry).Acceptance notes
package_id, which exists only for a position that was ever switched on or off. So the pass refuses on that evidence when it exists and on any current holder (a disabled package's included), and otherwise carries for the one claimant, whichever package that is; the ADR-0150 addendum says so in the same words. A package that declares an old name nobody holds and no ledger row records can take that name's stranded holders; the boot log names every carry (old name, new name, rows, organizations) atinfo, so an operator can see it at the boot it happens.marketplace-install-local-register-refusal.test.ts: such an entry's package readsgetPackage(id) === undefined; a failure after a successful register leaves it loaded and judged). A standing claim on a position name of a package in that state is carried. Recorded as the limit in the ADR line; a stand-down would need the marketplace door to publish what it failed to load.renamedFromform entry. The reconciliation's existing field entry still calls the field key "planned, not yet read" although it is live since A field's declaredrenamedFromcarries the old column's data to the new name on package upgrade, instead of leaving it behind an empty new column (epic cloud#3652 Q3) #30885. Noted, not changed here (another key's record).Verification
Final head and merge base are in the gates block below. Local scope per os-dev: the affected packages' own suites and typecheck, plus every family
dispatch-gates.mjs --commandsderives; CI runs the farm.Head
cc6cce96cd(main merged once, at04c35f095; the three commits afterd9befe7f9fare the metadata-protocol count and the two review rounds' fixes, with no merge). Readings are on74fff9ff1funless they namecc6cce96cd; the last commit touches only the carry module, its test, the ADR line and the changeset.pnpm --filter @objectstack/plugin-security test: oncc6cce96cd, 265 files, 6551 passed, 45 skipped; typecheck exit 0.pnpm --filter @objectstack/metadata-protocol test: 337 files, 22790 passed, 36 skipped (on7a1bbb3f; the fix commit after it touches no file that suite reads besides the spec rebuild, whose key count is unchanged).@objectstack/spec: the full suite ran before the merge (837 files); on this head the identity, stack, form-reconciliation and dropped-refinement files ran again: 16 files, 414 passed. The other suites that readPositionSchema: coreposition-row-definition9, metadatatypescript-serializer-annotation7, downstream-contract 31, all passed.pnpm --filter @objectstack/spec typecheckandpnpm --filter @objectstack/plugin-security typecheck: exit 0.pnpm --filter @objectstack/spec check:generated: exit 0 after a freshbuild.marketplace-install-local-register-refusal.test.ts -t "notLoaded|failure after a successful register|register fault": 8 passed; the refused entry's package readsgetPackage(id) === undefined, the after-register failure stays loaded.!in the title and Clause-② is(widening).Ablations (one per new rule, each through
scripts/ablation-replace.mjs, restored to the HEAD blob,git diff HEADempty after each)Both suites import the rules by relative path from
src/, so nodist/sits between the mutation and the run.position-renamed-from.tsposition-renamed-from.tsposition-renamed-from.tsposition-renamed-from.tsposition-renamed-holder-carry.tsd9befe7f9f)position-renamed-holder-carry.tsd9befe7f9f)position-renamed-holder-carry.tsd9befe7f9f)position-renamed-holder-carry.tsd9befe7f9f)position-renamed-holder-carry.tsposition-renamed-holder-carry.tsd9befe7f9f)position-renamed-holder-carry.tsposition-renamed-holder-carry.tssys_metadatasentinel read throughcatalogEntryAddressposition-renamed-holder-carry.tsposition-renamed-holder-carry.tsposition-renamed-holder-carry.tsposition-renamed-holder-carry.tscc6cce96cd)position-renamed-holder-carry.tscc6cce96cd)Gates ran:
node scripts/pm/dispatch-gates.mjs --commandson head74fff9ff1f, 125 families, every one exit 0;--ranwith exit codes: 125 derived, 125 run, 0 NOT-MEASURED (a derived zero)On
cc6cce96cdthe 32 families that read the changeset, the ADR, the census or plugin-security sources ran again, every one exit 0:node scripts/check-adr-0087-registration.mjs --base origin/main,node scripts/check-adr-0087-registration.mjs --self-test,node scripts/check-adr-links.mjs,node scripts/check-adr-links.mjs --self-test,node scripts/check-changeset-no-major.mjs --base origin/main,node scripts/check-closing-keyword-parity.mjs,node scripts/check-closing-keyword-parity.mjs --self-test,node scripts/check-empty-changeset.mjs --base origin/main,node scripts/check-empty-changeset.mjs --self-test,node scripts/check-issue-citations.mjs,node scripts/check-plugin-teardown-shape.mjs,node scripts/check-plugin-teardown-shape.mjs --self-test,node scripts/check-tenant-audit-census.mjs,node scripts/check-tenant-audit-census.mjs --self-test,node scripts/docs-audit/check-affected-docs.mjs,node scripts/docs-audit/check-drift-comment.mjs,pnpm check:adr-anchors,pnpm check:adr-index,pnpm check:adr-symbol-anchors,pnpm check:changeset-gate-self-tests,pnpm check:closed-ceremony-text,pnpm check:corpus-claim-drift,pnpm check:doc-authoring,pnpm check:docs-audit-scope,pnpm check:issue-citations,pnpm check:logger-receiver-detach,pnpm check:optional-error-sink,pnpm check:role-word,pnpm check:spec-docblock-symbol-anchors,pnpm check:system-context-census,pnpm check:test-source-alias,pnpm check:undeclared-dep-imports.The first pass (on
2b41c135) was red on three families this diff caused, each fixed then:check-tenant-audit-census,check:doc-authoring,check:spec-docblock-symbol-anchors. On this head the census was regenerated again (the carry's write now namessys_user_positioninline, so it counts as a decidable write against a tenancy-enabled object) and the page's prose counts moved with it.node scripts/check-adr-0087-registration.mjs --base origin/main→ exit 0node scripts/check-adr-0087-registration.mjs --self-test→ exit 0node scripts/check-adr-links.mjs→ exit 0node scripts/check-adr-links.mjs --self-test→ exit 0node scripts/check-changeset-no-major.mjs --base origin/main→ exit 0node scripts/check-closing-keyword-parity.mjs→ exit 0node scripts/check-closing-keyword-parity.mjs --self-test→ exit 0node scripts/check-comment-mask-adoption.mjs→ exit 0node scripts/check-comment-mask-adoption.mjs --self-test→ exit 0node scripts/check-comment-mask-corpus.mjs→ exit 0node scripts/check-dev-prereqs.mjs --self-test→ exit 0node scripts/check-doc-route-spelling.mjs --advisory→ exit 0node scripts/check-doc-route-spelling.mjs --self-test→ exit 0node scripts/check-docs-section-name.mjs→ exit 0node scripts/check-docs-section-name.mjs --self-test→ exit 0node scripts/check-dts-emitted.mjs --self-test→ exit 0node scripts/check-empty-changeset.mjs --base origin/main→ exit 0node scripts/check-empty-changeset.mjs --self-test→ exit 0node scripts/check-issue-citations.mjs→ exit 0node scripts/check-plugin-teardown-shape.mjs→ exit 0node scripts/check-plugin-teardown-shape.mjs --self-test→ exit 0node scripts/check-section-landing-index.mjs→ exit 0node scripts/check-section-landing-index.mjs --self-test→ exit 0node scripts/check-tenant-audit-census.mjs→ exit 0node scripts/check-tenant-audit-census.mjs --self-test→ exit 0node scripts/ci/assert-turbo-remote-cache.mjs --self-test→ exit 0node scripts/ci/plan-test-core-shards.mjs --self-test→ exit 0node scripts/ci/prune-turbo-cache.mjs --self-test→ exit 0node scripts/ci/snapshot-next.mjs --self-test→ exit 0node scripts/docs-audit/check-affected-docs.mjs→ exit 0node scripts/docs-audit/check-drift-comment.mjs→ exit 0node scripts/pm/release-rehearsal-clone.mjs --self-test→ exit 0node scripts/release-pending-publish.mjs --self-test→ exit 0pnpm --filter @objectstack/lint run check:doc-formula-expressions→ exit 0pnpm --filter @objectstack/lint run check:doc-security-posture→ exit 0pnpm --filter @objectstack/spec run check:api-surface→ exit 0pnpm --filter @objectstack/spec run check:authorable-surface→ exit 0pnpm --filter @objectstack/spec run check:browser-reachable-entries→ exit 0pnpm --filter @objectstack/spec run check:docs→ exit 0pnpm --filter @objectstack/spec run check:dual-source-exports→ exit 0pnpm --filter @objectstack/spec run check:duration-unit-keys→ exit 0pnpm --filter @objectstack/spec run check:empty-state→ exit 0pnpm --filter @objectstack/spec run check:entry-nameability→ exit 0pnpm --filter @objectstack/spec run check:error-code-provenance→ exit 0pnpm --filter @objectstack/spec run check:export-origins→ exit 0pnpm --filter @objectstack/spec run check:exported-any→ exit 0pnpm --filter @objectstack/spec run check:generated→ exit 0pnpm --filter @objectstack/spec run check:liveness→ exit 0pnpm --filter @objectstack/spec run check:llms-txt→ exit 0pnpm --filter @objectstack/spec run check:skill-examples→ exit 0pnpm --filter @objectstack/spec run check:skill-refs→ exit 0pnpm --filter @objectstack/spec run check:strictness-ledger→ exit 0pnpm --filter @objectstack/spec run check:variant-docs→ exit 0pnpm --filter @objectstack/spec run check:yaml-examples→ exit 0pnpm check:adr-anchors→ exit 0pnpm check:adr-index→ exit 0pnpm check:adr-symbol-anchors→ exit 0pnpm check:authz-resolver→ exit 0pnpm check:changeset-gate-self-tests→ exit 0pnpm check:ci-filter-parity→ exit 0pnpm check:cli-command-ids→ exit 0pnpm check:closed-ceremony-text→ exit 0pnpm check:corpus-claim-drift→ exit 0pnpm check:cross-package-test-inputs→ exit 0pnpm check:dispatcher-error-vocabulary→ exit 0pnpm check:doc-anchors→ exit 0pnpm check:doc-authoring→ exit 0pnpm check:doc-frontmatter→ exit 0pnpm check:docs-audit-scope→ exit 0pnpm check:docs-redirects→ exit 0pnpm check:docs-single-h1→ exit 0pnpm check:docs-spec-enumerations→ exit 0pnpm check:docs-transcript-drift→ exit 0pnpm check:driver-memory-census→ exit 0pnpm check:dts-closure→ exit 0pnpm check:dual-build-cjs-loads→ exit 0pnpm check:durability-log-level→ exit 0pnpm check:engine-double-contract→ exit 0pnpm check:error-status-conformance→ exit 0pnpm check:gitlink-declared→ exit 0pnpm check:i18n→ exit 0pnpm check:i18n-stale-fill→ exit 0pnpm check:init-service-contract→ exit 0pnpm check:issue-citations→ exit 0pnpm check:keyed-text-bounds→ exit 0pnpm check:lean-entry-closure→ exit 0pnpm check:logger-receiver-detach→ exit 0pnpm check:merge-driver→ exit 0pnpm check:nul-bytes→ exit 0pnpm check:object-def-param-keys→ exit 0pnpm check:objectql-double-limit→ exit 0pnpm check:optional-error-sink→ exit 0pnpm check:org-identifier→ exit 0pnpm check:page-declaration-shape→ exit 0pnpm check:platform-checklist→ exit 0pnpm check:platform-object-tenancy-census→ exit 0pnpm check:pm-governed-merges→ exit 0pnpm check:pm-prior-rulings→ exit 0pnpm check:published-files→ exit 0pnpm check:published-readme-links→ exit 0pnpm check:query-options-erasure→ exit 0pnpm check:react-page-adapter-contract→ exit 0pnpm check:refd-timer-probe→ exit 0pnpm check:registry-log-declared→ exit 0pnpm check:rest-log-spy-declared→ exit 0pnpm check:role-word→ exit 0pnpm check:settings-bind-window→ exit 0pnpm check:skill-identifier-liveness→ exit 0pnpm check:skill-top-level-keys→ exit 0pnpm check:slot-lookup→ exit 0pnpm check:sourcemap-no-sources-content→ exit 0pnpm check:spec-docblock-symbol-anchors→ exit 0pnpm check:spec-parsed-alias→ exit 0pnpm check:stack-collection-maps→ exit 0pnpm check:startup-registry-verdict→ exit 0pnpm check:system-context-census→ exit 0pnpm check:test-source-alias→ exit 0pnpm check:tier-file-adoption→ exit 0pnpm check:type-check-coverage→ exit 0pnpm check:type-check-debt→ exit 0pnpm check:undeclared-dep-imports→ exit 0pnpm check:vendor-version-stamps→ exit 0pnpm check:vouch-for-reference-callers→ exit 0pnpm check:watch-hint-literal→ exit 0pnpm check:where-matcher→ exit 0Human Minimum
packages/specholds no runtime logic. (two parse-time refinements, like the fieldrenamedFrom's; the carry lives in plugin-security)pnpm lintis CI's run.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/. (position.mdxisgen:docsoutput)🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4czhuyaTe2ySbAbhCjq