Sanderson Group · Sales Reporting — Remediation

The Whole Program

Six phases from "we can't prove what we shipped" to "provable by construction". Each phase is planned in detail only when the previous phase's real results exist — the plan refuses to pretend it knows the future.

live from the task ledger · HEAD e2acd75 · 152 commits on remediation/phase-0

P0
P1
P2
P3
P4
P5

Program position: Phase 0, 50% by task count. Later phases show 0% because their tasks don't exist yet — they are minted at each replan gate from real receipts (the ratified plan: "exact leaf tasks after Phase 0 would be fiction"). This rail is also the program-level critical path — phases are strictly sequential by design, each gated by the previous phase's receipts. For the live task-level critical path inside Phase 0, see Build Progress →

The fact that matters most: weekly reports come back at the end of Phase 0 — when the harness proves the held 16a report and Adam signs the two reserved decisions — not at the end of all six phases. Phases 1–5 harden the system while production runs.
P0

Artifact truth & the rulers

● ACTIVE — 50% (15/30 tasks)

control plane 4/4 · investigation spikes 6/6 · verification harness 3/6 · release manifest 0/1 · product fixes 0/6 · enforcement gate 0/1 · history census 0/1 · Phase-1 replan 0/1 · 16a re-accept 0/1 · phase exit 0/1

Make 'done' and 'delivered' PROVABLE. Until now the system could produce a good report but couldn't prove the file a human checked is the file that ships. This phase builds the measuring instruments everything later is judged by.

What it fixes

