feat(serve): add ingestion API routes + integration tests (GH-328)#372
feat(serve): add ingestion API routes + integration tests (GH-328)#372
Conversation
Expose the ingestion trigger engine and suggestion queue through 6 HTTP API routes: evaluate trigger, manual ingest, list records, list pending suggestions, accept suggestion, and reject suggestion. Includes 8 integration tests covering auto/suggest/skip flows and error cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clippy 1.94 catches needless &format!() on .uri() calls that implement the required traits. Remove the unnecessary borrows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review: PR #372 (Round 1)SummaryThis PR adds 6 ingestion API routes to Key FindingsCritical Issues (P0)None. High Priority (P1)
Testing ReviewCoverage
Convention Compliance
Testing Verdict: Adequate (minor gap on 409 path)Verdict: Changes RequestedFixing P1 issues and will re-review. Round 1 of automated review-fix loop |
- Replace serde_json::to_value trigger_type filter with direct match - Add test for 409 Conflict on double-accept of suggestion Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review: PR #372 (Round 2) — LGTM 🎉All P0 and P1 issues have been resolved. SummaryThis PR adds 6 ingestion API routes to Fixes applied in round 1:
Verdict: LGTM ✅No critical or high-priority issues remaining. This PR is ready for merge. Completed after 2 round(s) of automated review-fix loop |
Summary
edda-serveexposing the ingestion trigger engine and suggestion queue fromedda-ingestion(feat(ingestion): add trigger tables + evaluator engine #326, feat(ingestion): add suggestion queue + workflow #327):POST /api/ingestion/evaluate— evaluate trigger (auto/suggest/skip)POST /api/ingestion/records— manual ingestion (bypass trigger)GET /api/ingestion/records— list ingestion records (with filters)GET /api/ingestion/suggestions— list pending suggestionsPOST /api/ingestion/suggestions/{id}/accept— accept and write to ledgerPOST /api/ingestion/suggestions/{id}/reject— reject without writingedda-ingestion, handlers are mechanical adapterspost_draft_approveCloses #328
Test plan
cargo fmt --check -p edda-serve— formatting cleancargo clippy -p edda-serve -- -D warnings— zero warningscargo test -p edda-serve— 105 tests pass (8 new ingestion tests)cargo test -p edda-ingestion— 53 tests pass (no regressions)🤖 Generated with Claude Code