Build Log · July 26, 2026

Alloy: Quench Ticket 4 — the QuenchSnapshot server projection

Built the one authoritative read model Quench's future page rebuild (Ticket 5) will consume — Charge baseline, Execution state + authoritySnapshot, WorkspaceDelta, gate_check events, criteria + verification, and cracks, all assembled from existing, already-proven sources. Proved it works with a real script against a real Arc, not just tsc.

  • Alloy
  • Quench
  • Snapshot
  • Projection
new module (lib/quench-snapshot.ts)
1

new module (lib/quench-snapshot.ts)

existing sources assembled, zero reimplemented
5

existing sources assembled, zero reimplemented

real tests passing (2 pre-existing, unrelated)
339/341

real tests passing (2 pre-existing, unrelated)

Timeline

  1. Start

    Resumed the 6-ticket Quench plan at Ticket 4, per Zeb's 'go'

    Re-read the original ticket spec verbatim from the source retro rather than working from memory

  2. +15m

    Surveyed all 5 real source paths before writing anything

    WorkspaceDelta (lib/workspace-snapshot.ts), authoritySnapshot (executions table), gate_check events (never had a dedicated query, added an in-memory filter matching listCracksForArc's precedent), criteria+verification (Ticket 2), cracks (Ticket 3)

  3. +25m

    Resolved an open question: what does 'Charge baseline at the exact bound revision' actually require?

    Confirmed via grep that persistChargeDraft/saveCharge both refuse to write after chargeFinalizedAt is set — so a finalized Arc's live chargeRevision column IS the bound revision, no separate stored pointer needed. Named as a real, explicit assumption in the module's own header comment, not left implicit.

  4. +35m

    lib/quench-snapshot.ts built — one function, one exported type, matching orient-snapshot.ts's established convention

  5. +45m

    Real proof: scripts/prove-quench-snapshot.ts run against the bootstrap Arc (1dd55940...)

    Confirmed real Charge baseline, real Execution row with real authoritySnapshot, real WorkspaceDelta matching the 7 files independently confirmed via git diff --stat earlier this session, real gate_check events, empty criteria/cracks (both correctly empty — this Arc's Charge predates the criteria feature, no cracks have been recorded)

  6. End

    tsc clean, 339/341 tests passing (2 pre-existing unrelated)

What shipped

  • products/alloy/lib/quench-snapshot.ts — buildQuenchSnapshot(arcId), QuenchSnapshot/QuenchChargeBaseline/QuenchCriterion types. Assembles: Charge baseline (arc's own charge* columns), latest Execution row (state, authoritySnapshot, workspaceDelta — via existing getLatestExecution), gate_check events (new in-memory filter over listArcEvents, no new query needed), criteria + their verification status (Ticket 2's getCriterionVerifications), and cracks (Ticket 3's listCracksForArc)

  • products/alloy/scripts/prove-quench-snapshot.ts — real proof script, following the established prove-*.ts convention (11 other real proof scripts already exist in this directory), run directly against a live Arc to confirm the snapshot assembles real data, not just that it typechecks