Repository navigation
Conversation
Implemented by the Weave Autoloop, attempt 1 (execution exe_c3a1e6bcf0b4).
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
==========================================
+ Coverage 83.60% 84.28% +0.68%
==========================================
Files 14 14
Lines 500 509 +9
==========================================
+ Hits 418 429 +11
+ Misses 63 62 -1
+ Partials 19 18 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Weave local checks: passed at |
|
Weave review: changes_requested (execution
The implementation looks correct on inspection. The step output doesn't prove acceptance criterion 7, because it never ran the race detector.
Defect: criterion 3 and 7 are unverified. |
|
Weave review: changes_requested (execution
Criteria, with implementation and proof
|
|
Weave review: changes_requested (execution
Criteria
|
|
Weave review: approved (execution
|
Work item WI-001 of work package WP-001 (Cycle 7 pilot: httpsuite #15).
From GitHub issue #15 (#15), copied by the operator because the issue is not labelled for intake:
GetProblemTypeURLreads from a package-leveldefaultProblemConfig(built once viaNewProblemConfig()), but there's no exported way to replace it — onlyDefaultProblemConfig()(read-only copy) and the per-callParseOptions.Problemsoverride onParseRequest.Consumers that want a custom
BaseURL(to emit real RFC 9457typeURIs instead of bare words like"unauthorized") or additionalErrorTypePathsglobally have no way to configure this once at startup — they'd have to passParseOptions.Problemson every singleParseRequestcall, and there's no equivalent hook at all for the direct helpers (NewProblemDetails,ProblemBadRequest, etc.), which always resolve via the package-level default.Found while auditing usage across a ~150k LOC service (GolgiMed): 60+ call sites construct
ProblemDetailswith a bare-wordtype("unauthorized","forbidden", ...) instead of a proper URI, because there's no way to register a base URL once and have every helper pick it up.Requested:
SetProblemConfig(cfg ProblemConfig)(mirroringSetValidator/ClearValidator's pattern) so an app can configureBaseURL+ErrorTypePathsonce at composition root.Acceptance criteria:
Implemented by the Weave Autoloop, attempt 1, execution
exe_c3a1e6bcf0b4.Changed files:
README.mdproblem_config.goproblem_config_test.go