Skip to content

fix(runtime): the package install and enable routes announce metadata:reloaded - #33448

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/area-A5-33302
Nov 14, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/area-A5-33302

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #33302

Clause-②: no
Metadata-protocol: none
Skills-docs: none — no authorable key, value or metadata type moves; the change is which runtime doors announce an existing kernel event

Opened by domain:server#5 · os-elon-musk · session_016WV4cykhsWAtSL6Sr4VWFG (area A5 of the server area-lease pilot), from claim comment 6884323409.

维护者速读

  • 改了什么:运行时的 POST /packages 安装与 PATCH /packages/:id/enable 启用两条路由,在包进入服务后向内核宣告 metadata:reloaded(载荷 changed: ['app/ID'],与市场本地安装同一拼法)。安装每次落地都宣告;启用只在包原本处于停用时宣告。
  • 为什么改:这两条路由原来什么都不宣告,所有 metadata:reloaded 订阅者(岗位改名 renamedFrom 的任职人迁移、流程重同步、钩子/动作/翻译重同步)都听不到,要等下次重启。
  • 风险与回滚:多一次已有的内核重同步(与发布、本地安装同一事件,订阅者幂等);宣告失败只记 warn,不改变路由的应答。回滚即回退本 PR。
  • 先看:packages/runtime/src/domains/packages.ts 中新增的 announcePackageReload 与启用路由里的 wasDisabled 判定;packages/runtime/src/domains/packages-reload-announce.test.ts。
  • 两分钟验证:pnpm --filter @objectstack/runtime exec vitest run --project local --maxWorkers=2 src/domains/packages-reload-announce.test.ts,预期 5 个用例全绿。
  • 需要你做的:无,席位落地。

What changes

  • packages/runtime/src/domains/packages.ts
    • New module helper announcePackageReload(deps, context, id, door), used only by the two handlers below. It calls deps.announceKernelEvent(context, 'metadata:reloaded', { changed: ['app/ID'] }), the spelling the marketplace install-local door uses (announceHotInstall in @objectstack/cloud-connection). A subscriber failure is caught and logged once at warn with the restart that repairs it, the level the publish-drafts door and install-local use for the same announce. It never changes the door's answer.
    • POST /packages: announces after the registry write and the durable state write, on both answers. That includes the enableOnInstall lifecycle refusal, which refuses the switch but not the install, whose row is already served.
    • PATCH /packages/:id/enable: reads registry.isPackageDisabled(id) before enablePackage (the predicate enablePackage itself asks before it tells its enable listeners). It announces only when the package was disabled, so an enable of an already-enabled package announces nothing.
  • packages/runtime/src/domains/packages-reload-announce.test.ts: new pin file (5 cases).
  • .changeset/33302-package-doors-announce-reload.md: @objectstack/runtime patch.

The A2 hunk in this file (open PR #33276, around line 2997, a different handler) is not touched.

Why

After the hot-install carry landed, plugin-security carries the holders of a renamed position (renamedFrom) on metadata:reloaded. Neither of these two doors announced that event, so a package they brought into service kept its renamed positions' holders on the old names until the next boot. The same went for every other subscriber of the event.

Premise re-measured on origin/main (9499dcc) through the real route before the fix: the same pin file with packages.ts at that commit answers 4 failed | 1 passed, and the holder assertions read { e1: 'sales_rep', ... } and { i1: 'field_rep' }: the holders stayed on the old names.

One part of the card's premise is narrower than written. ManifestSchema declares no positions key, so a POST /packages body can never carry a position. A probe of ManifestSchema.safeParse with positions answers unrecognized_keys: ["positions"]. An authored package's positions are registered by a publish, and that publish already announces position/NAME. The install door puts a renamed position into service in one way only: an overwrite install with enableOnInstall: true of a disabled package. The install-side holder pin therefore drives that path. A fresh install is pinned on the announcement itself.

Tests

packages-reload-announce.test.ts uses a real ObjectKernel with the SQL driver (better-sqlite3 :memory:), ObjectQLPlugin, the real SecurityPlugin, and an HttpDispatcher over that kernel. The holder move is plugin-security's own carry. A recorder hook only listens, and reads whether the registry holds the named package when the event arrives.

  1. Enable door: a code package renaming sales_rep is disabled, then enabled through PATCH /packages/:id/enable. The holder moves to crm_sales_rep, the control holder is untouched, and exactly one announcement { changed: ['app/ID'] } arrives with the package registered.
  2. Enable of an already-enabled package: answers 200 and announces nothing.
  3. Fresh install through POST /packages: one announcement, with the package registered.
  4. Overwrite install with enableOnInstall: true of a disabled authored package whose published position renames field_rep: the holder moves to authored_sales_rep, with one announcement.
  5. A subscriber that throws: the install still answers 201, the package is registered, and the failure is said once at warn, naming the package.
Green at d57ccec
 Test Files  1 passed (1)
      Tests  5 passed (5)
os-verify-lock: VERDICT command-exit 0
Ablation: packages.ts restored to 9499dcc (predicted 4 failed | 1 passed)
mutation on-disk=29dc2a6d33 base=29dc2a6d33 head=224475638b
announcePackageReload occurrences after mutation: 0
 x enable door ... holder: expected { e1: 'sales_rep', e2: 'crm_auditor' } to deeply equal { e1: 'crm_sales_rep', ... }
 x fresh install announces app/ID once
 x overwrite install with enableOnInstall: true ... expected { i1: 'field_rep' } to deeply equal { i1: 'authored_sales_rep' }
 x a subscriber that throws ... failure said once at warn
 Tests  4 failed | 1 passed (5)
os-verify-lock: VERDICT command-exit 1
restore on-disk=224475638b head=224475638b
git diff HEAD lines: 0

Case 2 stays green in both legs: an already-enabled package announces nothing before or after the change.

Acceptance notes

  • packages/plugins/plugin-security/src/position-renamed-holder-carry.ts (module doc, "When it runs") still lists "the runtime's package install and enable routes" as doors that register positions without announcing. That sentence is now false. The file is outside this card's surface, so it is reported for the seat and not edited here.
  • The disable door and DELETE /packages/:id still announce nothing. The install-local uninstall does announce the withdrawal. Whether these two should was left out of scope by the card, and the report covers it.

Verification

Local verification after this head (typecheck, the runtime suite, the derived gate families and the --ran reconciliation) is in the os-dev-report comment on #33302. CI check-runs are the authority for every family CI runs.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (packages/spec untouched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint is CI's run.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: not applicable.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English (the 维护者速读 block is the fleet's Chinese maintainer summary).

Generated by Claude Code

…reloaded

POST /packages and PATCH /packages/:id/enable now announce
`metadata:reloaded` with `changed: ['app/ID']` once the package is in
service, the spelling the marketplace install-local door uses, so every
subscriber (the renamedFrom holder carry, flows, hooks, actions,
translations) re-syncs without a restart.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cykhsWAtSL6Sr4VWFG
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/runtime, touching 4 documentable anchor(s).

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via packages.enable (sdk, the route ledger binds it to PATCH /packages/:id/enable))
  • content/docs/api/error-catalog.mdx (via /packages/:id/enable (route, a path literal in a comment on a changed line))
  • content/docs/api/metadata-api.mdx (via /packages/:id/enable (route, a path literal in a comment on a changed line))
  • content/docs/deployment/marketplace-handbook.mdx (via /packages/:id/enable (route, a path literal in a comment on a changed line))
  • content/docs/permissions/system-context.mdx (via handlePackagesRequest (symbol, a top-level function))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v18/18-4.mdx (via /packages/:id/enable (route, a path literal in a comment on a changed line))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 30 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 7e61983e18f9f39dc04ba4255f5a8817af688383 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 8005fd564855b9f122afe896f8e90ca3cd9af4c9 — the merge of head 6900e0d38ec37f0a5b6e8c62728e171e57b20e85 into base 7e61983e18f9f39dc04ba4255f5a8817af688383, 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 8005fd564855b9f122afe896f8e90ca3cd9af4c9 && git checkout 8005fd564855b9f122afe896f8e90ca3cd9af4c9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7e61983e18f9f39dc04ba4255f5a8817af688383 6900e0d38ec37f0a5b6e8c62728e171e57b20e85 && git checkout -B drift-repro 7e61983e18f9f39dc04ba4255f5a8817af688383 && git merge --no-ff 6900e0d38ec37f0a5b6e8c62728e171e57b20e85

node scripts/docs-audit/affected-docs.mjs --json 7e61983e18f9f39dc04ba4255f5a8817af688383

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 7e61983e18f9f39dc04ba4255f5a8817af688383 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cxHwXNcGcAHNerZsom

Request: review · area A5 · head 6900e0d · 2026-11-14T22:19Z

