Skip to content

feat(templates): sync netrock error codes, email jobs, proxy fix - #101

Merged
fpindej merged 4 commits into
mainfrom
chore/sync-netrock-2026-08
Aug 17, 2026
Merged

feat(templates): sync netrock error codes, email jobs, proxy fix#101
fpindej merged 4 commits into
mainfrom
chore/sync-netrock-2026-08

Conversation

@fpindej

@fpindej fpindej commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Port machine-readable error codes to generated projects: new Error record, ErrorMessages entries as static readonly Error with snake_case codes, Result.Failure(Error), ProblemFactory writes the code extension (EnsureCode for framework-generated bodies), ProblemDetailsSchemaTransformer documents it in OpenAPI; middlewares, auth handler, rate limiter, Infrastructure services and all backend tests updated; new ProblemFactoryTests, ProblemDetailsCodeTests, ProblemDetailsAssert
  • Port Hangfire-backed email delivery: EmailDeliveryJob + BackgroundEmailService (gated on jobs), email DI routing picks background delivery when JobScheduling:Enabled, three new component test files
  • Port frontend changes: getErrorCode() / getErrorMessage(error, fallback, messagesByCode), LoginForm and OAuth callback map on codes, regenerated v1.d.ts, new oauth messages, and the proxy body-buffering fix so 401 responses pass through on Node 24
  • Manifests, FILEMAP.md, .claude rules/skills/agents references and snapshots updated; version bumped to 0.10.0 with changelog entry

Source PRs: fpindej/netrock#525, fpindej/netrock#526, fpindej/netrock#527

Template-only deviations: AuthControllerTests.Register_ServiceFailure uses ErrorMessages.Auth.RegistrationInvalid instead of ErrorMessages.Admin.EmailAlreadyRegistered so core,auth without admin compiles; ProblemDetailsCodeTests.Forbidden_IncludesErrorCode is gated on admin; the add-background-job skill's email note is gated on email.

Test plan

  • pnpm install --frozen-lockfile && pnpm test && pnpm build && pnpm --filter @netrock/web check (snapshots updated for ErrorMessages/Program.cs content and new file lists)
  • scripts/generate-ci.ts + dotnet build (0 warnings) + dotnet test -c Release green for: core; core,auth; core,auth,jobs; core,auth,oauth; core,auth,file-storage,avatars; core,audit; core,email; core,email,jobs; api-only full; full with frontend
  • ProblemDetailsCodeTests + ProblemFactoryTests present and passing in every combo with auth; core,auth,jobs registers BackgroundEmailService/EmailDeliveryJob, core,auth ships SmtpEmailService only
  • Full-with-frontend: pnpm install --frozen-lockfile, paraglide compile, pnpm run check (0 errors, 9 known warnings), pnpm run test (298 passed), eslint clean, pnpm run build; prettier shows only the 6 known pre-existing failures

Port fpindej/netrock#526 (Error record, ErrorMessages as static readonly
Error entries with snake_case codes, ProblemFactory code extension,
EnsureCode in AddProblemDetails, ProblemDetailsSchemaTransformer, updated
middlewares/auth handler/rate limiter and tests) and fpindej/netrock#527
(EmailDeliveryJob + BackgroundEmailService, gated on jobs, with component
tests). New FileStorage error entries are gated on file-storage.
Port fpindej/netrock#525 (buffer proxied bodies so 401 responses pass
through) and the frontend half of fpindej/netrock#526 (getErrorCode,
getErrorMessage with messagesByCode, LoginForm and OAuth callback mapping
on codes, regenerated v1.d.ts, new oauth messages).
Add Error.cs, ProblemDetailsSchemaTransformer, ProblemDetails test files,
and email job files to the core/auth/email manifests, mark the email
ServiceCollectionExtensions as templated, sync FILEMAP.md and .claude
rules/skills/agents references, and refresh snapshots.
@fpindej
fpindej merged commit 83cc1d4 into main Aug 17, 2026
12 checks passed
@fpindej
fpindej deleted the chore/sync-netrock-2026-08 branch August 17, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant