Harness Engineering 5×: CI < 120s on PG16 in RAM & 5 PRs in 22 min
How I removed 16 artificial bottlenecks from my ALOHA OS software factory without loosening a single quality check, speeding up shipping fivefold.
When people hear I shipped five distinct production changes in 22 minutes, they assume I skipped testing. Inside ALOHA OS I enforced the exact opposite rule. In AI-driven ecommerce, you do not win by generating more lines of code · you win by verifying every change fast and deterministically.
Think of it like quality inspection on a factory floor. If inspection takes two hours, every robot stalls. The lazy shortcut is skipping checks. Instead, I traced the entire path from an AI worker’s task to merge and found 16 artificial bottlenecks wasting time without adding safety.
The biggest three were disk-bound test databases instead of RAM, vague error messages forcing agents into trial-and-error loops, and tests written inside the same blind spot as the implementation. Removing all 16 delivered a 5× speedup while keeping every checkout and data ratchet locked tight.
- 01I removed 16 artificial bottlenecks from my ALOHA OS CI/CD verification loop with 0 loosened quality ratchets.
- 02Safe shipping throughput rose 5× (5 distinct PRs merged in 22 minutes) while median full CI stayed under 120 seconds.
- 03Instead of faking the database with mocks, I run real Postgres 16 in RAM across 2 parallel shards.
- 04100% of CI failures emit structured Agent Experience (AX) fix instructions, and code authors never grade their own homework.
The difference between unchecked AI coding and my Harness Engineering loop
Zero skipped checks · I sped up storage (RAM), structured error contracts, and separated authors from test oracles.
Mock DBs miss SQL bugs while disk-bound DBs burn minutes per run.
Agent cannot see which invariant broke, burning 4 trial-and-error rounds.
Same context writes implementation and tests mirroring the same blind spots.
Exact production engine running in RAM across 2 balanced shards.
Explicit failure contract: what broke, where, and exact exit criteria.
Black-box suites and fast-check fuzzers verify domain invariants externally.
#01I run real Postgres 16 in RAM instead of faking the database
Database mocks feel fast while letting the most dangerous checkout and order bugs slip through.
Instead of faking persistence, I run full Postgres 16 on in-memory tmpfs split across 2 balanced shards. Every migration, row lock, and order transaction runs on the exact engine powering Aloha Fungi while keeping full CI under 120 seconds.
Disk-bound I/O or brittle ORM mocks drifting from real SQL
Real PG16 in RAM + 2 shards · full CI under 120s
„Test real database physics: accelerate the storage medium, never simplify semantics.”
#02I write error messages so AI agents fix them on the first pass
David Parnas’s 1972 modularity principle turned out to be a direct multiplier for AI agent reliability.
When module boundaries stay crisp and every test failure emits a structured contract (what broke, which surface, exact expected exit condition), my agents stop guessing from noisy stack traces. Reaching 100% AX error coverage lets workers close fixes on the first pass.
Vague failures forcing agents into multi-round trial and error
100% AX standard · explicit boundary and deterministic fix contract
„Clean modular boundaries compress context for both humans and AI agents.”
#03Code authors never grade their own homework (black-box & fast-check)
The same actor writing an implementation shares the exact same blind spots when writing tests · so I separated the roles.
Inside my ALOHA OS factory, implementation authors are strictly separated from verification oracles. Cart math, discount stacking, rounding, and AI Shopping Concierge rules are hammered with external black-box tests and randomized fast-check generators before touching a single live buyer.
Tests mirroring the author’s own assumptions and blind spots
Independent black-box oracle + fast-check invariant generators
„Verify business invariants from the outside. Never ask the author to grade their own homework.”
Pros and cons of building a Harness Engineering setup
Why this investment pays me back daily
- I ship storefront upgrades in minutes instead of waiting on two-week agency sprints.
- I can run parallel AI agents confidently because real Postgres 16 catches mistakes before merge.
- Every guardrail added to the harness protects my store permanently.
When this is overkill
- If you edit a template store once a month, building a full CI harness is overkill.
- Initial setup of in-RAM Postgres and AX error contracts takes upfront engineering discipline.
- No shortcuts: if a gate catches a cent-level edge case, shipping waits until root cause is fixed.
„Speed without ratchets creates technical debt. Ratchets without speed create paralysis. Harness Engineering 5× gives me both at once.”
What this means for Aloha Fungi and ALOHA OS partners
- 01Storefront, checkout, and AI Shopping Concierge improvements ship in minutes instead of two-week sprint cycles.
- 02Every release passes real Postgres 16 verification, an independent test oracle, and edge canary rollout with < 5s rollback.
- 03Zero loosened safeguards: faster shipping cadence directly increases system determinism.
Key terms in this dispatch
Full glossary ↗- Harness EngineeringAI Factory
The automated testing, contract, and safety framework around AI coding agents so they can ship fast without breaking live checkout.
- Closed-Loop CI (Adaptive Verification Loop)AI Factory
An automated test verification system that measures its own load, catches slowdowns and flaky tests, and shapes queues so AI agents never stall.
- Single-Tenant Postgres (1 Brand = 1 DB)Architecture
Each brand owns its own completely isolated Postgres database and open codebase instead of sharing a closed multi-tenant SaaS box.
- Checkout Idempotency (ACID)Reliability
A transactional guarantee that even if a shopper taps Pay twice or a payment gateway retries a webhook, the order commits strictly once.
Questions & answers
- How is Harness Engineering different from standard AI code generation?
- Unchecked AI code generation pushes regressions into production. Harness Engineering is my deterministic safety layer around agents: real Postgres 16 in CI, structured AX error contracts, independent test oracles, and hard ratchets agents cannot bypass.
- Why do I run real Postgres 16 in RAM instead of mocks in CI?
- Mocks miss row locks, SQL constraints, and transactional checkout bugs. Real Postgres 16 in RAM keeps exact production semantics while holding full CI under 120 seconds.
- What does “Code Author ≠ Oracle Author” mean in practice?
- The agent writing code is never the sole author of its verification suite. Public contracts are tested externally via black-box suites and randomized fast-check generators before merge.