Skip to content

TKM-168: Build and reload indexed plugins from the CLI - #255

Closed
JustKira wants to merge 14 commits into
feat/tkm-167-clifrom
feat/tkm-168-plugin-reload
Closed

JustKira wants to merge 14 commits into
feat/tkm-167-clifrom
feat/tkm-168-plugin-reload

Conversation

@JustKira

@JustKira JustKira commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #253.

Summary

tokamak plugin reload [id] builds indexed sources and swaps verified builds into the running local server. The command reports which exact build is running, even when a reload reply is lost.

lock source → build → submit plugin id + manifest SHA-256
  verified reply → loaded or unchanged
  refusal → load-failed
  lost reply → compare against the running catalog, or report unknown

The command applies index removals independently and reports unrelated manifest errors as warnings after the swap. A refused batch falls back in dependency order, except that a unique-index backfill refusal leaves the entire batch untouched. Changed workers must pass readiness before swap. Requested skipped plugins fail the command; unrequested skipped plugins are reported separately.

Linear: TKM-168

Evidence

  • Before: A delayed request could report the wrong build as loaded. A lost reply could report failure after the server applied the build. A worker could fail during its first action after a reported success.
  • After: CLI regressions cover overlapping builds, stale manifests, tampered artifact bytes, lost replies, an unreachable server, dependency fallback, index and legacy isolation, worker import refusal, skipped plugins, and atomic unique-index refusal. The browser scenario uses the CLI and checks the document stays open and only the changed view remounts.
Local command Result
proto run bun -- test packages/cli/tests 26 passed.
cargo test -p server --no-fail-fast -- --test-threads=2 188 passed, 2 ignored by the suite. The worker shutdown regression passed.
bash .ci/check.sh lint Passed on rerun; nonblocking TypeScript warnings.
bash .ci/check.sh ts Passed.
bash .ci/check.sh rust Passed.
proto run bun -- e2e/run.ts Passed.
proto run bun -- run e2e:browser 20 passed across Chromium and WebKit.

Merge Danger

Door: Two-way. The plugin index format is unchanged.

Blast Radius: Reload. The old server binary reload command has been replaced by tokamak plugin reload. The older HTTP route still controls the configured installation and does not apply live index changes.

…168-plugin-reload

# Conflicts:
#	packages/cli/README.md
#	packages/cli/src/commands/add.ts
#	packages/cli/src/main.ts
#	packages/cli/src/server.ts
#	packages/cli/tests/cli.test.mjs
#	packages/server/src/plugins/catalog.rs
#	packages/server/src/plugins/mod.rs
…into feat/tkm-168-plugin-reload

# Conflicts:
#	packages/runtime/PLUGINS.md
#	packages/server/PLUGINS.md
#	packages/server/src/plugins/catalog.rs
#	packages/server/src/plugins/grants.rs
#	packages/server/src/plugins/loading.rs
#	packages/server/src/plugins/mod.rs
#	packages/server/src/service/plugin_control.rs
#	packages/server/src/service/startup.rs
@JustKira
JustKira marked this pull request as draft November 20, 2026 14:08
@JustKira

Copy link
Copy Markdown
Contributor Author

Closing without merging. The plugin shape, the server engine and sign-in are being decided again (Linear TKM-194 and TKM-195), and this work sits on top of them. Nothing is lost: the head commit is 6645ed0, and git fetch origin pull/255/head brings it back.

@JustKira JustKira closed this Nov 21, 2026
@JustKira
JustKira deleted the feat/tkm-168-plugin-reload branch November 21, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant