state-hub/tests
tegwick 7b7b725f8b fix(consistency): fix C-04 status vocabulary mismatch + surface PATCH errors
Root cause: workplan files use "done" (task vocabulary) but the DB workstream
API only accepts "completed". The PATCH was silently failing with 422.

Fixes:
- Add FILE_TO_DB_WORKSTREAM_STATUS map and normalise_workstream_status()
- Normalise file status before C-04 comparison: done↔completed is no longer
  spurious drift
- Normalise file status before PATCHing: always send DB-valid "completed"
- _api_patch now returns {"_error": ...} instead of None on failure, so the
  fix loop reports FAILED entries rather than silently dropping them
- 9 new tests in TestNormaliseWorkstreamStatus (42 total)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 21:57:11 +01:00
..
__init__.py feat(state-hub): integrate llm-connect as dependency (S3.1) 2026-02-27 08:32:17 +01:00
test_consistency_check.py fix(consistency): fix C-04 status vocabulary mismatch + surface PATCH errors 2026-03-12 21:57:11 +01:00
test_ingest_sbom.py feat(sbom): CUST-WP-0013 — expand SBOM infra to terraform, ansible, and tool manifests 2026-03-12 04:40:26 +01:00
test_llm_connect_integration.py feat(state-hub): integrate llm-connect as dependency (S3.1) 2026-02-27 08:32:17 +01:00