state-hub/scripts
tegwick aade470f4a
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s
C-32: fix-consistency registration for intake/decision work records (CUST-WP-0061-T02)
Extends fix-consistency to scan any file for kind: intake / kind: decision
YAML blocks (not just workplans/, per canon: any file is a potential
work-record source), create the corresponding hub entity when missing a
state_hub_intake_id / state_hub_decision_id, and write the id back into
the source block -- same write-back pattern as C-06 for workplans.
kind: engagement is reported INFO (deferred, not fixable): no hub entity
exists for it yet, a separate stage-3 follow-on.

- _load_work_record_kind_registry(): kind-aware registry loader, factored
  out so C-31's existing flat _load_work_record_patterns() builds on it
  without duplication (verified: C-31's 16 tests still pass unmodified)
- _check_work_record_registration(): detection, wired into check_repo
  right after C-31
- _inject_yaml_block_field(): write-back helper for  fenced
  blocks, mirroring _inject_task_id_into_block's pattern for
  blocks
- fix_repo C-32 dispatch: creates the intake (scoped to repo_id) or
  decision (scoped to resolved topic_id, reusing C-06's domain->topic
  resolution) via the REST API, then writes the id back
- tests/test_work_record_registration.py: 15 tests (classification,
  detection incl. engagement-deferred and workplan-kind-exclusion,
  injection incl. idempotence and non-interference with sibling blocks)

Live-verified end to end against a real registered repo (binky-control,
not just synthetic fixtures): a real fix-consistency run found and
registered 3 genuinely open, previously-unlinked intake items
(AWQ-002/003/006) sitting in AutopilotWorkQueue.md, and correctly
deferred 5 real OH- engagement items as INFO. No regressions: full
consistency_check + consistency_sweep suite (128 tests) and C-31's own
suite (16 tests) still green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 00:48:10 +02:00
..
project_rules Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
backfill_codex_token_events.py Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
benchmark_summary_cache.py feat(summary): revision-gated cache with stale-while-revalidate (STATE-WP-0066) 2026-06-22 16:27:32 +02:00
bootstrap-env.sh Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
capture_legacy_meter_evidence.py Add 8-hour default window for legacy-meter deploy monitoring 2026-07-09 01:36:02 +02:00
capture_sbom_tools.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
check_doi.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
cleanup_stale_tasks.py STATE-WP-0070: identity headers, archive 0069, phase-2 workplan 2026-07-09 00:39:09 +02:00
codex-state-hub-mcp.sh chore: update standalone state hub wiring 2026-05-17 20:01:21 +02:00
compare_consistency_sweep_parallel.py finish(STATE-WP-0064): cut over scheduler and split sweep errors from failures 2026-06-22 01:20:59 +02:00
complete_statehub_bootstrap.py Extend complete_statehub_bootstrap for five Forgejo-migrated repos 2026-07-08 15:14:48 +02:00
consistency_check.py C-32: fix-consistency registration for intake/decision work records (CUST-WP-0061-T02) 2026-07-21 00:48:10 +02:00
dev_hub_up.sh feat(dev-hub): custodian dev up and files-first local hub (CUST-WP-0054-T07) 2026-07-08 11:42:49 +02:00
ensure_gitignore_claude_rules.py Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
gitea_inventory.py feat(CUST-WP-0014): repo sync automation & Gitea inventory 2026-03-16 01:41:16 +01:00
ingest_capabilities.py feat(capability-requests): add cross-domain capability catalog and request routing 2026-03-19 21:07:50 +01:00
ingest_sbom.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
ingest_tpsc.py feat(tpsc): Third-Party Services Catalog (CUST-WP-0023) 2026-03-20 00:15:26 +01:00
install_hooks.sh chore: add local consistency sync cli 2026-07-02 00:15:16 +02:00
mcp_hub_profile.sh feat(dev-hub): custodian dev up and files-first local hub (CUST-WP-0054-T07) 2026-07-08 11:42:49 +02:00
mcp_registration.py Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
migrate_mcp_config.py Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
normalize_attached_repo_workplans.py Fix workplan frontmatter join and prefix inference (STATE-WP-0067) 2026-06-22 23:16:15 +02:00
patch_mcp_cwd.py Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
project_claude_md.template feat(register): modular @-import CLAUDE.md structure (ops-bridge pattern) 2026-03-16 18:35:02 +01:00
propagate_credential_routing.py Add shared credential-routing template and propagation tooling 2026-06-18 22:48:43 +02:00
pull_image.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
push-seal.md Load limiting safeguards 2026-05-06 04:04:53 +02:00
recently_on_scope.py Implement RecentlyOnScope domain digest 2026-05-22 13:45:53 +02:00
register-mcp.sh Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
register_from_classification.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
register_project.sh Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
repo_sync.py feat(consistency): T04 push seal — closed-loop writeback for automated commits 2026-04-21 01:43:40 +02:00
seed.py feat(api): CUST-WP-0018 — API hardening & code quality 2026-03-18 02:17:04 +01:00
seed_wp0012_suggestions.py Finish CUST-WP-0011 and implement STATE-WP-0061 suggestion backlog. 2026-07-06 10:52:49 +02:00
smoke_dashboard_load.sh Optimize dashboard overview loading 2026-06-06 00:42:00 +02:00
spine_migration_data.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
spine_migration_dry_run.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
task_token_hook.py Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
token_reconcile.py Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
update_agent_instruction_files.py Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
validate_repo_adr.py STATE-WP-0070: identity headers, archive 0069, phase-2 workplan 2026-07-09 00:39:09 +02:00