feat(benchmark): Supabase store hardening — verify command, offline fallback, secrets auto-load#95
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
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 intobenchmark_runs+benchmark_samples→ cascade cleanup. Exits 1 when runs would fall back to offline.store_resultscatches Supabase errors (bad key, missing table, network) and falls back to the offline JSON with the error reported (offline-fallbackmode). Previously it raised and the run's metrics were lost..archie-bench/secrets.envis read automatically whenSUPABASE_URL/SUPABASE_SERVICE_KEYaren't in the env — noset -a; sourcestep. 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).Validation
Live
verifyagainst 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