feat(e2e): Beton/Mason E2E harness — PostHog + Supabase + Beton sinks - #3
feat(e2e): Beton/Mason E2E harness — PostHog + Supabase + Beton sinks#3nadyyym wants to merge 1 commit into
Conversation
… + Beton sinks Port the dryfit-based E2E test rig (previously vendored in inspector-ml-backend under scripts/dryfit_e2e/ + scripts/test_env/) into dryfit under e2e/, so the synthetic data travels with its sinks. Generates dryfit data and fans it out to three sinks: - PostHog (dryfit_to_posthog.py): runs dryfit's engine in-memory, POSTs events to Project B /batch with historical_migration. Also posthog_ingest.py for the Postgres-table variant. - Supabase (bootstrap_workspace.mjs): idempotently creates the Inspector test user/workspace/membership + PostHog integration_configs (AES-256-GCM key). - Beton/Mason (run_matrix.py): railway-driven model switch, /api/agent/trigger-test, pulls experiment_report.json via railway ssh; model×batch matrix. Plus score.py (coverage recall/precision vs ground truth), posthog_dashboard.py, run.sh (local-Mason single-scenario), generate.sh, and run_e2e.sh (orchestrator, STAGE=supabase|posthog|beton|all). README + .env.example document the rig. Path rewiring from the inspector-ml-backend layout: - generate.sh/run.sh artifacts now under e2e/artifacts/ (gitignored). - run_matrix.py --repo-dir no longer defaults to a relative parent; requires MASON_REPO_DIR (the inspector-ml-backend checkout linked to the Railway service). Validated: py_compile / bash -n / node --check all clean; dryfit_to_posthog.py --dry-run generates 76,185 events + 230 signals against the current dryfit engine. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ First end-to-end run with this harness (gemini-3-flash)Exercised the ported harness against the live rig: separate PostHog Project B (406509), the Inspector Supabase branch, and Mason on its Railway env ( Sinks / stages that worked
Telemetry captured (via the run)Langfuse trace CaveatThe run promoted 0 signals: warehouse profiling returned an empty table allowlist ( Harness notes for reviewers
|
🔁 Corrected end-to-end run — harness drove all stages; found two Mason-side issuesFollow-up to the run above (which scored 0/0). Root cause was session registration, not the harness data path:
Corrected run (gemini-3-flash, registered session)The harness drove every stage correctly: PostHog Project B data (73.6k seat events) → registered session → Mason run → profiling succeeded ( Two findings for the harness / Mason
Harness notes confirmed
|
What
Ports the Beton / Mason end-to-end test harness into dryfit under
e2e/. It was previously vendored insidegetbeton/inspector-ml-backend(scripts/dryfit_e2e/+scripts/test_env/); moving it here lets the synthetic data travel with the sinks that consume it.The harness generates dryfit synthetic data and fans it out to three native sinks, then triggers Mason and scores its promoted signals against dryfit's hidden ground truth:
Sinks
dryfit_to_posthog.pyruns dryfit's engine in-memory (no Postgres) and POSTs events to Project B/batchwithhistorical_migration: true.posthog_ingest.pyis the Postgres-table variant.bootstrap_workspace.mjsidempotently creates the Inspector test user / workspace / membership and the PostHogintegration_configs+posthog_workspace_configrows (API key AES-256-GCM-encrypted to match Inspector's scheme). Node stdlib only.run_matrix.pyswitches the Mason model viarailway, hits/api/agent/trigger-test, pullsexperiment_report.jsonoff the container viarailway ssh, and runs a model×batch-size matrix.Plus
score.py(coverage-based recall/precision),posthog_dashboard.py,run.sh(local-Mason single-scenario),generate.sh, andrun_e2e.sh— an orchestrator chaining the three sinks (STAGE=supabase|posthog|beton|all).README.md+.env.exampledocument the rig.Path rewiring from the inspector-ml-backend layout
e2e/artifacts/(gitignored), not the old$V0_DIR/artifacts.run_matrix.py --repo-dirno longer defaults to a relative parent (which used to be the Mason checkout); it now requiresMASON_REPO_DIR— theinspector-ml-backendcheckout that'srailway link-ed to the e2e service, sincerun_matrix.pydrivesrailwayredeploys/ssh from there.Validation
py_compile/bash -n/node --checkall clean.dryfit_to_posthog.py --dry-rungenerates 76,185 events + 230 signal instances against the current dryfit engine and writes ground truth + manifest (0 skipped). ConfirmedEventRecord/GenerationResultfield mapping matches this dryfit version.railway login.Context
This unblocks validating inspector-ml-backend#12 (LiteLLM adapter + Langfuse-alongside-AgentOps) on a separate Railway env with its own PostHog Project B + Supabase branch.
🤖 Generated with Claude Code