Skip to content

fix(cloud-connection): install-local's hotLoaded reports what the hot-register did - #22728

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-22695-install-local-hotloaded
Oct 10, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-22695-install-local-hotloaded

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #22695

Clause-②: no

What changes

POST /api/v1/marketplace/install-local (packages/cloud-connection/src/marketplace-install-local-plugin.ts) answered hotLoaded: true as a literal. A cloud-fetched manifest whose manifest.register throws takes the lenient path: the install writes its ledger entry and answers 200, and the package loads at the next restart. That answer told its caller the running kernel already held the package.

  • Step 3 records its outcome. A local, hotLoadError, stays undefined exactly when manifest.register succeeds. The answer's hotLoaded is derived from it, never written as a literal.
  • The new key is hotLoadError (string): the register error's message. It is present only beside hotLoaded: false. On a hot-loaded install it is omitted (not null), so the success answer's key set is unchanged. console: install answers say what the runtime served — hotLoaded: false reads "installed, loads at the next restart", and an upgrade waits for the new version's app objectui#12098 reads hotLoaded, and can show hotLoadError as the reason.
  • The note follows the same record. It makes the same claim hotLoaded does, so on the lenient path it no longer says "App is now available in this runtime". It says the package is installed and cached, the running kernel could not load it, and the runtime registers it again at its next restart.
  • Unchanged. The lenient path still installs: the ledger entry is written and the package loads at the next restart. An inline manifest whose register throws is still refused with 422 PLUGIN_REGISTER_FAILED, and nothing is written. Whether the lenient path should stay lenient is ⛔ not decided here (triage 6098821061: "Not in scope").

The lenient path's answer, abridged:

{ "success": true, "data": { "manifestId": "com.example.crm", "hotLoaded": false, "hotLoadError": "MESSAGE", "upgradedFrom": null, "note": "App installed and cached on this runtime, but the running kernel could not load it (`hotLoadError` says why). The runtime registers it again at its next restart." } }

MESSAGE stands for the register error's message, passed through as the register threw it.

Premise check, against origin/main eae3368ae

  • Held. manifestService.register(manifest) is awaited at :1257; an inline manifest's failure answers 422 PLUGIN_REGISTER_FAILED at :1266; a cloud-fetched manifest's failure only warns at :1269; hotLoaded: true at :1348 is a literal.
  • No second spelling. No other answer in the file records a hot-register failure. The listing's notLoaded marker ({ code, requiredRange }) records only an entry the boot rehydrate refused on the protocol handshake. The DELETE answer's cleanups[].error records a failed withdrawal from the running kernel. Neither is this event.
  • No async install job. marketplace-install-local-jobs.test.ts is about a package's declared scheduled jobs. It reads hotLoaded only as one key of the success answer's key set (Object.keys(data)). That set is unchanged here, and the pin stays green.

Tests

  • New: packages/cloud-connection/src/marketplace-install-local-hot-loaded.test.ts, 3 cases. It imports the plugin from source, not through dist.
    • Lenient path: a cloud-fetched snapshot whose register throws answers 200, hotLoaded: false, hotLoadError equal to the thrown message. The ledger entry is written, and the note does not say "now available".
    • CONTROL: a register that succeeds answers hotLoaded: true, with no hotLoadError key.
    • CONTROL: an inline manifest whose register throws answers 422 PLUGIN_REGISTER_FAILED in the declared envelope, and nothing is written.
  • Ablation, from the committed fix at 83034b34c. scripts/ablation-replace.mjs put hotLoaded: true, back (anchor hits 1 then 0, blob 10b51ce6aaec then cb1f247d39c6). Result: Tests 1 failed | 2 passed (3). The lenient case went red (expected true to be false), and both controls stayed green. Restore: blob equal to HEAD (10b51ce6aaec), git diff HEAD empty.
  • Package suite: pnpm --filter @objectstack/cloud-connection test: Test Files 43 passed (43), Tests 517 passed (517). pnpm --filter @objectstack/cloud-connection typecheck: exit 0. tsc --noEmit -p tsconfig.test.json --listFiles lists the new test (43 package test files in the program).
  • Tests ran at 83034b34c. 58fccccf2 adds only the changeset, so the code is byte-identical.

Gates, at 58fccccf2 (this PR's head)

  • Derived families. I ran the 50 dispatch lines plus the 14 families the re-derivation added. dispatch-gates --ran: 64 derived, 64 run, 0 NOT-MEASURED, all exit 0. check:dual-build-cjs-loads first answered PREREQUISITE NOT MET (no dist/). After a full pnpm build (72 of 72 tasks) it passed: 107 require entry points across 66 packages.
  • pnpm lint, narrowed to the touched files, with the narrowing proven:
    • (1) eslint's own config. --print-config applies 3 active rules to the plugin file and 5 to the test. eslint ignores the changeset .md: "File ignored because no matching configuration was supplied".
    • (2) --format json: 3 results. The 2 linted files have 0 errors and 0 warnings.
    • (3) Invariance. The config enables no type-aware linting: every parserOptions is { ecmaVersion, sourceType }, with no project or projectService, the only parser is @typescript-eslint/parser, and every rule is per-file. So this diff cannot move an untouched file's verdict.

Acceptance notes

  • Observation, not filed. Until the next restart, the GET listing serves a lenient-path entry with no notLoaded marker. The marker covers only a protocol refusal at rehydrate, and a rehydrate whose register throws is not marked either. Carrier: none.
  • Observation, not filed. After a failed register on the lenient path, the install still runs syncSchemas, binds handlers, seeds and announces the hot install, over a kernel that does not hold the package. This belongs to the open question of whether the lenient path stays lenient, and is not touched here.
  • Handed to the dispatcher for filing, not fixed here. os package install prints "Package installed into the running kernel" for any 200, whatever hotLoaded says (packages/cli/src/commands/package/install.ts:224). I measured it with a scratch probe that ran the command against a stubbed answer carrying hotLoaded: false. The probe is not committed.

Generated by Claude Code

…-register did

The install answer wrote hotLoaded: true as a literal, so a cloud-fetched
manifest whose manifest.register threw (the lenient path) answered 200
claiming the running kernel held a package it did not. Step 3 now records
its outcome: hotLoaded is false on the lenient path, the register error's
message rides beside it as hotLoadError, and the note stops saying the app
is now available. The lenient path itself is unchanged.

Claude-Session: https://claude.ai/code/session_019SvPnd2bzECRNmAU9i6E4k
Co-authored-by: Claude <noreply@anthropic.com>
…path, with both controls

Claude-Session: https://claude.ai/code/session_019SvPnd2bzECRNmAU9i6E4k
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 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 — 3 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 762db996ad2e353d2ddfc553aba11cd6ca67b57f → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 3f6011ab77e7a5e6604276db8b5e084b2495a3e8 — the merge of head 58fccccf2ca08bac444709973ffa705b0b89adc8 into base 762db996ad2e353d2ddfc553aba11cd6ca67b57f, 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 3f6011ab77e7a5e6604276db8b5e084b2495a3e8 && git checkout 3f6011ab77e7a5e6604276db8b5e084b2495a3e8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 762db996ad2e353d2ddfc553aba11cd6ca67b57f 58fccccf2ca08bac444709973ffa705b0b89adc8 && git checkout -B drift-repro 762db996ad2e353d2ddfc553aba11cd6ca67b57f && git merge --no-ff 58fccccf2ca08bac444709973ffa705b0b89adc8

node scripts/docs-audit/affected-docs.mjs --json 762db996ad2e353d2ddfc553aba11cd6ca67b57f

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

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 10, 2026 20:41
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 10, 2026 20:41
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit a360cee Oct 10, 2026
36 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-22695-install-local-hotloaded branch October 10, 2026 21:00
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

Projects

None yet

2 participants