The false-acceptance family (the #1 finding): checked-file ≠ delivered-file; unprovable completion; forgeable sign-offs.

The work

The control plane (task ledger, receipts, un-forgeable authority) → six read-only investigations → the verification harness (HAR) → a release manifest (MAN) → the worst product-precision fixes (VRT) → enforcement gate + history census → the Phase-1 replan → Adam's two decisions.

Exit test

GATE-001 proves every criterion; Adam signs D-16A (re-accept the held 16a report) and D-P0-EXIT.

What you get

WEEKLY REPORTS RESUME — the production pause lifts at Phase-0 exit, not at the end of the program.

Live task board (summary)

control plane 4/4 · investigation spikes 6/6 · verification harness 3/6 · release manifest 0/1 · product fixes 0/6 · enforcement gate 0/1 · history census 0/1 · Phase-1 replan 0/1 · 16a re-accept 0/1 · phase exit 0/1

Full live detail — critical path, work journal, tap-through task cards: Build Progress →

replan gate RPL-001 — the next phase is planned from THIS phase's real results, not from guesses
P1

Durable safety

PLANNED — tasks minted at its replan gate

Stop the system from ever silently destroying or losing data. Today a crash mid-write, a deleted email, or an expired sync token can quietly corrupt what's stored.

What it fixes

Tombstones/410 recovery, crash-safe database writes (the six D1-incompatible transactions get their proven batch/CAS redesigns), retention/versioning, a protected census & repair of history.

The work

Exact tasks are minted by RPL-001 using Phase-0's receipts — 7 owner tasks for orphaned wrong-tests are already drafted, and the D1 redesign proof (SPK-010) feeds straight in.

Exit test

All charter Phase-1 criteria; Adam receipt required before any protected migration/repair runs.

What you get

The stored record becomes trustworthy under failure — the foundation identity work needs.

What's already known about this phase's work
  • 7 wrong-test fixes already banked for this phase's gate (TI-010, TI-011, TI-012, TI-013, TI-014, TI-015, TI-016)
  • 7 owner tasks pre-drafted for those fixes (DRAFT — ratified only at RPL-001), each with its evidence citation and deletion gate
  • 4 of the 6 crash-unsafe database transactions get their proven batch/CAS redesigns here (the other 2 belong to the person lane → Phase 2)
  • SPK-010's native-D1 proof feeds straight in as the redesigns' evidence base

Task IDs for this phase do not exist yet — they are minted at its replan gate from real receipts. Everything above is banked input, not a promise.

replan gate RPL-002 — the next phase is planned from THIS phase's real results, not from guesses
P2

Typed authorities & the person lane

PLANNED — tasks minted at its replan gate

Replace 'the code guesses from strings' with typed business truths, one vertical at a time. This is where the frozen person-identity work (the two-Susan-Joneses / wrong-Brian class of bug) comes back to life as a first-class typed authority.

What it fixes

String-driven status/stage/money/week parsing; person identity & collision handling; movement/loss fact transport.

The work

CRM status is deliberately first (smallest, well-understood). Each vertical dual-runs new logic beside old, switches one caller, deletes the old parser, and dispositions its history — no big-bang rewrite.

Exit test

Every vertical proven equivalent-or-better, old parsers deleted, history dispositioned.

What you get

Buyer identity becomes provable — the root cause of the report's precision bugs is gone.

What's already known about this phase's work
  • 4 wrong-test fixes already banked for this phase's gate (TI-017, TI-018, TI-019, TI-027)
  • Verticals, one at a time: CRM status first, then activity/tag/error, business week, person identity & collision (the frozen lane resumes here as a typed authority), Money/stage/Unit, movement/loss transport
  • Each vertical dual-runs beside the old code, switches one caller, then deletes the old parser — no big-bang rewrite
  • The 2 person-lane database transactions get their redesigns here

Task IDs for this phase do not exist yet — they are minted at its replan gate from real receipts. Everything above is banked input, not a promise.

replan gate RPL-003 — the next phase is planned from THIS phase's real results, not from guesses
P3

One report core

PLANNED — tasks minted at its replan gate

Today there are FOUR different ways a weekly report can be produced (fresh, offline replay, editorial, acceptance) that can silently disagree. This phase collapses them into one pipeline with one pure renderer.

What it fixes

The four-path render fork — the root that made false acceptance possible in the first place.

The work

One assemble/enrich service; one final-view pipeline; a pure renderer; DOM-equality proof; then DELETE the forks.

Exit test

Canonical document parity (or typed 'unavailable'), DOM equality, old paths deleted.

What you get

What you review is provably what everyone gets, by construction.

What's already known about this phase's work
  • Collapse the four report paths (fresh / offline / editorial / accept) into one assemble-enrich service + one pure renderer
  • Input already in hand: the complete 21-entrypoint caller inventory (mapped by spike SPK-006)
  • Exit is DOM-equality proof, then the old paths are DELETED

Task IDs for this phase do not exist yet — they are minted at its replan gate from real receipts. Everything above is banked input, not a promise.

replan gate RPL-004 — the next phase is planned from THIS phase's real results, not from guesses
P4

LLM trust boundary

PLANNED — tasks minted at its replan gate

Treat AI output like untrusted input from the internet. Every claim the AI writes into a report must carry a verified quote from real evidence; failures become visible quarantine, never silence.

What it fixes

Hostile-input framing, atom/receipt verification, visible retry/quarantine, cost budgets, subject-scoped tools.

The work

Exact request envelope + source/ownership verifier first; recorded replay for regression; live model calls separately authorized.

Exit test

Charter hard gates green on recorded replay.

What you get

AI-written content becomes auditable evidence, not prose to take on faith.

What's already known about this phase's work
  • 5 wrong-test fixes already banked for this phase's gate (TI-001, TI-006, TI-007, TI-008, TI-009)
  • Treat AI output as untrusted: exact request envelope, source/ownership verifier, quote-verified atoms
  • Failures become visible quarantine — never silence; cost budgets; subject-scoped tools; recorded replay for regression

Task IDs for this phase do not exist yet — they are minted at its replan gate from real receipts. Everything above is banked input, not a promise.

replan gate RPL-005 — the next phase is planned from THIS phase's real results, not from guesses
P5

Decompose & enforce

PLANNED — tasks minted at its replan gate

Pay down the structural debt so the system stays healthy: split the god modules, delete superseded code, and turn the engineering rules into mechanical gates that fail the build when violated.

What it fixes

Dependency law, the 500-line module gate, zero anonymous exceptions, superseded surfaces deleted.

The work

Dependency/size baseline once the real seams exist; split by use-case; shrink the exception list to zero.

Exit test

All rulers green; every earlier phase's receipts still green.

What you get

The codebase future agents inherit is one they can't quietly rot.

What's already known about this phase's work
  • Split the god modules by use-case; delete superseded surfaces
  • Turn the rules into mechanical gates: dependency law, the 500-line module limit, zero anonymous exceptions
  • Exit: all rulers green, every earlier phase's receipts still green

Task IDs for this phase do not exist yet — they are minted at its replan gate from real receipts. Everything above is banked input, not a promise.

The two decisions reserved for Adam (this phase)
D-16A — after the replan & history census: approve re-accepting the held 2026-07-16a weekly report, judged on its dry-run manifest / lineage / reality / reader-view evidence.
D-P0-EXIT — approve Phase-0 exit and lift the weekly-production pause, once GATE-001 proves every criterion.
Where the detail lives
Phase descriptions are grounded in the ratified implementation plan (§8 "Later phases and mandatory replan gates") and the remediation charter — not summarised from memory. Phase-0 numbers regenerate live from remediation/task-ledger.json.
Wondering what codes like TI-010 or TR-P1-2 mean? See "How to read the codes" on Build Progress.
↻ Last updated 2026-07-18 13:58 GMT+8