Repository navigation
feat(requests): pluginize request fulfillment behind request_router.v1 - #104
Conversation
Pluginize the requests fulfillment backend behind an agnostic request_router.v1 capability (high seam: whole-request fulfiller). Host keeps lifecycle/quota/policy/quality-governance and a generic two-tier connection registry; plugins own routing+submission+status. First plugin extracts multi-instance Sonarr/Radarr; Seerr follows in a separate spec. Preserves autoscan reuse of arr connection rows. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Three-phase plan: (1) request_router.v1 SDK capability, (2) new silo-plugin-requests-arr plugin extracting multi-instance Sonarr/Radarr, (3) host refactor routing fulfillment through the plugin while keeping quality governance, target records, and autoscan connection reuse host-side. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…registry Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… keeps quality governance Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…alization Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ation, dedupe targets Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…n bad connections, media-type routing) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…on, propagate config-encode error, drop itoa wrapper, test status/options translation Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ile cycle Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…installation default, drop redundant options write Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Extends AdminFormDescriptor into a full form-description language (dynamic options, multi-select, conditional visibility, sections, validation) + a plugin Validate RPC, rendered by one reusable SchemaForm engine. Retires the bespoke arr connection form and integrationOptionsFromRouter so any request_router backend renders its config UI from manifest data with zero host changes. Addresses code-review finding Silo-Server#9. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Six phases: SDK AdminFormDescriptor extensions + Validate RPC; reusable SchemaForm renderer (refactor PluginConfigForm onto it); host Validate plumbing + generic options + legacy-column derivation + retire integrationOptionsFromRouter; requests admin page swap to SchemaForm with per-plugin grouping; arr manifest enrichment + Validate impl; verification. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…alidation, multi-select)
…ion) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…c options, errors) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…cy columns from plugin_config Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ion field_errors Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ping; retire bespoke arr form Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…(no toast spam) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…po arity Post-rebase conflict fixups: take-ours on internal/plugins/service.go dropped origin's ScanSourceClientByPluginID (independent upstream capability) — restored. mediarequests.NewRepository temporarily 1-arg to match our pre-Silo-Server#95 repo; Task 2 restores the cipher arg when adopting Silo-Server#95's at-rest credential model.
…plugin api keys; drop SecretResolver
…oval (code-review) Max-effort code review of the Silo-Server#95 credential integration. Fixes the actionable findings: - TestEncryptAPIKeyRoundTripAndAAD: pins encryptAPIKey<->DecryptIfEncrypted inversion, the id-bound apiKeyAAD == secret.RowAAD(...) match (so Silo-Server#95's backfill rows decrypt), the blank-key "" sentinel, and row-bound AAD — the security- critical invariants had no automated guard (no DB harness for scanIntegration). - TestCreateRequestAutoApprovalEmptyKeyTreatedAsUnconfigured: pins that a keyless connection reads as unconfigured (request stays pending, never submitted), so integrationConfigured and resolveRouterConnections can't drift. - Fix stale fulfillContext comment (referenced a resolved-API-key cache removed with SecretResolver). Assessed-not-changed (documented): decrypt-error-fails-closed and failed-backfill behaviors are origin/main Silo-Server#95 design we adopt; nil-cipher is unreachable in prod and matches the codebase-wide no-guard pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The replace directive was already removed when v0.6.0 was pinned (785606f); this leftover comment falsely claimed a local replace still existed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughThis PR migrates media request fulfillment from adapter-based (Radarr/Sonarr-specific) implementations to a plugin-driven ChangesRequest router pluginization rollout
Metadata provider eligibility filtering
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
|
These design specs and implementation plans are internal development artifacts; keep them out of the upstream PR diff. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 14
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
🟡 Minor comments (18)
docs/superpowers/plans/2026-06-08-plugin-platform-sdk-helpers.md-24-35 (1)
24-35:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winSpecify a language for this fenced block (MD040).
Please annotate this code fence with a language (e.g.,
text) to satisfy markdownlint.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-plugin-platform-sdk-helpers.md` around lines 24 - 35, The fenced code block that lists the package layout (the block starting with "/opt/silo-plugin-sdk/pkg/pluginsdk/") is missing a language tag for markdownlint MD040; update that fence to include a language (for example change ``` to ```text or ```bash) so the block is annotated and MD040 passes.Source: Linters/SAST tools
docs/superpowers/plans/2026-06-08-plugin-launch-singleflight.md-15-15 (1)
15-15:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdjust heading nesting to satisfy MD001.
Heading level jumps here and should be normalized to keep markdownlint green.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-plugin-launch-singleflight.md` at line 15, The heading "### Task 1: Single-flight `ensureClient`" jumps levels and violates MD001; update its markdown header level to match surrounding headings (e.g., change to "##" or "####" as appropriate) so the nesting is sequential with the prior and subsequent headings, and verify other headings around "Task 1: Single-flight `ensureClient`" follow the same normalized level to keep markdownlint MD001 satisfied.Source: Linters/SAST tools
docs/superpowers/plans/2026-06-07-requests-pluginization.md-109-111 (1)
109-111:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix heading-level jump to satisfy markdownlint MD001.
The heading hierarchy skips a level here and will keep lint noisy.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-07-requests-pluginization.md` around lines 109 - 111, The heading "PHASE 1 — SDK: `request_router.v1` capability (`silo-plugin-sdk`)" is using a top-level H1 which creates a level jump; change its markdown level to match the surrounding plan headings (e.g., convert "# PHASE 1 — SDK: `request_router.v1` capability (`silo-plugin-sdk`)" to "## PHASE 1 — SDK: `request_router.v1` capability (`silo-plugin-sdk`)" or the appropriate lower-level heading) so the hierarchy flows into the subsequent "Task 1: Add the `request_router.proto` contract" heading without skipping levels.Source: Linters/SAST tools
docs/superpowers/plans/2026-06-07-seerr-request-router.md-23-39 (1)
23-39:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd language identifier to fenced code block (MD040).
The file-structure code fence should declare a language (
textis sufficient) to satisfy markdown lint.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-07-seerr-request-router.md` around lines 23 - 39, Add a language identifier to the fenced code block that contains the repository tree (the block starting with ``` and the lines beginning "/opt/silo-plugin-requests-seerr/ ... README.md"); change the opening fence to specify a language (e.g., ```text) so the markdown linter MD040 is satisfied.Source: Linters/SAST tools
docs/superpowers/plans/2026-06-07-schema-driven-config-form.md-51-51 (1)
51-51:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winNormalize heading hierarchy (MD001).
This heading level jumps over the expected level and should be adjusted to keep markdown lint clean.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-07-schema-driven-config-form.md` at line 51, The markdown heading for Task 1 skips the expected hierarchy level and needs to be normalized. In the schema-driven config form plan document, adjust the `### Task 1: Extend AdminFormDescriptor in common.proto` heading so it follows the surrounding heading structure without jumping levels, and update any sibling task headings in the same section if needed to keep the hierarchy consistent.Source: Linters/SAST tools
docs/superpowers/plans/2026-06-08-request-card-library-collapse-anime.md-11-12 (1)
11-12:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winReplace local absolute paths with repo-relative instructions.
Line [11] and later command/file references hardcode local paths (
/opt/...,/tmp/...), which makes the plan environment-specific and non-portable for contributors.As per coding guidelines, "When creating or editing
docs/superpowers/specs/ordocs/superpowers/plans/, never include local absolute filesystem paths or transient worktree IDs; use repository-relative paths and wording like 'Commands assume the repository root is the cwd.'"Also applies to: 226-227, 318-321, 378-379
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-request-card-library-collapse-anime.md` around lines 11 - 12, Replace the hardcoded absolute paths seen in the plan (e.g. `/opt/silo`, `/opt/silo-plugin-requests-arr`, `/tmp/go/bin`, `web/node_modules/.bin`) with repository-relative instructions and a single clarifying sentence such as "Commands assume the repository root is the cwd." Update all occurrences (including the later occurrences mentioned) so commands reference repo-root-relative locations (e.g. `silo`, `silo-plugin-requests-arr`, `./web/node_modules/.bin`, `./go/bin` or just rely on PATH) and remove any transient local filesystem paths to keep the plan portable for contributors.Source: Coding guidelines
docs/superpowers/plans/2026-06-08-seerr-permission-simplification.md-9-10 (1)
9-10:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove absolute filesystem paths from this plan.
Line [9] and later steps use local absolute paths, which conflicts with the docs portability rule for plans/specs.
As per coding guidelines, "When creating or editing
docs/superpowers/specs/ordocs/superpowers/plans/, never include local absolute filesystem paths or transient worktree IDs; use repository-relative paths and wording like 'Commands assume the repository root is the cwd.'"Also applies to: 258-263, 277-278
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-seerr-permission-simplification.md` around lines 9 - 10, The plan contains local absolute filesystem paths (e.g., "/opt/silo-plugin-requests-seerr" and the PATH prefix example) that violate the docs portability rule; update the plan text to remove all absolute paths and transient worktree IDs and replace them with repository-relative references (e.g., "repo: silo-plugin-requests-seerr" or "assume repository root is the cwd") and neutral command notes such as "Commands assume the repository root is the cwd"; ensure the same replacements are made for every occurrence of that absolute path and the PATH prefix example within this document.Source: Coding guidelines
docs/superpowers/plans/2026-06-08-seerr-per-user-requester-mapping.md-11-12 (1)
11-12:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse repository-relative paths throughout the plan.
The plan currently embeds machine-local absolute paths (
/opt/...,/tmp/...). Please rewrite these to repository-relative references so the instructions are reusable across environments.As per coding guidelines, "When creating or editing
docs/superpowers/specs/ordocs/superpowers/plans/, never include local absolute filesystem paths or transient worktree IDs; use repository-relative paths and wording like 'Commands assume the repository root is the cwd.'"Also applies to: 205-207, 698-716, 726-727
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-seerr-per-user-requester-mapping.md` around lines 11 - 12, Replace all machine-local absolute paths (e.g. strings like "/opt/...", "/tmp/..." and specific absolute PATH prefixes) in the plan with repository-relative references (for example refer to repositories by their directory names such as "silo-plugin-sdk", "silo", "silo-plugin-requests-seerr") and add a short preface line: "Commands assume the repository root is the cwd." Also change any hardcoded PATH suggestions to a portable form (for example mention adding Go binaries via "PATH=$PATH:$(go env GOPATH)/bin" or by referring to a repo-local bin directory) and apply the same substitution to the other ranges noted (lines referenced in the review) so no absolute filesystem paths remain.Source: Coding guidelines
docs/superpowers/plans/2026-06-08-silo-server-95-credential-integration.md-9-10 (1)
9-10:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winNormalize plan paths to repository-relative form.
This file still uses absolute local paths (
/opt/silo, etc.). Please switch to repo-relative instructions to keep the runbook portable and guideline-compliant.As per coding guidelines, "When creating or editing
docs/superpowers/specs/ordocs/superpowers/plans/, never include local absolute filesystem paths or transient worktree IDs; use repository-relative paths and wording like 'Commands assume the repository root is the cwd.'"Also applies to: 21-26, 162-163
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-silo-server-95-credential-integration.md` around lines 9 - 10, The doc uses local absolute paths and transient IDs (e.g., "/opt/silo", "backup/pre-main-rebase-20260608", and the literal PATH hack "PATH=$PATH:/tmp/go/bin") which must be turned into repository-relative instructions: replace absolute paths with repo-relative references like "internal/requests", "internal/plugins", "cmd/silo" and add a short note "Commands assume the repository root is the cwd"; convert the backup reference to a generic backup branch name (e.g., "backup/<branch>") or remove it; change the PATH line to an instruction such as "Ensure /tmp/go/bin is on PATH" or "Add Go to PATH as needed" rather than injecting an absolute PATH string, and make the same replacements for the other occurrences of absolute paths mentioned in the comment.Source: Coding guidelines
docs/superpowers/plans/2026-06-08-single-default-enforcement.md-15-15 (1)
15-15:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix heading depth jump at Line 15.
This jumps from an H1 to H3, triggering MD001 (
heading-increment). Use an H2 at this section level.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-single-default-enforcement.md` at line 15, The document has a heading depth jump at the line containing "### Task 1: SDK — add `siblings` + `exclusive_group_field` and regenerate" which should be H2 instead of H3; update that heading from "### Task 1: SDK — add `siblings` + `exclusive_group_field` and regenerate" to use H2 (i.e., prepend with "##") so the heading hierarchy is consistent and MD001 is resolved.Source: Linters/SAST tools
docs/superpowers/specs/2026-06-07-requests-pluginization-design.md-44-44 (1)
44-44:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd language identifiers to fenced code blocks at Lines 44 and 144.
markdownlint MD040 is triggered here; annotate fences (for example,
text/plaintext) so docs lint remains clean.Also applies to: 144-144
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/specs/2026-06-07-requests-pluginization-design.md` at line 44, Two fenced code blocks in the document use bare triple-backticks (no language) and trigger markdownlint MD040; update each opening fence from ``` to an appropriate annotated fence such as ```text, ```plaintext, or ```json depending on the block content (e.g., request/response payloads should use ```json, plain examples use ```text) so both bare ``` occurrences become language-annotated.Source: Linters/SAST tools
docs/superpowers/plans/2026-06-08-typed-quality-tier-signal.md-93-93 (1)
93-93:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winCorrect the contradictory identifier note at Line 93.
The sentence says the getter is
GetIs4K()and then parenthetically says NOTGetIs4K(). That contradiction can send implementers to the wrong symbol. Please fix the “NOT …” example to the actually-wrong variant.Suggested doc fix
- ... so the proto field `is4k` generates the Go field **`Is4K`** and getter **`GetIs4K()`** (NOT `Is4K`/`GetIs4K()`). + ... so the proto field `is4k` generates the Go field **`Is4K`** and getter **`GetIs4K()`** (NOT `Is4k`/`GetIs4k()`).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-08-typed-quality-tier-signal.md` at line 93, Fix the contradictory parenthetical on the note about the is4k identifier: update the example of the actually-wrong generated symbols so it reads that the proto field is4k generates Go field Is4K and getter GetIs4K() (NOT the lowercase/incorrect `is4k`/`GetIs4k()`); ensure the surrounding references to RequestedQuality, GetId(), Is4K, GetIs4K(), and GetQualities() remain unchanged.internal/requests/errors.go-38-43 (1)
38-43:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winGuard
ValidationError.Error()against a nil receiver.If a typed-nil
*ValidationErrorreaches anerrorinterface, this method panics one.FormError.Suggested fix
func (e *ValidationError) Error() string { + if e == nil { + return "validation failed" + } if e.FormError != "" { return e.FormError } return "validation failed" }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/requests/errors.go` around lines 38 - 43, The ValidationError.Error() method should guard against a nil receiver to avoid panics when a typed-nil *ValidationError is used as an error; update the ValidationError.Error() implementation to check if e == nil and return "validation failed" (or another sensible default) before accessing e.FormError, keeping the existing behavior of returning e.FormError when non-empty; locate the method by its symbol ValidationError.Error() and the FormError field to apply the nil-check.docs/superpowers/specs/2026-06-08-seerr-per-user-requester-mapping-design.md-120-120 (1)
120-120:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix markdownlint warnings in the spec (inline code span + fenced block language).
markdownlintwarnings are reported at Line 120 (MD038) and Line 134 (MD040). These are small, but worth cleaning to keep docs lint output green.Suggested patch
-`seerr.CreateRequestBody` gains `UserID int \`json:"userId,omitempty"\`` — set +`seerr.CreateRequestBody` gains `UserID int` with JSON tag `json:"userId,omitempty"` — set -``` +```text Silo user requests → host approves → Fulfill(descriptor{requester_email, …}, conns) └─ seerr plugin: mode==mapped, email present ├─ FindUserByEmail(email) ──found──▶ userId = user.ID │ └─none──▶ CreateUser(email, permBits) → userId └─ POST /api/v1/request { mediaType, mediaId, is4k, userId } └─ attributed to that user; auto-approves iff the user has AUTO_APPROVE</details> Also applies to: 134-134 <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/superpowers/specs/2026-06-08-seerr-per-user-requester-mapping-design.md
at line 120, Fix the markdownlint warnings MD038/MD040 by correcting the inline
code and fenced block: render the symbol seerr.CreateRequestBody as a single
inline code span (seerr.CreateRequestBody) and replace the escaped field
snippet so the struct field reads UserID intjson:"userId,omitempty"inside a
fenced code block that includes a language tag (e.g.,go ortext) instead
of using backslash-escaped backticks; ensure the fenced block around the flow
diagram includes the language marker to satisfy MD040 and remove any stray
backslashes so MD038 is resolved.</details> <!-- cr-comment:v1:2894a2ccad80f62a7e0108fe --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>docs/superpowers/specs/2026-06-08-single-default-enforcement-design.md-139-147 (1)</summary><blockquote> `139-147`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Label the data-flow fenced block with a language.** Line 139 starts an unlabeled fenced block; adding a language tag will clear MD040. <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/superpowers/specs/2026-06-08-single-default-enforcement-design.md
around lines 139 - 147, The fenced code block that starts with "Admin toggles
is_default on card B (radarr)" is unlabeled; add a language tag (e.g., ```text)
to the opening fence so the block is labeled and MD040 is resolved. Update the
block surrounding the flow (the triple-backtick section containing the
Admin/frontend/host/plugin lines) to use a consistent language label such as
text to avoid syntax highlighting changes.</details> <!-- cr-comment:v1:6e0967cd26d20e36d9e2af82 --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>docs/superpowers/specs/2026-06-08-silo-server-95-credential-integration-design.md-51-54 (1)</summary><blockquote> `51-54`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Specify the fence language for the rebase commands block.** Line 51 uses an unlabeled fence; please tag it (for example, `bash`) to satisfy MD040. <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/superpowers/specs/2026-06-08-silo-server-95-credential-integration-design.md
around lines 51 - 54, The fenced code block containing the git commands needs a
language tag to satisfy MD040: edit the fenced block around the two lines "git
config rerere.enabled true" and "git rebase origin/main" and add a shell
language identifier (e.g., bash) immediately after the opening triple backticks
so the block reads like ```bash; this will properly label the code snippet for
linting.</details> <!-- cr-comment:v1:bdace6e70209aad903ada51a --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>docs/superpowers/specs/2026-06-08-typed-quality-tier-signal-design.md-43-43 (1)</summary><blockquote> `43-43`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Use repository-relative paths in this spec instead of local absolute paths.** Lines 43, 64, 80, and 88 embed workstation-specific absolute paths (`/opt/...`), which makes the runbook non-portable for reviewers and operators. As per coding guidelines, “When creating or editing `docs/superpowers/specs/` or `docs/superpowers/plans/`, never include local absolute filesystem paths or transient worktree IDs; use repository-relative paths and wording like 'Commands assume the repository root is the cwd.'” Also applies to: 64-64, 80-80, 88-88 <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/specs/2026-06-08-typed-quality-tier-signal-design.md` at line 43, Replace workstation-specific absolute paths in the spec with repository-relative paths and a note that commands assume the repository root is the current working directory; specifically, update occurrences of paths like `/opt/silo-plugin-sdk/proto/silo/plugin/v1/request_router.proto` to the repo-relative form `proto/silo/plugin/v1/request_router.proto` (and apply the same change for the other absolute `/opt/...` entries in this spec) and add a short sentence such as "Commands assume the repository root is the cwd" to the top or relevant section. ``` </details> <!-- cr-comment:v1:9c25875b7b08f69c1d1877da --> _Source: Coding guidelines_ </blockquote></details> <details> <summary>docs/superpowers/specs/2026-06-08-seerr-permission-simplification-design.md-40-46 (1)</summary><blockquote> `40-46`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Add a language identifier to the fenced block.** Line 40 opens a code fence without a language, which triggers MD040 and will keep markdown lint noisy. <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/superpowers/specs/2026-06-08-seerr-permission-simplification-design.md
around lines 40 - 46, The fenced code block containing the permission-bit
example (variables like bits, REQUEST, REQUEST_4K, AUTO_APPROVE, AUTO_APPROVE_4K
and the conditional snippet) is missing a language identifier; update the
opening triple-backtick to include a language (e.g.,python ortext) so
the snippet is labeled and MD040 is resolved.</details> <!-- cr-comment:v1:36a35bb4668c366e948af339 --> _Source: Linters/SAST tools_ </blockquote></details> </blockquote></details> <details> <summary>🧹 Nitpick comments (3)</summary><blockquote> <details> <summary>internal/api/handlers/plugins_admin_form_test.go (1)</summary><blockquote> `173-181`: _⚡ Quick win_ **Extend completeness coverage to nested `AdminFormCondition` and `AdminFormValidation` DTOs.** Right now the guard only proves top-level field presence. Newly added nested proto fields can still be dropped silently while this test stays green. <details> <summary>Suggested extension</summary> ```diff cases := []struct { name string proto reflect.Type dto reflect.Type }{ {"AdminFormField", reflect.TypeOf(pluginv1.AdminFormField{}), reflect.TypeOf(pluginAdminFormFieldJSON{})}, {"AdminFormDescriptor", reflect.TypeOf(pluginv1.AdminFormDescriptor{}), reflect.TypeOf(pluginAdminFormJSON{})}, {"AdminFormSection", reflect.TypeOf(pluginv1.AdminFormSection{}), reflect.TypeOf(pluginAdminFormSectionJSON{})}, + {"AdminFormCondition", reflect.TypeOf(pluginv1.AdminFormCondition{}), reflect.TypeOf(pluginAdminFormConditionJSON{})}, + {"AdminFormValidation", reflect.TypeOf(pluginv1.AdminFormValidation{}), reflect.TypeOf(pluginAdminFormValidationJSON{})}, } ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/api/handlers/plugins_admin_form_test.go` around lines 173 - 181, The current test cases in plugins_admin_form_test.go only verify top-level DTOs; extend the cases slice to include nested types so the guard covers AdminFormCondition and AdminFormValidation too by adding entries for reflect.TypeOf(pluginv1.AdminFormCondition{}) -> reflect.TypeOf(pluginAdminFormConditionJSON{}) and reflect.TypeOf(pluginv1.AdminFormValidation{}) -> reflect.TypeOf(pluginAdminFormValidationJSON{}); alternatively, enhance the test logic that iterates the cases to recursively walk/compare nested fields in pluginv1.AdminFormDescriptor / pluginAdminFormJSON (and AdminFormSection) so any newly added nested proto fields are validated against their corresponding DTO types as well. ``` </details> <!-- cr-comment:v1:0aa41ba775cbbfb7f8f083e5 --> </blockquote></details> <details> <summary>docs/superpowers/specs/2026-06-08-request-card-library-collapse-anime-design.md (1)</summary><blockquote> `64-67`: _💤 Low value_ **Add language specifiers to fenced code blocks.** The pseudocode blocks at lines 64–67 and 93–96 are missing language specifiers. Even for pseudocode, adding a language hint (e.g., ` ```text ` or ` ```pseudocode `) silences the linter and improves rendering consistency. Also applies to: 93-96 <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/superpowers/specs/2026-06-08-request-card-library-collapse-anime-design.md
around lines 64 - 67, Add language specifiers to the fenced pseudocode blocks
that define forceOpen and open (the blocks containing expressions using
section.field_keys, mergedErrors, userToggled, and collapsed_default) and the
similar block at the later location; update those triple-backtick fences to
include a language hint such astext orpseudocode so the linter stops
complaining and rendering is consistent.</details> <!-- cr-comment:v1:62de359ade1f2f2c2c0a9084 --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>migrations/sql/20260607211831_drop_legacy_request_integration_columns.sql (1)</summary><blockquote> `36-46`: _💤 Low value_ **Down migration backfill is incomplete.** The `tags`, `anime_quality_profile_id`, `anime_tags`, and `options` columns are re-added in the Down migration but not populated from `plugin_config`. While the comment says "best-effort," these fields could be extracted: ```sql tags = COALESCE((SELECT array_agg(v::integer) FROM jsonb_array_elements_text(plugin_config->'tags') AS v), '{}'), anime_quality_profile_id = NULLIF(plugin_config->>'anime_quality_profile_id','')::integer, anime_tags = COALESCE((SELECT array_agg(v::integer) FROM jsonb_array_elements_text(plugin_config->'anime_tags') AS v), '{}') ``` If rolling back is truly unlikely, the current state is acceptable, but documenting which fields are intentionally omitted would help future maintainers. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@migrations/sql/20260607211831_drop_legacy_request_integration_columns.sql` around lines 36 - 46, The Down migration's UPDATE for public.request_integrations omits populating tags, anime_quality_profile_id, anime_tags (and options) from plugin_config; update the SET clause for those columns so tags and anime_tags use COALESCE((SELECT array_agg(v::integer) FROM jsonb_array_elements_text(plugin_config->'tags') AS v), '{}') and COALESCE((SELECT array_agg(v::integer) FROM jsonb_array_elements_text(plugin_config->'anime_tags') AS v), '{}') respectively, set anime_quality_profile_id = NULLIF(plugin_config->>'anime_quality_profile_id','')::integer, and populate options from plugin_config (e.g., COALESCE(plugin_config->'options', '{}'::jsonb)); target the UPDATE on request_integrations and adjust the SET expressions using jsonb_array_elements_text and NULLIF casts as described. ``` </details> <!-- cr-comment:v1:0d5268264e9c52bac0dd22e8 --> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Inline comments:
In@docs/superpowers/plans/2026-06-07-requests-pluginization.md:
- Around line 403-406: The plan currently hardcodes an absolute path in the
command sequence (the mkdir/cd lines and the go mod init invocation referencing
/opt/silo-plugin-requests-arr), which violates docs rules; change these commands
to use repository-relative paths and a short note that "commands assume the
repository root is the cwd" (e.g., replace "mkdir -p
/opt/silo-plugin-requests-arr && cd /opt/silo-plugin-requests-arr" with a
relative mkdir/cd or just "mkdir -p silo-plugin-requests-arr && cd
silo-plugin-requests-arr" and update the go mod init module path wording to
avoid embedding local filesystem locations), and add a brief preface line
stating commands assume repo root as cwd.In
@docs/superpowers/plans/2026-06-07-schema-driven-config-form.md:
- Around line 12-15: Replace the three absolute paths (
/opt/silo-plugin-sdk,
/opt/silo,/opt/silo-plugin-requests-arr) and the absolute Go toolchain path
with repository-relative instructions: describe each component as a repo
subdirectory (e.g., "silo-plugin-sdk", "silo", "silo-plugin-requests-arr") and
state "Commands assume the repository root is the cwd." Update the build/codegen
notes (themake proto/buf generateand Go toolchain mention) to reference
using the toolchain on PATH or a local SDK under the repo (or a container)
rather than/opt/..., and convert any container/build recipe text to refer to
the repo-relative locations and the same cwd assumption.In
@docs/superpowers/plans/2026-06-07-seerr-request-router.md:
- Around line 14-18: The doc currently hardcodes absolute paths like
/opt/silo-plugin-requests-seerrand/opt/deployarr/.local/go-sdk/go/bin/go
which violates the docs path policy; update the text (lines referencing "Repo
root is/opt/silo-plugin-requests-seerr" and "Go toolchain:
/opt/deployarr/.local/go-sdk/go/bin/go") to use repository-relative phrasing
(e.g., "Commands assume the repository root is the cwd" and refer togoon
PATH or "the Go toolchain (go)"), remove any absolute filesystem paths, and
reword the path-guard note to say the path-guard restricts tools outside the
repo root and that files should be written via Bash heredocs from the repository
root.In
@docs/superpowers/plans/2026-06-08-plugin-launch-singleflight.md:
- Around line 11-12: Replace the machine-local absolute path "/opt/silo" in the
plan with repository-relative wording and paths: state "Repo:silo-server
(branchfeat/requests-pluginization). Commands assume the repository root is
the cwd." and referenceinternal/plugins(and other files) using repo-relative
paths (e.g.,internal/plugins) instead of/opt/...; similarly keep the PATH
hint (PATH=$PATH:/tmp/go/bin) but phrase it as an environment setup step run
from the repo root. Ensure the diff text no longer contains "/opt/silo" and uses
the repository-relative phrasing throughout.In
@docs/superpowers/plans/2026-06-08-plugin-platform-sdk-helpers.md:
- Around line 16-17: The plan embeds local absolute filesystem paths (the bullet
about Edit/Write tools being path-guarded outside/opt/siloand the gofmt
invocation using an absolute GOROOT), so rewrite those lines to remove absolute
paths and use repository-relative wording: change the "Edit/Write tools..."
bullet to say files under the repository should be created/modified via Bash
heredocs with repository-relative paths and a note that commands assume the
repository root is the current working directory, and replace the gofmt line to
instruct running the formatter via the Go toolchain (e.g., using the
environment's go/gofmt) or just "gofmt" without embedding an absolute GOROOT
path. Ensure both edits reference the same bullets in the plan (the Edit/Write
tools bullet and the gofmt invocation) so reviewers can locate and verify the
changes.In
@docs/superpowers/plans/2026-06-08-single-default-enforcement.md:
- Around line 11-12: The plan uses hard-coded absolute paths (e.g.
"/opt/silo-plugin-sdk", "/opt/silo-plugin-requests-arr", "/opt/silo") under the
"Repos & order:" section which makes it non-portable; update all occurrences
to repository-relative references (e.g. "silo-plugin-sdk",
"silo-plugin-requests-arr", "silo-server") and replace filesystem roots with
wording like "Commands assume the repository root is the cwd" and tool prefixes
(e.g. "Go: prefix with PATH=$PATH:/tmp/go/bin", "Frontend: node_modules/.bin/")
so no local absolute filesystem paths or transient worktree IDs remain in the
document; ensure the branch names and order remain unchanged and run a quick
grep for "/opt/" to catch any remaining absolute paths.In
@docs/superpowers/plans/2026-06-08-typed-quality-tier-signal.md:
- Around line 14-38: The plan currently uses absolute host paths like
/opt/silo-plugin-sdk/...throughout; update the document to use
repository-relative paths and repository-root phrasing (e.g., "paths are
relative to the repository root (cwd)") instead of any/opt/...locations.
Replace every absolute path in the File Structure and bullets with the
repo-relative equivalents shown (for example:
silo-plugin-sdk/proto/silo/plugin/v1/request_router.proto,
silo/internal/requests/provider.go,
silo-plugin-requests-arr/internal/arr/routing.go, etc.), remove any
workstation-specific toolchain paths (usegoor state "Go toolchain at PATH
from environment" and say "commands assume repo root is cwd"), and update the
intent text mentioning SDK/plugin host to describe repos by name rather than
absolute locations; ensure the branch and build-order notes remain but without
filesystem prefixes.In
@internal/api/requests_wiring.go:
- Around line 18-20: The PluginRequestRouterAdapter.RequestRouterClient
currently dereferences a.Svc unconditionally and can panic if the adapter was
installed with a nil service; modify RequestRouterClient to check whether a.Svc
is nil and return a controlled "router unavailable" error when it is instead of
calling a.Svc.RequestRouterClient, and update the adapter installation path
(where PluginRequestRouterAdapter is created/installed) to avoid registering the
adapter when dependencies are nil or to pass a clear nil-safe implementation;
reference the PluginRequestRouterAdapter type and its RequestRouterClient method
to locate and change the guard and the registration call.In
@internal/plugins/service.go:
- Around line 629-637: The current ensureClient uses the caller's ctx inside
s.launchGroup.Do which lets the leader caller's cancellation/timeouts cancel the
shared in-flight work; change ensureClient so the launch uses a
cancellation-isolated context (e.g. a background-derived context) when calling
s.doEnsureClient inside launchGroup.Do, so waiter cancellations don't cancel the
shared leader work. Specifically update ensureClient to call
s.launchGroup.Do(..., func() { return s.doEnsureClient(isolatedCtx,
installationID) }) where isolatedCtx is created from context.Background() (or
context.WithCancel(context.Background()) if you need a cancel token you
control), and keep s.doEnsureClient and return handling unchanged.In
@internal/plugins/user_identity_lookup.go:
- Around line 78-80: Guard against a nil adapter or missing lookup in
requesterIdentityAdapter.ResolveRequester by checking if a == nil or a.lookup ==
nil before calling LookupIdentity; if nil, return empty identity values ("" for
both ID and display name) and a nil error to gracefully degrade. Locate
ResolveRequester and the a.lookup.LookupIdentity call and add the nil checks and
early return, otherwise proceed to call a.lookup.LookupIdentity as before.In
@web/src/components/admin/plugins/schemaForm.ts:
- Around line 144-145: The boolean coercion in the switch handling for "boolean"
(case "boolean": return Boolean(raw);) wrongly treats the string "false" as
true; update that branch to explicitly handle string values by returning
raw.toLowerCase() === "true" for strings (and optionally treat "1"/"0" if
desired), otherwise fall back to Boolean(raw) for other types; apply the same
change to the other identical boolean branch in the file so string "false"
correctly becomes false.- Around line 164-169: The array:num case currently maps values with
coerceNumericString which only matches integer regex; update the logic so
decimal numeric strings are converted to numbers too — either extend
coerceNumericString to accept floating formats (e.g. allow /^-?\d+(.\d+)?$/)
and return Number(value), or add a new helper (e.g. coerceNumericOrFloat) that
returns parseFloat/Number for integer and decimal strings and leaves non-numeric
values untouched; then change the switch's array:num branch to use that updated
helper (referencing the case "array:num" and the coerceNumericString helper).In
@web/src/pages/AdminRequests.tsx:
- Around line 577-580: The form/editor currently only stores installation_id
which causes duplicate Select option values when requestRouterInstallations()
emits multiple capability options per installation; update the editor state and
form schema to track capability_id (in addition to installation_id) and wire the
Select to use capability_id as the value, ensure request probing and save
payloads read capability_id (not just installation_id), and update any handlers
that construct payloads or set selected values (references: installation_id,
capability_id, requestRouterInstallations, the component and the code paths around saving/probing options) so the exact capability sub-id is persisted and sent. Around line 926-933: When the user changes the selected plugin, the previous pluginConfig and any inline save errors must be cleared to avoid sending stale keys to the new plugin; update the plugin-change path (the handler that updates selected / selectedInstallationID) to set pluginConfig to an empty/default object and clear related inline save error state before the options probe runs (this affects the values passed into useConnectionOptions). Locate the code that updates selected (and where selectedInstallationID is set) and add logic to reset pluginConfig and the inline save error variables so the next options call receives a fresh per-plugin config. Minor comments: In @docs/superpowers/plans/2026-06-07-requests-pluginization.md: Around line 109-111: The heading "PHASE 1 — SDK: request_router.v1 capability (silo-plugin-sdk)" is using a top-level H1 which creates a level jump; change its markdown level to match the surrounding plan headings (e.g., convert "# PHASE 1 — SDK: request_router.v1 capability (silo-plugin-sdk)" to "## PHASE 1 — SDK: request_router.v1 capability (silo-plugin-sdk)" or the appropriate lower-level heading) so the hierarchy flows into the subsequent "Task 1: Add the request_router.proto contract" heading without skipping levels. In @docs/superpowers/plans/2026-06-07-schema-driven-config-form.md: Line 51: The markdown heading for Task 1 skips the expected hierarchy level and needs to be normalized. In the schema-driven config form plan document, adjust the ### Task 1: Extend AdminFormDescriptor in common.proto heading so it follows the surrounding heading structure without jumping levels, and update any sibling task headings in the same section if needed to keep the hierarchy consistent. In @docs/superpowers/plans/2026-06-07-seerr-request-router.md: Around line 23-39: Add a language identifier to the fenced code block that contains the repository tree (the block starting with and the lines beginning "/opt/silo-plugin-requests-seerr/ ... README.md"); change the opening fence to specify a language (e.g.,text) so the markdown linter MD040 is satisfied. In @docs/superpowers/plans/2026-06-08-plugin-launch-singleflight.md: Line 15: The heading "### Task 1: Single-flight ensureClient" jumps levels and violates MD001; update its markdown header level to match surrounding headings (e.g., change to "##" or "####" as appropriate) so the nesting is sequential with the prior and subsequent headings, and verify other headings around "Task 1: Single-flight ensureClient" follow the same normalized level to keep markdownlint MD001 satisfied. In @docs/superpowers/plans/2026-06-08-plugin-platform-sdk-helpers.md: Around line 24-35: The fenced code block that lists the package layout (the block starting with "/opt/silo-plugin-sdk/pkg/pluginsdk/") is missing a language tag for markdownlint MD040; update that fence to include a language (for example change totext or ```bash) so the block is annotated and MD040 passes. In @docs/superpowers/plans/2026-06-08-request-card-library-collapse-anime.md: Around line 11-12: Replace the hardcoded absolute paths seen in the plan (e.g. /opt/silo, /opt/silo-plugin-requests-arr, /tmp/go/bin, web/node_modules/.bin) with repository-relative instructions and a single clarifying sentence such as "Commands assume the repository root is the cwd." Update all occurrences (including the later occurrences mentioned) so commands reference repo-root-relative locations (e.g. silo, silo-plugin-requests-arr, ./web/node_modules/.bin, ./go/bin or just rely on PATH) and remove any transient local filesystem paths to keep the plan portable for contributors. In @docs/superpowers/plans/2026-06-08-seerr-per-user-requester-mapping.md: Around line 11-12: Replace all machine-local absolute paths (e.g. strings like "/opt/...", "/tmp/..." and specific absolute PATH prefixes) in the plan with repository-relative references (for example refer to repositories by their directory names such as "silo-plugin-sdk", "silo", "silo-plugin-requests-seerr") and add a short preface line: "Commands assume the repository root is the cwd." Also change any hardcoded PATH suggestions to a portable form (for example mention adding Go binaries via "PATH=$PATH:$(go env GOPATH)/bin" or by referring to a repo-local bin directory) and apply the same substitution to the other ranges noted (lines referenced in the review) so no absolute filesystem paths remain. In @docs/superpowers/plans/2026-06-08-seerr-permission-simplification.md: Around line 9-10: The plan contains local absolute filesystem paths (e.g., "/opt/silo-plugin-requests-seerr" and the PATH prefix example) that violate the docs portability rule; update the plan text to remove all absolute paths and transient worktree IDs and replace them with repository-relative references (e.g., "repo: silo-plugin-requests-seerr" or "assume repository root is the cwd") and neutral command notes such as "Commands assume the repository root is the cwd"; ensure the same replacements are made for every occurrence of that absolute path and the PATH prefix example within this document. In @docs/superpowers/plans/2026-06-08-silo-server-95-credential-integration.md: Around line 9-10: The doc uses local absolute paths and transient IDs (e.g., "/opt/silo", "backup/pre-main-rebase-20260608", and the literal PATH hack "PATH=$PATH:/tmp/go/bin") which must be turned into repository-relative instructions: replace absolute paths with repo-relative references like "internal/requests", "internal/plugins", "cmd/silo" and add a short note "Commands assume the repository root is the cwd"; convert the backup reference to a generic backup branch name (e.g., "backup/") or remove it; change the PATH line to an instruction such as "Ensure /tmp/go/bin is on PATH" or "Add Go to PATH as needed" rather than injecting an absolute PATH string, and make the same replacements for the other occurrences of absolute paths mentioned in the comment. In @docs/superpowers/plans/2026-06-08-single-default-enforcement.md: Line 15: The document has a heading depth jump at the line containing "### Task 1: SDK — add siblings + exclusive_group_field and regenerate" which should be H2 instead of H3; update that heading from "### Task 1: SDK — add siblings + exclusive_group_field and regenerate" to use H2 (i.e., prepend with "##") so the heading hierarchy is consistent and MD001 is resolved. In @docs/superpowers/plans/2026-06-08-typed-quality-tier-signal.md: Line 93: Fix the contradictory parenthetical on the note about the is4k identifier: update the example of the actually-wrong generated symbols so it reads that the proto field is4k generates Go field Is4K and getter GetIs4K() (NOT the lowercase/incorrect is4k/GetIs4k()); ensure the surrounding references to RequestedQuality, GetId(), Is4K, GetIs4K(), and GetQualities() remain unchanged. In @docs/superpowers/specs/2026-06-07-requests-pluginization-design.md: Line 44: Two fenced code blocks in the document use bare triple-backticks (no language) and trigger markdownlint MD040; update each opening fence from to an appropriate annotated fence such astext, plaintext, or json depending on the block content (e.g., request/response payloads should use json, plain examples use text) so both bare ``` occurrences become language-annotated. In @docs/superpowers/specs/2026-06-08-seerr-per-user-requester-mapping-design.md: Line 120: Fix the markdownlint warnings MD038/MD040 by correcting the inline code and fenced block: render the symbol seerr.CreateRequestBody as a single inline code span (seerr.CreateRequestBody) and replace the escaped field snippet so the struct field reads UserID int json:"userId,omitempty" inside a fenced code block that includes a language tag (e.g., go or text) instead of using backslash-escaped backticks; ensure the fenced block around the flow diagram includes the language marker to satisfy MD040 and remove any stray backslashes so MD038 is resolved. In @docs/superpowers/specs/2026-06-08-seerr-permission-simplification-design.md: Around line 40-46: The fenced code block containing the permission-bit example (variables like bits, REQUEST, REQUEST_4K, AUTO_APPROVE, AUTO_APPROVE_4K and the conditional snippet) is missing a language identifier; update the opening triple-backtick to include a language (e.g., python or text) so the snippet is labeled and MD040 is resolved. In @docs/superpowers/specs/2026-06-08-silo-server-95-credential-integration-design.md: Around line 51-54: The fenced code block containing the git commands needs a language tag to satisfy MD040: edit the fenced block around the two lines "git config rerere.enabled true" and "git rebase origin/main" and add a shell language identifier (e.g., bash) immediately after the opening triple backticks so the block reads like ```bash; this will properly label the code snippet for linting. In @docs/superpowers/specs/2026-06-08-single-default-enforcement-design.md: Around line 139-147: The fenced code block that starts with "Admin toggles is_default on card B (radarr)" is unlabeled; add a language tag (e.g., ```text) to the opening fence so the block is labeled and MD040 is resolved. Update the block surrounding the flow (the triple-backtick section containing the Admin/frontend/host/plugin lines) to use a consistent language label such as text to avoid syntax highlighting changes. In @docs/superpowers/specs/2026-06-08-typed-quality-tier-signal-design.md: Line 43: Replace workstation-specific absolute paths in the spec with repository-relative paths and a note that commands assume the repository root is the current working directory; specifically, update occurrences of paths like /opt/silo-plugin-sdk/proto/silo/plugin/v1/request_router.proto to the repo-relative form proto/silo/plugin/v1/request_router.proto (and apply the same change for the other absolute /opt/... entries in this spec) and add a short sentence such as "Commands assume the repository root is the cwd" to the top or relevant section. In @internal/requests/errors.go: Around line 38-43: The ValidationError.Error() method should guard against a nil receiver to avoid panics when a typed-nil *ValidationError is used as an error; update the ValidationError.Error() implementation to check if e == nil and return "validation failed" (or another sensible default) before accessing e.FormError, keeping the existing behavior of returning e.FormError when non-empty; locate the method by its symbol ValidationError.Error() and the FormError field to apply the nil-check. Nitpick comments: In @docs/superpowers/specs/2026-06-08-request-card-library-collapse-anime-design.md: Around line 64-67: Add language specifiers to the fenced pseudocode blocks that define forceOpen and open (the blocks containing expressions using section.field_keys, mergedErrors, userToggled, and collapsed_default) and the similar block at the later location; update those triple-backtick fences to include a language hint such as text or pseudocode so the linter stops complaining and rendering is consistent. In @internal/api/handlers/plugins_admin_form_test.go: Around line 173-181: The current test cases in plugins_admin_form_test.go only verify top-level DTOs; extend the cases slice to include nested types so the guard covers AdminFormCondition and AdminFormValidation too by adding entries for reflect.TypeOf(pluginv1.AdminFormCondition{}) -> reflect.TypeOf(pluginAdminFormConditionJSON{}) and reflect.TypeOf(pluginv1.AdminFormValidation{}) -> reflect.TypeOf(pluginAdminFormValidationJSON{}); alternatively, enhance the test logic that iterates the cases to recursively walk/compare nested fields in pluginv1.AdminFormDescriptor / pluginAdminFormJSON (and AdminFormSection) so any newly added nested proto fields are validated against their corresponding DTO types as well. In @migrations/sql/20260607211831_drop_legacy_request_integration_columns.sql: Around line 36-46: The Down migration's UPDATE for public.request_integrations omits populating tags, anime_quality_profile_id, anime_tags (and options) from plugin_config; update the SET clause for those columns so tags and anime_tags use COALESCE((SELECT array_agg(v::integer) FROM jsonb_array_elements_text(plugin_config->'tags') AS v), '{}') and COALESCE((SELECT array_agg(v::integer) FROM jsonb_array_elements_text(plugin_config->'anime_tags') AS v), '{}') respectively, set anime_quality_profile_id = NULLIF(plugin_config->>'anime_quality_profile_id','')::integer, and populate options from plugin_config (e.g., COALESCE(plugin_config->'options', '{}'::jsonb)); target the UPDATE on request_integrations and adjust the SET expressions using jsonb_array_elements_text and NULLIF casts as described. </details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Organization UI **Review profile**: CHILL **Plan**: Pro Plus **Run ID**: `13ccaf57-c4cd-4915-a239-ffe826adb032` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between cb309ca and a6e90aa. </details> <details> <summary>⛔ Files ignored due to path filters (1)</summary> * `go.sum` is excluded by `!**/*.sum` </details> <details> <summary>📒 Files selected for processing (67)</summary> * `cmd/silo/main.go` * `docs/superpowers/plans/2026-06-07-requests-pluginization.md` * `docs/superpowers/plans/2026-06-07-schema-driven-config-form.md` * `docs/superpowers/plans/2026-06-07-seerr-request-router.md` * `docs/superpowers/plans/2026-06-08-plugin-launch-singleflight.md` * `docs/superpowers/plans/2026-06-08-plugin-platform-sdk-helpers.md` * `docs/superpowers/plans/2026-06-08-request-card-library-collapse-anime.md` * `docs/superpowers/plans/2026-06-08-seerr-per-user-requester-mapping.md` * `docs/superpowers/plans/2026-06-08-seerr-permission-simplification.md` * `docs/superpowers/plans/2026-06-08-silo-server-95-credential-integration.md` * `docs/superpowers/plans/2026-06-08-single-default-enforcement.md` * `docs/superpowers/plans/2026-06-08-typed-quality-tier-signal.md` * `docs/superpowers/specs/2026-06-07-requests-pluginization-design.md` * `docs/superpowers/specs/2026-06-07-schema-driven-config-form-design.md` * `docs/superpowers/specs/2026-06-07-seerr-request-router-design.md` * `docs/superpowers/specs/2026-06-08-plugin-launch-singleflight-design.md` * `docs/superpowers/specs/2026-06-08-plugin-platform-sdk-helpers-design.md` * `docs/superpowers/specs/2026-06-08-request-card-library-collapse-anime-design.md` * `docs/superpowers/specs/2026-06-08-seerr-per-user-requester-mapping-design.md` * `docs/superpowers/specs/2026-06-08-seerr-permission-simplification-design.md` * `docs/superpowers/specs/2026-06-08-silo-server-95-credential-integration-design.md` * `docs/superpowers/specs/2026-06-08-single-default-enforcement-design.md` * `docs/superpowers/specs/2026-06-08-typed-quality-tier-signal-design.md` * `go.mod` * `internal/api/autoscan_wiring_test.go` * `internal/api/handlers/plugins.go` * `internal/api/handlers/plugins_admin_form_test.go` * `internal/api/handlers/requests.go` * `internal/api/handlers/requests_test.go` * `internal/api/requests_wiring.go` * `internal/api/router.go` * `internal/pluginhost/client.go` * `internal/pluginhost/handshake.go` * `internal/plugins/service.go` * `internal/plugins/service_hot_reload_test.go` * `internal/plugins/service_singleflight_test.go` * `internal/plugins/user_identity_lookup.go` * `internal/requests/arrclient/resources.go` * `internal/requests/errors.go` * `internal/requests/provider.go` * `internal/requests/provider_test.go` * `internal/requests/radarr/client.go` * `internal/requests/radarr/client_test.go` * `internal/requests/repository.go` * `internal/requests/repository_crypto_test.go` * `internal/requests/routing.go` * `internal/requests/routing_test.go` * `internal/requests/service.go` * `internal/requests/service_test.go` * `internal/requests/sonarr/client.go` * `internal/requests/sonarr/client_test.go` * `internal/requests/types.go` * `migrations/sql/20260607131954_request_router_connections.sql` * `migrations/sql/20260607211831_drop_legacy_request_integration_columns.sql` * `migrations/sql/20260608131649_backfill_request_integration_capability_subid.sql` * `web/src/api/client.ts` * `web/src/api/types.ts` * `web/src/components/admin/plugins/PluginConfigForm.tsx` * `web/src/components/admin/plugins/SchemaForm.test.tsx` * `web/src/components/admin/plugins/SchemaForm.tsx` * `web/src/components/admin/plugins/schemaForm.test.ts` * `web/src/components/admin/plugins/schemaForm.ts` * `web/src/hooks/queries/useRequests.ts` * `web/src/pages/AdminRequests.tsx` * `web/src/pages/admin/autoscan/ConnectionsPanel.tsx` * `web/src/pages/requestExclusivity.test.ts` * `web/src/pages/requestExclusivity.ts` </details> <details> <summary>💤 Files with no reviewable changes (6)</summary> * internal/requests/radarr/client.go * internal/requests/routing.go * internal/requests/sonarr/client_test.go * internal/requests/routing_test.go * internal/requests/sonarr/client.go * internal/requests/radarr/client_test.go </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
ResolveChain falls back to every enabled metadata provider when a library
+ content-level has no enabled chain entry. That fallback was media-type
blind: a provider declaring default_priority only for an unrelated level
(e.g. an audiobook provider declaring {"audiobook": N}) was kept in the
list (merely sorted last) and invoked for video content levels.
In production this made silo.audiobook-metadata hammer external audiobook
APIs with anime/movie/series titles every scheduled enrichment pass
(MatchWorker, 30s) for the season/episode levels that had no enabled chain
entry. Disabling the chain entries did not help because the fallback never
consults them; only disabling the installation removed it from the global
set.
Treat a non-empty default_priority map as the provider enumerating the
content levels it supports: in resolveEnabledProvidersByPriority, exclude
providers whose declared map omits the requested level instead of ranking
them last. Providers that declare no default_priority make no claim and
stay eligible everywhere (legacy behavior).
Fixes Silo-Server#105
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The deduped ensureClient launch ran doEnsureClient under the leader caller's ctx, so if that caller's request was canceled/timed out mid-launch the shared plugin start was torn down and the error propagated to every waiter. Run the launch under context.WithoutCancel so a single caller cannot cancel work the other waiters depend on (values preserved for tracing/auth). (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
RequestRouterClient dereferenced a.Svc unconditionally and AttachRequestRouter called SetRouterProvider even with nil deps, so a build without the plugin service would panic instead of degrading. Guard both: the adapter returns a controlled error and AttachRequestRouter no-ops, leaving fulfillment to fail with the existing "no backend configured" path. (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… form
- schemaForm: Boolean("false") was true; parse string booleans explicitly.
array:num now coerces decimals ("1.5"), array:int stays integer-only.
- AdminRequests: track capability_id alongside installation_id (composite
<Select> value) so a multi-capability installation resolves the exact
backend; reset pluginConfig when the selected plugin changes so plugin A's
keys never reach plugin B's options probe/save. (CodeRabbit)
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Review feedback addressedThanks @coderabbitai. Summary of dispositions (pushed in Fixed
Declined
Obsolete
|
|
A few notes on each:
On the declined nil guard: the reasoning holds up. A constructor-enforced invariant ( On the obsolete markdownlint comments: understood — those files being out of scope of the upstream diff makes those comments moot. The PR looks solid. Happy to re-review if you'd like a pass over the pushed commits. ✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/metadata/chain.go`:
- Around line 312-313: The metadata lookup is too broad: update
lookupCapabilityMetadata calls (used before providerSupportsLevel) to include
and filter by capability_id in addition to plugin_installation_id, and thread
capabilityID through LookupDefaultPriority (and its callers such as
seedDefaultChain) so queries use both plugin_installation_id AND capability_id
(remove/avoid LIMIT 1 that ignores capability) ensuring per-capability
deterministic metadata selection for eligibility, include/exclude decisions, and
ranking.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: eeca76ab-19b4-4071-aba9-80b11a253cf2
📒 Files selected for processing (9)
internal/api/requests_wiring.gointernal/api/requests_wiring_test.gointernal/metadata/chain.gointernal/metadata/chain_test.gointernal/plugins/service.gointernal/plugins/service_singleflight_test.goweb/src/components/admin/plugins/schemaForm.test.tsweb/src/components/admin/plugins/schemaForm.tsweb/src/pages/AdminRequests.tsx
✅ Files skipped from review due to trivial changes (1)
- internal/metadata/chain_test.go
🚧 Files skipped from review as they are similar to previous changes (5)
- internal/api/requests_wiring.go
- internal/plugins/service.go
- web/src/components/admin/plugins/schemaForm.test.ts
- web/src/pages/AdminRequests.tsx
- web/src/components/admin/plugins/schemaForm.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d68ed1c20
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| capability_id: selected?.capability.id ?? "", | ||
| installation_id: hasInstallation ? selectedInstallationID : undefined, | ||
| supported_media_types: [], | ||
| plugin_config: descriptor |
There was a problem hiding this comment.
Preserve each connection's supported media types
Saving any request-router connection now always sends supported_media_types: [], and the repository persists that value on both create and update. Since integrationSupportsMediaType treats an empty slice as "supports all", editing a migrated movie-only/series-only connection (or creating one through this form) makes it eligible for both movies and series, so auto-approval/fulfillment can route a series request to a Radarr-only connection or a movie request to a Sonarr-only one. Derive this from the selected plugin/config or preserve the existing source.supported_media_types instead of overwriting it with an empty array.
Useful? React with 👍 / 👎.
| if strings.TrimSpace(integration.APIKeyRef) == "" { | ||
| integration.APIKeyRef = stored.APIKeyRef |
There was a problem hiding this comment.
Don't reuse saved keys for changed option-probe URLs
For an existing connection, the background options probe backfills the stored API key whenever the request omits api_key_ref, even if the submitted base_url has been changed in the form. That lets an admin edit the Base URL to an attacker-controlled endpoint and the server will send the otherwise unreadable saved key during ListConfigOptions before the save path's re-enter-key check can reject it. Mirror the save-time guard here: only backfill the stored key when the probed Base URL is blank or still matches the stored URL.
Useful? React with 👍 / 👎.
| metadataJSON := lookupCapabilityMetadata(ctx, pool, c.PluginInstallationID) | ||
| if !providerSupportsLevel(metadataJSON, contentLevel) { | ||
| slog.Debug("skipping metadata provider: does not declare support for content level", | ||
| "installation_id", c.PluginInstallationID, | ||
| "capability_id", c.CapabilityID, | ||
| "content_level", contentLevel) | ||
| continue | ||
| } | ||
| items = append(items, ranked{cap: c, priority: extractDefaultPriority(metadataJSON, contentLevel)}) |
There was a problem hiding this comment.
Look up metadata for the specific capability
In the chain-less fallback, each CapabilityInfo is filtered/ranked using metadata fetched only by plugin_installation_id with LIMIT 1. If one installation exposes multiple metadata_provider.v1 capabilities with different default_priority maps, every capability is evaluated with the same arbitrary metadata row, so a valid movie/provider capability can be skipped or ranked with an audiobook-only capability's priority. Include c.CapabilityID in the metadata lookup so the support check is applied to the capability being appended.
Useful? React with 👍 / 👎.
| DynamicOptions: field.GetDynamicOptions(), | ||
| ShowWhen: adminFormConditionsToJSON(field.GetShowWhen()), | ||
| Validation: validation, |
There was a problem hiding this comment.
Serialize exclusive_group_field to the admin form
The frontend has generic exclusivity logic keyed by exclusive_group_field, but adminFormToJSON never copies that proto field into pluginAdminFormFieldJSON. For request-router forms that mark fields like default/default-4K as mutually exclusive, the browser never receives the grouping metadata, so toggling a new default does not clear the sibling card and admins hit validation errors or can persist conflicting defaults if a plugin does not duplicate the check. Add the field to the DTO and populate it here.
Useful? React with 👍 / 👎.
| continue | ||
| } | ||
| if _, err := s.store.UpdateTargetStatus(ctx, t.ID, newStatus, st.ExternalID, st.ExternalStatus, "", Viewer{}); err != nil { | ||
| if _, err := s.store.UpdateTargetStatus(ctx, target.ID, newStatus, "", st.ExternalStatus, "", Viewer{}); err != nil { |
There was a problem hiding this comment.
Preserve plugin failure messages during reconcile
When CheckStatus returns a target as failed, this updates the target with an empty last_error, discarding st.Message. In the scenario where the plugin reports why an external request failed during reconciliation, the admin queue only shows a generic aggregate failure and the target row has no actionable error, unlike initial fulfillment which stores rt.Message. Pass st.Message as the last-error argument when applying status updates.
Useful? React with 👍 / 👎.
…ixes # Conflicts: # internal/metadata/chain.go
#104) * docs: design spec for pluginizing requests fulfillment Pluginize the requests fulfillment backend behind an agnostic request_router.v1 capability (high seam: whole-request fulfiller). Host keeps lifecycle/quota/policy/quality-governance and a generic two-tier connection registry; plugins own routing+submission+status. First plugin extracts multi-instance Sonarr/Radarr; Seerr follows in a separate spec. Preserves autoscan reuse of arr connection rows. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for requests pluginization Three-phase plan: (1) request_router.v1 SDK capability, (2) new silo-plugin-requests-arr plugin extracting multi-instance Sonarr/Radarr, (3) host refactor routing fulfillment through the plugin while keeping quality governance, target records, and autoscan connection reuse host-side. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(db): generalize request_integrations into a two-tier connection registry Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): add generic connection fields to Integration + repo mapping * feat(pluginhost): typed RequestRouter capability client + resolver Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): plugin-backed RequestRouterProvider seam Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): route fulfillment through RequestRouterProvider; host keeps quality governance Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): base auto-approve gate on router connection model Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(api): wire plugin-backed request router at both service sites Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(requests): remove in-host Sonarr/Radarr fulfillment code * test(autoscan): lock request-integration reuse after connection generalization Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): plugin-driven request integration config form Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(api): echo router connection fields in integration response * fix(requests): retry dropped qualities, contain to one router installation, dedupe targets Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): harden plugin trust boundary (validate targets, contain bad connections, media-type routing) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): tighten auto-approve gate, restore default/4k validation, propagate config-encode error, drop itoa wrapper, test status/options translation Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * perf(requests): resolve integrations/settings/secrets once per reconcile cycle Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): dedupe config helpers, preserve zero profile id, stabilize installation default, drop redundant options write Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for schema-driven plugin config form Extends AdminFormDescriptor into a full form-description language (dynamic options, multi-select, conditional visibility, sections, validation) + a plugin Validate RPC, rendered by one reusable SchemaForm engine. Retires the bespoke arr connection form and integrationOptionsFromRouter so any request_router backend renders its config UI from manifest data with zero host changes. Addresses code-review finding #9. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for schema-driven plugin config form Six phases: SDK AdminFormDescriptor extensions + Validate RPC; reusable SchemaForm renderer (refactor PluginConfigForm onto it); host Validate plumbing + generic options + legacy-column derivation + retire integrationOptionsFromRouter; requests admin page swap to SchemaForm with per-plugin grouping; arr manifest enrichment + Validate impl; verification. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): extend plugin admin-form TS types (sections, conditions, validation, multi-select) * feat(web): schema-form pure utils (show_when, validation, value coercion) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): SchemaForm renderer (controls, sections, show_when, dynamic options, errors) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(web): render PluginConfigForm via the shared SchemaForm engine Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): RequestRouter Validate client + provider seam Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): plugin Validate on save, generic options, derive legacy columns from plugin_config Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(api): generic options response + 400 field_errors on plugin validation failure * feat(web): generic request-integration options type + surface validation field_errors Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): render request connections via SchemaForm; per-plugin grouping; retire bespoke arr form Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): silent connection-options probe with inline failure status (no toast spam) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(api): serialize admin_form sections/show_when/dynamic_options/validation to the client Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): drop show_when-hidden fields from buildSchemaValues payload Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): pass requester user id as int64 (no truncation) * refactor(requests): drop legacy arr columns; plugin_config is sole source of truth Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): backfill api key in plugin validate; centralize validation 400; drop duplicate host cross-field check; guard admin-form serializer Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): refuse stored api key reuse when base_url changes (security hardening) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): SchemaForm regex-guard, default_value, type-driven coercion, validity callback Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): connection-options latest-wins + narrowed deps + clear stale errors; auto-select; type-driven persist; reuse types Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for silo-plugin-requests-seerr (request_router.v1 backend) * docs: implementation plan for silo-plugin-requests-seerr * docs(spec): FindExistingRequest uses /api/v1/request (carries request id) * docs(spec): seerr hardening — id-recovery, 404 terminal, media-status, sort pin, single missing-tmdb message * docs: design spec for shared plugin-platform SDK helpers (code-review #10) * docs: plan for plugin-platform SDK helpers (#10) + spec fix (inline broker wiring, no import cycle) * docs: design spec for typed 4K quality-tier signal (code-review #9) * docs: implementation plan for typed 4K quality-tier signal (#9) * feat(requests): stamp is4k per quality (host owns the 4K-tier fact) * fix(requests): store capability sub-id, not the type, in request_integrations request_integrations.capability_id carried the capability TYPE ("request_router.v1") instead of the capability sub-id ("arr"/"seerr"). The host resolves a router plugin via requireCapability("request_router.v1", id), which keys on (type, id), so storing the type resolved to no capability: every save/options/fulfill 500'd ("Request operation failed" / "no fulfillment backend configured") in ~1ms, before the arr/Seerr API was ever contacted. The path was internally split-brained (the fulfillment filter matched the type while the dispatcher needed the sub-id), so it never worked end-to-end; the unit tests hid it behind a fake provider that skips requireCapability. Align capability_id with the scan_source/metadata convention (sub-id): - validateInstance: require a non-empty sub-id; drop the default-to-type and the "!= request_router.v1" reject. - resolveRouterConnections / integrationConfigured / unbound-guidance: match on a non-empty capability, not type equality. - repository: persist capability_id verbatim (never default to the type). - web AdminRequests: send the selected plugin's capability.id in both the options probe and the save payload (was a hardcoded type constant). - migration 20260608131649: backfill capability_id from each bound installation's request_router.v1 capability and drop the column's misleading default. Unbound legacy rows are left for admin re-save. Tests: validateInstance now requires the sub-id, and the selected sub-id must reach the plugin Validate RPC (fakeRouterProvider records it). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): polish request connection cards (grouped toggles + option loading states) The schema-driven connection cards rendered each boolean as its own bordered, double-labeled box and showed dynamic SELECTs (root folder, quality profile, tags) as empty controls with a single "Loading options…" line while the host probed the service. - Toggles render as a cohesive settings list: consecutive switches collapse into one bordered, divided container; each row is toggle-first with the label + description hugging beside it (no stranded whitespace between a short label and its switch). Honors show_when, so conditional toggles still group correctly. - Dynamic SELECT/MULTI_SELECT fields show a per-field spinner + shimmer skeleton while options load, and only when there's nothing to show yet — a background re-probe never flashes over the operator's current value. - Sections get a softer surface and clearer titles; the card's enable switch is labeled Enabled/Disabled; the options-load failure is a proper inline alert with retry guidance. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): treat "Any"/no-cap playback ceiling as 4K-allowed allowedQualities decided whether to also request 2160p with `CompareQuality(ceiling, PlaybackQuality4K) >= 0`. But an "Any" max playback quality resolves to an empty ceiling ("no cap"), and in qualityRank "" is the LOWEST rank (0) — so CompareQuality("", "2160p") returns -1 and 4K was dropped. A requester with unlimited playback quality only got a 1080p request, never the 4K one. Use access.QualityAllowed(PlaybackQuality4K, ceiling), which already encodes "empty ceiling == no cap == allows everything". Now: - "" / "Any" -> 1080p + 2160p - "2160p" -> 1080p + 2160p - "1080p" -> 1080p only - resolver error still fails safe to the HD ceiling. Tests: add an "any/no-cap ceiling adds 2160p" case; the unknown-quality, status-coercion, dedup, and per-quality-idempotency submit tests now pin an explicit HD ceiling (they relied on the old empty-default == HD-only behavior and were not about 4K entitlement). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for collapsible Library + anime gate/nesting (request card UI, Spec A) Spec A of two for the request connection card UX: Library section becomes collapsible/collapsed (auto-expanding on validation errors) and the anime override fields move into a single gated section below Library instead of popping out as a detached sibling card. Single-default enforcement is Spec B. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for collapsible Library + anime gate/nesting (Spec A) Task-by-task TDD plan: SchemaForm auto-expand-on-error + nested-field affordance (silo-server), arr manifest regroup (collapsible Library, anime gate section), then build/deploy/reinstall + manual verify. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): auto-expand collapsible schema sections that have validation errors SchemaFormSection now accepts a forceOpen prop; when any field in the section has a mergedError (client validation or server error), the section expands automatically so required-field setup can never be hidden behind a collapsed accordion. The operator's manual toggle is preserved via a nullable userOpen state that only takes effect when forceOpen is false. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): indent show_when-revealed schema fields to read as nested Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * docs: design spec for schema-driven single-default exclusivity enforcement (Spec B) At most one connection per service_kind may be the HD default (is_default) or 4K default (is_default_4k). Generic exclusivity: a new AdminFormField exclusive_group_field declares the rule, the plugin Validate enforces it against host-supplied siblings (config only, no creds), and the admin UI auto-clears conflicts as you toggle. Host stays plugin-agnostic. Forward-only; no migration. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for single-default exclusivity enforcement (Spec B) Five TDD tasks across 3 repos: SDK proto (siblings + exclusive_group_field) + buf regen; arr Validate cross-sibling + manifest; host gathers siblings (config-only) into Validate; frontend generic mutual-exclusion helper; then re-vendor/rebuild/redeploy + plugininstall. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): pass sibling connections to plugin Validate for cross-connection rules Adds siblings []ResolvedRouterConnection to RequestRouterProvider.Validate so the plugin can enforce cross-connection invariants (e.g. one default per service_kind) without the host resolving sibling credentials. The new siblingConnections helper gathers other connections on the same installation, carrying only ID + PluginConfig. Vendor updated to the Task 1 SDK version that carries ValidateRequest.Siblings. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(web): auto-clear mutually-exclusive defaults across request connection cards Adds generic applyExclusivity helper and wires it into updateCardConfig so turning on a field with exclusive_group_field proactively clears the same field on sibling cards sharing the same group value, matching server-side enforcement with a proactive UX. * docs: design spec for single-flighting plugin client launch (cold-start herd fix) Concurrent ensureClient calls for a cold installation each spawn a redundant plugin process (Host.Start releases its lock during launch). Wrap ensureClient in a per-installation singleflight.Group so concurrent first-use collapses to one launch. Host-only fix; surfaced while testing the request-router feature. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for single-flighting plugin client launch TDD: concurrency tests (herd collapses to one launch, warm-cache reuse, distinct installations stay parallel, failed launch propagates) + the singleflight wrapper around ensureClient; then rebuild/redeploy + verify. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(plugins): single-flight ensureClient to prevent cold-start launch herd Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(requests): harden capability containment + dedupe eligibility; UI/migration cleanups Addresses /code-review high findings on the previously-unreviewed commits: - resolveRouterConnections contains fulfillment to the first chosen (installation, capability) and locks only after a connection's key resolves, so a plugin exposing >1 request_router capability never mixes connections and a skipped bad-key connection never pins the capability (+ test). - extract eligibleRouterConnection, shared by resolveRouterConnections and integrationConfigured so the auto-approval gate and fulfillment filter can't drift. - SchemaForm: shared FieldDescription helper (field/switch/section); key switch groups by position so a show_when reveal doesn't remount the group (focus loss). - migration backfill uses a deterministic correlated subquery instead of a join cross-product when an installation exposes multiple request_router capabilities. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for opt-in Seerr per-user requester mapping Per-connection requester_mode (admin default | mapped). In mapped mode the host pushes the requester email/username into the Fulfill descriptor and the seerr plugin resolves/creates the matching Seerr user by email with operator-chosen default permissions, attributing the request (and gating Seerr-side approval via the auto-approve permission). Spans SDK (descriptor fields), host (extend UserIdentityLookup with email + a requester resolver), and the seerr plugin (Seerr user API + mapping). Fallback to admin on any failure. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for Seerr per-user requester mapping Five TDD tasks across 3 repos: SDK descriptor fields (requester_email/username); host resolves identity (UserIdentityLookup+email, RequesterIdentityResolver, populate descriptor at both Fulfill sites); seerr config+user API (find/create by email, exported PermissionBits); seerr Fulfill mapping + admin_form; then re-vendor/rebuild/redeploy + plugininstall (installation 6). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: make Seerr unmapped-requester behavior a toggle (admin fallback | fail request) Per user feedback: require_mapped_user switch (default off = admin fallback, on = fail the request). Updates spec + plan Tasks 3/4 (config field, Fulfill honoring the toggle via a mapFailed signal, a new test, and the manifest switch). * feat(requests): resolve requester email/username into the Fulfill descriptor Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * docs: design spec for simplified Seerr mapped-user permissions Reduce the 5 permission toggles to two (request_4k_all + auto_approve); 1080p always granted; remove manage_requests; 4K eligibility per-user from the request's qualities (host-decided, same as arr) with a blanket override toggle. Seerr-plugin-only; permission-only override (host still gates 4K requests). * docs: implementation plan for simplified Seerr mapped-user permissions Two tasks (seerr-plugin-only): replace the 5 perm toggles with request_4k_all + auto_approve (1080p always; 4K from request qualities via userPermissions; remove PermManageRequests/PermissionBits; manifest + json_schema), then rebuild + reinstall (installation 6). No host/SDK change. * docs: design spec for host rebase onto main + #95 credential-model adoption Per-commit rebase of our 68 request-router commits onto the force-pushed origin/main (drops 188 patch-equivalent). At the credential-path conflicts, adopt #95's inline secret.Cipher model: keep our plugin columns + #95's encrypt/decrypt in repository.go; drop our SecretResolver and read in.APIKeyRef directly in service.go; wire NewRepository(pool, dataCipher). #39-area conflicts take ours (our pluginization supersedes it). Security review + SECRET_KEY deploy note. * docs: implementation plan for host rebase + #95 credential adoption Four tasks: (1) guided per-commit rebase onto origin/main, take-ours on credential files so it builds; (2) TDD integration commit adopting #95's secret.Cipher (encrypt/decrypt in repository.go, drop SecretResolver, read APIKeyRef directly, wire NewRepository(pool, cipher)); (3) security review; (4) pin published SDK v0.6.0, push fork, open host PR with SECRET_KEY deploy note. * chore(rebase): restore scan-source service methods + temp requests-repo arity Post-rebase conflict fixups: take-ours on internal/plugins/service.go dropped origin's ScanSourceClientByPluginID (independent upstream capability) — restored. mediarequests.NewRepository temporarily 1-arg to match our pre-#95 repo; Task 2 restores the cipher arg when adopting #95's at-rest credential model. * feat(requests): adopt at-rest credential cipher (#95) for plugin api keys; drop SecretResolver * build: pin published silo-plugin-sdk v0.6.0 (drop local replace) * test(requests): guard at-rest cipher round-trip + empty-key auto-approval (code-review) Max-effort code review of the #95 credential integration. Fixes the actionable findings: - TestEncryptAPIKeyRoundTripAndAAD: pins encryptAPIKey<->DecryptIfEncrypted inversion, the id-bound apiKeyAAD == secret.RowAAD(...) match (so #95's backfill rows decrypt), the blank-key "" sentinel, and row-bound AAD — the security- critical invariants had no automated guard (no DB harness for scanIntegration). - TestCreateRequestAutoApprovalEmptyKeyTreatedAsUnconfigured: pins that a keyless connection reads as unconfigured (request stays pending, never submitted), so integrationConfigured and resolveRouterConnections can't drift. - Fix stale fulfillContext comment (referenced a resolved-API-key cache removed with SecretResolver). Assessed-not-changed (documented): decrypt-error-fails-closed and failed-backfill behaviors are origin/main #95 design we adopt; nil-cipher is unreachable in prod and matches the codebase-wide no-guard pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * build: drop stale machine-local SDK replace comment from go.mod The replace directive was already removed when v0.6.0 was pinned (3410df7); this leftover comment falsely claimed a local replace still existed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style(web): prettier-format schema-form utils to 100-col width Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: drop internal superpowers specs/plans from PR These design specs and implementation plans are internal development artifacts; keep them out of the upstream PR diff. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(metadata): exclude providers from content levels they don't declare ResolveChain falls back to every enabled metadata provider when a library + content-level has no enabled chain entry. That fallback was media-type blind: a provider declaring default_priority only for an unrelated level (e.g. an audiobook provider declaring {"audiobook": N}) was kept in the list (merely sorted last) and invoked for video content levels. In production this made silo.audiobook-metadata hammer external audiobook APIs with anime/movie/series titles every scheduled enrichment pass (MatchWorker, 30s) for the season/episode levels that had no enabled chain entry. Disabling the chain entries did not help because the fallback never consults them; only disabling the installation removed it from the global set. Treat a non-empty default_priority map as the provider enumerating the content levels it supports: in resolveEnabledProvidersByPriority, exclude providers whose declared map omits the requested level instead of ranking them last. Providers that declare no default_priority make no claim and stay eligible everywhere (legacy behavior). Fixes #105 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(plugins): isolate singleflight launch from leader ctx cancellation The deduped ensureClient launch ran doEnsureClient under the leader caller's ctx, so if that caller's request was canceled/timed out mid-launch the shared plugin start was torn down and the error propagated to every waiter. Run the launch under context.WithoutCancel so a single caller cannot cancel work the other waiters depend on (values preserved for tracing/auth). (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(api): nil-guard request-router wiring RequestRouterClient dereferenced a.Svc unconditionally and AttachRequestRouter called SetRouterProvider even with nil deps, so a build without the plugin service would panic instead of degrading. Guard both: the adapter returns a controlled error and AttachRequestRouter no-ops, leaving fulfillment to fail with the existing "no backend configured" path. (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): correct value coercion + track capability sub-id in request form - schemaForm: Boolean("false") was true; parse string booleans explicitly. array:num now coerces decimals ("1.5"), array:int stays integer-only. - AdminRequests: track capability_id alongside installation_id (composite <Select> value) so a multi-capability installation resolves the exact backend; reset pluginConfig when the selected plugin changes so plugin A's keys never reach plugin B's options probe/save. (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): address request-router review findings * fix(requests): handle router review edge cases * fix(web): resolve schema form build casing * fix(requests): skip unconfigured 4k fulfillment targets --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Quick <[email protected]>
#104) * docs: design spec for pluginizing requests fulfillment Pluginize the requests fulfillment backend behind an agnostic request_router.v1 capability (high seam: whole-request fulfiller). Host keeps lifecycle/quota/policy/quality-governance and a generic two-tier connection registry; plugins own routing+submission+status. First plugin extracts multi-instance Sonarr/Radarr; Seerr follows in a separate spec. Preserves autoscan reuse of arr connection rows. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for requests pluginization Three-phase plan: (1) request_router.v1 SDK capability, (2) new silo-plugin-requests-arr plugin extracting multi-instance Sonarr/Radarr, (3) host refactor routing fulfillment through the plugin while keeping quality governance, target records, and autoscan connection reuse host-side. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(db): generalize request_integrations into a two-tier connection registry Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): add generic connection fields to Integration + repo mapping * feat(pluginhost): typed RequestRouter capability client + resolver Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): plugin-backed RequestRouterProvider seam Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): route fulfillment through RequestRouterProvider; host keeps quality governance Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): base auto-approve gate on router connection model Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(api): wire plugin-backed request router at both service sites Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(requests): remove in-host Sonarr/Radarr fulfillment code * test(autoscan): lock request-integration reuse after connection generalization Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): plugin-driven request integration config form Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(api): echo router connection fields in integration response * fix(requests): retry dropped qualities, contain to one router installation, dedupe targets Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): harden plugin trust boundary (validate targets, contain bad connections, media-type routing) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): tighten auto-approve gate, restore default/4k validation, propagate config-encode error, drop itoa wrapper, test status/options translation Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * perf(requests): resolve integrations/settings/secrets once per reconcile cycle Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): dedupe config helpers, preserve zero profile id, stabilize installation default, drop redundant options write Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for schema-driven plugin config form Extends AdminFormDescriptor into a full form-description language (dynamic options, multi-select, conditional visibility, sections, validation) + a plugin Validate RPC, rendered by one reusable SchemaForm engine. Retires the bespoke arr connection form and integrationOptionsFromRouter so any request_router backend renders its config UI from manifest data with zero host changes. Addresses code-review finding #9. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for schema-driven plugin config form Six phases: SDK AdminFormDescriptor extensions + Validate RPC; reusable SchemaForm renderer (refactor PluginConfigForm onto it); host Validate plumbing + generic options + legacy-column derivation + retire integrationOptionsFromRouter; requests admin page swap to SchemaForm with per-plugin grouping; arr manifest enrichment + Validate impl; verification. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): extend plugin admin-form TS types (sections, conditions, validation, multi-select) * feat(web): schema-form pure utils (show_when, validation, value coercion) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): SchemaForm renderer (controls, sections, show_when, dynamic options, errors) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(web): render PluginConfigForm via the shared SchemaForm engine Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): RequestRouter Validate client + provider seam Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): plugin Validate on save, generic options, derive legacy columns from plugin_config Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(api): generic options response + 400 field_errors on plugin validation failure * feat(web): generic request-integration options type + surface validation field_errors Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): render request connections via SchemaForm; per-plugin grouping; retire bespoke arr form Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): silent connection-options probe with inline failure status (no toast spam) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(api): serialize admin_form sections/show_when/dynamic_options/validation to the client Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): drop show_when-hidden fields from buildSchemaValues payload Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): pass requester user id as int64 (no truncation) * refactor(requests): drop legacy arr columns; plugin_config is sole source of truth Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): backfill api key in plugin validate; centralize validation 400; drop duplicate host cross-field check; guard admin-form serializer Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): refuse stored api key reuse when base_url changes (security hardening) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): SchemaForm regex-guard, default_value, type-driven coercion, validity callback Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): connection-options latest-wins + narrowed deps + clear stale errors; auto-select; type-driven persist; reuse types Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for silo-plugin-requests-seerr (request_router.v1 backend) * docs: implementation plan for silo-plugin-requests-seerr * docs(spec): FindExistingRequest uses /api/v1/request (carries request id) * docs(spec): seerr hardening — id-recovery, 404 terminal, media-status, sort pin, single missing-tmdb message * docs: design spec for shared plugin-platform SDK helpers (code-review #10) * docs: plan for plugin-platform SDK helpers (#10) + spec fix (inline broker wiring, no import cycle) * docs: design spec for typed 4K quality-tier signal (code-review #9) * docs: implementation plan for typed 4K quality-tier signal (#9) * feat(requests): stamp is4k per quality (host owns the 4K-tier fact) * fix(requests): store capability sub-id, not the type, in request_integrations request_integrations.capability_id carried the capability TYPE ("request_router.v1") instead of the capability sub-id ("arr"/"seerr"). The host resolves a router plugin via requireCapability("request_router.v1", id), which keys on (type, id), so storing the type resolved to no capability: every save/options/fulfill 500'd ("Request operation failed" / "no fulfillment backend configured") in ~1ms, before the arr/Seerr API was ever contacted. The path was internally split-brained (the fulfillment filter matched the type while the dispatcher needed the sub-id), so it never worked end-to-end; the unit tests hid it behind a fake provider that skips requireCapability. Align capability_id with the scan_source/metadata convention (sub-id): - validateInstance: require a non-empty sub-id; drop the default-to-type and the "!= request_router.v1" reject. - resolveRouterConnections / integrationConfigured / unbound-guidance: match on a non-empty capability, not type equality. - repository: persist capability_id verbatim (never default to the type). - web AdminRequests: send the selected plugin's capability.id in both the options probe and the save payload (was a hardcoded type constant). - migration 20260608131649: backfill capability_id from each bound installation's request_router.v1 capability and drop the column's misleading default. Unbound legacy rows are left for admin re-save. Tests: validateInstance now requires the sub-id, and the selected sub-id must reach the plugin Validate RPC (fakeRouterProvider records it). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): polish request connection cards (grouped toggles + option loading states) The schema-driven connection cards rendered each boolean as its own bordered, double-labeled box and showed dynamic SELECTs (root folder, quality profile, tags) as empty controls with a single "Loading options…" line while the host probed the service. - Toggles render as a cohesive settings list: consecutive switches collapse into one bordered, divided container; each row is toggle-first with the label + description hugging beside it (no stranded whitespace between a short label and its switch). Honors show_when, so conditional toggles still group correctly. - Dynamic SELECT/MULTI_SELECT fields show a per-field spinner + shimmer skeleton while options load, and only when there's nothing to show yet — a background re-probe never flashes over the operator's current value. - Sections get a softer surface and clearer titles; the card's enable switch is labeled Enabled/Disabled; the options-load failure is a proper inline alert with retry guidance. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): treat "Any"/no-cap playback ceiling as 4K-allowed allowedQualities decided whether to also request 2160p with `CompareQuality(ceiling, PlaybackQuality4K) >= 0`. But an "Any" max playback quality resolves to an empty ceiling ("no cap"), and in qualityRank "" is the LOWEST rank (0) — so CompareQuality("", "2160p") returns -1 and 4K was dropped. A requester with unlimited playback quality only got a 1080p request, never the 4K one. Use access.QualityAllowed(PlaybackQuality4K, ceiling), which already encodes "empty ceiling == no cap == allows everything". Now: - "" / "Any" -> 1080p + 2160p - "2160p" -> 1080p + 2160p - "1080p" -> 1080p only - resolver error still fails safe to the HD ceiling. Tests: add an "any/no-cap ceiling adds 2160p" case; the unknown-quality, status-coercion, dedup, and per-quality-idempotency submit tests now pin an explicit HD ceiling (they relied on the old empty-default == HD-only behavior and were not about 4K entitlement). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for collapsible Library + anime gate/nesting (request card UI, Spec A) Spec A of two for the request connection card UX: Library section becomes collapsible/collapsed (auto-expanding on validation errors) and the anime override fields move into a single gated section below Library instead of popping out as a detached sibling card. Single-default enforcement is Spec B. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for collapsible Library + anime gate/nesting (Spec A) Task-by-task TDD plan: SchemaForm auto-expand-on-error + nested-field affordance (silo-server), arr manifest regroup (collapsible Library, anime gate section), then build/deploy/reinstall + manual verify. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): auto-expand collapsible schema sections that have validation errors SchemaFormSection now accepts a forceOpen prop; when any field in the section has a mergedError (client validation or server error), the section expands automatically so required-field setup can never be hidden behind a collapsed accordion. The operator's manual toggle is preserved via a nullable userOpen state that only takes effect when forceOpen is false. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(web): indent show_when-revealed schema fields to read as nested Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * docs: design spec for schema-driven single-default exclusivity enforcement (Spec B) At most one connection per service_kind may be the HD default (is_default) or 4K default (is_default_4k). Generic exclusivity: a new AdminFormField exclusive_group_field declares the rule, the plugin Validate enforces it against host-supplied siblings (config only, no creds), and the admin UI auto-clears conflicts as you toggle. Host stays plugin-agnostic. Forward-only; no migration. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for single-default exclusivity enforcement (Spec B) Five TDD tasks across 3 repos: SDK proto (siblings + exclusive_group_field) + buf regen; arr Validate cross-sibling + manifest; host gathers siblings (config-only) into Validate; frontend generic mutual-exclusion helper; then re-vendor/rebuild/redeploy + plugininstall. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(requests): pass sibling connections to plugin Validate for cross-connection rules Adds siblings []ResolvedRouterConnection to RequestRouterProvider.Validate so the plugin can enforce cross-connection invariants (e.g. one default per service_kind) without the host resolving sibling credentials. The new siblingConnections helper gathers other connections on the same installation, carrying only ID + PluginConfig. Vendor updated to the Task 1 SDK version that carries ValidateRequest.Siblings. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(web): auto-clear mutually-exclusive defaults across request connection cards Adds generic applyExclusivity helper and wires it into updateCardConfig so turning on a field with exclusive_group_field proactively clears the same field on sibling cards sharing the same group value, matching server-side enforcement with a proactive UX. * docs: design spec for single-flighting plugin client launch (cold-start herd fix) Concurrent ensureClient calls for a cold installation each spawn a redundant plugin process (Host.Start releases its lock during launch). Wrap ensureClient in a per-installation singleflight.Group so concurrent first-use collapses to one launch. Host-only fix; surfaced while testing the request-router feature. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for single-flighting plugin client launch TDD: concurrency tests (herd collapses to one launch, warm-cache reuse, distinct installations stay parallel, failed launch propagates) + the singleflight wrapper around ensureClient; then rebuild/redeploy + verify. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(plugins): single-flight ensureClient to prevent cold-start launch herd Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(requests): harden capability containment + dedupe eligibility; UI/migration cleanups Addresses /code-review high findings on the previously-unreviewed commits: - resolveRouterConnections contains fulfillment to the first chosen (installation, capability) and locks only after a connection's key resolves, so a plugin exposing >1 request_router capability never mixes connections and a skipped bad-key connection never pins the capability (+ test). - extract eligibleRouterConnection, shared by resolveRouterConnections and integrationConfigured so the auto-approval gate and fulfillment filter can't drift. - SchemaForm: shared FieldDescription helper (field/switch/section); key switch groups by position so a show_when reveal doesn't remount the group (focus loss). - migration backfill uses a deterministic correlated subquery instead of a join cross-product when an installation exposes multiple request_router capabilities. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: design spec for opt-in Seerr per-user requester mapping Per-connection requester_mode (admin default | mapped). In mapped mode the host pushes the requester email/username into the Fulfill descriptor and the seerr plugin resolves/creates the matching Seerr user by email with operator-chosen default permissions, attributing the request (and gating Seerr-side approval via the auto-approve permission). Spans SDK (descriptor fields), host (extend UserIdentityLookup with email + a requester resolver), and the seerr plugin (Seerr user API + mapping). Fallback to admin on any failure. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: implementation plan for Seerr per-user requester mapping Five TDD tasks across 3 repos: SDK descriptor fields (requester_email/username); host resolves identity (UserIdentityLookup+email, RequesterIdentityResolver, populate descriptor at both Fulfill sites); seerr config+user API (find/create by email, exported PermissionBits); seerr Fulfill mapping + admin_form; then re-vendor/rebuild/redeploy + plugininstall (installation 6). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: make Seerr unmapped-requester behavior a toggle (admin fallback | fail request) Per user feedback: require_mapped_user switch (default off = admin fallback, on = fail the request). Updates spec + plan Tasks 3/4 (config field, Fulfill honoring the toggle via a mapFailed signal, a new test, and the manifest switch). * feat(requests): resolve requester email/username into the Fulfill descriptor Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * docs: design spec for simplified Seerr mapped-user permissions Reduce the 5 permission toggles to two (request_4k_all + auto_approve); 1080p always granted; remove manage_requests; 4K eligibility per-user from the request's qualities (host-decided, same as arr) with a blanket override toggle. Seerr-plugin-only; permission-only override (host still gates 4K requests). * docs: implementation plan for simplified Seerr mapped-user permissions Two tasks (seerr-plugin-only): replace the 5 perm toggles with request_4k_all + auto_approve (1080p always; 4K from request qualities via userPermissions; remove PermManageRequests/PermissionBits; manifest + json_schema), then rebuild + reinstall (installation 6). No host/SDK change. * docs: design spec for host rebase onto main + #95 credential-model adoption Per-commit rebase of our 68 request-router commits onto the force-pushed origin/main (drops 188 patch-equivalent). At the credential-path conflicts, adopt #95's inline secret.Cipher model: keep our plugin columns + #95's encrypt/decrypt in repository.go; drop our SecretResolver and read in.APIKeyRef directly in service.go; wire NewRepository(pool, dataCipher). #39-area conflicts take ours (our pluginization supersedes it). Security review + SECRET_KEY deploy note. * docs: implementation plan for host rebase + #95 credential adoption Four tasks: (1) guided per-commit rebase onto origin/main, take-ours on credential files so it builds; (2) TDD integration commit adopting #95's secret.Cipher (encrypt/decrypt in repository.go, drop SecretResolver, read APIKeyRef directly, wire NewRepository(pool, cipher)); (3) security review; (4) pin published SDK v0.6.0, push fork, open host PR with SECRET_KEY deploy note. * chore(rebase): restore scan-source service methods + temp requests-repo arity Post-rebase conflict fixups: take-ours on internal/plugins/service.go dropped origin's ScanSourceClientByPluginID (independent upstream capability) — restored. mediarequests.NewRepository temporarily 1-arg to match our pre-#95 repo; Task 2 restores the cipher arg when adopting #95's at-rest credential model. * feat(requests): adopt at-rest credential cipher (#95) for plugin api keys; drop SecretResolver * build: pin published silo-plugin-sdk v0.6.0 (drop local replace) * test(requests): guard at-rest cipher round-trip + empty-key auto-approval (code-review) Max-effort code review of the #95 credential integration. Fixes the actionable findings: - TestEncryptAPIKeyRoundTripAndAAD: pins encryptAPIKey<->DecryptIfEncrypted inversion, the id-bound apiKeyAAD == secret.RowAAD(...) match (so #95's backfill rows decrypt), the blank-key "" sentinel, and row-bound AAD — the security- critical invariants had no automated guard (no DB harness for scanIntegration). - TestCreateRequestAutoApprovalEmptyKeyTreatedAsUnconfigured: pins that a keyless connection reads as unconfigured (request stays pending, never submitted), so integrationConfigured and resolveRouterConnections can't drift. - Fix stale fulfillContext comment (referenced a resolved-API-key cache removed with SecretResolver). Assessed-not-changed (documented): decrypt-error-fails-closed and failed-backfill behaviors are origin/main #95 design we adopt; nil-cipher is unreachable in prod and matches the codebase-wide no-guard pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * build: drop stale machine-local SDK replace comment from go.mod The replace directive was already removed when v0.6.0 was pinned (3410df7); this leftover comment falsely claimed a local replace still existed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style(web): prettier-format schema-form utils to 100-col width Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: drop internal superpowers specs/plans from PR These design specs and implementation plans are internal development artifacts; keep them out of the upstream PR diff. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(metadata): exclude providers from content levels they don't declare ResolveChain falls back to every enabled metadata provider when a library + content-level has no enabled chain entry. That fallback was media-type blind: a provider declaring default_priority only for an unrelated level (e.g. an audiobook provider declaring {"audiobook": N}) was kept in the list (merely sorted last) and invoked for video content levels. In production this made silo.audiobook-metadata hammer external audiobook APIs with anime/movie/series titles every scheduled enrichment pass (MatchWorker, 30s) for the season/episode levels that had no enabled chain entry. Disabling the chain entries did not help because the fallback never consults them; only disabling the installation removed it from the global set. Treat a non-empty default_priority map as the provider enumerating the content levels it supports: in resolveEnabledProvidersByPriority, exclude providers whose declared map omits the requested level instead of ranking them last. Providers that declare no default_priority make no claim and stay eligible everywhere (legacy behavior). Fixes #105 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(plugins): isolate singleflight launch from leader ctx cancellation The deduped ensureClient launch ran doEnsureClient under the leader caller's ctx, so if that caller's request was canceled/timed out mid-launch the shared plugin start was torn down and the error propagated to every waiter. Run the launch under context.WithoutCancel so a single caller cannot cancel work the other waiters depend on (values preserved for tracing/auth). (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(api): nil-guard request-router wiring RequestRouterClient dereferenced a.Svc unconditionally and AttachRequestRouter called SetRouterProvider even with nil deps, so a build without the plugin service would panic instead of degrading. Guard both: the adapter returns a controlled error and AttachRequestRouter no-ops, leaving fulfillment to fail with the existing "no backend configured" path. (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(web): correct value coercion + track capability sub-id in request form - schemaForm: Boolean("false") was true; parse string booleans explicitly. array:num now coerces decimals ("1.5"), array:int stays integer-only. - AdminRequests: track capability_id alongside installation_id (composite <Select> value) so a multi-capability installation resolves the exact backend; reset pluginConfig when the selected plugin changes so plugin A's keys never reach plugin B's options probe/save. (CodeRabbit) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(requests): address request-router review findings * fix(requests): handle router review edge cases * fix(web): resolve schema form build casing * fix(requests): skip unconfigured 4k fulfillment targets --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Quick <[email protected]>
Summary
Pluginizes request fulfillment so the host no longer talks to Sonarr/Radarr (or any backend) directly. The host now computes governance (which qualities a requester is allowed) and delegates whole-request fulfillment to a
request_router.v1plugin over gRPC, persisting the targets the plugin reports back.request_integrationsis generalized into generic host columns (base_url,api_key_ref,enabled,capability_id,installation_id,supported_media_types) plus aplugin_configJSON blob. Legacy per-backend columns dropped;plugin_configis the sole source of truth.RequestRouterProvider+ typedpluginhostRequestRoutercapability client/resolver. In-host Sonarr/Radarr fulfillment code removed. Fulfillment is pure-plugin (no in-host fallback; no plugin ⇒ approve fails "no fulfillment backend configured").SchemaFormrenderer drives any plugin'sadmin_formdescriptor (sections,show_when, dynamic options, validation, multi-select, exclusive groups). The bespoke arr form is gone;PluginConfigFormwas refactored ontoSchemaForm.FulfillRequest.qualitiescarries typedRequestedQuality{id, is4k}; the host stampsis4k, plugins shed all tier-string literals.secret.Cipher(enc:v1:at rest inrequest_integrations.api_key_ref, decrypted on the read path); the oldSecretResolverindirection is removed. RequiresSECRET_KEYat boot.request_integrationsrows viarequest_integration_id(locked by a regression test + compile guard ininternal/api/autoscan_wiring_test.go).Pairs with the published
silo-plugin-sdkv0.6.0 (request_routercapability) and the first-partysilo-plugins-requests-arr/-seerrplugin repos.Spec:
docs/superpowers/specs/2026-06-07-requests-pluginization-design.mdPlan:
docs/superpowers/plans/2026-06-07-requests-pluginization.md(plus follow-on specs/plans for the schema-driven form, typed 4K signal, SDK helpers, single-default enforcement, and the host-rebase + #95 credential adoption)
Test Plan
go test ./internal/requests/...passes (ingolang:1.26 + libvips-dev, built against published SDK v0.6.0)pnpm lint— 0 errors;prettier --checkclean on all branch-touched filesmake verify-local-pathspasses; no machine-localreplaceingo.mod(SDK pinned at v0.6.0)20260607131954,20260607211831,20260608131649apply cleanly on a fresh DB and against a populated pre-pluginization DB🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements