issue 5#21
Merged
Merged
Conversation
Add design spec for POST /api/v1/cases/{caseId}/signals endpoint
(issue casehubio#5). Defines REST API for sending external signals to case
instances via CaseHubRuntime.signal().
Key decisions:
- Separate SignalResource for clean isolation
- Direct mapping: {path, value} → signal(caseId, path, value)
- 202 Accepted async model
- Minimal validation (null-checks only)
- Idempotency deferred to future iteration
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Create detailed TDD implementation plan for POST /api/v1/cases/{caseId}/signals
endpoint. Plan includes 10 tasks with bite-sized steps following red-green-refactor
cycle.
Tasks cover:
- DTOs (SendSignalRequest, SignalResponse)
- SignalResource with validation and error handling
- Unit tests with mocked CaseHubRuntime
- Integration tests with real runtime
- Manual verification
Estimated: 45-60 minutes for complete implementation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…dependency - Add @InjectMock annotation to CaseHubRuntime field in SignalResourceTest - Add verification that signal() method was called with correct parameters - Add quarkus-junit-mockito dependency for mock support - Test now properly verifies mock interactions as required by spec
- Total: 63 tests all passing (61 unit + 2 integration) - Compilation: clean with no warnings - Coverage: REST endpoints, database persistence, error handling, context management - Manual test scenarios documented for end-to-end validation
Move PagedResponse from io.casehub.flow.rest to io.casehub.flow.rest.dto for better package organization. All DTOs are now in the dto package.
Remove duplicate ProblemDetail inner records from CaseDefinitionResource and CaseInstanceResource. All resources now use the shared ProblemDetail from io.casehub.flow.rest.dto package for consistent RFC 7807 error responses.
Signed-off-by: Dmitrii Tikhomirov <chani.liet@gmail.com>
Contributor
Author
|
/retest |
|
✅ Tests restarted — check the Actions tab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implementation Details
Test Coverage
Closes #5
🤖 Generated with Claude Code