fix: close open resume and runtime writes, and keep the run ledger honest #206

Merged
meshflows merged 1 commit from feat/issue-178-dashboard-definitions into main 2026-09-22 14:58:00 +00:00
Owner

Summary

  • Dashboard GET/PUT on /internal/connections, /internal/policies and /internal/schedules now require platform admin, same as the existing deletes.
  • Run resume requires a logged-in caller with run, retrigger, or platform-admin scope. The orchestrator accepts that identity JWT (OAuth2) or the dashboard service token, and rejects resume when neither is configured.
  • A configured run ledger no longer clears its DSN and keeps serving when Postgres is down. /readyz returns 503 until the pool is up, and a later retry cannot overwrite a succeeded idempotency receipt.
  • Identity SQLite uses WAL and a busy timeout. /readyz checks the database; liveness stays on /healthz.

Branch name is historical (feat/issue-178-dashboard-definitions). Against current main this PR is only commit 1ae0d5c.

Follow-up that stays open: NetworkPolicies and egress service auth (#192), orchestrator observability auth and fail-closed /run when OAuth2 is off (#191), and moving Identity SQLite off the event loop (#198).

Test plan

  • pytest tests/test_run_state_store.py tests/test_dashboard.py::test_run_ledger_and_resume_proxy
  • Unauthenticated PUT /internal/connections/{name} returns 401
  • An operator with run or retrigger scope can still resume a run from Operations
  • With ORCH_MESSAGE_DATABASE_DSN set and Postgres down, the orchestrator does not become Ready
## Summary - Dashboard `GET`/`PUT` on `/internal/connections`, `/internal/policies` and `/internal/schedules` now require platform admin, same as the existing deletes. - Run resume requires a logged-in caller with run, retrigger, or platform-admin scope. The orchestrator accepts that identity JWT (OAuth2) or the dashboard service token, and rejects resume when neither is configured. - A configured run ledger no longer clears its DSN and keeps serving when Postgres is down. `/readyz` returns 503 until the pool is up, and a later retry cannot overwrite a succeeded idempotency receipt. - Identity SQLite uses WAL and a busy timeout. `/readyz` checks the database; liveness stays on `/healthz`. Branch name is historical (`feat/issue-178-dashboard-definitions`). Against current `main` this PR is only commit `1ae0d5c`. Follow-up that stays open: NetworkPolicies and egress service auth (#192), orchestrator observability auth and fail-closed `/run` when OAuth2 is off (#191), and moving Identity SQLite off the event loop (#198). ## Test plan - [ ] `pytest tests/test_run_state_store.py tests/test_dashboard.py::test_run_ledger_and_resume_proxy` - [ ] Unauthenticated `PUT /internal/connections/{name}` returns 401 - [ ] An operator with run or retrigger scope can still resume a run from Operations - [ ] With `ORCH_MESSAGE_DATABASE_DSN` set and Postgres down, the orchestrator does not become Ready
fix: close open resume and runtime writes, and keep the run ledger honest
All checks were successful
Test & Validate / Validate Kubernetes Manifests (pull_request) Successful in 5s
Build & Push Docker Images / Retag Product Version (push) Successful in 0s
Build & Push Docker Images / Detect Changed Components (pull_request) Successful in 5s
Build & Push Docker Images / Build Forgejo Runner Image (pull_request) Has been skipped
Build & Push Docker Images / Sync compact pointer to Forgejo Wiki (pull_request) Has been skipped
Build & Push Docker Images / Validate Repository Structure (pull_request) Successful in 3s
Test & Validate / Test Engine Smoke Suite (pytest) (pull_request) Successful in 46s
Build & Push Docker Images / Validate Workflow YAML (pull_request) Successful in 13s
Build & Push Docker Images / Validate Kubernetes Manifests (pull_request) Successful in 5s
Build & Push Docker Images / Publish Release Bundle (push) Successful in 2s
Build & Push Docker Images / Build Wiki (MkDocs) (pull_request) Successful in 3s
Build & Push Docker Images / Test Engine Smoke Suite (pytest) (pull_request) Successful in 46s
Build & Push Docker Images / Build (dashboard) Engine Services [./engine/services/dashboard] (dashboard, ./engine/services/dashboard) (pull_request) Successful in 23s
Build & Push Docker Images / Build (identity) Engine Services [./engine/services/identity] (identity, ./engine/services/identity) (pull_request) Successful in 20s
Test & Validate / Test Summary (pull_request) Successful in 0s
Build & Push Docker Images / Resolve Auto-Deploy Targets (push) Successful in 0s
Build & Push Docker Images / Test Summary (pull_request) Successful in 0s
Build & Push Docker Images / Test Gate (pull_request) Successful in 0s
Build & Push Docker Images / Trigger Deploy DEV (dev) (push) Successful in 1s
Build & Push Docker Images / Build Summary (push) Successful in 0s
Build & Push Docker Images / Trigger Deploy TST/LAB (lab) (push) Has been skipped
Build & Push Docker Images / Trigger Deploy TST/LAB (tst) (push) Has been skipped
Build & Push Docker Images / Build (orchestrator) Engine Services [./engine/services/orchestrator] (orchestrator, ./engine/services/orchestrator) (pull_request) Successful in 18s
Build & Push Docker Images / Retag Product Version (pull_request) Successful in 0s
Build & Push Docker Images / Publish Release Bundle (pull_request) Successful in 1s
Build & Push Docker Images / Resolve Auto-Deploy Targets (pull_request) Successful in 0s
Build & Push Docker Images / Build Summary (pull_request) Successful in 0s
Build & Push Docker Images / Trigger Deploy DEV (dev) (pull_request) Successful in 1s
Build & Push Docker Images / Trigger Deploy TST/LAB (lab) (pull_request) Has been skipped
Build & Push Docker Images / Trigger Deploy TST/LAB (tst) (pull_request) Has been skipped
1ae0d5cd82
Dashboard internal routes and run resume now require a caller, and a configured ledger no longer drops out silently when Postgres is down.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign in to join this conversation.
No description provided.