Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
0bd3137
fix(downloads): preserve path whitespace
therobbiedavis Jul 1, 2026
6d0f265
fix(paths): allow root-folder filesystem roots
therobbiedavis Jul 1, 2026
6290b23
fix(paths): reject parent traversal broadly
therobbiedavis Jul 1, 2026
8f58785
fix(paths): constrain library move destinations
therobbiedavis Jul 2, 2026
e218c0c
test(paths): use verbatim backslash literals
therobbiedavis Jul 2, 2026
4fb112c
fix(paths): refine destination validation
therobbiedavis Jul 2, 2026
823b029
Fix audiobook move workflow
therobbiedavis Jul 2, 2026
6c0c17f
Fix EF migration schema drift
kevinheneveld Jul 2, 2026
40d53ae
Fix move retry and path validation edge cases
therobbiedavis Jul 3, 2026
7fd4caf
Address PR review path comments
therobbiedavis Jul 3, 2026
25550b8
Fix branch path identity edge cases
therobbiedavis Jul 3, 2026
a05291f
fix: apply filesystem-aware path handling
therobbiedavis Jul 3, 2026
1425dbe
wip: add durable filesystem move framework
therobbiedavis Jul 3, 2026
d6123c5
fix: normalize durable move migration formatting
therobbiedavis Jul 3, 2026
237a486
Harden root relocation and move recovery
therobbiedavis Jul 4, 2026
167ac9a
refactor: simplify relocation state reconciliation
therobbiedavis Jul 4, 2026
2d1cfd4
Enforce move lease fencing and path semantics
therobbiedavis Jul 4, 2026
9c9e7f1
Improve move job error handling and isolation
therobbiedavis Jul 4, 2026
2481738
Fix move lease fencing and path semantics
therobbiedavis Jul 4, 2026
c576ee6
Fix move lease bypass and import reservations
therobbiedavis Jul 5, 2026
e0bf92e
Use resolved semantics for library moves
therobbiedavis Jul 5, 2026
66499f5
Commit import destinations only after success
therobbiedavis Jul 5, 2026
61bef52
Remove additional host path fallbacks
therobbiedavis Jul 5, 2026
9f365fe
Track legacy host path identity sites
therobbiedavis Jul 5, 2026
0def8b2
Use resolved path semantics in library service
therobbiedavis Jul 5, 2026
07e95be
Use resolved path semantics in metadata rescan
therobbiedavis Jul 5, 2026
ca86a47
Use resolved path semantics in organize service
therobbiedavis Jul 5, 2026
c1b925e
Use resolved path semantics for file association
therobbiedavis Jul 5, 2026
35f2454
Use resolved path semantics for library naming
therobbiedavis Jul 5, 2026
74652d0
Use resolved path semantics for scan queues
therobbiedavis Jul 5, 2026
2e3ff76
Update move queue path identity
therobbiedavis Jul 5, 2026
668a151
Use resolved path semantics for download sources
therobbiedavis Jul 5, 2026
4124c0b
Use resolved path semantics for moved path rewrites
therobbiedavis Jul 5, 2026
03dfe06
Classify remote path identity allowance
therobbiedavis Jul 5, 2026
698776e
Update library service behavior
therobbiedavis Jul 5, 2026
0e24e3e
Add library boundary regression tests
therobbiedavis Jul 6, 2026
ba5857d
Fail closed on move lease uncertainty
therobbiedavis Jul 6, 2026
5a7bd13
Split move source and target path semantics
therobbiedavis Jul 6, 2026
4cc51e6
Fence content moves with lease tokens
therobbiedavis Jul 6, 2026
3077735
Use semantic destination changes in edit modal
therobbiedavis Jul 6, 2026
f1f1b5d
Rewrite path refs and lease-safe attempt bumps
therobbiedavis Jul 6, 2026
be965bb
Track skipped relocation metadata rewrites
therobbiedavis Jul 7, 2026
8d1c4f7
Move migration metadata to Designer.cs
therobbiedavis Jul 7, 2026
c3d71f6
Enforce EF-scaffolded migrations and checks
therobbiedavis Jul 7, 2026
9f26dda
Extract shared path normalization and improve relocation
therobbiedavis Jul 7, 2026
b89676f
Guard against move/relocation conflicts
therobbiedavis Jul 7, 2026
e4ed91e
Prevent audiobook moves during active root folder relocations
therobbiedavis Jul 7, 2026
9e8cae5
Serialize filesystem mutations
therobbiedavis Jul 7, 2026
daa4037
Serialize root folder retry broadcasts
therobbiedavis Jul 7, 2026
2cbee01
Honor root case sensitivity for library moves
therobbiedavis Jul 7, 2026
a284041
Centralize destination rewrite and requeue resets
therobbiedavis Jul 8, 2026
2ff37ee
Centralize filesystem mutation services
therobbiedavis Jul 8, 2026
d87a189
Phase 1: Fix destination resolution ordering and enforce expectedSour…
therobbiedavis Jul 8, 2026
d92a7e4
Phase 2: Prevent legacy PUT stale path rollback after BasePath rewrite
therobbiedavis Jul 8, 2026
ad81405
Phase 3: Frontend sparse update payload construction
therobbiedavis Jul 8, 2026
e614907
Phase 5: API error mapping for root-folder delete persistence conflicts
therobbiedavis Jul 8, 2026
a685ae6
Phase 4: Root-folder relocation FK to SetNull for history preservation
therobbiedavis Jul 8, 2026
6b3fef5
Regenerate durable move migrations via EF tooling
therobbiedavis Jul 8, 2026
820d39e
Harden path metadata repair workflows
therobbiedavis Jul 9, 2026
8ef9323
Fix durable move migration and legacy path repair
therobbiedavis Jul 9, 2026
a30744d
Fix custom moves and durable move UI status
therobbiedavis Jul 9, 2026
a4737bc
Harden move recovery and background move status tracking
therobbiedavis Jul 9, 2026
48f9038
Fix Linux path repair test fixtures
therobbiedavis Jul 9, 2026
53133b8
Address code quality path safety findings
therobbiedavis Jul 9, 2026
bf0767f
test: align rewrite legacy path expectation with stored normalization
therobbiedavis Jul 9, 2026
653af7a
fix: rewrite tracked file paths after physical moves
therobbiedavis Jul 9, 2026
1d1fedc
test: cover tracked file path rewrite after moves
therobbiedavis Jul 9, 2026
7e0440a
fix: map source-root path references during rewrites
therobbiedavis Jul 9, 2026
4e892e6
test: cover source-root path reference rewrites
therobbiedavis Jul 9, 2026
f662e19
test: cover physical move with source-root legacy file path
therobbiedavis Jul 9, 2026
8ee59b3
fix: preserve relocation path validation semantics
therobbiedavis Jul 10, 2026
eb954ce
test: align metadata relocation tests with source-root rewrites
therobbiedavis Jul 10, 2026
b7a15ac
fix: harden cross-platform root relocation recovery
therobbiedavis Jul 10, 2026
fd511c8
fix: prune empty move source parents after quarantine cleanup
therobbiedavis Jul 10, 2026
49d7fe5
fix: persist safe move cleanup boundaries
therobbiedavis Jul 10, 2026
983fec6
test: cover unix and UNC move cleanup boundaries
therobbiedavis Jul 10, 2026
7406694
fix(api): add partial audiobook update contract
therobbiedavis Jul 10, 2026
27a091a
fix(api): preserve omitted audiobook fields
therobbiedavis Jul 10, 2026
702254f
fix(api): bind audiobook updates to partial request
therobbiedavis Jul 10, 2026
1fce75e
test(api): cover sparse audiobook booleans
therobbiedavis Jul 10, 2026
cb00e77
fix(filesystem): validate linked path components
therobbiedavis Jul 10, 2026
821caaf
fix(filesystem): block linked audiobook delete trees
therobbiedavis Jul 10, 2026
4e49368
test(filesystem): block linked audiobook delete trees
therobbiedavis Jul 10, 2026
923c2c8
fix(moves): publish through owned partial files
therobbiedavis Jul 10, 2026
7a1117b
fix(moves): validate move publication paths independently
therobbiedavis Jul 10, 2026
9308772
refactor(root-folders): add atomic reassignment contract
therobbiedavis Jul 10, 2026
eaa08cc
fix(root-folders): make reassignment and delete atomic
therobbiedavis Jul 10, 2026
9d4c8f8
fix(root-folders): use atomic reassignment workflow
therobbiedavis Jul 10, 2026
c890482
fix(moves): require manifest before marker recovery
therobbiedavis Jul 10, 2026
9af366d
test(root-folders): cover atomic reassignment rollback
therobbiedavis Jul 10, 2026
95085e6
ci: add temporary focused fix validation
therobbiedavis Jul 10, 2026
020f299
ci: expose temporary validation on pull requests
therobbiedavis Jul 10, 2026
b6f1ec4
ci: report temporary validation diagnostics on PR
therobbiedavis Jul 10, 2026
3fcc792
style(api): remove redundant update request using
therobbiedavis Jul 10, 2026
3da0d49
fix(filesystem): avoid capturing mutation out parameter
therobbiedavis Jul 10, 2026
a483f21
ci: apply mechanical recovery test and format fix
therobbiedavis Jul 10, 2026
d3c9953
ci: make recovery test replacement signature-scoped
therobbiedavis Jul 10, 2026
a42c8c1
test(moves): reject recovery without persisted manifest
github-actions[bot] Jul 10, 2026
84e392a
chore(ci): remove temporary fix validation workflow
therobbiedavis Jul 10, 2026
9564df8
fix(moves): replace stale files only in job-owned temp directories
therobbiedavis Jul 10, 2026
8ced2fb
ci: add temporary Windows test diagnostics
therobbiedavis Jul 10, 2026
df9e039
ci: report compact failed test diagnostics
therobbiedavis Jul 10, 2026
1ebbb93
fix(root-folders): use transactions only on relational providers
therobbiedavis Jul 10, 2026
bc0eb54
fix(moves): allow source subtree ancestor directories
therobbiedavis Jul 10, 2026
9b90c5f
test(root-folders): verify reassignment transactions with SQLite
therobbiedavis Jul 10, 2026
a15cfdf
ci: apply marker guard and validate backend fixes
therobbiedavis Jul 10, 2026
0c25cb3
fix: address PR 717 path safety review findings
therobbiedavis Jul 11, 2026
1333a61
chore(ci): remove temporary Windows diagnostics
therobbiedavis Jul 11, 2026
315f21c
test(moves): cover temp ownership and atomic recovery safety
therobbiedavis Jul 11, 2026
34416e5
fix(moves): prove filesystem ownership before recovery and cleanup
therobbiedavis Jul 11, 2026
9de6850
fix(moves): harden recovery ownership and linked paths
therobbiedavis Jul 11, 2026
eeddbe4
fix(moves): make ownership recovery fail closed
therobbiedavis Jul 11, 2026
d8e9151
fix(moves): fence recovery and completion retries
therobbiedavis Jul 11, 2026
aa8c5b1
fix(moves): harden recovery retries and scan handoffs
therobbiedavis Jul 12, 2026
3997172
Harden durable library move execution
therobbiedavis Jul 13, 2026
6f96101
fix(moves): harden recovery and requeue safety
therobbiedavis Jul 14, 2026
a20d2e7
fix(moves): close final recovery review gaps
therobbiedavis Jul 14, 2026
cec938d
fix: harden audiobook moves and relocation coordination
therobbiedavis Jul 15, 2026
7b2a667
Harden audiobook file ownership and path mutations
therobbiedavis Jul 16, 2026
d459ba1
Fix cross-platform audiobook path semantics
therobbiedavis Jul 16, 2026
53a7229
Harden move workflows and filesystem path safety
therobbiedavis Jul 18, 2026
3752e10
Harden scan and move ownership boundaries
therobbiedavis Jul 18, 2026
a213f29
Harden scan attribution and move identity
therobbiedavis Jul 19, 2026
1999051
test: validate changed production singletons
therobbiedavis Jul 19, 2026
f5441e4
fix: detect Linux filesystem symlinks
therobbiedavis Jul 19, 2026
4d9ac8c
test: assert linked scan path is skipped
therobbiedavis Jul 19, 2026
4751289
fix: harden filesystem moves and root relocation
therobbiedavis Jul 20, 2026
b27a91f
test(scan): adapt m4bard attribution regressions
therobbiedavis Jul 20, 2026
3509935
fix(scan): match title metadata components in book folders
therobbiedavis Jul 20, 2026
499b32e
test(scan): harden decorated-title attribution coverage
therobbiedavis Jul 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .github/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ Before making code, dependency, workflow, or documentation changes, review and f

