feat(templates): sync netrock error codes, email jobs, proxy fix - #101
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Errorrecord,ErrorMessagesentries asstatic readonly Errorwith snake_case codes,Result.Failure(Error),ProblemFactorywrites thecodeextension (EnsureCodefor framework-generated bodies),ProblemDetailsSchemaTransformerdocuments it in OpenAPI; middlewares, auth handler, rate limiter, Infrastructure services and all backend tests updated; newProblemFactoryTests,ProblemDetailsCodeTests,ProblemDetailsAssertEmailDeliveryJob+BackgroundEmailService(gated onjobs), email DI routing picks background delivery whenJobScheduling:Enabled, three new component test filesgetErrorCode()/getErrorMessage(error, fallback, messagesByCode),LoginFormand OAuth callback map on codes, regeneratedv1.d.ts, new oauth messages, and the proxy body-buffering fix so 401 responses pass through on Node 24.clauderules/skills/agents references and snapshots updated; version bumped to 0.10.0 with changelog entrySource PRs: fpindej/netrock#525, fpindej/netrock#526, fpindej/netrock#527
Template-only deviations:
AuthControllerTests.Register_ServiceFailureusesErrorMessages.Auth.RegistrationInvalidinstead ofErrorMessages.Admin.EmailAlreadyRegisteredsocore,authwithoutadmincompiles;ProblemDetailsCodeTests.Forbidden_IncludesErrorCodeis gated onadmin; theadd-background-jobskill's email note is gated onemail.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 Releasegreen 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 frontendProblemDetailsCodeTests+ProblemFactoryTestspresent and passing in every combo withauth;core,auth,jobsregistersBackgroundEmailService/EmailDeliveryJob,core,authshipsSmtpEmailServiceonlypnpm 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