Skip to content

Stabilize backend foundation and clarify boundaries#686

Open
therobbiedavis wants to merge 20 commits into
canaryfrom
677-backend-foundation-combined
Open

Stabilize backend foundation and clarify boundaries#686
therobbiedavis wants to merge 20 commits into
canaryfrom
677-backend-foundation-combined

Conversation

@therobbiedavis

Copy link
Copy Markdown
Collaborator

Summary

This PR combines #679 and #685 into one backend foundation PR so the dependency/test-loop work and architecture-boundary cleanup can be reviewed and merged together.

The first part gets dependency restores deterministic again. Backend package lock files are committed, CI restore uses locked mode, publish runtime identifiers are covered, and the frontend dependency/build-warning cleanup from the dependency update work is included.

The second part makes the backend layer boundaries more intentional. Application now owns contracts for behavior, while infrastructure owns framework and adapter details like EF/SQLite, HTML parsing, image probing, audio tagging, Data Protection, request context access, and realtime transport wiring.

Refs #677. Supersedes #679 and #685.

Changes

Added

  • NuGet lock files for backend projects and tests, including API runtime targets used by CI publish jobs.
  • Application-owned ports for infrastructure-backed concerns such as HTML extraction, Audible author parsing, cover probing, audio tag writing, secret protection, request context access, and realtime broadcasting/client inspection.
  • Infrastructure implementations for those ports.
  • Infrastructure extension methods for realtime endpoint mapping and logging setup.
  • Backend architecture documentation and AI/contributor guidance to review repo docs before changing code.
  • A small frontend router instance service to remove the auth-store dynamic import warning.

Changed

  • Enabled deterministic NuGet restore behavior through central package configuration and CI locked restore mode.
  • Updated CI publish steps to use the already-restored graph with --no-restore.
  • Pulled in the dependency updates from chore/dependency-update, including Node engine metadata and npm lockfile updates.
  • Moved infrastructure-shaped behavior out of listenarr.application and behind application interfaces.
  • Kept concrete realtime hub mapping and log sink initialization in infrastructure instead of exposing those details from Program.cs.
  • Centralized common backend/test usings and removed unnecessary per-file directives.
  • Updated tests to use the new application ports and infrastructure registrations.

Fixed

  • Fixed backend test compilation failures caused by inconsistent package resolution, including EF Core version drift.
  • Fixed locked restore coverage for RID-specific CI publish targets.
  • Fixed the frontend dynamic import warning between the auth store and router.
  • Filtered the known upstream VueUse/Rolldown annotation warning without hiding unrelated build warnings.
  • Stopped request context snapshots from trusting raw forwarded host/proto headers outside ASP.NET Core's forwarded-header trust model.

Testing

  • dotnet build listenarr.slnx --no-restore — 0 warnings, 0 errors
  • dotnet test listenarr.slnx --no-build — 696 passed
  • cd fe && npm run test:unit -- --run — 378 passed, 1 skipped test file
  • cd fe && npm run build
  • cd fe && npm run lint:check
  • git diff --check origin/canary...HEAD
  • Push hook also ran backend format, frontend type check, and frontend tests successfully.

Notes

This intentionally replaces the separate dependency and architecture PRs so the repo gets one coherent foundation update: first make validation deterministic, then make the backend boundaries cleaner on top of that same validated graph.

Enable deterministic NuGet restores for backend projects by turning on package lock files and CI locked restore mode. Add generated NuGet lock files so local and CI test runs resolve the same dependency graph before `dotnet test --no-restore`.

Pull in the dependency updates from `chore/dependency-update`, including the Node engine update to `^24.15.0` and refreshed root/frontend npm lockfiles.

Clean up frontend build warnings introduced during dependency validation by removing the auth store's dynamic router import and moving router instance access into a small shared service. Add a narrow Vite/Rolldown warning filter for known upstream `@vueuse/core` pure annotation noise.

Validated with:
- `dotnet restore listenarr.slnx /p:CI=true`
- `dotnet test listenarr.slnx --no-restore`
- `npm install`
- `cd fe && npm install`
- `cd fe && npm run test:unit`
- `cd fe && npm run build`
- `cd fe && npm run lint:check`
- `git diff --check`
@therobbiedavis therobbiedavis requested a review from a team June 12, 2026 02:29
@therobbiedavis therobbiedavis added the patch patch version bump - backward compatible bug fixes label Jun 12, 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 Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2700aa2f7

ℹ️ 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".

Comment thread listenarr.application/Notification/NotificationService.cs Outdated
using var scope = _scopeFactory.CreateScope();
var audible = scope.ServiceProvider.GetRequiredService<AudibleService>();

if (audiobook.Authors == null || !audiobook.Authors.Any())
_logger.LogInformation("TryPrepareMyAnonamouseTorrentAsync called for '{Title}', IndexerId: {IndexerId}, TorrentUrl: '{TorrentUrl}'",
searchResult.Title, searchResult.IndexerId, searchResult.TorrentUrl);

if (searchResult.IndexerId == null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch patch version bump - backward compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants