Repository navigation
feat(manifest): let a plugin opt out of idle stops with stay_running - #66
Conversation
A host that stops idle plugin processes also ends work a plugin does between host calls, such as its own timers, a background sync, or a listener it opened. Add an optional stay_running bool to PluginManifest (default false) so such a plugin can ask the host not to stop it for being idle. Every other stop and the lazy start stay as they are. Closes #65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pre-merge checks:
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
A host from before that change refuses a plugin binary whose manifest has a field it does not know, and stops such a plugin at start when it was installed from an archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Closes #65
Related issue: Silo-Server/silo-server#3974
Validation tasks: none
Silo-Server/silo-server#3960 stops a plugin process after 30 minutes without a host call. A plugin that works between host calls, through its own timers, a background sync, or a listener it opened, loses that work when it is stopped. The manifest has no way for a plugin to say it must stay up.
This adds an optional
stay_runningbool toPluginManifest. When it is true, the host should not stop the plugin for being idle.Approach
silo/plugin/v1/common.proto: new fieldbool stay_running = 14, default false, with the contract in the field comment. It turns off idle stops only. The host still starts the plugin on first use and still stops it on update, disable, config change, crash, and shutdown. It is separate from residentnetwork_access_provider.v1plugins. There is no server-wide setting.manifest.Loaddecodes the field with no new code. Tests cover absent,false,true, the camelCase name themanifestsubcommand prints, a round trip through that rendering, and rejection of non-boolean values.docs/compatibility.md"Idle stops" explain when to use it: only for work between host calls, not to keep a cache warm.Host side: Silo-Server/silo-server#3974 reads the field once this ships in a release and #3960 merges.
Validation
go test ./...,go vet ./..., and builds of the four examples: pass.main, which has noGetStayRunning. There,Loaddrops the key without an error.make proto'sbuf generatestep with protoc-gen-go v1.36.11 and protoc-gen-go-grpc v1.6.1: no drift onmain, and the regenerated output is stable on this branch.gofmt -l .lists onlypkg/pluginsdk/runtime/scan_source_test.go, which was already unformatted onmainand is not touched here.Evidence
Evidence: none, no user-visible change
Risks
The change is additive and needs a minor release, v0.33.0, which the docs name. Setting
stay_running: trueneeds a Silo host with Silo-Server/silo-server#2502. An older host refuses the plugin binary, or installs the archive but stops the plugin at start.falseis safe everywhere because protobuf leaves it off the wire. A host with idle stops but an SDK older than v0.33.0 ignores the field and still stops the plugin.docs/compatibility.mdcovers each case.Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Add
stay_runningboolean toPluginManifestso plugins can opt out of idle stopsAdds a
stay_runningfield (protobuf field 14) tosilo.plugin.v1.PluginManifestin common.proto, with generated bindings in common.pb.go.manifest.Loadreads the field, accepts thestayRunningJSON alias, and rejects non-boolean values; the value survives a load/marshal/reload round trip.Macroscope summarized 0ca990d.