Central was serving two revisions behind the code it shipped: review_contracts did not exist there although its migration was inside the running image. There was no migration mechanism at all — bare uvicorn CMD, nothing chart-declared — and nothing surfaced the mismatch. The API starts happily against a schema it was not built for and only fails when a request touches a missing table. Adds a chart-managed Helm pre-install/pre-upgrade hook running alembic upgrade head, weighted to complete before the API rolls. A hook rather than an init container: init containers run per pod, so more than one replica means concurrent alembic upgrade with no locking. Failed jobs are deliberately retained — a migration that fails and vanishes is how this drifted in the first place. /state/health now reports applied and expected revisions. "unknown" is deliberately not "ok": an instance that cannot establish agreement must not claim it, the same principle as instance_role defaulting to unknown. Refs STATE-WP-0083-T07 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 2583210@bnt-lap001 Assistant-Session: f2bff2d5-e9b2-4338-92ca-10282a927006 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| capability_requests.py | ||
| consistency_sweep.py | ||
| contributions.py | ||
| decisions.py | ||
| domain_goals.py | ||
| domains.py | ||
| execution.py | ||
| extension_points.py | ||
| fabric.py | ||
| flows.py | ||
| identifier_migrations.py | ||
| intake.py | ||
| interface_changes.py | ||
| legacy_meter.py | ||
| messages.py | ||
| ops_runs.py | ||
| policy.py | ||
| progress.py | ||
| recently_on_scope.py | ||
| reconciliation.py | ||
| repo_goals.py | ||
| repos.py | ||
| review_contracts.py | ||
| sbom.py | ||
| services.py | ||
| state.py | ||
| suggestions.py | ||
| tasks.py | ||
| technical_debt.py | ||
| token_events.py | ||
| topics.py | ||
| tpsc.py | ||
| workstream_dependencies.py | ||
| workstreams.py | ||