feat(observer): Data Observer Phase 3 foundation — Dagster read client + Supabase write client (WIP, Tasks 1–2 of 6)#29
Open
oldhero5 wants to merge 3 commits into
Open
Conversation
added 3 commits
July 1, 2026 05:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 3 of the internal Data Observer is the cross-platform Quality/Veracity board + operator issue actions. This PR is its groundwork: observer-api's first outbound integrations. Follows #27 (Phase 1) and #28 (Phase 2).
What's included (Tasks 1–2)
src/energex/observer/config.py) — adds optionalSUPABASE_URL,SUPABASE_SERVICE_KEY, andDAGSTER_GRAPHQL_URL(defaulthttp://dagster-webserver:3000/graphql). Optional-safe: the module still imports without them.dagster_client.py) —get_pipeline_health()returns a normalized{available, checks, runs, schedules, error}. Validated against a live Dagster 1.13.9 (the initially-assumed query was schema-incompatible in three ways and was corrected toassetNodes+executionForLatestMaterialization,runsOrError,workspaceOrError). Fully resilient — any transport/HTTP/parse error or missing field degrades toavailable: false, never raises (so the board can't 500 when Dagster is down). Read-only; TTL-cached.supabase_client.py) — observer-api's first write path:read_issue_acks,write_issue_ack,write_audit_log, using the service key server-side only (never exposed to the browser);is_configured()+ typedSupabaseErrorfor graceful 503/502 handling by the callers.Both use sync
httpx(matching the sync observer routers) and are covered by offline, mocked-httpx tests.Not in this PR (Tasks 3–6, still to build)
GET /quality/board,GET /issues(viewer).POST /issues/{key}/ack|snooze|resolvewith audit logging (operator role)./qualityfrontend view + operator action controls (+ POST-capable proxy).Testing
uv run --all-extras pytest); ruff check + format clean. New: 11 Dagster-client tests (parse + total resilience + TTL-cache hit +data: null) and 8 Supabase-client tests (PostgREST URL/headers/payload + not-configured).Review status & notes
last_run_statusnow carries the status not the run id; a TTL-cache-hit test was added). Task 2 (Supabase client) is committed and tested but has not yet had its task review — treat accordingly.SUPABASE_URLmust be host-reachable from the container (http://host.docker.internal:54321in compose on macOS) — distinct from the browser'sNEXT_PUBLIC_SUPABASE_URL. This is wired in the compose task (not yet in this PR).energex.orchestration. No new Supabase migrations.