BCH-1145: Remove definition-level evidence-required from API contract#409
Conversation
Evidence requirements are modelled exclusively at step level (EvidenceRequirement[] per step). The definition-level field was duplicated and never used by step transition validation. - Remove EvidenceRequired from Create/Update request structs - Remove handler logic that copied the field onto the definition - Tag model field json:"-" to exclude from responses (DB column kept for migration safety) - Add integration tests asserting evidence_required is absent from Create and Update responses Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request removes the ChangesRemove EvidenceRequired from API contracts
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/api/handler/workflows/workflow_definition_integration_test.go`:
- Around line 93-94: The test currently only asserts the JSON response map
variable data does not contain "evidence_required"; extend the check to also
assert the dashed variant "evidence-required" is absent by adding the same
pattern: _, hasField := data["evidence-required"]; assert.False(t, hasField,
...) next to the existing assertion that uses data["evidence_required"]. Apply
the same pair of assertions in the other duplicated test location (the similar
block around the later check) so both locations validate absence of both key
variants.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cfe47d67-72ee-40e1-81fc-a3fdca6dabb1
📒 Files selected for processing (6)
docs/docs.godocs/swagger.jsondocs/swagger.yamlinternal/api/handler/workflows/workflow_definition.gointernal/api/handler/workflows/workflow_definition_integration_test.gointernal/service/relational/workflows/workflow_definition.go
💤 Files with no reviewable changes (4)
- docs/docs.go
- docs/swagger.json
- internal/api/handler/workflows/workflow_definition.go
- docs/swagger.yaml
…onses Add hyphen-form (evidence-required) assertions alongside the existing underscore-form checks in the Create and Update integration tests to fully enforce contract removal of the definition-level field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Evidence requirements are modelled exclusively at step level (EvidenceRequirement[] per step). The definition-level field was duplicated and never used by step transition validation.
Summary by CodeRabbit