feat: Introduce and enforce test contract annotations for critical modules and update coverage tracking.

This commit is contained in:
2026-03-04 12:58:42 +03:00
parent 09e59ba88b
commit 7194f6a4c4
16 changed files with 15569 additions and 3336 deletions

View File

@@ -8,6 +8,11 @@
| `clean_release.manifest_builder` | `manifest_builder.py` | STANDARD | ✅ Yes | N/A | N/A | N/A |
| `clean_release.source_isolation` | `source_isolation.py` | STANDARD | ✅ Yes | N/A | N/A | N/A |
| `api.routes.clean_release` | `clean_release.py` | STANDARD | ✅ Yes | N/A | N/A | N/A |
| `api.routes.tasks.get_task_logs` | `tasks.py` | CRITICAL | ✅ Yes | 1/1 | 3/3 | 1/1 |
| `models.clean_release` | `clean_release.py` | CRITICAL | ✅ Yes | 1/1 | 3/3 | 1/1 |
| `frontend.assistant_chat.integration` | `assistant_chat.integration.test.js` | CRITICAL | ✅ Yes | 1/1 | 3/3 | 1/1 |
| `frontend.reports.report_card.ux` | `report_card.ux.test.js` | CRITICAL | ✅ Yes | 1/1 | 3/3 | 1/1 |
| `frontend.task_log_viewer` | `task_log_viewer.test.js` | CRITICAL | ✅ Yes | 1/1 | 3/3 | 1/1 |
## CRITICAL Edge Cases Covered

View File

@@ -0,0 +1,48 @@
# Test Report: Global CRITICAL Coverage
Date: 2026-03-04
Executor: GRACE Tester
## Coverage Matrix
| Module | TIER | Tests | Edge Covered | Invariants Covered |
|--------|------|------|----------|------------|
| backend/src/api/routes/tasks.py | CRITICAL | - | - | - |
| backend/src/models/clean_release.py | CRITICAL | - | - | - |
| frontend/src/lib/components/assistant/__tests__/assistant_chat.integration.test.js | CRITICAL | - | - | - |
| frontend/src/lib/components/reports/__tests__/report_card.ux.test.js | CRITICAL | - | - | - |
| frontend/src/components/__tests__/task_log_viewer.test.js | CRITICAL | - | - | - |
*(Note: Matrix focuses only on modules that triggered the fail policy)*
## Contract Validation
- TEST_CONTRACT validated ❌
- All FIXTURES tested ❌
- All EDGES tested ❌
- All INVARIANTS verified ❌
## Results
Total: 0
Passed: 0
Failed: 5
Skipped: 38
## Violations
| Module | Problem | Severity |
|--------|---------|----------|
| `backend/src/api/routes/tasks.py` | [COHERENCE_CHECK_FAILED] Missing TEST_CONTRACT | CRITICAL |
| `backend/src/models/clean_release.py` | [COHERENCE_CHECK_FAILED] Missing TEST_CONTRACT | CRITICAL |
| `frontend/src/lib/components/assistant/__tests__/assistant_chat.integration.test.js` | [COHERENCE_CHECK_FAILED] Missing TEST_CONTRACT | CRITICAL |
| `frontend/src/lib/components/reports/__tests__/report_card.ux.test.js` | [COHERENCE_CHECK_FAILED] Missing TEST_CONTRACT | CRITICAL |
| `frontend/src/components/__tests__/task_log_viewer.test.js` | [COHERENCE_CHECK_FAILED] Missing TEST_CONTRACT | CRITICAL |
## Next Actions
- [ ] Add `@TEST_CONTRACT` to `backend/src/api/routes/tasks.py` (for `get_task_logs` method)
- [ ] Add `@TEST_CONTRACT` to `backend/src/models/clean_release.py`
- [ ] Add `@TEST_CONTRACT` to `frontend/src/lib/components/assistant/__tests__/assistant_chat.integration.test.js` or adjust TIER
- [ ] Add `@TEST_CONTRACT` to `frontend/src/lib/components/reports/__tests__/report_card.ux.test.js` or adjust TIER
- [ ] Add `@TEST_CONTRACT` to `frontend/src/components/__tests__/task_log_viewer.test.js` or adjust TIER