WI-041 · Tracker Hardening · reseed-decouple

Decouple reseed from local builds + seed preserves HITL

done P1 medium risk   Owner: Claude   Reviewer: Paul   100% · 1/1 tasks complete

Gates: TH3 Requirements: REQ-TRACK-011 Updated: 2026-06-22

At a glance

CodeWI-041
PhaseTracker Hardening
Order76 of 93
Story points3
Primary surfacepackage.json + tracker-push.mjs + tracker-seed.mjs
Retires
Depends on
Blocks
Evidence
built in Tracker Hardening

Goals

Stop two foot-guns: a local rebuild silently writing the prod DB, and the SQL seed erasing live HITL state.

Implementation — what to build

Decouple

  • Move tracker-push out of docs:tracker into an explicit step the tracker Pages build / deploy runs; local regen stays offline.

Seed

  • Update tracker-seed.mjs on-conflict to NOT overwrite task status/waiting_on/notes (match tracker-push), or label the SQL bootstrap-only.

Acceptance

  • Local build writes nothing to Supabase; re-running the seed never erases live HITL state.

Checklist

  • TH3 Supabase reseed decoupled from local builds; SQL seed preserves live HITL state.

Gates & testing

  • TH3 Supabase reseed decoupled from local builds; SQL seed preserves live HITL state.
    CODE TEST

Requirements

  • REQ-TRACK-011 accepted The Supabase reseed must be decoupled from local builds and the SQL seed must preserve live HITL state.
    Done when: Local docs:tracker does not write the prod DB; the deploy path does; tracker-seed.mjs no longer overwrites HITL status/waiting_on/notes on conflict (or is marked bootstrap-only).
    Spec: docs/tracking/decision-log.md#d23 · docs/tracking/retrospectives/proposed-retro-tracker-foundation.html

Verify (done when)

local docs:tracker does not write prod; deploy reseeds; SQL seed preserves task status/waiting_on/notes (or marked bootstrap-only).

Cost triggers

No paid API / infra spend triggered by this item.

Status & editing

done   Sprint: Tracker Hardening

Edit status / sprint on the ★ Live Board → — changes are logged live with who / when / why.

Human-in-the-loop

No human tasks linked.

Findings

  • Confirmed: local docs:tracker prints "tracker-push: skipped (local build)".
  • Matches the REST push's preserve-live-state contract.

Concerns

  • Behavior change: a contributor who edits the git plan and runs `npm run docs:tracker` locally will NOT see Supabase update — the reseed now only runs on deploy (CF_PAGES) or `npm run tracker:push --force`. Documented in the handoff + MAINTENANCE, but it can surprise someone expecting the old behavior.

Risks

None recorded yet.

Tech debt

None recorded yet.

Tools used

  • Edit — apps/web/scripts/tracker-push.mjs (CF_PAGES/--force gate)
  • Edit — apps/web/scripts/tracker-seed.mjs (preserve live HITL on conflict)
  • Edit — apps/web/package.json (tracker:push --force)
  • Bash — verified a local docs:tracker skips the prod write

Files & artifacts

Update log

Update · 2026-06-19 · Reseed decoupled from local builds; seed preserves live HITL

tracker-push now writes Supabase only on a deploy (CF_PAGES) or when forced (npm run tracker:push) — a local docs:tracker no longer mutates prod. The SQL seed's on conflict no longer overwrites task status/waiting_on/notes, so re-running it can't erase review progress.

  • Confirmed: local docs:tracker prints "tracker-push: skipped (local build)".
  • Matches the REST push's preserve-live-state contract.