# 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.
>
> Innovation Chronicle #01 · 2026-12-03 · 6 min read · Harness Engineering & AI Factory
> Source: https://alohaos.ai/en/chronicle/harness-engineering-5x

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.

## Production Telemetry

- **Median CI time:** < 120 s (Real Postgres 16 in RAM · 2 parallel shards)
- **Bottlenecks removed:** 16 (0 loosened safety ratchets)
- **Throughput:** 5 PRs / 22 min (Full end-to-end verification on every iteration)
- **AX error standard:** 100% (Deterministic remediation contracts for agents)

## TL;DR

- I removed 16 artificial bottlenecks from my ALOHA OS CI/CD verification loop with 0 loosened quality ratchets.
- Safe shipping throughput rose 5× (5 distinct PRs merged in 22 minutes) while median full CI stayed under 120 seconds.
- Instead of faking the database with mocks, I run real Postgres 16 in RAM across 2 parallel shards.
- 100% of CI failures emit structured Agent Experience (AX) fix instructions, and code authors never grade their own homework.

## 01 · I 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.

- **Before:** Disk-bound I/O or brittle ORM mocks drifting from real SQL
- **After:** Real PG16 in RAM + 2 shards · full CI under 120s

> Test real database physics: accelerate the storage medium, never simplify semantics.

## 02 · I 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.

- **Before:** Vague failures forcing agents into multi-round trial and error
- **After:** 100% AX standard · explicit boundary and deterministic fix contract

> Clean modular boundaries compress context for both humans and AI agents.

## 03 · Code 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.

- **Before:** Tests mirroring the author’s own assumptions and blind spots
- **After:** 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.

## What this means for Aloha Fungi and ALOHA OS partners

- Storefront, checkout, and AI Shopping Concierge improvements ship in minutes instead of two-week sprint cycles.
- Every release passes real Postgres 16 verification, an independent test oracle, and edge canary rollout with < 5s rollback.
- Zero loosened safeguards: faster shipping cadence directly increases system determinism.

> „Speed without ratchets creates technical debt. Ratchets without speed create paralysis. Harness Engineering 5× gives me both at 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.

---

Author: Mateusz Rosa (Founder & Architect · ALOHA OS / Aloha Fungi)
Contact: matt@alohaos.ai · https://alohaos.ai
