Lesson 183: Post-Tabletop Deficiency CSV Export to Sprint Hardening Feed (2026)

Direct answer: Lesson 173 built the trend board and sprint hardening budget tables. Lesson 183 adds the CSV export lane so the scribe closes a tabletop, runs one command, and drops deficiency_export_YYYYMMDD.csv into release-evidence/05-operations/ for Friday Block 6 to ingest in fifteen minutes—not a manual copy-paste from SQL client to spreadsheet.

Lesson hero for post-tabletop deficiency CSV export to sprint hardening feed

Why this matters now (2026 H2 governance velocity)

2026 H2 roguelite-style live-ops cadence hit governance teams too:

  • Two mock audits per cert window × six overlapping windows = dozens of deficiency rows per quarter.
  • Lesson 182 finally produces scored mock_audit_log rows with attendance_id proof.
  • Lesson 173 Block 6 asks whether sprint work matched allocator weights—but teams still hand-copy SQL results Friday morning.
  • Partner readbacks in Q4 2026 ask for export artifacts with SHA-256, not screenshots of pgAdmin.

Machine-readable export is the missing gear between scribe close and sprint steering.

Lesson objectives

You will implement:

  • deficiency_export_run job metadata table
  • CSV schema aligned to deficiency_event view (Lesson 173)
  • sprint_hardening_feed staging table for Block 6 ingest
  • Fifteen-minute scribe-close procedure
  • Variance gate vs sprint_hardening_budget
  • Export SHA-256 in BUILD_RECEIPT.json

Prerequisites

  • Lesson 172 — deficiency tickets and failure_mode_tag allow-list
  • Lesson 173deficiency_event view + sprint_hardening_budget
  • Lesson 182 — scored logs only (export filters status = 'scored')

CSV schema (deficiency_export_v1)

Required columns (header row exact match):

export_schema_version,mock_audit_log_id,cert_window_id,rehearsal_dt_utc,rubric_dimension,failure_mode_tag,severity,sla_tier,board_category,weight_points,source_lesson_id
1.0.0,log-8f2c,q1_2027_meta,2027-01-08T15:30:00Z,3,footer_schema_drift,high,T-3,hot,3.0,165

Rules:

  • failure_mode_tag must match Lesson 172 allow-list (no free text).
  • board_category from Lesson 173 CASE (structural-red, hot, etc.).
  • weight_points precomputed from allocator weights for ingest sanity check.
  • source_lesson_id maps dimension → lesson column (167, 170, …).

sprint_hardening_feed staging table

CREATE TABLE sprint_hardening_feed (
  feed_id           UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  export_run_id     UUID NOT NULL,
  mock_audit_log_id TEXT NOT NULL,
  rubric_dimension  INT NOT NULL,
  failure_mode_tag  TEXT NOT NULL,
  board_category    TEXT NOT NULL,
  weight_points     NUMERIC(4,1) NOT NULL,
  source_lesson_id  TEXT NOT NULL,
  ingested_at_utc   TIMESTAMPTZ,
  ingest_status     TEXT NOT NULL DEFAULT 'pending'
    CHECK (ingest_status IN ('pending','applied','rejected'))
);

Ingest job (Friday Block 6):

  1. Load latest CSV by export_run_id.
  2. Upsert into sprint_hardening_feed.
  3. Recompute sprint_hardening_budget percentages from board_category weights.
  4. Fail if sum ≠ 100 or new structural-red without variance_note.

Export job sketch

def export_deficiencies(mock_audit_log_id: str) -> Path:
    rows = query("""
      SELECT * FROM deficiency_event
      WHERE mock_audit_log_id = %s
        AND log_status = 'scored'
    """, [mock_audit_log_id])
    path = evidence_dir / f"deficiency_export_{utc_date()}.csv"
    write_csv(path, rows, schema="deficiency_export_v1")
    sha = sha256_file(path)
    insert_deficiency_export_run(mock_audit_log_id, path, sha)
    extend_build_receipt(sha)
    return path

Run within 15 minutes of scribe marking tabletop scored.

Scribe-close procedure (fifteen minutes)

Minute Action
0–3 Confirm mock_audit_log.status = 'scored'
3–8 Run export script
8–10 Verify row count matches ticket count
10–12 Paste SHA-256 into Slack #governance
12–15 Upload CSV to release-evidence/05-operations/deficiency-exports/

Block 6 ingest variance gate

Compare feed totals to sprint_hardening_budget:

  • If any dimension differs by > 25% from budget row → require sprint_hardening_budget_variance_note.
  • If new structural-red appears → escalate per Lesson 173 carve-out rules.

Common mistakes

  • Exporting draft logs (pollutes histogram).
  • CSV headers renamed for “readability” (breaks ingest).
  • Free-text failure_mode_tag in export (fails allow-list CHECK downstream).
  • Skipping SHA-256 on receipt (partner cannot reproduce).
  • Running export Monday for Friday tabletop (stale sprint steering).

Troubleshooting

Symptom Fix
Zero rows exported Log still draft — complete Lesson 182 scoring step
Ingest rejects CSV Schema version mismatch — bump export_schema_version minor
Weights don't sum Re-run Lesson 173 allocator normalization
Duplicate export_run Idempotent key on mock_audit_log_id

Verification checklist

  • [ ] CSV validates against deficiency_export_v1 header contract
  • [ ] Only scored logs exported
  • [ ] sprint_hardening_feed ingest marks applied
  • [ ] Block 6 yes/no metric answerable same day
  • [ ] SHA-256 on BUILD_RECEIPT.json

Mini exercise (20 minutes)

  1. Use a sample mock_audit_log_id from Lesson 182 exercise.
  2. Draft five CSV rows with two hot and one structural-red.
  3. Write expected sprint_hardening_budget delta after ingest.
  4. Note one variance_note sentence if engineering spent week on wrong lesson.

Continuity

FAQ

Can we export JSON instead of CSV?
Yes for internal tools; Block 6 ingest in this lesson standardizes on CSV for spreadsheet review. Ship both if needed with same SHA-256.

Who owns ingest?
Governance owner on Fridays; scribe only exports.

Does export replace trend board refresh?
No. Nightly deficiency_recurrence_12w refresh still runs; feed updates sprint allocation only.


Spreadsheet copy is where governance dies in 2026. Export deficiencies while the tabletop is still fresh, ingest before Block 6, and let Lesson 173 steer the sprint with numbers—not memory.