Home / Blog / Every Test Passed and the Article Was Still Wrong

I've just written up how to import a journal into Knowledge Commons Works — 829 articles, 67 issues, a DOI on every one. This is the companion piece: how the work was actually made, which agents did which parts, and what they got wrong.

I want to start at the end, with the thing that organizes everything else.

On August 17th, an agent swarm reading the JCRT archive — one subagent per issue, sixty-six issues, summarizing content rather than checking schemas — noticed that one article's PDF was not the article it claimed to be. Volume 24, issue 2 listed Maeve Callan's essay on the medieval origins of religious white supremacy, pages 260–273. The file had a correct Callan cover sheet, correct embedded metadata, correct page numbers. Every one of its fifteen body pages was a different author's article.

That defect sat for thirteen days. During those thirteen days:

  • the KC Works migration completed and its live audit reported zero failures;
  • 829 of 829 records were confirmed to have DOIs;
  • the file server's test suite passed — 31 redirect scenarios, 829 OAI Dublin Core records, 795 PDF rights records, 795 cover sheets, derived-file coverage for 1,202 items;
  • the cover-sheet validator specifically confirmed that the visible text on Callan's first page matched Callan's embedded metadata. It did. That was the problem's disguise, not its detection.

Every check I had written passed, and a DOI was resolving to one scholar's name over another scholar's work.

It got fixed this week, in about ninety minutes, because a human said "fix Callan" and handed over the author's original manuscript. That is the whole argument of this post, and I'll come back to it.

Methods #

The lexicon #

Four ideas, and I use them as a decision ladder rather than as slogans.

DRY — Don't Repeat Yourself. One authoritative source per fact. In JCRT this is nearly literal: the article's Markdown front matter is the only place a title, author, page range, or DOI is written by hand. The PDF cover sheet, the RIS file, the CSL JSON, the Schema.org record, the OAI-PMH record, and the repository deposit are all generated from it. When the archive was wrong, it was wrong in one place, and fixing it there fixed it everywhere. Six representations, one truth.

YAGNI — You Aren't Gonna Need It. The most useful thing an agent can do is not write code. The file server's Worker is vanilla JavaScript with no runtime dependencies. A framework was proposed and rejected: it serves one route, and the code is per-request policy, not an application. No build step either — the tests import the Worker source raw. Every dependency you skip is a dependency you never have to upgrade at 11pm because a transitive package changed its ESM exports.

That last example is not hypothetical. While writing this post I ran a clean npm install on my own site and it wouldn't build: [email protected] no longer ships a default export, [email protected] still imports one. Two dependencies I did not choose, in a chain I did not audit, breaking a site whose content is Markdown files.

Write less, do more. Fewer lines, fewer moving parts, fewer things to explain to the next person, who is me in six months and has forgotten all of it. The measure is not elegance; it's how much of the system I can hold in my head when it breaks.

#MINICOMP. Minimal Computing — the digital humanities practice organized around minimal maintenance, minimal dependencies, and minimal connectivity. This is the frame that makes the other three add up to something. A scholarly journal is not a startup. It has no engineering staff, no budget line for infrastructure, and an obligation to still be readable in twenty years. Every service you add is a service that can be acquired, deprecated, or priced out from under you.

Read the JCRT stack through that lens and the choices stop looking like preferences. Static site: nothing to patch. Files in object storage behind a read-only Worker: no write path, so no attack surface and no state to corrupt. Git as the declared source of truth for the bucket: if the CDN vanishes tomorrow, the archive is intact in a repository, and re-hosting is a sync. Deposits in KC Works: a second, institutionally-maintained copy with persistent identifiers that don't depend on my domain renewal.

The whole architecture is an answer to one question — what survives me not paying attention to it?

Rules for human-in-the-loop collaboration #

These are mine, stated as rules because that's how I actually enforce them.

Don't have agents write code in languages you don't speak. This is the load-bearing one. I read and debug JavaScript, shell, and enough Python to follow along. So my KC Works wrapper is bash calling the vendor's Python, which I read and changed in exactly one place. When it broke — and it broke — I could fix it. Ian Scott from Knowledge Commons said the same thing to me unprompted while suggesting an agent could write my batch script: "that is dangerous, though, if you don't know how to debug the script well." Generated code you can't read isn't a shortcut; it's a debt whose interest comes due at the worst moment.

