Skip to content

impl(pm-stack): model data pipeline Phase 2 slices 0-1 — DB verification + live gatherer (#1248) #9999

Open

Description

@dezren39

Slices 0–1 (the claimable head) of the #1248 Phase 2 decomposition recorded by lane any-c (task 16642 park note, 2026-11-14). Phase 1 is complete (event tables + current views, backfill, parity 107/107 PASS, gatherer dry-run zero-write diff).

Slice 0 — DB verification (precondition): determine whether the Phase 1 event tables live in muse-dev or muse-dev2 today (#3294, CLOSED, records the muse-dev2 migration breaking the /aa feed). No write in any later slice precedes this answer; record the answer on #1248.
Slice 1 — Live gatherer: schedule the proven dry-run gatherer (AA + models.dev + provider catalogs) to run live — insert-only new observations, new-model detection, zero-write diff on no-change batches.

Design doc: ~/workspace/goals/supabase-muse-dev-platform-backups/files/aa-event-log-design-2026-10-26.md (fleet workspace). Slices 2–6 are filed separately per the decomposition; slice 6 is calendar-gated (one clean week of slices 1+4 live). Filed by queue worker lane code-c, task 16642.

Activity

  1. developing-today commented on Nov 14, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note — slice 0 ANSWERED: the Phase 1 event tables live in muse-dev2, and muse-dev no longer exists

    Verified 2026-11-16 (read-only, live Management API) — no writes made.

    • The Bitwarden management token's account lists exactly one Supabase project in the org:
      • muse-dev2 — ref keihfchslgjetkmnmzra, us-east-2, ACTIVE_HEALTHY, created 2026-10-30.
    • The legacy muse-dev project is gone (consistent with pm-dispatch: config.ts default SUPABASE_URL points at the deleted legacy muse-dev project #5120: the old default was deleted). There is no supabase.muse-dev.* secret left in Bitwarden, only the supabase.muse-dev2.* set.
    • Schema listing on muse-dev2 (via /v1/projects/keihfchslgjetkmnmzra/database/query) shows the complete Phase 1 event-log objects in schema ainventory:
    object kind est. rows
    ingest_batches table 10
    measurement_events table 1410
    price_events table 4
    provider_policies table 4
    models / sources / sheet_rows (workbook era, untouched) tables 102 / 28 / 79673
    v_current_measurements, v_current_prices, v_latest_import_batch, v_rankings, v_threshold_metrics views —

    Conclusion for slice 1: every write goes to muse-dev2 (keihfchslgjetkmnmzra). Nothing may target muse-dev — it does not exist.

    Found in the same pass (slice-1 blocker, recorded for the resume): the preserved dry-run gatherer (ainventory-import/gather_events.py, recovered from the workspace snapshot at commit 2bb0e8f) still hard-codes REF = "nltgxorqwxhgfzseiirt" — the deleted muse-dev project — and it fetches the service-role key from the pre-cutover supabase.service-role-key secret name. Before the gatherer can be taken live it must be repointed to keihfchslgjetkmnmzra / supabase.muse-dev2.service-role-key and flipped from dry-run to insert mode. That work is in progress under task 16876.

  3. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    🤖 Slice 1 progress — gatherer recovered and repointed to muse-dev2 (still dry-run, zero writes)

    • Recovered the preserved Phase 1 gatherer from the workspace snapshot (workspace/supabase/ainventory-import/gather_events.py @ 2bb0e8f; it had been deleted in a later snapshot).
    • Repointed it: REF nltgxorqwxhgfzseiirt (deleted muse-dev) → keihfchslgjetkmnmzra (muse-dev2); secrets supabase.service-role-key → supabase.muse-dev2.service-role-key; Bitwarden access token now honors BWS_ACCESS_TOKEN.
    • Dry run against live muse-dev2 (2026-11-16), zero rows written:
    metric value
    AA variants pulled 27
    AA measurement would-insert 19
    AA price would-insert 18
    models.dev price would-insert 73
    new models flagged 13

    New models include Qwen4 Max (alibaba, 2026-11-16), Muse Ember (meta, 2026-11-09), K2 Horizon 375B A23B (ifm), DeepSeek V4 Flash (models.dev), GLM-5.3-FlashX, Kimi K3.1 Pro Highspeed, Nemotron 3.5 Super VL.

    Remaining for this packet (slice 1): insert mode (one ingest_batches row per run, events only for the diff), a live batch actually landing insert-only, a no-change batch zero-write diff, and the schedule entry. Task 16876 is parked with this resume brief.

  4. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 16, 2026
  5. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note — parked with a resume brief (run-budget, not a blocker)

    • Task: 16876 (impl(pm-stack): model data pipeline Phase 2 slices 0-1 — DB verification + live gatherer (#1248) #9999, Phase 2 slices 0–1), lane code-g (openchamber scheduled lane), parked 2026-11-16T10:48Z for 30 min.
    • Done this shift (evidence in the two comments above):
      • Slice 0 ANSWERED — Phase 1 event tables live in muse-dev2 keihfchslgjetkmnmzra; legacy muse-dev is deleted.
      • Gatherer recovered, repointed to muse-dev2, dry-run passed against the live DB (19 AA measurements, 18 AA prices, 73 models.dev prices, 13 new models, zero writes).
    • Resume here: implement insert mode (one ingest_batches row per run; events only for the diff), run one live insert-only batch, demonstrate a no-change batch's zero-write diff, then add the schedule (register it in doc/fleet-schedule-registry.md).
    • Work area: /home/user/git/fleet/16876-9999-gatherer/ (gather_events.py + dry_runs/gather_diff_2026-11-16.json) on the laptop.
  6. added a commit that references this issue on Nov 16, 2026
  7. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    state: done — task 16876, lane code-a, 2026-11-16 (slices 0-1 complete)

    Slice 0 (prior lanes, verified): the Phase 1 event tables live in muse-dev2 (keihfchslgjetkmnmzra); legacy muse-dev is deleted. Gatherer recovered and repointed to muse-dev2.

    Slice 1 — insert mode taken live, with a bug found and fixed on the way:

    • The first three live batches (2bcfdff4, 8fb963a7, ec986695) reported measurement inserts that NEVER landed: AA returns output_tokens_per_task as a per-phase object ({reasoning, answer, output}) for some variants; the numeric column rejected the whole chunk (HTTP 400, 22P02), and rest_write swallowed HTTP errors, so the loss was silent. Price inserts in those batches DID land. Those batches' inserted_counts overstate measurement_events by 19/19/20 — the rows are not in the log.
    • Fixes in gather_events.py (working copy at ~/git/fleet/16876-9999-gatherer/): num_or_none coercion (breakdown's "output" total; full object preserved in raw), rest_write now raises on HTTP >= 400, per-context-band price comparison (the view returns one row per band; comparing base price against the top band re-inserted every tiered price), and the measurement diff now prefers the latest event in the log over the current-measurements view (the view reported a superseded October value for GPT-6 Astra while the log already held today's).
    • Verified live batch 4c3e9b0a: 20 measurement + 28 price rows inserted and read back by batch id, exactly matching.
    • Zero-write demonstration: a subsequent no-change live run produced batch=None, inserted 0/0, 20 AA measurements unchanged, 0 price diffs (live_runs/fix4-nochange/). The systemd-scheduled run repeated it: zero writes, Result=success.
    • Schedule: ainventory-gatherer.timer (daily 06:20 local, Persistent, user systemd on the laptop) enabled and verified by a manual service start; registered in doc/fleet-schedule-registry.md via PR docs(fleet): register ainventory-gatherer.timer in the schedule registry (#9999) #10735 (merged 4cbd08f).
    • New-model detection output: 12 models flagged in the latest diff (live_runs/scheduled/gather_diff_2026-11-16.json), including Qwen4 Max, Muse Ember, Kimi K3.1 Pro Highspeed, Nemotron 3.5 Super VL 120B A12B.
    • Disclosure: diagnosis left one probe row in measurement_events (model_name "probe", source_ref "probe", batch ec986695) — a single-row POST used to isolate the failure. DELETE was refused (append-only guard working as designed), so it stays, clearly labelled as a probe.
  8. removed their assignment
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    queue/parkedQueue task is parked (waiting on CI, time, or an event)status/parkedDeliberately paused with a recorded resume conditionstatus:in-reviewwork/assignedQueue worker lifecycle state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions