You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Owner: Me (lead) · Track: Aiven clean-room (front-runner) · Implemented by: Claude Code + dev-team plugin
Goal
A working autoresearch loop that proposes a DB change, applies it to a live Postgres, measures it on a frozen benchmark, and keeps-or-rolls-back — producing one clean descending p99 curve on one task.
⚠️Gate-1 update (verified 2026-06-24 on konsta-sunsteadhack / service sunstead-pg-bench, RUNNING).
hypopg is NOT available on our Aiven PG plan (0 of 60 extensions; no pg_hint_plan either). The original "no-build hypothetical index" path is closed.
Substitute (now the plan):actions.apply runs a real CREATE INDEX, actions.rollback a DROP INDEX. Keep the dataset small (pgbench scale ~10–50, or a trimmed JOB) so each build is sub-second-to-seconds. This is fully reversible and more honest than a cost-only proxy — you measure the real index, not an estimate.
cleanroom/loop/ — the dependency-injected loop + keep/discard/rollback control flow
cleanroom/actions/ — apply + rollback adapters (start with index discovery: real CREATE INDEX / DROP INDEX on a small dataset — see Gate-1 note; reversible, no hypopg)
the default Claude proposer
Do not edit files outside cleanroom/loop/ and cleanroom/actions/. Consume B's modules and C's proposers only through the frozen interfaces below.
Tasks, in order (the "when")
Phase 0 — Implement run_loop against the fixture stubs in cleanroom/fixtures/ (canned benchmark, no-op pore, in-memory logclient). Do not wait for B. Control flow: propose → pore.evaluate → actions.apply → benchmark.run → is_within_noise gate → keep/discard → logclient.write_experiment (+ rollback on regression).
Phase 0 — Implement actions/ for task 1 = index discovery with apply/rollback. ⚠️hypopg is unavailable on our Aiven plan (verified 2026-06-24 — see Gate-1 note): apply does a real CREATE INDEX, rollback a DROP INDEX. Keep the dataset small (pgbench scale ~10–50 or trimmed JOB) so build time stays sub-second-to-seconds — reversible, and more honest than a cost-only proxy.
Phase 1 — Swap fixtures for B's real benchmark/pore/logclient (integration point test #1). Run on one frozen workload against sunstead-pg-bench (or a throwaway Postgres) → produce the first descending p99 curve.
Phase 2 — Add task 2 (query-rewrite — MUST call check_correctness) and task 3 (GUC tuning — apply live if dynamic, flag restart-required).
Expose run_loop's proposer parameter so C can inject alternate models (integration point with the model axis).
Async strategy
The fixtures/ stubs let you build and demo the entire loop before B lands. Fall back to a local throwaway Postgres if Aiven access is delayed.
Definition of done
run_loop on the index task produces a descending p99 series written to the experiment table, rolls back on regression, and the significance gate rejects within-variance changes.
Method
Lead with dev-team-planner to design the loop against the contracts below, then dev-team-builder + dev-team-tester.
Frozen contracts (shared across issues #A/#B/#C — implement against these, do not change unilaterally)
Phase 0: B ships schema+stubs → A builds on stubs, C builds on synthetic log (all parallel)
Phase 1: A ⟵ B's real harness → first descending curve (integration #1)
Phase 2: A adds tasks + B's pore fires escalations into the log
Phase 3: C ⟵ A's real log + injects proposers → boundary curve + model axis (integration #2/#3)
Owner: Me (lead) · Track: Aiven clean-room (front-runner) · Implemented by: Claude Code + dev-team plugin
Goal
A working autoresearch loop that proposes a DB change, applies it to a live Postgres, measures it on a frozen benchmark, and keeps-or-rolls-back — producing one clean descending p99 curve on one task.
You build
cleanroom/loop/— the dependency-injected loop + keep/discard/rollback control flowcleanroom/actions/— apply + rollback adapters (start with index discovery: realCREATE INDEX/DROP INDEXon a small dataset — see Gate-1 note; reversible, no hypopg)Do not edit files outside
cleanroom/loop/andcleanroom/actions/. Consume B's modules and C's proposers only through the frozen interfaces below.Tasks, in order (the "when")
run_loopagainst the fixture stubs incleanroom/fixtures/(canned benchmark, no-op pore, in-memory logclient). Do not wait for B. Control flow:propose → pore.evaluate → actions.apply → benchmark.run → is_within_noise gate → keep/discard → logclient.write_experiment(+ rollback on regression).actions/for task 1 = index discovery withapply/rollback.applydoes a realCREATE INDEX,rollbackaDROP INDEX. Keep the dataset small (pgbench scale ~10–50 or trimmed JOB) so build time stays sub-second-to-seconds — reversible, and more honest than a cost-only proxy.benchmark/pore/logclient(integration point test #1). Run on one frozen workload againstsunstead-pg-bench(or a throwaway Postgres) → produce the first descending p99 curve.check_correctness) and task 3 (GUC tuning — apply live if dynamic, flag restart-required).run_loop'sproposerparameter so C can inject alternate models (integration point with the model axis).Async strategy
The
fixtures/stubs let you build and demo the entire loop before B lands. Fall back to a local throwaway Postgres if Aiven access is delayed.Definition of done
run_loopon the index task produces a descending p99 series written to theexperimenttable, rolls back on regression, and the significance gate rejects within-variance changes.Method
Lead with
dev-team-plannerto design the loop against the contracts below, thendev-team-builder+dev-team-tester.Frozen contracts (shared across issues #A/#B/#C — implement against these, do not change unilaterally)
Postgres log schema (source of truth)
Interfaces (signatures are the contract)
Integration timeline