Skip to content

feat(manifest): let a plugin opt out of idle stops with stay_running - #66

Merged
Quick104 merged 3 commits into
mainfrom
feat/manifest-stay-running
Nov 11, 2026
Merged

Quick104 merged 3 commits into
mainfrom
feat/manifest-stay-running

Conversation

@Quick104

@Quick104 Quick104 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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_running bool to PluginManifest. When it is true, the host should not stop the plugin for being idle.

Approach

  • silo/plugin/v1/common.proto: new field bool 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 resident network_access_provider.v1 plugins. There is no server-wide setting.
  • manifest.Load decodes the field with no new code. Tests cover absent, false, true, the camelCase name the manifest subcommand prints, a round trip through that rendering, and rejection of non-boolean values.
  • README "Staying running between calls" and 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.
  • The new tests fail to compile on main, which has no GetStayRunning. There, Load drops the key without an error.
  • make proto's buf generate step with protoc-gen-go v1.36.11 and protoc-gen-go-grpc v1.6.1: no drift on main, and the regenerated output is stable on this branch.
  • gofmt -l . lists only pkg/pluginsdk/runtime/scan_source_test.go, which was already unformatted on main and 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: true needs 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. false is 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.md covers each case.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, buf, Go toolchain
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified (the maintainer chose the design)
  • Adversarial review: Codex gpt-6.1-sol reviewed 5bcee70 adversarially, covering the contract, generated code, related SDK helpers, docs and tests. It found one problem: the docs said older hosts ignore the field, but hosts without silo-server#2502 reject or fail to start such a plugin. That is fixed in 0ca990d. Kody's request to name the first release is fixed in dc8783d.

🤖 Generated with Claude Code

Note

Add stay_running boolean to PluginManifest so plugins can opt out of idle stops

Adds a stay_running field (protobuf field 14) to silo.plugin.v1.PluginManifest in common.proto, with generated bindings in common.pb.go. manifest.Load reads the field, accepts the stayRunning JSON alias, and rejects non-boolean values; the value survives a load/marshal/reload round trip.

  • Documents the setting, its default (false), and its v0.33.0 host-version requirement in README.md and compatibility.md.
  • Behavioral Change: field defaults to false, so existing manifests are unaffected; hosts older than v0.33.0 ignore the setting.

Macroscope summarized 0ca990d.

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>
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Nov 11, 2026
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T15:01:24.816750Z 0ca990d New commits
🔒 Security Review ✅ Completed 2026-11-11T15:04:02.772996Z 0ca990d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread README.md Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

silo-kody Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 5 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Share optional authentication service resolution across interface types
  • Test required RPC behavior rather than relying on interface satisfaction
  • Find the last complete-line boundary with bounded memory
  • Identify the actual first SDK release containing new Go APIs
  • Pin protobuf wire metadata in Go contract tests

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

silo-kody Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 5 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Share optional authentication service resolution across interface types
  • Test required RPC behavior rather than relying on interface satisfaction
  • Find the last complete-line boundary with bounded memory
  • Identify the actual first SDK release containing new Go APIs
  • Pin protobuf wire metadata in Go contract tests

@Quick104
Quick104 merged commit e9ed279 into main Nov 11, 2026
4 checks passed
@Quick104
Quick104 deleted the feat/manifest-stay-running branch November 11, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let a plugin opt out of idle stops with a stay_running manifest field

1 participant