Repository-specific guidance takes precedence over general examples in this file. Keep infrastructure-shaped dependencies out of `listenarr.application`; define application-owned ports there and implement adapters in infrastructure/API.

## Mandatory Independent and Adversarial Code Review

Every code review must be a fresh, independent, adversarial review of the authoritative complete diff. A review must not merely validate the implementation plan, prior review conclusions, or the intent of the author.

Required review behavior:

- Start from the complete branch, commit, staged, or working-tree diff against its authoritative base and review the changed behavior from first principles.
- Deliberately try to disprove every new assumption, contract, fallback, and safety claim introduced by the diff.
- Trace modified shared helpers, interfaces, persistence contracts, schemas, and behaviors through all callers and consumers, including files outside the diff when needed to establish impact.
- Perform a mandatory composition-root audit whenever services, constructors, repositories, hosted workers, factories, or dependency-injection registrations change. Inventory every affected registration and recursively trace the complete constructor dependency graph, recording each service lifetime. Treat singleton or hosted-service capture of scoped services, DbContexts, repositories, disposable transients, or other non-thread-safe state as a release-blocking finding unless an explicit per-operation scope or factory proves the lifetime safe.
- Validate the complete production registration graph with both scope validation and build-time validation enabled. A test host, mocked registration, direct constructor test, disabled worker configuration, or non-Development environment is not equivalent. Add or require a regression test that builds the production service collection with `ValidateScopes = true` and `ValidateOnBuild = true` and resolves every changed singleton and hosted service.
- Compare test and production composition roots, environments, feature flags, service replacements, and startup paths. Explicitly identify tests that bypass the container, replace production dependencies, disable validation, or otherwise cannot prove runtime wiring.
- Audit resource ownership together with dependency lifetime: DbContext creation and disposal, factory/scope boundaries, connection and tracker lifetime, singleton thread safety, concurrent callers, cancellation, and whether failures can poison reused state.
- Use a review coverage matrix for every complete pass. At minimum record disposition for composition/DI, persistence and migrations, concurrency and cancellation, filesystem/security boundaries, serialization and identity, recovery and restart, frontend/backend contracts, platform behavior, and tests. Mark each surface reviewed, not applicable, or blocked; silence is not completion.
- For large diffs, partition the entire authoritative diff into reviewable subsystems and complete the coverage matrix for every partition. Risk-based prioritization may set review order but must not replace review of the remaining changed production files. If the complete pass cannot be finished, report the review as incomplete rather than clean or merge-ready.
- Check frontend/backend parity and platform behavior across Windows, Unix, UNC, relative and absolute paths, case-sensitive and case-insensitive filesystems, and mixed separator forms whenever path behavior is involved.
- Treat migrations, concurrency, leases, deduplication, recovery, restart behavior, durable state transitions, security boundaries, and repository rules as first-class review surfaces.
- Treat passing tests as supporting evidence, not proof of correctness. Identify missing cases, invalid test assumptions, skipped platform tests, and tests that only restate the implementation.
- Require native validation for platform-specific claims. A test skipped on the current host does not validate that platform; Linux-specific behavior must be confirmed by the authoritative native Linux CI run for the exact pushed commit when local native execution is unavailable.
- Keep implementation and review passes separate. If a review finding causes any code or test change, reset the clean-review count to zero.
- Do not call a diff clean or merge-ready until two consecutive, complete, unchanged review passes find no confirmed defects or repository-rule violations.
- Clearly distinguish confirmed findings, unverified risks, missing platform validation, process blockers, and non-blocking suggestions.

As a security-aware developer, generate secure .NET code using ASP.NET Core that inherently prevents top security weaknesses.
Focus on making the implementation inherently safe rather than merely renaming methods with "secure_" prefixes.
Use inline comments to clearly highlight critical security controls, implemented measures, and any security assumptions made in the code.
Expand Down
23 changes: 23 additions & 0 deletions .github/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ Before making code, dependency, workflow, or documentation changes, review and f

Repository-specific guidance takes precedence over general examples in this file. Keep infrastructure-shaped dependencies out of `listenarr.application`; define application-owned ports there and implement adapters in infrastructure/API.

## Mandatory Independent and Adversarial Code Review

Every code review must be a fresh, independent, adversarial review of the authoritative complete diff. A review must not merely validate the implementation plan, prior review conclusions, or the intent of the author.

Required review behavior:

- Start from the complete branch, commit, staged, or working-tree diff against its authoritative base and review the changed behavior from first principles.
- Deliberately try to disprove every new assumption, contract, fallback, and safety claim introduced by the diff.
- Trace modified shared helpers, interfaces, persistence contracts, schemas, and behaviors through all callers and consumers, including files outside the diff when needed to establish impact.
- Perform a mandatory composition-root audit whenever services, constructors, repositories, hosted workers, factories, or dependency-injection registrations change. Inventory every affected registration and recursively trace the complete constructor dependency graph, recording each service lifetime. Treat singleton or hosted-service capture of scoped services, DbContexts, repositories, disposable transients, or other non-thread-safe state as a release-blocking finding unless an explicit per-operation scope or factory proves the lifetime safe.
- Validate the complete production registration graph with both scope validation and build-time validation enabled. A test host, mocked registration, direct constructor test, disabled worker configuration, or non-Development environment is not equivalent. Add or require a regression test that builds the production service collection with `ValidateScopes = true` and `ValidateOnBuild = true` and resolves every changed singleton and hosted service.
- Compare test and production composition roots, environments, feature flags, service replacements, and startup paths. Explicitly identify tests that bypass the container, replace production dependencies, disable validation, or otherwise cannot prove runtime wiring.
- Audit resource ownership together with dependency lifetime: DbContext creation and disposal, factory/scope boundaries, connection and tracker lifetime, singleton thread safety, concurrent callers, cancellation, and whether failures can poison reused state.
- Use a review coverage matrix for every complete pass. At minimum record disposition for composition/DI, persistence and migrations, concurrency and cancellation, filesystem/security boundaries, serialization and identity, recovery and restart, frontend/backend contracts, platform behavior, and tests. Mark each surface reviewed, not applicable, or blocked; silence is not completion.
- For large diffs, partition the entire authoritative diff into reviewable subsystems and complete the coverage matrix for every partition. Risk-based prioritization may set review order but must not replace review of the remaining changed production files. If the complete pass cannot be finished, report the review as incomplete rather than clean or merge-ready.
- Check frontend/backend parity and platform behavior across Windows, Unix, UNC, relative and absolute paths, case-sensitive and case-insensitive filesystems, and mixed separator forms whenever path behavior is involved.
- Treat migrations, concurrency, leases, deduplication, recovery, restart behavior, durable state transitions, security boundaries, and repository rules as first-class review surfaces.
- Treat passing tests as supporting evidence, not proof of correctness. Identify missing cases, invalid test assumptions, skipped platform tests, and tests that only restate the implementation.
- Require native validation for platform-specific claims. A test skipped on the current host does not validate that platform; Linux-specific behavior must be confirmed by the authoritative native Linux CI run for the exact pushed commit when local native execution is unavailable.
- Keep implementation and review passes separate. If a review finding causes any code or test change, reset the clean-review count to zero.
- Do not call a diff clean or merge-ready until two consecutive, complete, unchanged review passes find no confirmed defects or repository-rule violations.
- Clearly distinguish confirmed findings, unverified risks, missing platform validation, process blockers, and non-blocking suggestions.

As a security-aware developer, generate secure .NET code using ASP.NET Core that inherently prevents top security weaknesses. Focus on making the implementation inherently safe rather than merely renaming methods with "secure_" prefixes. Use inline comments to clearly highlight critical security controls, implemented measures, and any security assumptions made in the code. Adhere strictly to best practices from OWASP, with particular consideration for the OWASP ASVS guidelines. **Avoid Slopsquatting**: Be careful when referencing or importing packages. Do not guess if a package exists. Comment on any low reputation or uncommon packages you have included.

---
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ listenarr.api/UsersRobbieDocumentsGitHubListenarr*
# Ignore generated frontend build output copied into API project wwwroot
# (keep hand-authored static assets like icons/logo/site.webmanifest)
listenarr.api/wwwroot/assets/
listenarr.api/wwwroot/fonts/
listenarr.api/wwwroot/index.html
listenarr.api/wwwroot/*.map
listenarr.api/wwwroot/assets/**
Expand Down
Loading
Loading