feat(routing): implement resource operation routing (topic 8) - #18
feat(routing): implement resource operation routing (topic 8)#18gabriel-farache wants to merge 4 commits into
Conversation
Code Review by Qodo
1.
|
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 5235ea8 |
Plan 2 (empty provider ID collision): - Guard in resolveProvider: empty sp.ID → Unavailable + Error log - Validate provider record on FileStore.Save write path - Guard in SetState: empty providerID is a no-op - Add SchemaVersion to test helper (prevent future time bomb) Plan 3 (ack warning lacks message ID): - Replace handlers with CE-identity-enriched ack/nak failure logging - Add extractCEIdentity for correlation (id, type from envelope) - Log JetStream metadata (stream_seq, consumer_seq, num_delivered) - Log NakWithDelay failures (previously silently discarded) Plan 1 (duplicate dispatch on redelivery — minimal stopgap): - Add AckWait (120s) and CancelAckWait (10s) to MessagingConfig - Set explicit AckWait on main, retry, and cancel consumers - Validated: AckWait ∈ [10s, 5m], CancelAckWait ∈ [1s, 1m] Addresses: PR dcm-project#18 Qodo automated review unresolved threads Assisted by: Claude Code - Opus 4.6 Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
62e7271 to
f954377
Compare
dc63983 to
a39dcea
Compare
a39dcea to
2f1606e
Compare
Add UT-MSG-037–041 (whitelist regex edge cases) to unit test plan and IT-MSG-071–073 (nested payload, delete response, publish error nak) to integration test plan. Update traceability matrices accordingly. Assisted by: Claude Code - claude-4.6-opus Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Add CloudEvent builder (internal/cloudevent) with FormatSource/FormatType helpers and NewResponseCE constructor. Implement NATS JetStream messaging client (internal/messaging) with topic subscription, handler dispatch, response publishing, and cancel-request deny-list management. Wire messaging setup into main via setupMessaging helper. Includes whitelist-based topic validation, typed CE payload extraction, compile-time interface assertions, and separated handler file. Config extended with NATS and messaging fields. Full unit and integration test coverage with test suites. Assisted by: Claude Code - claude-4.6-opus Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
…peration routing Update architecture decision DD-190 with deny-list semantics and add ASM-RTE-010 documenting the resource operation routing contract and CloudEvent publishing interface. Assisted by: Claude Code - opus-4.6 Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2f1606e to
07d49eb
Compare
Add resource operation router with deny-list filtering, backoff-aware routing decisions, and CloudEvent publishing. Includes supporting refactors to messaging handlers, config, provider store, and cloudevent types, plus full unit and integration test coverage. Assisted by: Claude Code - opus-4.6 Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
07d49eb to
72d0095
Compare
|
#19 is covering all of this and as it's the terminal PR, it has some hardening so closing this PR in favour of the terminal one. |
Summary
HandleRequestinto focused helpers, extract types/interfaces totypes.go, create genericPublishCEhelper incloudeventpackage, extract CE constants to shared package, remove legacy messaging handler pathsPrerequisites
#15 to be merged
Spec conformance
All requirements in Section 4.8 (REQ-RTE-030 through REQ-RTE-180) are satisfied. Integration tests cover IT-RTE-010 through IT-RTE-130 plus edge cases (TC-7).
Review coverage
Implementation was reviewed by 6 specialized agents across 4 models (Opus 4.6, Sonnet 5, Grok 4.5, Codex 5.3) covering correctness, security, code structure, test coverage, concurrency, and cross-package integration. All Must Fix and Should Fix findings were resolved.
Test plan
make fmt— no formatting changesmake lint— 0 issuesmake build— compiles cleanlymake test— all suites pass (routing: 26 specs, 18 integration + 8 unit)make test-race— no race conditions detectedMade with Cursor