<!-- 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-fklulkjvw" -->

---
title: 108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI...
description: During a 6-hour hackathon, three developers using local AI coding agents built a GDPR-compliant consultation registry for an autism helpline, ending with 67...
canonical: https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-fklulkjvw
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: During a 6-hour hackathon, three developers using local AI coding agents built a GDPR-compliant consultation registry for an autism helpline, ending with 67...
og:url: https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-fklulkjvw
og:image: https://api.daily.dev/og/posts/FkLuLKjVW.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

**[CMS](https://daily.dev/sources/cms_squad)** · [@jakubczechowski](https://daily.dev/jakubczechowski) · 3 min read · 5 upvotes · 0 comments

## Summary

During a 6-hour hackathon, three developers using local AI coding agents built a GDPR-compliant consultation registry for an autism helpline, ending with 67 commits, 16 merges, and 108 passing Vitest tests running in about 0.5 seconds. The team credits a strict test suite as a merge gate, deterministic logic over fuzzy AI guesswork for search and matching, and a clear division of labor (AI generating boilerplate and tests, humans handling privacy decisions and manual QA) for keeping the fast-moving codebase reliable. The proof-of-concept used localStorage and BroadcastChannel rather than a real database, so production readiness would require PostgreSQL, encryption, and audit logging.

## 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

- [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 · 1 comments
- [How do coding agents make TDD more practical?](https://daily.dev/posts/how-do-coding-agents-make-tdd-more-practical--jglmgl2sl) · LogRocket · 0 upvotes · 0 comments
- [Agentic Development: We Handed Off the Code, Not the Job](https://daily.dev/posts/agentic-development-we-handed-off-the-code-not-the-job-2ou02tzdx) · Atomic Spin · 0 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#typescript](https://daily.dev/tags/typescript), [#vibe-coding](https://daily.dev/tags/vibe-coding), [#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-fklulkjvw)

```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-fklulkjvw","headline":"108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI Agents from Breaking One Repo","text":"During a 6-hour hackathon, three developers using local AI coding agents built a GDPR-compliant consultation registry for an autism helpline, ending with 67 commits, 16 merges, and 108 passing Vitest tests running in about 0.5 seconds. The team credits a strict test suite as a merge gate, deterministic logic over fuzzy AI guesswork for search and matching, and a clear division of labor (AI generating boilerplate and tests, humans handling privacy decisions and manual QA) for keeping the fast-moving codebase reliable. The proof-of-concept used localStorage and BroadcastChannel rather than a real database, so production readiness would require PostgreSQL, encryption, and audit logging.","url":"https://daily.dev/posts/108-unit-tests-in-6-hours-what-kept-3-devs-and-local-ai-agents-from-breaking-one-repo-fklulkjvw","datePublished":"2026-09-03T18:33:28.476Z","dateModified":"2026-09-13T21:03:17.042Z","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--cM6mDRvE--/f_auto/v1788460409/posts/FkLuLKjVW?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/cms_squad","name":"CMS"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"CMS","item":"https://daily.dev/squads/cms_squad"},{"@type":"ListItem","position":3,"name":"108 Unit Tests in 6 Hours: What Kept 3 Devs and Local AI Agents from Breaking One Repo"}]}
```

