Skip to content

docs(runtime): explain the plugin GOMAXPROCS cap - #64

Merged
Quick104 merged 1 commit into
mainfrom
docs/plugin-gomaxprocs
Nov 11, 2026
Merged

Quick104 merged 1 commit into
mainfrom
docs/plugin-gomaxprocs

Conversation

@Quick104

@Quick104 Quick104 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Silo-Server/silo-server#3959 makes the server start each plugin process with GOMAXPROCS set to 4, or to the server's own value when that is lower. Network access providers and the install-time manifest run are exempt. This adds a README section so plugin authors know about the cap, that it doesn't limit goroutines waiting on the network or in syscalls, and how a CPU-heavy plugin opts out with runtime.SetDefaultGOMAXPROCS().

Related issue: Silo-Server/silo-server#3959

Compatibility and release impact

Docs only. No API, protobuf, or runtime change. Plugins built with Go 1.25 or later can use the opt-out shown. The section refers to "Silo server releases that include silo-server#3959", so it is accurate before and after that PR ships.

Downstream coordination

  • silo-server#3959 makes the server change. Merge this after it, or alongside it.

Validation

  • go test ./...: pass
  • go vet ./...: clean
  • go build for the four examples: pass
  • The README snippet compiled as a throwaway main against the SDK.
  • gofmt -l . lists only pkg/pluginsdk/runtime/scan_source_test.go, which is already unformatted on main and untouched here.

AI Disclosure

  • Harness: Claude Code (T3 Code)
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: AI-generated, reviewed by the maintainer's agent session
  • Adversarial review: n/a for a docs change. The facts it documents (the cap value, the exemptions, the opt-out) were checked against the server PR head.

🤖 Generated with Claude Code

Note

Document the plugin GOMAXPROCS cap in the runtime README

Adds a CPU-limit section to README.md, citing silo-server#3959. It explains the cap, which plugins are exempt, and how it affects CPU-bound versus I/O-bound work. It also shows a main function example that restores the Go runtime default or sets an explicit value before serving.

Macroscope summarized aaa9a26.

Silo now starts plugin processes with a capped GOMAXPROCS. Describe the
cap, which plugins it skips, why I/O-bound plugins are unaffected, and
how a CPU-bound plugin restores the runtime default before serving.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 11, 2026
@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 ❌
⚠️ 3 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
  • Find the last complete-line boundary with bounded memory
  • Identify the actual first SDK release containing new Go APIs

@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-11T14:48:47.491149Z aaa9a26 PR opened
🔒 Security Review ✅ Completed 2026-11-11T14:49:49.213733Z aaa9a26 PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The README adds a section on the plugin GOMAXPROCS cap, its exceptions, and how plugins can disable automatic sizing or set an explicit value.

Changes: Plugin CPU limit documentation

Layer / File(s) Summary
Document plugin GOMAXPROCS behavior
README.md
Documents the plugin GOMAXPROCS cap and exceptions, describes its stated effects, and provides examples for disabling automatic sizing or setting an explicit value.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested labels: documentation, go, size/S

Suggested reviewers: rhainland

Merge Risk: Low · up to aaa9a

This is a docs-only change with no runtime impact. One sentence overstates that I/O-bound plugins are unaffected by the cap. Qualifying it would avoid misleading performance diagnosis, but it should not block merge.

Architecture risk: Low · up to aaa9a

The change affects 1 system.

Changed systems: README.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — README.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in README.md: The README adds documentation on the server’s plugin GOMAXPROCS cap and its exceptions, the Go execution and I/O behavior it describes, and opt-out or explicit-setting examples for plugins.
Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly and concisely describes the main documentation change: explaining the plugin GOMAXPROCS cap.
Description check Passed The description directly explains the documented server behavior, exemptions, runtime impact, opt-out guidance, compatibility, and validation for this docs-only change.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@coderabbitai coderabbitai Bot added documentation Improvements or additions to documentation go Pull requests that update go code labels Nov 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 74bbf506-1717-473c-9357-529c5e3efe9c
Commits

Reviewing files that changed from the base of the PR and between 2710a5a and aaa9a26.

Files selected for processing: 1

  • README.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Comment thread README.md

The cap limits how many goroutines run Go code at the same time. A goroutine
blocked on network I/O or in a syscall (file reads, `stat`, extended
attributes) does not count against it, so I/O-bound plugins are unaffected.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Qualify the claim about I/O-bound plugins.

Blocked goroutines do not consume execution slots, but I/O-bound plugins can still have many goroutines runnable at once. The cap can then affect throughput or latency. The server PR notes this risk for proxied streams. (github.com)

Say that the cap does not limit waiting goroutines, rather than that I/O-bound plugins are unaffected.

@Quick104
Quick104 merged commit b82b589 into main Nov 11, 2026
4 checks passed
@Quick104
Quick104 deleted the docs/plugin-gomaxprocs branch November 11, 2026 16:42
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 go Pull requests that update go code size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant