Task 011 implement evidence matrix and claim gate
This commit is contained in:
@@ -32,14 +32,14 @@ Development description: Build claim extraction, claim-to-evidence mapping, unsu
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] TDD pre-requirement: before implementation, write one failing behavior test showing insufficient evidence returns the article to `PLAN_REVISION_REQUIRED`; proceed one claim/evidence behavior at a time and record evidence in `Result`.
|
||||
- [ ] Every factual claim is mapped to at least one evidence item or marked unsupported.
|
||||
- [ ] Unsupported claims are visible by section.
|
||||
- [ ] High-risk unsupported claims block final approval.
|
||||
- [ ] Insufficient acceptable evidence blocks draft production and triggers plan revision.
|
||||
- [ ] Editor can approve, reject, add, and remove evidence.
|
||||
- [ ] Evidence UI supports section and unsupported-claim filters.
|
||||
- [ ] Evidence item retains URL, title, source type, summary, quality score, retrieval timestamp, and manifest reference.
|
||||
- [x] TDD pre-requirement: before implementation, write one failing behavior test showing insufficient evidence returns the article to `PLAN_REVISION_REQUIRED`; proceed one claim/evidence behavior at a time and record evidence in `Result`.
|
||||
- [x] Every factual claim is mapped to at least one evidence item or marked unsupported.
|
||||
- [x] Unsupported claims are visible by section.
|
||||
- [x] High-risk unsupported claims block final approval.
|
||||
- [x] Insufficient acceptable evidence blocks draft production and triggers plan revision.
|
||||
- [x] Editor can approve, reject, add, and remove evidence.
|
||||
- [x] Evidence UI supports section and unsupported-claim filters.
|
||||
- [x] Evidence item retains URL, title, source type, summary, quality score, retrieval timestamp, and manifest reference.
|
||||
|
||||
## Verification
|
||||
|
||||
@@ -49,9 +49,9 @@ Development description: Build claim extraction, claim-to-evidence mapping, unsu
|
||||
|
||||
## Result
|
||||
|
||||
- Status: Pending execution.
|
||||
- TDD plan: To be filled during execution.
|
||||
- Red evidence: To be filled during execution.
|
||||
- Green evidence: To be filled during execution.
|
||||
- Refactor notes: To be filled during execution.
|
||||
- Verification output: To be filled during execution.
|
||||
- Status: Accepted.
|
||||
- TDD plan: Added `apps/backend/tests/integration/test_evidence_matrix_public_api.py` first, with the primary failing behavior around insufficient evidence forcing `PLAN_REVISION_REQUIRED` and blocking draft/final approval; then extended coverage for sufficient evidence flow and manual evidence add/remove operations.
|
||||
- Red evidence: Before fixes, the evidence matrix behavior test failed with empty `evidence`/`claims` because `_build_matrix` was not fully applied in runtime flow (`test_sufficient_evidence_maps_claims_and_allows_draft` and insufficient scenario both failed).
|
||||
- Green evidence: Implemented evidence matrix generation from research manifests, unsupported-claim gating, draft/final approval blockers, manual evidence CRUD operations (`POST/PATCH/DELETE` under article evidence routes), claim link updates after evidence removal, and FSD evidence UI with unsupported-only + section filters.
|
||||
- Refactor notes: Added `EvidenceCreateRequest` contract and shared type generation; consolidated evidence update flows in `apps/backend/src/application/evidence.py`; ensured article detail response surfaces evidence and claims; updated frontend API client and evidence panel to support add/remove alongside approve/reject.
|
||||
- Verification output: `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps/backend/tests/integration/test_evidence_matrix_public_api.py apps/backend/tests/contracts/test_generated_contract_artifacts.py` passed. `node apps/frontend/tests/evidence_matrix.model.test.mjs` passed. `pnpm --filter @pipeline/frontend typecheck` passed. `bash tests/smoke/evidence-flow.sh` passed with Docker Compose after Docker socket escalation.
|
||||
|
||||
Reference in New Issue
Block a user