Local models first. Hermes as the harness, qwen3:6 and gemma4 doing the routine passes locally. This is a minimal-computing position as much as a cost one: the work that can happen on my machine should happen on my machine, and the frontier model should be reserved for the tasks that actually need it.

Store .env one level above what the agents can reach. Secrets belong outside the working tree the agent has been handed. I'll be straight about the gap here, since I'm asking you to take my rules seriously: JCRT's metadata repo keeps its .env inside the repo, gitignored. That is the rule I state and not yet the rule I follow. It's on the list.

Teach the model with samples, partials, and outlines. Give it five files of your own code, up to about a thousand lines each, and have it write a style.md for that language. Give it your outline rather than your intention. An agent handed a blank page will invent a house style; an agent handed your house style will match it, and matching it is what makes the output debuggable by you.

Ponytail. A ruleset plugin that teaches agents the YAGNI ladder — necessity check, then existing patterns, then the standard library, then native platform features, then installed dependencies, and only then new code. Its published benchmarks claim 54% less code and 22% fewer tokens; on my JavaScript I measured token use down a little over 50%. Its own docs don't ship a memory file — the memory.md per project and style.md per language are my addition on top, updated at the end of each session along with the changelog. Three files, and the agent starts each session already knowing the project, the style, and what it learned last time.

Proof, test, and test. Then run explain-diff and take the test. Geoffrey Litt's skill generates a page explaining a change — background, intuition, a walkthrough, and a five-question quiz — and the point is that you take the quiz. If you can't answer questions about the change that just landed in your repository, you don't understand your own codebase, and no amount of green CI fixes that. Litt himself notes the multiple-choice format is gameable, which is why free-response questioning in chat works better. Either way, the principle holds: comprehension is the gate, not test results.

An honest evaluation #

Caveats first, because this is the section where it would be easy to write something that sounds authoritative and isn't.

This is not a benchmark. The sample is small, non-random, and badly confounded: I assigned harder tasks to bigger models, so any correlation between model tier and rework partly measures my task routing, not the models. Commit trailers only exist for 22 commits across the three repositories — most of this work was committed by me without attribution. And I'm evaluating models by looking at the artifacts they left behind, months later, which is evidence of a kind but not the kind a controlled comparison would give you.

Codex #

Codex did the architectural planning for splitting the site repo from the files repo — a memory package and a seven-part project dossier laying out the new repository, the subdomain, the asset paths to move, the configurable base URL, and a split citation workflow triggered by content paths.

The plan was sound and I still use its shape. Its numbers were not. It estimated build time down 10–30%, deploy time down 25–70%, CI time down 15–45%. Wide hedged ranges that would have been hard to falsify in any direction. What actually happened: deploy went from about thirty minutes to under thirty seconds. That's outside the top of its range by more than an order of magnitude — and, more to the point, the win came from a mechanism its plan never mentioned. Codex proposed moving paths and adding hash-gated incremental generation. The actual fix was replacing a per-file upload loop with one content-addressed rclone --checksum sync. Same goal, different lever, hundredfold difference.

The lesson I take from that isn't "Codex was wrong." It's that an agent asked to estimate a speedup will estimate the speedup of the plan it just wrote, and the biggest wins usually come from questioning the mechanism the plan assumed. Ask for the plan. Don't ask for the percentages.

Codex has also been reliably good at the dull, bounded chores — dependency bumps arriving as clean single-purpose branches — and at picking up structured handoff notes. That's a real strength and it's the mode I keep using it in.

Claude, by model #

Fable 5 did the Pagefind search migration in a single day. Eight commits in the site repo, and reading them in sequence tells the story: version the bundle URLs, salt the bundle path, remove the index cache wrapper, pin the component UI path, drop the salt after a cache purge. That's five attempts at one problem. The problem turned out not to be the code at all — Cloudflare's edge cache was serving a stale 404, so a fixed bug looked unfixed for most of a day.

Fable is fast and cheap and it moves. What it did not do was stop and ask whether the system under test was telling the truth. It treated each failed verification as evidence its last change was wrong, and generated another change. A human — me — eventually thought to purge the cache. I'd use Fable again for exactly this kind of work, with one rule attached: when the second fix doesn't take, stop fixing and start doubting your instruments.

Sonnet 4.6 did small, scoped feature work — favicon and Search Console fixes, a sidebar badge with a three-tier fallback chain, a robots handler in the Worker. Landed clean, no visible rework, no follow-up commits. Unglamorous and correct. This is the tier I under-use.

