<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-t1gaekqu4" -->

---
title: 108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI...
description: A team of 3 developers using local AI agents in IDEs/CLIs built a GDPR-compliant consultation registry for an autism helpline foundation during a 6-hour...
canonical: https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-t1gaekqu4
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI Agents from Breaking One Repo | daily.dev
og:description: A team of 3 developers using local AI agents in IDEs/CLIs built a GDPR-compliant consultation registry for an autism helpline foundation during a 6-hour...
og:url: https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-t1gaekqu4
og:image: https://api.daily.dev/og/posts/t1gaeKqU4.png
og:image:alt: 108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI Agents from Breaking One Repo
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI Agents from Breaking One Repo

**[Jakub Czechowski](https://daily.dev/sources/fhtovhcva5jqrn5bev7kl)** · [@jakubczechowski](https://daily.dev/jakubczechowski) · 3 min read · 1 upvotes · 0 comments

## Summary

A team of 3 developers using local AI agents in IDEs/CLIs built a GDPR-compliant consultation registry for an autism helpline foundation during a 6-hour hackathon, reaching 108 passing Vitest tests across 15 files by the end. Key practices credited for keeping the fast-paced, AI-assisted work reliable include treating the test suite as a hard merge gate (agents could not push without a green run), using deterministic logic instead of AI guesswork for search and fuzzy matching (with ambiguous cases routed to human review), and dividing labor so AI generated boilerplate and tests while humans set privacy constraints and did manual QA. The prototype used localStorage and BroadcastChannel rather than a real database, so it doesn't prove production readiness.

## Content

An AI agent under time pressure produces a fragile prototype by default. Give it fifteen minutes, and it generates a slick UI that renders cards, handles a click, and falls over on the first surname with diacritics or the first malformed date.

During a recent 6-hour hackathon, our team built a consultation registry for a nationwide autism helpline foundation (handling ~4,000 cases/year under GDPR Article 9, previously managed in a single shared Excel file).

The setup: **3 developers using local AI agents in IDEs/CLIs, 1 manual QA tester, and a single shared **`main`** branch.**

By 16:03, the repo had **67 commits, 16 merges, and 108 passing Vitest tests across 15 files**, running in ~0.5 seconds.

Here is what actually made that pace reliable:

### 1. The 11:25 Pivot (Zero Regret Code Deletion)

One hour in, we agreed to switch challenges. At 11:25, a commit wiped the repo clean (`chore: remove all repository files`), deleting 51 minutes of a working booking system. Agent speed makes dropping throwaway code cheap. It does nothing for the reliability of what you build next.

### 2. The Test Suite as a Hard Merge Gate

Between 11:50 and 12:40, 3 developers pushed UI and business logic directly to `main`. Merges were constant friction over shifting TypeScript types.

At 12:40, the first test suite landed—starting with the highest-risk artifact: GDPR-compliant anonymized exports. At 13:36, 7 more test files were added.

From that point, the merge prompt to local agents became mechanical: _adapt branch to latest _`main`_, resolve diffs, run _`npm test`_, do not push unless green._ The 0.5s Vitest suite acted as an unskippable gate the agent couldn't talk its way past.

### 3. Strict Determinism Over AI Guesswork

- **Search:** Substring containment on normalized text (handling Polish diacritics and stripped spacing) instead of fuzzy scoring. If multiple people match, the UI shows disambiguation cards for the human to pick. The system never guesses whose medical history is on screen.
- **Fuzzy Matching:** Confined strictly to dictionary mapping (16 voivodeships) with explicit confidence states (`exact`, `auto`, `uncertain`, `none`). Any tie or ambiguous match routes to human review.
- **Excel Importer:** Scans dynamically for header rows (instead of assuming row 1) and outputs structured `SkippedRow` logs instead of silently dropping malformed data.

### 4. The Division of Labor

- **AI Agents:** Generated permutation tables, regexes (`anonymizeFreeText`), test assertion blocks, boilerplate TypeScript types, and resolved merge conflicts against the green suite.
- **Humans:** Set data privacy constraints, decided against fuzzy linking of callers, directed the pivot, and performed manual QA on every live build (driving 12 bugfix commits for UI glitches tests couldn't catch).

### What a 6-Hour PoC Doesn't Prove

Persistence was `localStorage` and concurrency was a `BroadcastChannel` between browser tabs. True multi-user production requires PostgreSQL with column-level encryption, an audit log, and browser E2E tests.

**Full breakdown, git commit timeline, and SVG architecture diagrams:**

👉 [Read the full article on StackCompass](https://stackcompass.dev/blog/ai-coding-reliability-unit-tests/)

## Similar posts on daily.dev

- [AI coding has made CI a bottleneck, so we reworked ours to keep up](https://daily.dev/posts/ai-coding-has-made-ci-a-bottleneck-so-we-reworked-ours-to-keep-up-xaq5plq9r) · Linear · 13 upvotes · 4 comments
- [The Cost of Proof Has Collapsed](https://daily.dev/posts/the-cost-of-proof-has-collapsed-nflsmuiln) · Medium · 0 upvotes · 0 comments
- [Five Things Developers at All Day AI Agreed About Coding Agents](https://daily.dev/posts/five-things-developers-at-all-day-ai-agreed-about-coding-agents-4njmqryka) · Kilo Blog · 2 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#ai-agents](https://daily.dev/tags/ai-agents), [#typescript](https://daily.dev/tags/typescript), [#gdpr](https://daily.dev/tags/gdpr), [#vitest](https://daily.dev/tags/vitest)

[View this post on daily.dev](https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-t1gaekqu4)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-t1gaekqu4","headline":"108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI Agents from Breaking One Repo","text":"A team of 3 developers using local AI agents in IDEs/CLIs built a GDPR-compliant consultation registry for an autism helpline foundation during a 6-hour hackathon, reaching 108 passing Vitest tests across 15 files by the end. Key practices credited for keeping the fast-paced, AI-assisted work reliable include treating the test suite as a hard merge gate (agents could not push without a green run), using deterministic logic instead of AI guesswork for search and fuzzy matching (with ambiguous cases routed to human review), and dividing labor so AI generated boilerplate and tests while humans set privacy constraints and did manual QA. The prototype used localStorage and BroadcastChannel rather than a real database, so it doesn't prove production readiness.","url":"https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-t1gaekqu4","datePublished":"2026-09-03T18:33:28.476Z","dateModified":"2026-09-13T21:26:20.854Z","author":{"@type":"Person","name":"Jakub Czechowski","url":"https://daily.dev/jakubczechowski","image":"https://avatars.githubusercontent.com/u/48767339?v=4","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":460}},"image":"https://media.daily.dev/image/upload/s--sxPZ_X0w--/f_auto/v1788460408/posts/t1gaeKqU4?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/fhtovhcva5jqrn5bev7kl","name":"Jakub Czechowski"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Jakub Czechowski","item":"https://daily.dev/sources/fhtovhcva5jqrn5bev7kl"},{"@type":"ListItem","position":3,"name":"108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI Agents from Breaking One Repo"}]}
```

