Skip to content

fix(autoscan): drop titles Sonarr or Radarr deleted with their files - #3335

Merged
Quick104 merged 4 commits into
mainfrom
fix/issue-3266
Nov 1, 2026
Merged

Quick104 merged 4 commits into
mainfrom
fix/issue-3266

Conversation

@Quick104

@Quick104 Quick104 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #3266
Related issue: #3060
Validation tasks: changes #1231 C1; changes #1232 C1

Deleting a whole series in Sonarr, or a movie in Radarr, with its files leaves the title in Silo's library until the next scheduled library scan. This affects libraries that rely on a Sonarr/Radarr Webhook autoscan source instead of filesystem monitoring, such as media on NFS. Tools that delete through the arrs, such as Maintainerr, hit it too. With this change, the title leaves the library shortly after arr finishes deleting the folder.

Sonarr's SeriesDelete and Radarr's MovieDelete parse as "valid delivery, nothing to do", so no scan is queued.

Approach

When deletedFiles is true, the webhook parser now turns the delivery into a scan of the series folder (series.path) or movie folder (movie.folderPath, falling back to movie.path). Since #3093, such a scan marks a vanished folder's files missing and removes the title from the library. With deletedFiles: false the delivery stays a no-op.

Arr sends the notification before it deletes the folder: the webhook goes out from a synchronous handler, and the folder is deleted afterwards in an async one, as a recursive delete or a move to the recycle bin. Silo queues its scan while handling the request, so a scan queued straight away would usually find the files still there, and nothing would scan again afterwards. So the parser flags the change as Removed, and webhook ingestion keeps the delivery in its durable queue until the folder is gone (ENOENT) while its parent is still a directory, the same evidence the scanner requires before it treats a vanished folder as deleted. Then it scans:

  • The wait uses the existing webhook retry queue: the delivery is rechecked every 10 to 25 seconds (a 10-second delay plus the retry task's 15-second interval), and once a minute after the first two minutes. It records no error on the source and does not use the failure backoff. Deliveries are leased as before, so this holds across nodes and restarts.
  • Each check is a stat bounded to 2 seconds. A stalled mount, or a path that can't be inspected, keeps the delivery waiting instead of blocking the webhook request or the retry batch. At most 16 checks can be blocked on a stalled mount at once; past that, a check reads as unconfirmed and the delivery keeps waiting. A path outside every enabled library doesn't wait and is reported as unresolved, as it is today.
  • A folder still present an hour after the delivery arrived is scanned as it stands, with a warning in the log. An hour allows for a recycle-bin move to another filesystem, which copies every file first.

The webhook setup hint in Admin > Autoscan > Sources lists On Series Delete (Sonarr) and On Movie Delete (Radarr) as optional triggers. docs/architecture/missing-files.md records the rule. The Sonarr and Radarr custom-script examples in docs/scan-api.md no longer scan on these events, since a script runs before arr deletes the folder too.

The files still wait out scanner.file_removal_grace in the trash, like any other vanished file. Skipping that grace for arr deletes, which #3060 also asks for, is out of scope.

Validation

  • Full CONTRIBUTING gate at 107224d: the Go checks (go build, gofmt, go vet, make lint-changed, make lint-router-recovery, make test-go), the web lint, format, build and budget checks, and every verify-* target pass. make test-web failed 8 tests in 5 files this PR doesn't touch (global search, access groups, shuffle playback, ChatGPT connection, PGS subtitles) while sandbox builds ran on the same machine. All 104 tests in those files pass when rerun on their own.
  • Tests: the parser test covers series and movie deletes with files deleted, files kept, deletedFiles absent, a movie without folderPath, and a delete that names no folder. The ingest tests cover a delivery whose folder is still on disk (rechecked at an even interval, no error recorded, no scan), the scan once the folder is gone, the expired wait, a path outside every library, a folder whose parent is gone too (keeps waiting), and a deleted folder named with a trailing separator. They call code this change adds, so they can't build on main. Instead, removing each part of the fix in turn makes the matching test fail for that reason. The parts removed were: the parser case, the wait, the fixed recheck interval, the expiry, the parent check, the no-folder no-op, and the path cleaning. Without the wait, the code behaves like a scan on arrival.
  • Web: Prettier and the existing autoscan setup tests pass.
  • Live, on an isolated dev deployment with real-time monitoring off and Sonarr and Radarr webhook sources with path rewrites. A script sends the arr-shaped MovieDelete or SeriesDelete payload and removes the folder only after Silo answers, the order arr uses.
    • On main: both deliveries got 202, no scan was queued, and both titles were still listed after their folders were gone.
    • With this change (20eaec4; later commits change only paths with a trailing separator and waits past two minutes, which these runs don't reach): a Radarr movie and a Sonarr series left their libraries 15 to 25 seconds after their folders were removed. A movie whose folder was removed 45 seconds after the delivery stayed listed while the folder existed and left afterwards. A MovieDelete with files kept changed nothing. No source recorded an error.

Evidence

Before-and-after recordings of the Movies library's Library tab while a Radarr MovieDelete arrives and the folder is removed 15 seconds later: on main the title stays listed, with this change it leaves once the folder is gone. The setup hint in a webhook source's edit dialog now lists On Series Delete for Sonarr and On Movie Delete for Radarr, at desktop and phone widths.

Evidence: https://evidence.siloserver.org/r/silo-server/issue-3266/

Risks

  • Last title under a library root. Deleting the only folder under a library root leaves the root empty. Silo treats that as a possible lost mount and protects its files, so that title stays until the root has content again. This is the existing suspect-empty-root rule, and this change doesn't alter it.
  • Arr didn't delete the folder. Arr can skip the delete, for example when the folder contains another title's folder. The delivery then waits an hour and rescans the unchanged folder, which removes nothing.
  • Retry count. Each recheck counts as a delivery attempt. If a real failure follows a long wait, its retry starts at the 10-minute backoff cap instead of 5 seconds.
  • Mixed versions. During a rolling upgrade or a rollback, a node running an older build that picks up a waiting delivery drops the removed flag and scans straight away. The title then stays until the scheduled scan, which is today's behavior.
  • Validation. Autoscan — Server #1231 C1 gains a wait for folder-delete deliveries; imports and file deletes take the same path as before. Autoscan — Web admin #1232 C1's trigger hint gains two optional triggers.
  • No migration, setting, or API change. The new removed flag is stored only inside the queued delivery's JSON. Older rows lack it and read as false.

Checklist

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

Follow-ups

AI Disclosure

  • Harness: T3 Code (Claude Code agent harness)
  • Tool(s): Claude Code, GitHub CLI
  • Model(s): claude-opus-5-5; claude-sonnet-5-5 (review subagent); gpt-6.1-sol (plan review)
  • Involvement: Fully AI-generated at the maintainer's request; the main agent wrote and verified the change.
  • Adversarial review: gpt-6.1-sol (xhigh) reviewed the plan before implementation. It confirmed the delete ordering in Sonarr and Radarr. It found that a 10-minute wait could still scan before a slow delete finished, that a filesystem error ended the wait early, and that rechecks backed off like failures. All three were fixed: the wait is an hour, only ENOENT ends it early, and rechecks use a fixed interval. Its fourth finding, that the last title under a library root stays protected, is the existing empty-root rule, listed under Risks. A multi-agent code review of the diff (claude-opus-5-5 and claude-sonnet-5-5 subagents) then found an unbounded stat on network mounts, a transient resolver error ending the wait, a delete naming no folder returning 400, and the custom-script docs describing the same race. All four were fixed, and the wait also requires the folder's parent to exist. The retry-count and mixed-version effects are listed under Risks. A background review of this PR (gpt-6.1-sol, xhigh, reviewed 20eaec4) found that a folder named with a trailing separator was never confirmed gone, so it waited the full hour. That is fixed in 259d7d3 with a test. Kody and the Codex security review then pointed out that stalled-mount checks could outlast a batch's delivery lease, and that repeated delete deliveries could crowd the retry batch. 107224d bounds each check to 2 seconds and spaces long waits to once a minute. Per-path coalescing was not added; the reply on that thread explains why. CodeRabbit then noted that a timed-out stat keeps its goroutine blocked, so distinct paths on a stalled mount could pile them up; 205d329 caps those checks at 16.

🤖 Generated with Claude Code

Note

Handle Sonarr SeriesDelete and Radarr MovieDelete events with deleted files

  • Sonarr and Radarr send folder-delete webhooks before removing the folder, so Silo previously ignored them. Now arrwebhook.Parse turns these events into a Removed Change when deletedFiles is true, using the series or movie folder as fallback
  • Ingestion waits for the folder to disappear before scanning, since the removal is only confirmed when the path returns ENOENT and its parent is still a directory. Waits use a 10s recheck for the first two minutes, 1s after that, and stop after one hour
  • Filesystem stats during removal checks run with a 2s timeout and a shared 16-slot in-flight limit
  • rewriteChanges now copies each Change instead of rebuilding it, so the new Removed flag survives path rewriting; webhook setup pages gain optional Series/Movie Delete triggers
  • Risk: autoscan.IngestResult gains a new AwaitingRemoval field and Change gains an optional Removed field (in types.go) — check that in-tree consumers of these types handle them

Macroscope summarized 205d329.

Sonarr's SeriesDelete and Radarr's MovieDelete parsed as no-ops, so a series
or movie deleted in arr with its files stayed in the library until the next
scheduled scan on libraries without filesystem monitoring.

With deletedFiles true, the webhook parser now emits a subtree change for the
series or movie folder, marked Removed. Arr sends the notification before it
deletes the folder, so webhook ingestion keeps the delivery queued and
rechecks it every 10 seconds, without recording an error, until the folder is
gone (ENOENT) while its parent is still a directory, and then scans it. Each
check is a bounded stat, so a stalled mount keeps the delivery waiting. A
folder not confirmed gone after an hour is scanned as it stands.
deletedFiles false, or a delete that names no folder, stays a no-op.

The webhook setup hint lists On Series Delete and On Movie Delete, and the
custom-script examples in docs/scan-api.md no longer scan on these events.

Closes #3266

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/L 200–499 added + deleted lines (all files); change volume, not priority. label Oct 31, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T23:56:50.404361Z 205d329 New commits
🔒 Security Review ✅ Completed 2026-10-31T23:58:16.782119Z 205d329 New commits

Security findings

Advisory findings (1)

ℹ️ About Codex in GitHub

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

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

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

@silo-kody

silo-kody Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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

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

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dd8201ad-3ea2-4d76-ab1c-7be5309ec9f4
Commits

Reviewing files that changed from the base of the PR and between 107224d and 205d329.

Files selected for processing: 1
  • internal/autoscan/service.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Walkthrough

Sonarr and Radarr folder-delete webhooks now produce removed subtree changes when deletedFiles is true. The autoscan service retries eligible deliveries while the folder remains present, then scans after removal is confirmed or the one-hour wait limit expires.

Changes: Arr folder-delete scans

Layer / File(s) Summary
Parse and expose folder-delete events
internal/autoscan/types.go, internal/autoscan/arrwebhook/parse.go, internal/autoscan/arrwebhook/parse_test.go, web/src/pages/admin/autoscan/webhookSetup.ts, docs/scan-api.md
The parser marks qualifying series and movie subtree changes as removed. Setup instructions add the corresponding triggers. The custom-script documentation distinguishes file-delete events from folder-delete events.
Wait for removal and enqueue the scan
internal/autoscan/service.go, internal/autoscan/service_ingest_test.go, internal/autoscan/service_test.go, internal/api/handlers/autoscan_webhook.go, docs/architecture/missing-files.md
Eligible deliveries retry while the folder remains present. The service confirms removal by checking that the path is absent and its parent exists, then scans the subtree. After one hour, it proceeds without confirmation. The result and debug log report when a delivery is awaiting removal.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

Possibly related PRs

  • Silo-Server/silo-server#3093: This change queues a vanished-subtree scan after confirming folder removal, relying on the scan behavior changed in PR #3093.
  • Silo-Server/silo-server#3172: This change queues a vanished-folder scan and relies on the protected-root behavior changed in PR #3172.

Suggested labels: go, javascript, documentation, needs-review, impact: usability, evidence-required

Suggested reviewers: rhainland

Merge Risk: Minimal · up to 205d3

The folder-delete scan change has no identified issue requiring a fix before merge. Normal checks remain appropriate.

Architecture risk: Medium · up to 205d3

The change affects 3 systems.

Changed systems: internal, docs, web

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — internal (service) was modified; 7 changed files map to changed impact.
  • observed — docs (service) was modified; 2 changed files map to changed impact.
  • observed — web (ui) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/scan-api.md: The Sonarr deletion case no longer includes SeriesDelete; only EpisodeFileDelete reaches the existing deletion scan branch.
  • observed — Modified behavior in docs/scan-api.md: The Radarr deletion case no longer includes MovieDelete; only MovieFileDelete reaches the existing deletion scan branch.
  • observed — Modified behavior in docs/scan-api.md: A note states that the custom scripts do not handle whole-series or whole-movie deletion because they run before the folder is removed; the built-in receiver waits for the folder to disappear before scanning.
  • observed — Modified behavior in internal/api/handlers/autoscan_webhook.go: The webhook-ingest debug log now records result.AwaitingRemoval.

Reliability and maintainability

  • inferred — Risk-relevant change factors for internal: blast_radius_1; direct_dependents_1
Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the main change: removing titles when Sonarr or Radarr delete their files.
Description check Passed The description directly explains the deletion webhook handling, delayed folder-removal scan, affected providers, validation, risks, and documentation changes.
Linked Issues check Passed Issue #3266 requires SeriesDelete and MovieDelete with deletedFiles: true to enqueue a subtree change for the series or movie folder. The parser emits a Removed change for series.path or `mo…
Out of Scope Changes check Passed The changes remain within issue #3266. The removal wait, bounded filesystem checks, retry handling, tests, setup hint, architecture documentation, and scan API documentation support whole-folder delet…
Docstring Coverage Passed Docstring coverage is 90.91% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Full details: Linked Issues check

Explanation

Issue #3266 requires SeriesDelete and MovieDelete with deletedFiles: true to enqueue a subtree change for the series or movie folder. The parser emits a Removed change for series.path or movie.folderPath, with movie.path as fallback. Events with files kept, absent deletedFiles, or no usable folder path remain no-ops. Ingestion waits for folder removal, then scans, and the change includes parser and ingestion tests.

Full details: Out of Scope Changes check

Explanation

The changes remain within issue #3266. The removal wait, bounded filesystem checks, retry handling, tests, setup hint, architecture documentation, and scan API documentation support whole-folder delete webhook handling. The PR explicitly excludes the separate file-removal-grace change. No unrelated functional change is demonstrated.

Full details: Docstring Coverage

Explanation

Docstring coverage is 90.91% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 11 functions across 8 files.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added bug Something isn't working priority: P2 Limited scope, workaround exists, or polish labels Oct 31, 2026
@coderabbitai coderabbitai Bot added documentation Improvements or additions to documentation evidence-required Needs before-and-after evidence before the Evidence check passes go Pull requests that update go code impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. size/M 50–199 added + deleted lines (all files); change volume, not priority. labels Oct 31, 2026
Comment on lines +751 to +753
if !change.Removed || removalConfirmed(ctx, change.SourcePath) {
continue
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Performance high

Webhook retry worker starvation in internal/autoscan/service.go occurs when serial removalConfirmed calls each wait up to five seconds for distinct paths on a stalled NFS mount, occupying a 100-delivery batch for roughly 500 seconds, delaying unrelated deliveries, and exceeding the batch’s five-minute leases so another node can reclaim still-unprocessed deliveries. Bound batch-wide filesystem-check time or use bounded parallel processing with lease-aware claiming.

Prompt for LLM

File internal/autoscan/service.go:

Line 751 to 753:

Webhook retry worker starvation in internal/autoscan/service.go occurs when serial removalConfirmed calls each wait up to five seconds for distinct paths on a stalled NFS mount, occupying a 100-delivery batch for roughly 500 seconds, delaying unrelated deliveries, and exceeding the batch’s five-minute leases so another node can reclaim still-unprocessed deliveries. Bound batch-wide filesystem-check time or use bounded parallel processing with lease-aware claiming.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 107224d. Each removal check is now bounded to 2 seconds, so a full 100-delivery batch on a stalled mount takes at most about 200 seconds, inside the 5-minute delivery lease. Deliveries still waiting after two minutes are rechecked once a minute, which also shrinks how many of them share a batch. Before this PR the same path had no bound at all: the vanished-file resolver calls an unbounded Lstat.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks—that addresses the lease-overrun scenario I flagged, provided the 2-second timeout covers the whole removal check per delivery, including the folder and parent checks. A 100-delivery batch would then spend roughly 200 seconds on those checks, leaving about 100 seconds of the five-minute lease for other processing.

Unrelated deliveries can still be delayed behind stalled checks, so the change mitigates rather than eliminates worker starvation. The once-per-minute rechecks after two minutes also reduce retry pressure.

The pre-existing unbounded Lstat is relevant context. Based on your description of 107224d5b, I would no longer treat the original ~500-second lease-overrun concern as outstanding; the remaining batch latency is a separate trade-off.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does: removalConfirmed sets one 2-second context per delivery, and both the folder stat and the parent stat use it, so the whole check for a delivery is bounded to 2 seconds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for confirming. The shared 2-second deadline covers both stats, satisfying the condition I raised. That bounds removal-check time for a 100-delivery batch to roughly 200 seconds, below the five-minute lease.

I consider the original lease-overrun finding addressed by 107224d5b. Unrelated deliveries may still wait behind those checks, but that is a remaining latency trade-off, not the original ~500-second overrun.

@silo-triage silo-triage Bot removed the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 20eaec4ac6

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread internal/autoscan/service.go Outdated
// Expected for every arr folder delete: check again shortly, without
// the failure backoff and without recording an error on the source.
result.AwaitingRemoval = true
if err := s.store.RetryWebhookDelivery(ctx, delivery.ID, delivery.LockedBy, removalRecheckDelay, ""); err != nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review · Automatically triggered

P2 Badge Security: Deduplicate pending folder-removal retries

An attacker who has an enabled autoscan webhook token and knows any existing in-library folder can repeatedly submit MovieDelete/SeriesDelete with deletedFiles:true. Every request creates a distinct durable row, and this branch reschedules each row every 10 seconds for up to an hour without deduplication or backoff. The default 60/min/IP limit can keep the 100-row/15-second retry worker occupied, delaying legitimate retries; distributed IPs can grow the queue faster. Coalesce waits by source and normalized path, cap them per source, and back off rechecks. The 256-bit token and per-IP limiter mitigate but do not stop a stolen-token sender.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Partly addressed in 107224d. A delivery still waiting after two minutes is now rechecked once a minute instead of every 10 seconds, so a repeated or never-completed delete costs the retry batch about a sixth as much over its hour. Checks stay in next_attempt_at order, so failed deliveries from other sources are delayed, not starved. I did not add per-path coalescing. The sender needs the 256-bit source token and is rate-limited per IP, and that same sender can already send import events that queue real scans, which costs more than a recheck. Coalescing would need a new repository query keyed on source and path. If a maintainer wants it, I can file it as a follow-up.

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial review (gpt-6.1-sol, reviewed 20eaec4)

One verified finding: F1 (P2).

Comment thread internal/autoscan/service.go Resolved
@macroscopeapp

macroscopeapp Bot commented Oct 31, 2026

Copy link
Copy Markdown

Minor change: #1232 C1 (Web admin, build 1804 · cc851494) needs a re-check because the source editor's webhook hint now adds optional On Series Delete / On Movie Delete triggers. Re-check the updated guidance after merge. #1231 C1–C3 retain their recorded import, episode-file-delete, and polling-plugin behavior; the new wait applies only to whole-folder delete deliveries. The PR's Validation tasks: line is present and consistent with these affected paths.

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

Arr can send a series or movie folder with a trailing separator, which path
rewrites keep. filepath.Dir then returned the folder itself instead of its
parent, so the removal was never confirmed and the delivery waited the full
hour. Clean the path before checking it and its parent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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

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

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 31, 2026

Copy link
Copy Markdown

Minor change: #1231 C1 (Server, build 1804 · cc851494) needs a focused re-check after merge. The PR adds whole-folder deletion webhooks and waits for removal before scanning; the recorded C1 run exercised imports, so it does not cover this new path. The latest commit also fixes removal confirmation when Arr sends a trailing separator, making that case worth including. The Validation tasks: line correctly lists C1 for #1231 and #1232.

Suggested fix: No diff — re-check C1 on the merged build with SeriesDelete/MovieDelete, including a trailing-separator path.

Validation tasks: changes #1231 C1; changes #1232 C1

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

A delivery still waiting for a deleted folder after two minutes is rechecked
once a minute instead of every 10 seconds, so slow recycle-bin copies and
repeated folder-delete deliveries cost the shared retry batch little. Each
filesystem check is bounded to 2 seconds, so a full batch on a stalled mount
finishes well inside the delivery lease and another node does not reclaim
rows still in progress.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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

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

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 31, 2026

Copy link
Copy Markdown

The folder-delete behavior is visible because library titles disappear only after Arr removes their folders. The Evidence section reports live before-and-after results, but does not identify a recording of this timing; please ensure the evidence page shows a recording of the title remaining while the folder exists and disappearing after removal.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a8f3a8c-7c50-4a64-ba8a-a4c6b79e98fc
Commits

Reviewing files that changed from the base of the PR and between 20eaec4 and 107224d.

Files selected for processing: 3
  • docs/architecture/missing-files.md
  • internal/autoscan/service.go
  • internal/autoscan/service_ingest_test.go
Files skipped from review as they are similar to previous changes: 1
  • docs/architecture/missing-files.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Comment thread internal/autoscan/service.go Resolved
A timed-out stat keeps its goroutine blocked until the kernel returns, so
distinct deleted paths on a stalled mount could pile up blocked goroutines.
Removal checks now hold one of 16 slots until their stat actually returns;
with none free, the check does not start and the path reads as unconfirmed,
so the delivery keeps waiting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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

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

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 merged commit 1e4ca21 into main Nov 1, 2026
30 checks passed
@Quick104
Quick104 deleted the fix/issue-3266 branch November 1, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation evidence-required Needs before-and-after evidence before the Evidence check passes go Pull requests that update go code impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish size/L 200–499 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autoscan: Radarr MovieDelete / Sonarr SeriesDelete are ignored, so removed titles stay until the nightly scan

1 participant