Opus 4.8 did a two-commit configuration change: upgrade Pagefind, add cross-origin access for merged search. Precise, minimal, done.

Opus 5 shows a different shape: fewer commits, each with a wide blast radius. Re-crediting 248 imported posts to their real authors in one commit. Inverting author name order across every archive RIS file and fixing the workflow permission that was silently blocking the write. Adding the religious-theory deploy path, file sitemaps, and an XSLT stylesheet together. That's the right tool for changes that have to be consistent across hundreds of files at once, and it is the wrong tool for a two-line fix, where you're paying for judgment you don't need.

Opus 5 also wrote most of this week's work, including this post, which makes it the one section here I'd trust least — a model evaluating itself is not evidence, it's a press release. So, for the record, the measurable parts of this session: roughly forty investigative tool calls before it proposed a plan; four factual errors in the first draft of the how-to post, all four caught by checking each claim against the source rather than by anyone noticing they were wrong; one failed AppleScript formulation; one missing Python dependency it hadn't anticipated. It also stopped at a 403 from Knowledge Commons rather than trying to route around it, which is the behaviour I want, and it surfaced the broken dependency chain on this very site while doing something else entirely.

Haiku 4.5: no attributed commits in any of these three repositories. I have nothing to report, and I'd rather say that than manufacture an impression.

I'm evaluating gemma4 and the local models separately, and reserving my own judgment on Opus, for the reason given above.

What none of them caught #

Back to Callan.

The defect was found by an agent — the swarm bundling the archive in August found it, wrote it into a defects report, and flagged it as the most urgent open item. Credit where it's due, and note why it found it: that swarm was reading and summarizing article content. Every system that missed it was checking structure. The cover sheet validator compared the visible cover text to the embedded metadata and found them consistent, which they were. The rights checker verified copyright metadata. The coverage checker confirmed the file existed. The live audit confirmed a DOI and a unique record mapping. Not one of them opened the PDF to page two and asked whether the article was the article.

Nothing in an automated suite tests the invariant you didn't think of. That is not a fixable property of test suites; it's what a test suite is. Which means the green checkmark is evidence about the checks, and only ever evidence about the checks.

And then the second failure, which is mine and not any model's: an agent flagged it as urgent, and it sat for thirteen days. The finding was written down correctly, in the right file, with the right severity, and no part of my process escalated it. Human-in-the-loop is not a slogan you get to say once at the start of a project. It's a queue that somebody has to actually work.

What I'd keep #

One authoritative source per fact, and generate everything else. The reason this week's fix took ninety minutes instead of a week is that a corrected Markdown file plus four regeneration commands propagated to the PDF, the RIS, the CSL JSON, the Schema.org record, the OAI feed, and the deposit package.

Tools that refuse rather than guess. The DOI sync in my import wrapper stops unless the import log is a complete success and each returned record matches exactly one Markdown file. It has stopped on me. It was right every time. Every place I let a script infer, I later had to check its work; every place a script made me look, I trusted the result.

Small models for small work, and a rule about when to stop. Not "always use the biggest model" — most commits here didn't need one. The rule that matters more than model selection: when the second fix doesn't take, stop fixing and start doubting the system that's reporting failure.

Read the diff and take the test. If you can't explain the change, it isn't done, however green the build is.

The strongest argument for keeping humans in this loop is not that the agents were bad. Read back through this and they mostly weren't: a repository got audited, 103 missing PDFs got built, 3,601 subject headings got verified, an entire archive got deposited with persistent identifiers. The argument is narrower and harder to design around. Everything automated here verified what it was told to verify, and the one thing that mattered most was something nobody had thought to tell it.

Tags : minimal-computing ai coding-agents claude digital-humanities scholarly-publishing method

Webmentions

No webmentions yet.

Previous

Importing a Whole Journal into Knowledge Commons Works

How I deposited 829 articles across 67 issues of JCRT into KC Works and got a DOI for every one: the Python importer, the .env, the interactive prompts, and the wrapper that made 27 years of back issues survivable.

Next

Eleven Steps From a Build Awesome Site to a KC Works Deposit

A working plan for taking an existing Eleventy journal site and getting it ready to deposit into Knowledge Commons Works: front matter, controlled subjects, ORCID and ISSN, cover sheets, an import directory, and the script that ties it together.