Skip to content

docs(plugin-spec): the migration example no longer teaches the retired onUpgrade hook - #4300

Merged
os-zhuang merged 1 commit into
mainfrom
claude/docs-accuracy-4212-followup
Jul 31, 2026
Merged

docs(plugin-spec): the migration example no longer teaches the retired onUpgrade hook#4300
os-zhuang merged 1 commit into
mainfrom
claude/docs-accuracy-4212-followup

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

Two lines in content/docs/protocol/kernel/plugin-spec.mdx. The page carries a warn Callout stating the onInstall/onEnable/onDisable/onUninstall/onUpgrade family never existed and was retired (#4212) — and then, 600 lines further down, its CHANGELOG example told the reader:

The onUpgrade lifecycle hook runs automatically when the package is upgraded to v2.0.0 and renames the field on existing records.

A reader who copies that example writes a hook that never runs — the exact failure mode #4212 set out to end. Replaced with the mechanism the same page already documents 320 lines above: upgrade applies metadata migrations (ADR-0087), and no plugin code runs at install/uninstall/upgrade.

Why this is the whole diff

This closes out the docs-accuracy question raised by the drift-check advisory on #4242. The retired surfaces were swept against every hand-written doc first — the 17 never-fired event names from #4241 (plugin:started, plugin:error, service:registered, …), ObjectQLHostContext, ITypedEventEmitter, PluginLifecycleEventType, and engine.use( — and they appear in exactly one place: the v17 release notes that document them as removed. kernel/events.mdx lists only events in the surviving 14.

The onEnable mentions elsewhere were checked against code and are correct — the app-bundle onEnable is a live contract dispatched by AppPlugin.start() (packages/runtime/src/app-plugin.ts:593), and the ctx.drivers.register(driver) facade data-modeling/external-datasources.mdx documents is built there too (app-plugin.ts:604). No change needed in those docs.

Verification

  • node scripts/check-doc-authoring.mjs — 214 files clean.
  • Prose-only change inside a fenced example; no code paths touched.

Noted, not addressed here

content/docs/kernel/cluster.mdx describes a cluster coordinator that wraps onEnable and releases a lock on onDisable. leader-elected resolves only to packages/spec/src/kernel/cluster.zod.ts and its test — no runtime implementation found. That looks like a separate declared-but-unbuilt surface needing its own ADR-0049 enforce-or-remove pass, not a docs edit.


Generated by Claude Code

…d onUpgrade hook

The page carries a warn Callout stating the onInstall/onEnable/onDisable/
onUninstall/onUpgrade family never existed and was retired (#4212) — and then,
600 lines down, its CHANGELOG example told the reader "the `onUpgrade`
lifecycle hook runs automatically when the package is upgraded to v2.0.0 and
renames the field on existing records." A reader who copies the example writes
a hook that never runs, which is the exact failure #4212 set out to end.

Replaced with the mechanism the same page already documents 320 lines above:
upgrade applies metadata migrations (ADR-0087), and no plugin code runs at
install/uninstall/upgrade.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HrRNgrWaRtggzmrHpbomyh
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 31, 2026 4:43am

Request Review

@github-actions github-actions Bot added size/xs documentation Improvements or additions to documentation tooling labels Jul 31, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review July 31, 2026 04:51
@os-zhuang
os-zhuang merged commit a922a86 into main Jul 31, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/docs-accuracy-4212-followup branch July 31, 2026 04:51
@os-zhuang
os-zhuang restored the claude/docs-accuracy-4212-followup branch July 31, 2026 05:33
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/xs tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants