Repository navigation
Description
Why
On 2026-11-02 Drew ordered Supabase-only for the model/plan data: every Drive workbook was audited, the one gap was ingested, and the Drive files were renamed DEPRECATED (see the ainventory Maintenance_Log entry "Supabase-only consolidation", 2026-11-02). What remains is the table sprawl the workbook era left inside muse-dev2 itself: several overlapping stores hold the same facts, and reads keep landing in the wrong one. Concrete proof, same day: the AA Intelligence Index v5 load (2026-10-31) lives ONLY in ainventory.sheet_rows Rankings rows, while measurement_events and benchmark_results hold no v5 at all — a direct question about v5 data was first answered "we don't have it" because the event log was checked instead of the sheet mirror.
Scope
ainventory (first):
- Decide the canonical store for benchmark facts. Three layers overlap today:
sheet_rows(JSON-cell workbook mirror),benchmark_results(typed, workbook-era, frozen at the 2026-10-26 import),measurement_events(append-only event log, holds II v4.3.2 + CAI only). The 2026-10-26 design (Model data pipeline: workbook-free append-only event log + agent interpretation #1248) names the event log as the target shape. - Backfill the canonical store from Rankings AA|v5 + AA|v4.3.2 rows (incl. the 2026-11-02 source-44 rows: DeepSeek V4.1 Flash 1017 keying, cost/time fills) so no dataset exists only as sheet cells.
- Retire
benchmark_resultsas a table — drop it or rebuild it as a view over the canonical store. - Retire the deprecated alias view
v_latest_workbook_batch(marked DEPRECATED 2026-11-02; usev_latest_import_batch). Consumers to migrate/audit first: the coding-plan-watch job (switched 2026-11-02),ainventory_append.py, the pm-aggregator AA collector/explorer (pm-aggregator /aa explorer data feed broken: Supabase query 403 after muse-dev2 migration #3294, AA explorer: dataset version switcher — browse older AA import batches, not just latest #3302 touch this surface). - Data hygiene inside the sheet mirror: duplicate variant keys for the same model+effort (Claude Haiku 5.5 and GPT-6.1 Sol each appear twice per effort —
|reasoning|and|yes|key forms); the twomodel_value_datasources (ids 42 + 43) — keep both for provenance, dedupe at read time or via the canonical store.
Other schemas:
- automation / engineering / finance / home / research all carry the same workbook-era
sheet_rows+ingest_batches+sourcesclone shape. Decide per domain: converge on the typedeventsshape their append helpers already write, or formally keep the mirror — no silent third state. -
agent.mirror_*tables: verify each mirror still has a live consumer; drop or document the ones nothing reads.
Constraints
- No history loss: merges preserve provenance (source ids, import batches, snapshot dates, estimated-vs-measured flags such as the Rankings
|estimatedrows). - No DROP before a consumer audit + readback verification of the replacement path (pm-aggregator collector, quota gatherer, coding-plan-watch, pool-intelligence all read this data).
- One schema/domain at a time, each step verified by readback before the next.
- Finish by updating
~/hatch-personal/workspace/supabase/ARCHITECTURE.mdso the documented shape matches reality.
Acceptance
- Exactly one canonical read path per dataset, named in ARCHITECTURE.md.
- No live job, view, or doc references
v_latest_workbook_batchor describes Drive workbooks as a data source. - v5 benchmark data is queryable from the canonical store (not only from sheet cells).
Related: #1248 (the event-log design this executes), #3142 (pm stack into Supabase — adjacent, not this), #3294 / #3302 (AA explorer consumers).
Activity
dezren39 commentedon Nov 3, 2026
🤖 Agent note · picked up + triage verdict: CONFIRMED, still live, routed (no schema changed)
muse-dev2(keihfchslgjetkmnmzra) read-only via the Management API on 2026-11-03;developing-today/codemaineef89b983The split-brain is real and the mirror is still winning. Measured state:
ainventory.sheet_rowsainventory.benchmark_resultsainventory.measurement_eventsmeasurement_eventsonly knowsAA@?,AA@4.3.2,CAI@1.4,CAI@1.5— AA Intelligence Index v5 exists nowhere but sheet cells, exactly the failure recorded in the body. The recentcoding-plan-watchbatches (2026-11-02) wrotemaintenance_log/plan_eventsonly, so the event log is dormant while the mirror keeps taking writes: the split is widening, not converging.Other scope items, checked:
v_latest_workbook_batchstill exists and itspg_get_viewdefis byte-identical tov_latest_import_batch(pure alias — retiring it is a rename, not a semantics change). No reference in this repo; live references are only theainventory_append.py:7docstring andARCHITECTURE.md:103.agent.mirror_*: 28 tables.sheet_rowsclone shape is present in automation, engineering, finance, home, research — five schemas, as the body says.#1248(the event-log design this executes) is still OPEN and blocked;#3294closed,#3302open (explorer version switcher, adjacent).Routing
repo-health-code-pilot, small_fix, risk high: production-data / drop-table / multi-step-migration) as the single execution task for this issue, carrying the issue's own constraints: canonical-store decision first, v5 backfill with readback,benchmark_resultsretirement, alias drop, mirror hygiene, per-schema verdicts, mirror audit,ARCHITECTURE.mdupdate — one step at a time, no DROP before consumer audit + readback.v_latest_import_batchuuid readback); (2) backfillmeasurement_eventsfrom the Rankings AA v5 / v4.3.2 sheet rows and readback the counts; (3)benchmark_results→ view over the canonical store; (4) duplicate variant-key + sources 42/43 read-time dedupe; (5) the five other schemas' verdicts; (6) the 28-mirror audit.dezren39 commentedon Nov 3, 2026
🤖 Agent note · parked
risk: highwith flagsproduction-data,drop-table,multi-step-migration: a muse-dev2 consolidation that needs a full 45-minute window and readback between steps. No database changes, source edits, branch, or worktree.benchmark_resultsretirement and thev_latest_workbook_batchdrop. Resolve the slice boundary before touching muse-dev2; do not treat it as a small alias-only change without checking.157 remaining items
dezren39 commentedon Nov 11, 2026
🤖 Agent note · picked up — executing tranche 2 (the recorded resume condition)
Merge pull request #8681 from developing-today/queue/14717-4401-aggre…
dezren39 commentedon Nov 11, 2026
🤖 Agent note · tranche 2 DONE — benchmark_results retired, #4401 complete (task 14717, lane any-c)
Aggregator migration (PR #8681, merged 0566f38):
pm-stack/aggregator/src/aa-batch-sql.ts: the AA payload'sconfigsandcaisections now read the canonicalainventory.measurement_events, scoped to the latestworkbook-importingest batch (the events' equivalent of the latest sheet import batch);speedTpsprojects fromoutput_tps. Configs keepbenchmark_version is null; cai keeps rows whoserawcarriesbenchmark_version. Comment references inaa.ts,model.ts,collect-fleet-feed.tsupdated.Consumer audit (recorded before the drop, per acceptance): repo-wide grep found the aggregator as the only live code reader of
benchmark_results; the other packet-named consumers (quota gatherer, coding-plan-watch, pool-intelligence) have no references; no Supabase views, functions, or matviews reference the table.Parity verification (live, pre-drop): full-row EXCEPT comparison of the old table's latest-batch rows vs the new query scope — configs 35/35, cai 27/27, zero differences in either direction. No history loss: every row the aggregator ever read is represented in
measurement_eventswith provenance (ingest batch, source_kind, raw).Drop + post-drop verification:
ainventory.benchmark_results(1,141 rows, frozen at the 2026-10-26 import) dropped; readback confirms it no longer exists. The full mergedaaPayloadSql(null)was then executed against the live database: configs 35, cai 27, rankings 283, thresholds 1144, prices 4, sources 4 — the complete AA section builds from the canonical store alone.Tests: aggregator
bun testfor aa-batches, aa-explorer-computations, aa-gate-2415/4169/5289 — 46 pass, 0 fail. (test/aa.test.tsfails pre-existing in this environment on clean main too — live-server port / package environment issues, unrelated.)Docs:
ARCHITECTURE.mdupdated —measurement_eventsremains the one canonical read path; thebenchmark_resultsretirement is recorded.All acceptance items on this issue are now met (tranche 1: canonical decision + AA v5 backfill, batch 21b09af3; tranche 2: this note). Closing.