refactor(feedback): consume dunite-feedback (DEV-516) #444

Merged
longjacksonle merged 1 commit from feat/DEV-516-consume-feedback into main 2026-08-03 20:00:21 +02:00

What

Consume the shared dunite-feedback crate (DEV-516, under the DEV-495 epic), replacing bunyip's local feedback model + repository. First consumer; a8n-tools follows.

Changes

  • crates/bunyip-domain/src/models/feedback.rs and repositories/feedback.rs become thin re-exports of dunite_feedback, so every crate::models::* / FeedbackRepository::* path across bunyip-domain and bunyip-api stays unchanged. The crate was lifted from this repo's own superset, so there is no reconciliation on bunyip's side.
  • The shared repository is error-agnostic (returns sqlx::Error). Handler call sites keep ? (mapped via From<sqlx::Error> for AppError); the seed path gains a small From<sqlx::Error> for LoadError; and the two now-bool methods (delete, archive_one) raise AppError::not_found("Feedback") on false in the handlers. SQL and behaviour are unchanged.

Tests

Model unit tests moved to dunite (tested there). bunyip's handler + seed feedback unit tests (8) pass; cargo clippy -p bunyip-domain -p bunyip-api and cargo fmt --check clean.

Merge order

Depends on dunite PR #28. Pinned to that crate's branch rev; the three dunite pins (core / stripe-core / feedback) collapse to one merged rev in a follow-up. a8n-tools adoption is a separate PR (it needs a migration for submitter_ip/user_agent and a reconcile of its list filter + React admin).

🤖 Generated with Claude Code

https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss

## What Consume the shared `dunite-feedback` crate (DEV-516, under the DEV-495 epic), replacing bunyip's local feedback model + repository. First consumer; a8n-tools follows. ## Changes - `crates/bunyip-domain/src/models/feedback.rs` and `repositories/feedback.rs` become thin re-exports of `dunite_feedback`, so every `crate::models::*` / `FeedbackRepository::*` path across bunyip-domain and bunyip-api stays unchanged. The crate was lifted from this repo's own superset, so there is no reconciliation on bunyip's side. - The shared repository is error-agnostic (returns `sqlx::Error`). Handler call sites keep `?` (mapped via `From<sqlx::Error> for AppError`); the seed path gains a small `From<sqlx::Error> for LoadError`; and the two now-`bool` methods (`delete`, `archive_one`) raise `AppError::not_found("Feedback")` on `false` in the handlers. SQL and behaviour are unchanged. ## Tests Model unit tests moved to dunite (tested there). bunyip's handler + seed feedback unit tests (8) pass; `cargo clippy -p bunyip-domain -p bunyip-api` and `cargo fmt --check` clean. ## Merge order Depends on dunite PR #28. Pinned to that crate's branch rev; the three dunite pins (core / stripe-core / feedback) collapse to one merged rev in a follow-up. a8n-tools adoption is a separate PR (it needs a migration for `submitter_ip`/`user_agent` and a reconcile of its list filter + React admin). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss
refactor(feedback): consume dunite-feedback shared crate (DEV-516)
All checks were successful
E2E PR gate / Install + reachability (no deployment secrets) (pull_request) Successful in 23s
Check / fmt + clippy + build + tests (pull_request) Successful in 13m46s
Create release / Create release from merged PR (pull_request) Has been skipped
6765caa1ab
Replace bunyip's local feedback model + repository with the shared dunite-feedback crate (also to be consumed by a8n-tools), extracted from this crate's own superset. bunyip-domain's models/feedback.rs and repositories/feedback.rs become thin re-exports so every `crate::models::*` / `FeedbackRepository::*` path across bunyip-domain and bunyip-api is unchanged. The shared repository is error-agnostic (returns sqlx::Error): handler call sites keep `?` (mapped via From<sqlx::Error> for AppError), the seed path gains a From<sqlx::Error> for LoadError, and the two now-bool methods (delete, archive_one) raise AppError::not_found("Feedback") on false in the handlers. Behaviour and SQL are unchanged; the model unit tests moved to dunite, and bunyip's handler/seed feedback unit tests pass. Pinned to the crate's branch rev; the dunite pins collapse to one merged rev in a follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss
longjacksonle scheduled this pull request to auto merge when all checks succeed 2026-08-03 19:47:35 +02:00
longjacksonle deleted branch feat/DEV-516-consume-feedback 2026-08-03 20:00:22 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!444
No description provided.