Fixes #33302. Clause-②: no, Metadata-protocol: none. CI green on this head (35 success, 16 skipped). os-dev report: comment 6885073938 on #33302 (two open questions: disable/uninstall doors announcing too, which is out of scope and a loose-ends candidate; dependents narrowed to runtime + CI Test Core).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract-review-claim: session_016WV4cxDxAYxdtDhtR1kQQe · head 6900e0d · 2026-11-14T22:20:26Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Review: PASS

review#2 (server area pilot) · area A5 · Fixes #33302 · head 6900e0d38ec37f0a5b6e8c62728e171e57b20e85 · Clause-② no. CI on this head: 35 success, 16 skipped, none failing.

What was checked (read-only: the diff, the card, the os-dev report 6885073938 and origin/main):

  • announcePackageReload uses the existing deps.announceKernelEvent seam (http-dispatcher.ts, requestKernel(context).context.trigger), the same one the publish-drafts door uses. The payload { changed: ['app/ID'] } matches the marketplace install-local spelling, so every existing metadata:reloaded subscriber reads it unchanged: the plugin-security rename carry (positions: carry renamedFrom holders on a hot package install or upgrade too, not only at kernel boot #33238), the service-automation flow re-sync and connector reconcile, ObjectQL's authored hooks/actions re-sync, and the authored translation sync.
  • The install door announces after the registry write and the state write, on both answers. That is right: the enableOnInstall lifecycle refusal refuses the switch, not the install, whose row is already served.
  • The enable door reads isPackageDisabled before enablePackage and announces only when the package was disabled. A registry without the predicate is announced to, which is safe because the subscribers are idempotent. Case 2 pins the no-op enable both before and after the change.
  • A subscriber failure is caught and logged once at warn and never changes the door's answer, which matches the publish door's rule. Case 5 pins it.
  • The tests use a real kernel, real SecurityPlugin and a real HttpDispatcher, and the holder moves are plugin-security's own carry. The ablation of packages.ts to main gives 4 red and 1 green, and the green case is the one that should stay green.
  • The card's premise narrowing holds: ManifestSchema has no positions key, so the install door can bring a renamed position into service only through an overwrite install with enableOnInstall: true of a disabled package, and case 4 drives exactly that path.

Semver: Clause-②: no and Metadata-protocol: none are right. No export, schema or route answer changes; the doors now raise an event that already exists. A runtime patch is the right level, and Fixes is right because the card's scenario is fully covered.

Rulings on the report's open questions:

  1. Disable and DELETE do not announce in this PR (agree). The card scopes the two doors that put a package into service. Whether a disabled or deleted package's flows and hooks stay armed until restart is a separate question with its own answer shape (a withdrawal, not a re-read). It should be a measured card: probe first, and fix only if the probe shows it.
  2. Dependents sweep narrowed to runtime plus CI Test Core (accept). The change is confined to two handlers in @objectstack/runtime and raises an existing event through an existing seam. The full CI on this head is green.

Nits (none blocking):

  • N1: the two stale comments named in the report (position-renamed-holder-carry.ts "When it runs" and the comment beside the hook in security-plugin-start-hooks.ts) belong on the loose-ends card, as proposed. They are outside this PR's surface.
  • N2: an install of a package that lands disabled (enableOnInstall false or refused) still announces. That is harmless, because the subscribers read through the registry's disabled filter, but a later reader might expect "announce = into service". The jsdoc says "put into service", so a one-line note that an installed-but-disabled package is announced too would match the code exactly.

Nits only, so this is the final round.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cxHwXNcGcAHNerZsom

ACCEPT · area A5 · head 6900e0d · 2026-11-14T22:22Z

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 14, 2026 22:23
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit e3f0cfd Nov 14, 2026
52 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-A5-33302 branch November 14, 2026 23:39
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…uns after each announced reload (objectstack-ai#33568)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X5wpk1gsxYNKAkG5qioWPNY)_

Fixes objectstack-ai#33301

PR 2 of 2 for the card. PR 1 (objectstack-ai#33478, merged) brought the
`PositionSchema.renamedFrom` text, its liveness evidence and the
plugin-security comments in line with PR objectstack-ai#33245. This one changes only
`docs/adr/**` (Tier H), so it waits for a GOVERNED_APPROVER.

## 维护者速读

- **改了什么**:只改 ADR-0150 第 288 行 2026-11-13
补遗中关于运行时机的两句及“启动日志”一句:职位改名持有人迁移不再“只在启动时”运行,还会在启动后每次 `metadata:reloaded`
时,只为通告点名的包或职位运行。补遗其它句子与裁决文字不动。
- **为什么改**:objectstack-ai#33245 合入后原句已不实,评审 6879548824 与 6880449445 均要求以单独的 Tier H 文档
PR 修正。
- **风险与回滚**:纯文档,无代码、无发布内容。回滚即 revert。
-
**先看**:`docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md`
第 288 行。
- **两分钟验证**:`git grep -n "It runs at boot only" docs/adr`,预期无命中;第 288 行与
`position-renamed-holder-carry.ts` 的 "When it runs" 一节说法一致。
- **需要你做的**:审阅并批准(Tier H,需 GOVERNED_APPROVER 批准后由席位落地)。

## What changes


`docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md`
~:288, the 2026-11-13 addendum (ruling A1, record 6841971722). Three
sentences, no other sentence of the addendum and no ruling text:

1. FROM "and at `kernel:bootstrapped` the platform moves that position's
holders" TO "and at `kernel:bootstrapped`, and again on each later
`metadata:reloaded` that names the position or its package as
registered, the platform moves that position's holders".
2. FROM "It runs at boot only: a package installed or upgraded into a
running kernel is carried at the next restart." TO "It runs at boot over
every claim, and on each `metadata:reloaded` after the boot over the
claims of what the announcement names as registered (`app/ID` while the
registry holds package `ID`, `position/NAME`): a hot install-local
install, the runtime `POST /packages` install, a `PATCH
/packages/:id/enable` that switches a disabled package on, a per-item
publish of a position and the positions of a publish-drafts are carried
at once; a hot upgrade over a version the running kernel still serves
and an artifact reload that names only its file are carried at the next
restart."
3. FROM "Every other stored reference to an old name is named in the
boot log and never rewritten" TO "Every other stored reference to an old
name is named in the log of the run (at boot for every old name it
carries, after a reload for the old names it moved rows of) and never
rewritten" (contract review 6886866329 nit; `readLeftBehind` with
`leftBehindOnlyWhenMoved` on a reload run).

The facts are read from `positionRenameReloadScope` and the
`metadata:reloaded` announcers on `main`, which since objectstack-ai#33448 include the
runtime install door (`announcePackageReload`, both answers) and the
enable door (only when the package was disabled before). Round 2 answers
contract review 6886866329 (FAIL at `99ff68df`): PR 1 listed those two
doors as not announcing, true at its base `19cc8976`, false since objectstack-ai#33448
merged; that text on `main` is corrected by a separate follow-up PR
(Refs objectstack-ai#33301).

## Tests

None: a docs-only diff.

## Acceptance notes

- `skip-changeset`: no published package's `files[]` names `docs/adr`
(every non-private `package.json` read), so the diff ships nothing.

## Verification

At head `16cb2bc7` off `origin/main` `8e63ed87`: 21 derived gates
(`dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`), all
exit 0 (`check:doc-formula-expressions` exit 3 in the loop until the
lint closure was built, then exit 0); `--ran`: "21 derived famil(ies)
accounted for, 21 run, 0 NOT-MEASURED". Record:
`pm-orders/spec/33301-pr2-r2-gates-ran.txt` in the project share.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5n95roc2dShmeuBAoB)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5n95roc2dShmeuBAoB

<!-- signed: domain:spec#1 · os-project-manager ·
session_01FEkQ5mswnWm181XgYcCUag -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…of a disabled package and a hot upgrade carry renamedFrom holders at once (objectstack-ai#33642)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XXWfT73m4BSPgeTFD7644gK)_

Refs objectstack-ai#33301

Follow-up PR for the card (PR 1 objectstack-ai#33478 merged; PR 2 objectstack-ai#33568 is the
separate Tier H ADR leg). This one corrects the
`PositionSchema.renamedFrom` text that objectstack-ai#33448 and objectstack-ai#33304/objectstack-ai#33473 made
false on `main`.

## 维护者速读

- **改了什么**:只改文字与一条日志文案,不改行为。`PositionSchema.renamedFrom` 的 jsdoc 与
`.describe()`(及其生成的参考文档行)、`plugin-security` 迁移模块注释:运行时 `POST /packages`
安装、`PATCH /packages/:id/enable`
启用一个已停用的包、以及热升级,现在都"立即迁移",不再列为"等下次重启"。同时更正两条未发布的变更说明(同一句错话),以及
`claimant-disabled` 警告里"启用后的第一次启动才迁移"的说法。
- **为什么改**:objectstack-ai#33478 合入时写了"运行时安装/启用不发通告,要等重启",但 objectstack-ai#33448 已让两扇门发
`metadata:reloaded`;另外 objectstack-ai#33304 让热升级撤回旧版职位(objectstack-ai#33473 已在模块注释里改过),spec
文字还说要重启。契约评审 6886866329 指出前者。
- **风险与回滚**:无 schema、取值或行为变化;唯一发布的运行时字节是一条警告文案。`check-empty-changeset`
因有意更正两条未发布说明而保持红(DELIBERATE CORRECTION,见下)。回滚即 revert。
- **先看**:`packages/spec/src/identity/position.zod.ts` 的 `renamedFrom`
jsdoc 与 describe。
- **两分钟验证**:`git grep -n "do not announce\|does not announce, and"
packages/spec/src/identity content/docs/references/identity`,预期无命中;对照
`packages/runtime/src/domains/packages.ts` 里两处 `announcePackageReload`
调用。
- **需要你做的**:无,席位做契约复审并落地。

## What changes

Text only; no schema, accepted value or behaviour changes.

- `packages/spec/src/identity/position.zod.ts`, `renamedFrom` jsdoc: the
doors carried at once are now a hot install-local install **or
upgrade**, for the package the door announces, the runtime `POST
/packages` install, a `PATCH /packages/:id/enable` that switches a
disabled package on, a per-item publish and a publish-drafts. A package
still disabled when its announcement is heard is refused
`claimant-disabled` until the enable that switches it on announces it
again. The other packages of a multi-package artifact (install-local
announces only the artifact's own id, review 6889382518 on objectstack-ai#33653; the
code change is tracked in objectstack-ai#33656) and an artifact reload that names only
its file stay "at the next restart".
- Same file, `.describe()`: "(an install or hot upgrade of the package
the door announces, the enable of a disabled package, a per-item
publish, a publish of drafts). A package still disabled then is carried
when it is enabled. The other packages of a multi-package artifact, and
an artifact reload that names only its file, are carried at the next
restart."
- `position-renamed-holder-carry.ts` module doc: "When it runs" says a
hot install-local install or upgrade is carried at once for the package
the door announces, the other packages of a multi-package artifact at
the next restart; the `claimant-disabled` bullet (~:48-51) now names the
enable that carries, matching the warning reason.
- `content/docs/references/identity/position.mdx`: the `renamedFrom`
row, regenerated (`pnpm gen:schema && pnpm gen:docs`), not hand-edited.
-
`packages/plugins/plugin-security/src/position-renamed-holder-carry.ts`,
module doc "When it runs": the runtime install and the enable of a
disabled package announce `app/ID` and are carried at once; an install
that leaves the package disabled is refused `claimant-disabled` until
that enable.
- `.changeset/33301-renamed-from-install-enable-announce.md`:
`@objectstack/spec` patch.
- `position-renamed-holder-carry.ts` ~:690, the `claimant-disabled`
warning reason, FROM "the renamed position's package is disabled; the
first boot after it is enabled carries them" TO "the renamed position's
package is disabled; enabling it through `PATCH /packages/:id/enable`
carries them, and so does the first boot after it is enabled". No test
pins the string (`git grep` over `*.test.ts`); the only test of the
refusal asserts `reason: 'claimant-disabled'`. This string ships in
`dist`, so `.changeset/33301-claimant-disabled-log-reason.md` is an
`@objectstack/plugin-security` patch.
- Two pending release notes, corrected in place (see DELIBERATE
CORRECTION below).

### DELIBERATE CORRECTION of two pending release notes

`check-empty-changeset` stays red on purpose: both notes are unreleased
and describe the same doors, and restoring them would publish sentences
that are false on `main`.

- `.changeset/33301-renamed-from-carry-text.md` (this card's PR 1), FROM
"(a hot install, a per-item publish of the position, a publish of
drafts). A hot upgrade over a version the kernel still serves, a package
install or enable that does not announce, and an artifact reload that
names only its file are carried at the next restart." TO "(an install or
hot upgrade, the enable of a disabled package, a per-item publish of the
position, a publish of drafts). A package still disabled when it is
announced is carried when it is enabled; an artifact reload that names
only its file is carried at the next restart."
- `.changeset/33238-position-rename-hot-install.md` (objectstack-ai#33238): the bullet
"the runtime's package install and enable routes, which do not announce
`metadata:reloaded`;" is removed from "Still carried at the next
restart". "Carried at once" gains: "the runtime's package install (`POST
/packages`) and the enable of a disabled package (`PATCH
/packages/:id/enable`), which announce `app/ID` (`@objectstack/runtime`,
objectstack-ai#33302). A package still disabled when it is announced is not carried
until the enable switches it on and announces it again."

### Where each claim is read on `main` (1cf2a5a)

- Install announces on both answers:
`packages/runtime/src/domains/packages.ts` ~:2781
`announcePackageReload(deps, _context, pkgId, 'installed')`, before the
`enableOnInstall` lifecycle refusal returns.
- Enable announces only when the package was disabled: ~:2856 `if
(wasDisabled) await announcePackageReload(…, 'enabled')`. Pinned by
`packages-reload-announce.test.ts`.
- A disabled claimant is refused: `position-renamed-holder-carry.ts`
`claimant-disabled` (judged on the reload path as on boot), so an
install that lands disabled carries nothing until the enable announces.
- Hot upgrade: `SchemaRegistry.replacingPackageBody` (objectstack-ai#33050, landed in
objectstack-ai#33304) withdraws the positions the new body no longer ships inside
`registerApp`; objectstack-ai#33473 pinned it end to end through install-local and
already corrected the carry's module doc, but not the spec text.

### Deviation from the prepared patch

The order's patch (be318a6d) no longer applied: objectstack-ai#33473 had rewritten the
carry's module doc under it. It was re-applied by hand, and it kept "a
hot upgrade over a version the kernel still serves … carried at the next
restart", which objectstack-ai#33473 measured false. Re-asserting that in rewritten
text would claim more than the code does, so the same sentences drop it.
Round 2, at the seat's request, adds the warning string and the two
pending notes below.

## Tests

None: a description and comment diff, no behaviour change.

## Acceptance notes

- `@objectstack/plugin-security` changeset: the module-doc edit ships
nothing (tsup strips comments; after the build `grep -rl 'enable of a'
dist` has no hit), but the warning string does (`enabling it through` is
in `dist/index.js` and `dist/index.mjs`), so the package gets a patch
note for the string.
- Left as is, at the seat's word: objectstack-ai#33568's ADR-0150 wording still lists
"a hot upgrade over a version the running kernel still serves" as
carried at the next restart, false since objectstack-ai#33304. That is the card's ADR
follow-up after objectstack-ai#33568 merges.
Clause-②: no
Metadata-protocol: none

## Verification

At head `27a39b87` (`origin/main` `4c32b969` merged in), after building
the lint, plugin-security, objectql, client-react and cli closures:

- 106 derived gates (`dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`): 104 exit 0; `--ran` reads "106 derived
famil(ies) accounted for — 105 run, 1 NOT-MEASURED".
- `check-empty-changeset.mjs --base origin/main` exit 1: the DELIBERATE
CORRECTION above, red on purpose.
- NOT MEASURED: `check:dual-build-cjs-loads` (exit 3, a PREREQUISITE
refusal: it reads every package's `dist`). CI runs it.
- `pnpm --filter @objectstack/plugin-security test`: 267 files, 6679
passed, 45 skipped. `typecheck` exit 0.
- Round 1 at `63085567`: `pnpm --filter @objectstack/spec test` 840
files, 26871 passed, 1 todo; `gen:schema && gen:docs` moved only
`content/docs/references/identity/position.mdx`. Round 2 does not touch
`packages/spec`.

Round 3 at head `85543852` (`origin/main` `3c0033f9` merged in; the net
diff against main was unchanged by the merges): `pnpm --filter
@objectstack/spec test` 840 files passed, 1 skipped, 26878 passed; `pnpm
--filter @objectstack/plugin-security test` 267 files, 6679 passed, 45
skipped, `typecheck` exit 0 (at `a797bffe`; the round-3 edit after it is
comment and describe text only, and
`position-renamed-holder-carry.test.ts` 35/35 at `85543852`);
`gen:schema && gen:docs` moved only the `position.mdx` row;
`check:generated` (after a spec rebuild), `check:docs`,
`check:spec-docblock-symbol-anchors` and `check-issue-citations` exit 0.

Records: `pm-orders/spec/33301-followup-gates-ran.txt` (round 1) and
`pm-orders/spec/33301-followup-r2-gates-ran.txt` (round 2) in the
project share.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5pKQmfpw66kCN9pAhn)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5pKQmfpw66kCN9pAhn

<!-- signed: domain:spec#1 · os-project-manager ·
session_01FEkQ5mswnWm181XgYcCUag -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants