runtime: add fenced per-service auth enrollment and refresh journal #665

Merged
toasterson merged 2 commits from codex/runtime-auth-writeback-prep-20261017 into main 2026-10-17 21:12:28 +00:00
Owner

Codex subscription refresh rotated both tokens in the retained-PVC probe. This prerequisite adds an offline, same-service auth enrollment CLI and an OpenBao CAS journal that refuses stale auth after interrupted provider use. It is based on merged #664 (17f94ecd).

akh-runtime-auth defaults to planning. It holds the existing profile lock, validates the source service/profile, verifies the reviewed store-import manifest against service/schema/kind/digest, and acquires that exact Postgres store exclusively with require_receipt. Apply requires the reviewed auth manifest; exact retries use CAS readback. It accepts only bounded private subscription auth, never a common seed or another service's file.

The library publishes using before provider use, retains using across checkpoints, and permits ready only through an explicit quiescent final capture. Missing, revoked, conflicting, inaccessible and ambiguous records fail closed. The journal binds service/profile and migration fence. Real provider launch/refresh/shutdown/startup hooks are not yet connected; this is the coordinator-approved bounded prerequisite, not runtime durability or cutover acceptance.

Validation at 8d210f37438f9e4748d4a5d9ed9304d46d4d4924:

  • Runtime-only library: 92 passed; CLI: 2 passed. This includes 13 focused auth tests and 2 CLI refusal tests.
  • One real Postgres/OpenBao ownership-loss/restart test compiled but locally ignored; wired into the existing CI disposable-backend harness.
  • Formatting, whitespace, Python syntax, evidence JSON and all four exact opaque slot paths checked.
  • No local Docker/image build; one 2-job Rust build reused the existing cache, with approximately 70 GiB headroom afterward.

RUNTIME-AUTH.md gives exact per-service sources/destinations, coordinator-owned dedicated reauthorization fallback, rollout ordering and remaining PR8/PR9 gates. Live evidence verifies all 19 claims/27 PVs protected and 14 pods Ready. All four Codex runtimes still use shared akh_sessions; owner-specific store reconciliation must precede enrollment. The shared seed remains inactive. Production auth, bindings, policies, manifests and volumes are unchanged.

Required later evidence: daemon/helper integration, actual same-service refresh/checkpoint/failure/shutdown acceptance, transcript reconciliation, and merged-main arm64+amd64 conformance. Main image build run 4309 is still pending in the recorded snapshot. Sessions/core reconciliation, per-Akh Sokar authorization, house schema compatibility, MausBot post-PR8 recapture and PR9 sharing remain explicit gates. No self-merge or activation.

Codex subscription refresh rotated both tokens in the retained-PVC probe. This prerequisite adds an offline, same-service auth enrollment CLI and an OpenBao CAS journal that refuses stale auth after interrupted provider use. It is based on merged #664 (`17f94ecd`). `akh-runtime-auth` defaults to planning. It holds the existing profile lock, validates the source service/profile, verifies the reviewed store-import manifest against service/schema/kind/digest, and acquires that exact Postgres store exclusively with `require_receipt`. Apply requires the reviewed auth manifest; exact retries use CAS readback. It accepts only bounded private subscription auth, never a common seed or another service's file. The library publishes `using` before provider use, retains `using` across checkpoints, and permits `ready` only through an explicit quiescent final capture. Missing, revoked, conflicting, inaccessible and ambiguous records fail closed. The journal binds service/profile and migration fence. Real provider launch/refresh/shutdown/startup hooks are **not yet connected**; this is the coordinator-approved bounded prerequisite, not runtime durability or cutover acceptance. Validation at `8d210f37438f9e4748d4a5d9ed9304d46d4d4924`: - Runtime-only library: 92 passed; CLI: 2 passed. This includes 13 focused auth tests and 2 CLI refusal tests. - One real Postgres/OpenBao ownership-loss/restart test compiled but locally ignored; wired into the existing CI disposable-backend harness. - Formatting, whitespace, Python syntax, evidence JSON and all four exact opaque slot paths checked. - No local Docker/image build; one 2-job Rust build reused the existing cache, with approximately 70 GiB headroom afterward. `RUNTIME-AUTH.md` gives exact per-service sources/destinations, coordinator-owned dedicated reauthorization fallback, rollout ordering and remaining PR8/PR9 gates. Live evidence verifies all 19 claims/27 PVs protected and 14 pods Ready. All four Codex runtimes still use shared `akh_sessions`; owner-specific store reconciliation must precede enrollment. The shared seed remains inactive. Production auth, bindings, policies, manifests and volumes are unchanged. Required later evidence: daemon/helper integration, actual same-service refresh/checkpoint/failure/shutdown acceptance, transcript reconciliation, and merged-main arm64+amd64 conformance. Main image build run 4309 is still pending in the recorded snapshot. Sessions/core reconciliation, per-Akh Sokar authorization, house schema compatibility, MausBot post-PR8 recapture and PR9 sharing remain explicit gates. No self-merge or activation.
feat(runtime): prepare fenced provider auth enrollment and journal
Some checks failed
CI / test-sokar-sharing (pull_request) Successful in 2m18s
CI / check-seshat (pull_request) Successful in 8m14s
CI / test-sokar (pull_request) Successful in 9m6s
CI / docker-seshd (pull_request) Successful in 7m28s
CI / docker-akh-transcripts (pull_request) Successful in 7m32s
CI / check-akh-medu (pull_request) Successful in 18m31s
CI / test-akh-medu (pull_request) Successful in 22m42s
CI / test-session-platform (pull_request) Failing after 24m27s
CI / platform-images-home (pull_request) Has been skipped
CI / platform-images-core (pull_request) Has been skipped
CI / platform-images-daemons (pull_request) Has been skipped
CI / publish-chart (pull_request) Successful in 17m7s
CI / platform-images-fleet (pull_request) Has been cancelled
CI / platform-images-collect (pull_request) Has been cancelled
CI / docker-sokard (pull_request) Has been cancelled
8d210f3743
test(runtime): keep auth owner fixture name within Postgres limit
All checks were successful
CI / test-sokar-sharing (pull_request) Successful in 2m1s
CI / check-seshat (pull_request) Successful in 3m9s
CI / check-akh-medu (pull_request) Successful in 8m8s
CI / test-sokar (pull_request) Successful in 11m3s
CI / docker-seshd (pull_request) Successful in 7m20s
CI / test-akh-medu (pull_request) Successful in 14m39s
CI / publish-chart (pull_request) Successful in 7m7s
CI / test-session-platform (pull_request) Successful in 28m31s
CI / docker-sokard (pull_request) Successful in 13m15s
CI / platform-images-home (pull_request) Successful in 50s
CI / platform-images-daemons (pull_request) Successful in 1m29s
CI / platform-images-core (pull_request) Successful in 2m0s
CI / docker-akh-transcripts (pull_request) Successful in 20m32s
CI / platform-images-fleet (pull_request) Successful in 49s
CI / platform-images-collect (pull_request) Successful in 46s
a90c8321ae
Sign in to join this conversation.
No reviewers
No labels
follow-up
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/akh-medu!665
No description provided.