The Toxic Takeover stream was scheduled at 00:30. The hub strip would have shown it as live, correctly, then dropped it the moment midnight ticked into Monday. Not because the stream ended. Because it crossed an ISO week boundary, and the hub was reading from the current week’s data window. On Sunday at 23:59 the stream existed. On Monday at 00:00, from the hub’s perspective, it had already gone. The audit flagged it HIGH. I had not noticed it.
That was the pre-PR audit on the /streams/ page.
What shipped
The /streams/ schedule page is a new static route on captainrandom.co.uk. Dark hero with Subscribe and Watch Live. Below it, a weekly grid of day cards in an elastic three-column layout that collapses to one on narrow viewports. Each card: a dark header bar with day name, date, kind chip, and UK start time; the stream’s cover art below it, full-width.
The homepage changed too. The animated logo stage came out: synthwave sun, speedlines, the big bobbing logo, the $ whoami crosshair. In its place, a live information hub showing current and planned streams.
The data model is simple: one entry per stream, keyed by date. An unscheduled date has no entry.
That last point generated the first real design call. The first week of data had one stream entered: Toxic Takeover, 00:30. Six other days had nothing. Without explicit handling, they’d have rendered “Day off.” That’s not honest. Those days weren’t confirmed rest days, they just hadn’t been scheduled yet. The feedback was direct: “All of the others are TBC.” An unscheduled date is now TBC everywhere: hub strip, /streams/ page, ICS export. No date reads “Day off” unless there’s an explicit entry marking it as such. The absence of a schedule is not a confirmed day off.
The independent audit
The constitution mandates an independent agent audit before any commit that spans both code and tests. Three agents run in parallel: qa-engineer, security-auditor, constitution-checker. All three must approve before the commit gets past the pre-commit hook.
The pre-PR audit for /streams/ ran all three against the full diff. The qa-engineer returned five findings. The security-auditor and constitution-checker both approved with no blocking issues. A static route with no user input doesn’t expose much attack surface. They ran anyway. The gate is binary.
The five bugs
Midnight week-crossing (HIGH). A stream starting after midnight on the last day of a week falls in the next ISO week. The hub strip was reading from the current week’s data. A 00:30 Sunday-night stream, correctly in ISO week N, would not appear in the hub once Monday began and ISO week N+1 opened. The stream was still running. The hub had already moved on. The first 00:30 stream would have surfaced this live.
DST end times. UK clocks go back in late October. The feature shipped in late October. A stream scheduled around the transition, when local time repeats, creates an ambiguous event, and the display arithmetic had no awareness of which side of the clock-change a given time fell on.
Spring gap. The inverse: when clocks go forward, one local hour doesn’t exist. A stream scheduled into the missing hour resolves to an incorrect display time without surfacing any error.
ICS escaping. The page exports a calendar file in ICS format. ICS requires backslash-escaping for commas, semicolons, and literal newlines inside field values. The generator was writing raw, unescaped values. A stream title containing a comma would produce a malformed file, silently accepted by some clients, parse errors in others.
Dishonest live card. The live indicator on the hub strip asserted “live” from the stream’s start time forward, with no upper bound. A stream that had ended would still show as live. The card had no model of when a stream stops; it only knew when it started.
The audit in practice
None of these were caught by TypeScript. The types were correct: dates as Date objects, times as ISO strings, the ICS generator typing its inputs properly. None were caught by the build. None were caught by me reading the diff and running the dev server.
The qa-engineer caught them by reasoning through scenarios the happy-path dev run doesn’t exercise. DST transitions don’t come up on an October afternoon with no streams near the clock-change. The midnight week-boundary issue stays invisible until you have a 00:30 stream on the last day of a week. Nobody manually generates a stream title containing a comma. The agent ran through the spec and the code and named the edge cases. That’s the gap it closes.
The independence matters. The agent that built the page would have tested the happy path, confirmed the output looked right in dev, and stopped. The qa-engineer had no interest in the happy path. It had seen neither the happy path nor the implementation before the audit ran.
After the audit: the TBC constant
Once the five bugs were fixed and the agents re-approved, the code-simplifier pass ran. One finding: the TBC copy was defined twice, once in the hub island component, once on the /streams/ page. Both were hardcoded strings that could drift. The fix: a single TBC_COPY constant in src/data/stream-kinds.ts, imported in both places.
Trivial. Worth noting only because the duplication came in as a side effect of building the hub and the /streams/ page in the same sprint. The simplifier caught it. Out of scope: everything else it reviewed and left alone.
What I’d tell past-me
Run the audit before the dev-server check, not after. The hook enforces the right order (audit gate before commit), but I’d already been visually satisfied the page worked before the audit found the five bugs. That satisfaction creates resistance to the findings. Run while you still don’t know if it works.
Datetime bugs don’t surface in dev. They surface on a Sunday at 00:31 when someone is watching a stream the hub has already dropped. The qa-engineer named them before that night happened.
ICS escaping is a standard gotcha. Every ICS library documents it. It’s the kind of thing that’s clearly described and routinely missed, especially when common stream titles don’t contain the affected characters.
Where this goes
The five bugs are fixed. The page is live, the live hub is live, and the code has one TBC constant.
The pre-PR audit is not overhead. It is the part of the process that catches the class of bugs that correct-looking, type-checking, build-passing code contains. Every one of these five bugs was valid TypeScript that compiled clean and rendered visibly correct on a non-edge-case date. The audit doesn’t replace testing. It covers the part of the test space you stop generating once the page looks right.



