state-hub/scripts
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
..
capture_sbom_tools.py feat(sbom): CUST-WP-0013 — expand SBOM infra to terraform, ansible, and tool manifests 2026-03-12 04:40:26 +01:00
cleanup_stale_tasks.py feat(maintenance): add stale-task cleanup scheme 2026-03-02 00:32:35 +01:00
consistency_check.py fix(consistency): fix C-04 status vocabulary mismatch + surface PATCH errors 2026-03-12 21:57:11 +01:00
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
patch_mcp_cwd.py Implement registration UX wishlist W1–W6 (260224) 2026-02-24 22:22:53 +01:00
project_claude_md.template feat(goals): add domain/repo goal tracking and update_workstream MCP tool 2026-03-09 00:15:29 +01:00
pull_image.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
register_project.sh feat(registration): write CLAUDE.custodian.md instead of overwriting CLAUDE.md 2026-03-02 01:30:28 +01:00
seed.py feat(state-hub): implement v0.5 — dynamic domains & multi-repo 2026-02-28 15:20:15 +01:00
validate_repo_adr.py feat(custodian): add ADR-001 compliance validator 2026-02-28 12:00:09 +01:00