Skip to content

feat(benchmark): Supabase store hardening — verify command, offline fallback, secrets auto-load#95

Merged
gbrbks merged 1 commit into
mainfrom
feature/benchmark-supabase
Jun 10, 2026
Merged

feat(benchmark): Supabase store hardening — verify command, offline fallback, secrets auto-load#95
gbrbks merged 1 commit into
mainfrom
feature/benchmark-supabase

Conversation

@csacsi

@csacsi csacsi commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Wires the benchmark harness' Supabase store for real use (schema is now deployed to the Archie project as migration benchmark_harness_v1).

  • python3 -m archie.benchmark verify — connection self-test: credentials → probe insert into benchmark_runs + benchmark_samples → cascade cleanup. Exits 1 when runs would fall back to offline.
  • No more lost results: store_results catches Supabase errors (bad key, missing table, network) and falls back to the offline JSON with the error reported (offline-fallback mode). Previously it raised and the run's metrics were lost.
  • Secrets auto-load: .archie-bench/secrets.env is read automatically when SUPABASE_URL / SUPABASE_SERVICE_KEY aren't in the env — no set -a; source step. Real env vars win; template placeholders are ignored.
  • schema.sql: RLS enabled on both tables (matches the deployed migration; service-role writes bypass RLS, anon/authenticated stay locked out).
  • README + secrets.env.example updated to the new flow.

Validation

Live verify against the Archie Supabase project: all 4 checks green (credentials, both inserts, cleanup).

Tests

8 new tests in tests/benchmark/test_store.py (fallback on POST failure, secrets auto-load, placeholder skip, env precedence, verify roundtrip/failure paths) + autouse fixture isolating tests from a developer's real secrets file. Benchmark suite: 60 passed.

🤖 Generated with Claude Code

…allback, secrets auto-load

- 'python3 -m archie.benchmark verify': checks creds, probe insert into both
  tables, cascade cleanup; exits 1 when the store would fall back to offline
- store_results no longer loses results on a Supabase error: falls back to
  the offline JSON and reports the error
- .archie-bench/secrets.env auto-loads when SUPABASE_* not in env (env wins;
  template placeholders ignored)
- schema.sql: enable RLS on both tables (matches deployed benchmark_harness_v1
  migration; service-role writes unaffected)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
archie Ready Ready Preview, Comment Jun 10, 2026 1:11pm

@gbrbks gbrbks merged commit 403bebe into main Jun 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants