autocode

← Slotbook experiment

Milestone 1 — public booking flow

Process

Acceptance tests higher is better
CC-Opus4.8-i1 7/7 CC-Opus4.8-i2 7/7 6/7 before one fix-it CX-5.6-i1 7/7 CX-5.6-i2 7/7 6/7 before one fix-it
Wall-clock (minutes) lower is better
CC-Opus4.8-i1 10.5 CC-Opus4.8-i2 22.8 CX-5.6-i1 10.2 CX-5.6-i2 14.9
Turns context
CC-Opus4.8-i1 67 CC-Opus4.8-i2 131 CX-5.6-i1 n/a CX-5.6-i2 n/a
Output tokens lower is better
CC-Opus4.8-i1 45.7K CC-Opus4.8-i2 68.8K CX-5.6-i1 25.6K CX-5.6-i2 66.6K
Input tokens context
CC-Opus4.8-i1 3.97M CC-Opus4.8-i2 9.72M CX-5.6-i1 1.48M CX-5.6-i2 3.76M
Actions context
CC-Opus4.8-i1 65 CC-Opus4.8-i2 128 CX-5.6-i1 27 CX-5.6-i2 40
Diff size (lines added) context
CC-Opus4.8-i1 +3,328 CC-Opus4.8-i2 +2,764 CX-5.6-i1 +2,281 CX-5.6-i2 +3,174
Self-verification
CC-Opus4.8-i1 browser click-testing, API probes, concurrency test, build CC-Opus4.8-i2 browser click-testing, typecheck, build CX-5.6-i1 API probes, concurrency test, typecheck, build CX-5.6-i2 API probes, browser checks (MCP), typecheck, build
Committed work
CC-Opus4.8-i1 yes CC-Opus4.8-i2 yes (milestone and fix-it) CX-5.6-i1 no CX-5.6-i2 no
Code at this milestone
CC-Opus4.8-i1 m1 · diff CC-Opus4.8-i2 m1 · diff CX-5.6-i1 m1 · diff CX-5.6-i2 m1 · diff

Task checks

Booking flow works end to end (browse → pick slot → book → confirmation)
CC-Opus4.8-i1 CC-Opus4.8-i2 CX-5.6-i1 CX-5.6-i2
Slots respect availability, duration grid, and minimum notice
CC-Opus4.8-i1 CC-Opus4.8-i2 CX-5.6-i1 CX-5.6-i2
Booked slots are no longer offered
CC-Opus4.8-i1 CC-Opus4.8-i2 CX-5.6-i1 CX-5.6-i2
Booking a just-taken slot gives a clean error, not a double booking or crash
CC-Opus4.8-i1 CC-Opus4.8-i2 1 fix-it CX-5.6-i1 CX-5.6-i2 1 fix-it
Host wall-clock times stay correct across a DST transition
CC-Opus4.8-i1 CC-Opus4.8-i2 CX-5.6-i1 CX-5.6-i2
No slots offered outside availability (weekends)
CC-Opus4.8-i1 CC-Opus4.8-i2 CX-5.6-i1 CX-5.6-i2
10 concurrent requests for one slot: exactly one succeeds
CC-Opus4.8-i1 CC-Opus4.8-i2 CX-5.6-i1 CX-5.6-i2

Code metrics

Source lines context
CC-Opus4.8-i1 1,552 20 files CC-Opus4.8-i2 1,145 20 files CX-5.6-i1 736 15 files CX-5.6-i2 1,163 18 files
Own tests context
CC-Opus4.8-i1 0 CC-Opus4.8-i2 0 CX-5.6-i1 0 CX-5.6-i2 0
Most complex function lower is better
CC-Opus4.8-i1 44 CC-Opus4.8-i2 24 CX-5.6-i1 19 CX-5.6-i2 21
Functions over complexity 15 lower is better
CC-Opus4.8-i1 1 CC-Opus4.8-i2 1 CX-5.6-i1 1 CX-5.6-i2 1
Unused exports lower is better
CC-Opus4.8-i1 15 CC-Opus4.8-i2 9 CX-5.6-i1 6 CX-5.6-i2 4
Orphan modules lower is better
CC-Opus4.8-i1 4 CC-Opus4.8-i2 1 CX-5.6-i1 3 CX-5.6-i2 4
Circular dependencies lower is better
CC-Opus4.8-i1 0 CC-Opus4.8-i2 0 CX-5.6-i1 0 CX-5.6-i2 0
Escape hatches lower is better
CC-Opus4.8-i1 0 CC-Opus4.8-i2 1 CX-5.6-i1 2 CX-5.6-i2 0
Bug-prone lint findings lower is better
CC-Opus4.8-i1 0 CC-Opus4.8-i2 1 exhaustive-deps CX-5.6-i1 1 CX-5.6-i2 0
Type coverage (%) higher is better
CC-Opus4.8-i1 99.4% CC-Opus4.8-i2 99.0% CX-5.6-i1 99.4% CX-5.6-i2 99.3%
Duplication (%) lower is better
CC-Opus4.8-i1 0% CC-Opus4.8-i2 0% CX-5.6-i1 0% CX-5.6-i2 0.6%

Review

One card per registered criterion; cells are descriptive, not scores. Full text with citations: light review · i2 addendum.

Domain core
CC-Opus4.8-i1 pure computeSlots with injected clock — no IO or framework; but one cognitive-complexity-44 function doing windows, caps, buffers and conflicts. CC-Opus4.8-i2 pure generateSlots with injected clock — same shape as i1, computation kept separate from persistence. CX-5.6-i1 slot engine in lib/slots.ts; daily-cap count recomputed per candidate slot (mild inefficiency). CX-5.6-i2 listAvailableSlots mixes Date/Temporal/ISO strings and runs its SQL inline — computation coupled to persistence.
Time & DST
CC-Opus4.8-i1 hand-rolled Intl core: spring-forward-skipped times detected and dropped, fall-back ambiguity documented. CC-Opus4.8-i2 Luxon, with host-local anchoring documented — dropped i1's hand-rolled core. CX-5.6-i1 luxon throughout; invalid spring-forward window starts skipped. CX-5.6-i2 Temporal polyfill — a library flip from i1's luxon.
Double-booking guard
CC-Opus4.8-i1 partial unique index on (host, start) arbitrates the race; violation mapped to a clean 409. CC-Opus4.8-i2 same design as i1: partial unique index, 23505 → 409, app-level re-check as UX only. CX-5.6-i1 per-host advisory transaction lock with the availability re-check inside the lock. CX-5.6-i2 same design as i1 — and the re-check runs the full buffer-widened overlap logic.
Guard's known gap
CC-Opus4.8-i1 the index arbitrates identical starts only; overlapping-but-different starts fall back to an app-level pre-check. CC-Opus4.8-i2 same gap as i1: overlap protection is same-start-only. CX-5.6-i1 no DB constraint behind the lock — a write path that skips it reintroduces the race silently. CX-5.6-i2 same gap as i1: the lock is a convention, not an invariant.
Boundary validation
CC-Opus4.8-i1 CC-Opus4.8-i2 CX-5.6-i1 zod .strict() schema, exact instant-format regex, length caps — this strictness exposed a harness bug at scoring. CX-5.6-i2 round-trip YYYY-MM-DDTHH:MM:SSZ instant check — i1's posture, different mechanism.
Infra-failure handling
CC-Opus4.8-i1 email failure isolated by design — cannot fail a confirmed booking (documented rationale). CC-Opus4.8-i2 email awaited post-commit inside the try block — a mail failure 500s a booking that persisted. CX-5.6-i1 catch-all maps any failure, including a DB outage, to 409 slot_unavailable. CX-5.6-i2 i1's catch-all fixed (unknown errors → 500) — but unknown host/event still returns 409, so a bad URL reads as “slot taken”.
Committed tests
CC-Opus4.8-i1 none (verified in-session, then discarded). CC-Opus4.8-i2 none. CX-5.6-i1 none (verified in-session, then discarded). CX-5.6-i2 none.