Repository navigation
WI-004: #17 Missing response helpers: Accepted, NoContent - #22
Conversation
Implemented by the Weave Autoloop, attempt 1 (execution exe_b61112dcc128).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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 #22 +/- ##
==========================================
+ Coverage 85.48% 85.71% +0.22%
==========================================
Files 14 14
Lines 565 574 +9
==========================================
+ Hits 483 492 +9
Misses 63 63
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Weave review: approved (execution
Two small gaps, neither of which blocks approval:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHBdej3KvFACHzafbEhw7C
Work item WI-004 of work package WP-001 (GitHub issues).
`response_helpers.go` has `OK`, `OKWithMeta`, and `Created`, but no `Accepted` (202) or `NoContent` (204) — both common for async-job-style and delete/update-with-empty-body endpoints. `ReplyBuilder` (the fluent path) has the same gap: `OK`/`Created` methods exist, no `Accepted`/`NoContent`.
Current workaround is the generic `Respond(data).Status(http.StatusAccepted).Write(w)` / `Respondany.Status(http.StatusNoContent).Write(w)`, which works but is exactly the "low-level escape hatch" the direct helpers exist to avoid.
Requested:
```go
func Accepted[T any](w http.ResponseWriter, data T)
func NoContent(w http.ResponseWriter)
```
plus `ReplyBuilder.Accepted`/`ReplyBuilder.NoContent` for the header/meta-configured path.
Implemented by the Weave Autoloop, attempt 1, execution
exe_b61112dcc128.Changed files:
response_builder.goresponse_helpers.goresponse_helpers_test.go