Repository navigation
Fix/verify fact identity - #53
Conversation
…RIFY_SCHEMA Several candidate facts can share one id+file+line (coupling.missing has no line; contract.dependency's findLine can place two new deps on the same or no line), so factId's `id:file[:line]` key collapsed them: collectCandidates' partners map, applyVerification's verdict lookup, the dismissal-memory map in verifyBrief, and `opendrs feedback --fact` all silently merged or mismatched distinct facts, keeping whichever was processed last. Add factIds(facts), which appends `#1`, `#2`, ... to the second and later fact sharing a base key, and use it everywhere a brief's captain facts are keyed. Non-colliding ids are unchanged. Reproduced with failing tests first (collectCandidates giving two coupling.missing facts the same id and overwriting one partner excerpt; applyVerification applying one fact's verdict to both). Also replace VERIFY_SCHEMA's droppedClass `anyOf: [{enum}, {type:"null"}]` with the type-array + null-enum-member form schema.ts's JUDGEMENT_SCHEMA already uses and both supported provider clients already send successfully, since anyOf-with-null was never proven against either's structured-output validator. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rebuild after the fact-id/VERIFY_SCHEMA fix (60e9de0) so the Action's checked-in bundle matches src/, keeping CI's "bundle up to date" check green. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🟢 Diff risk 0.24 · green · human review7 files · +125 −19 · Captain: standard review · why: Removes or changes exported
Review brief for AI reviewers (opendrs)Score details
Policy
opendrs 0.5.0 · default model · github.com/error-path/opendrs Auto-approval: not approved: decision is human-review; self-modification guard: the PR changes action/dist/index.js. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters: 1
📒 Files selected for processing: 7
✨ Finishing Touches
Comment |
What and why
How it was tested
npm run checkpassesnpm run build:actionrun andaction/distcommitted (ifsrc/changed)docs/specsupdated (if a contract insrc/domain/types.tsor the policy changed)Summary by CodeRabbit