Skip to content
Maxwell CollinsContact

AI testers that drive a real browser

AI testers that use a property software suite in a real browser, as a customer would.

What it achieved

AI testers use the software like customers and catch its serious defects before any real customer meets them.

The short version

AI testers use the software like customers and catch its serious defects before any real customer meets them. AI testers driving a real browser found 920 distinct defects in a property software suite, 427 of them critical or high, each checked twice and sent straight to repair with no person sorting them. Maxwell built the system so that no tester's report is believed until the tester proves it can see. Before each run it must find exactly six defects planted on a hidden page, or the run stops. Every finding then gets two independent rulings, one on the code and one on the business rule the code was built from. A fixed table sets its severity. Probes with no AI first test hostile inputs, dead links and every page, and each run is compared with the last. It runs on a nightly schedule.

The problem

Findings went straight to repair on recorded proof alone, with no person sorting them or reading every line. That made this system the last defence. An AI tester's main failure is looking clean while being blind. A run that reports nothing may have seen nothing, and from outside the two look the same. A tester that only checks a list cannot discover: one free-ranging session found 79 defects in about 20 minutes.

In use

  1. Maxwell starts a run, or the nightly schedule does. It begins on the hidden canary page, and if the tester does not report all six planted defects, the run stops as untrusted.
  2. Two finders explore the product from 72 scenarios, clicking, typing and watching the screen like a user. One checks set journeys; the other hunts freely.
  3. One adversary reads the source code to confirm each finding, and another checks whether the rule itself is wrong.
  4. A fixed table grades each confirmed finding by severity. It is filed for repair, and the run is compared with the last so a returning defect is reopened.

What it achieved

  • 920 distinct defects found, 427 of them critical or high (49 critical, 378 high, 196 medium and 220 low), each given two independent rulings and a severity from a fixed table, so they went to repair with no person sorting them.
  • A clean report can be trusted to mean clean: every run first has to find six defects planted on a hidden page or it stops as untrusted, and it is held to a frozen benchmark of real past defects.
  • Confirming a defect by reading the code costs about $0.10, against about $9 to confirm it by re-running the browser.
  • A full suite of 38 scenarios runs in about four hours for about $35, on a nightly schedule; the self-check alone takes about six minutes and $0.50.
  • Every lesson is a permanent countermeasure written into the design: 33 in all.

The full record

On this page
In one sentence

Maxwell built an autonomous browser-testing system, 15,350 lines in all (8,924 lines of TypeScript and shell across 29 programs, 3,416 lines in 67 scenario files, 2,004 lines in five agent roles and 1,006 lines of canary page, Stop hook, query service, nightly workflow and command wrapper), in which AI agents drive a real browser through the product and nothing they report is believed until the tester has proved it can see: before each run it must find exactly six defects planted on a hidden page, and every finding then gets two independent rulings, one on the code and one on the rule the code was built from, so that the findings go straight to repair without a person sorting them. It has recorded 920 distinct findings.

lines
15,350
scenario files
67
distinct findings
920
runs
25

What it does

The whole system is 15,350 lines of its own files, counted from dev: 8,924 lines of TypeScript and shell (the 24 TypeScript and 3 shell programs named qa-* under scripts/, 8,637 lines, plus the verdict parser, 104, and its check file, 183), 3,416 lines in the scenario folder (67 scenario files and their schema document), 1,892 lines in the five agent roles plus 112 lines of browser conventions they share, and 1,006 lines for the canary page (89), the Stop hook (227), the findings query service (316), the nightly workflow (122) and the suite qa wrapper (252). Around it sit 4,237 lines of documentation (the six-document record, 1,723, and the operator's guide, the two QA v2 plans, the reference set and two further records, 2,514) and 4,827 lines of audit reports, an issue triage and further records. 1,285 lines of the programs are the tester's own self-tests. The five agent roles also exist as a second set of copies under .agents/skills/ for a second agent runtime (1,853 lines: 371, 475, 314, 250 and 443), so the same judges can be run from either tool. The ledger it fills holds 383 scenario executions, 1,010 links between runs and findings and 920 distinct findings.

The orchestrator, scripts/qa-runner.sh, 1,486 lines. A fixed program that owns everything except the two judgments. In order: it takes a lock so a second copy cannot run; refuses to start unless the address is the local machine, because screenshots and logs can hold private data; builds and starts a production-like server for the run (not the development server, which hides whole classes of shipped defects); seeds the test users; checks speed budgets; runs the three probes; runs the canary; splits the scenarios into those that can run side by side and those that depend on earlier ones; dispatches each scenario to its own headless Claude Code process with a fixed list of allowed tools and a fresh browser profile; then reconciles, rules, classifies, diffs, files issues and sets the exit code. The discovery finder runs on a stronger model than the regression auditor on purpose, because the faster model stops early. Every stage has an off switch, and the whole run can repeat on a timer.

Two finders. /qa-audit (370 lines) checks one journey against its stated pass criteria and reports pass, fail or inconclusive on each, held in a "scope prison" because its failure is wandering. /qa-discover (474 lines) hunts freely with no checklist, reads source to find root causes, and may not stop until six conditions hold. A 112-line conventions file, required reading for both, fixes how they drive the browser: stored sign-in, filling versus dispatching events, the screenshot fallback, how to treat an inconclusive accessibility result and the onboarding helper.

The code adversary. /qa-verify (436 lines) with its driver qa-verify.ts (481 lines) and the defensive verdict parser (104 lines). It reads source with no browser, within about ten tool calls, and returns verified, refuted, runtime-only or inconclusive, with a file and line for every verdict. It scans the model's reply from the last brace backwards so that sample code in the prose cannot displace the verdict. Findings from the deterministic probes are tagged as confirmed by the probe and skip the model call, which saved about $2.70 a run.

The rule adversary. /qa-dr-adversary (345 lines) with its driver qa-dr-verify.ts (552 lines). It reads the project's numbered domain rules and decides whether the rule itself is the fault, with six verdicts: sound, under-specified, ambiguous, contradictory, stale and missing. Its constraints: it may only add to a rule, an ambiguity always goes to the CTO role and is never chosen between, "missing" needs three separate searches, and it never re-judges the code. qa-collect-dr.ts (100 lines) inlines the text of each rule a scenario names into the agent's prompt.

The severity classifier. /qa-severity-classifier (267 lines) reads both verdicts and sets severity and action class from a fixed table, with almost no tool calls of its own. The table: critical for a blocked core journey, data loss or corruption (a date shifted, money precision lost, a link between records lost), a bypassed sign-in or a confirmed injected script; high for degraded common paths, developer text visible in the product, a dead handler, an unexplained disabled control; medium and low below that, with accessibility-engine ratings mapped one to one.

The emission layer. qa-emit-writer.ts (209 lines) is the durable writer: each finding is appended, forced to disk and closed before the agent goes on, with a lock file that survives crashes (a stale lock is taken over after 10 seconds) and a queue inside one process. qa-emit-mcp.ts (297 lines) wraps it as a small per-scenario tool server with four tools, finding_emit, flow_open, flow_close and status, that never writes to the channel the protocol uses. qa-finding-reconcile.ts (382 lines) merges the stream with the end-of-scenario report and records which one each finding came from. Its tests: qa-emit-writer-tests.ts (398 lines, T1 to T4), qa-emit-mcp-tests.ts (495 lines, T5 to T10) and qa-emit-mcp-integration-test.ts (209 lines, T11 and T12), which kill the writer mid-write and run a thousand lines across processes.

The ledger and the summary. qa-findings.ts (522 lines) creates the three-table database (runs, findings and run_findings), derives a finding's identity from its scenario and a normalised title, raises it to open again if a resolved defect returns, and offers mark-fixed with evidence. qa-summary.ts (485 lines) diffs each run against the last, restricted to the scenarios that actually ran, merges reworded titles at 0.55 word overlap inside the same scenario and severity, applies a per-severity regression gate with a slack setting for each tier (unclassified included), annotates scenarios that timed out and marks their counts as lower bounds, writes SUMMARY.json and SUMMARY.md, and returns the exit code.

The three probes that use no AI. qa-prescan.ts (487 lines) searches the source for developer placeholders ("Phase 3", "Coming soon", "Not configured", TODO marks) and dead links and handlers, then smoke-tests the sign-out and session endpoints. qa-fuzz-inputs.ts (439 lines) sends a fixed catalogue of 43 hostile inputs (24 for names, 11 for email, 8 for passwords: very long, empty, control characters, emoji, right-to-left override, look-alike letters, script and SQL injection, command and path injection, template and format strings) to the sign-up and sign-in endpoints, and reads every reply, including successful ones, for five kinds of leaked internals: stack traces, database errors, the ORM's own errors, file paths and the generic server-error text. qa-state-walk.ts (345 lines) lists every static page from the file tree by the framework's routing rules, fetches each, and flags a server error, a missing page, a near-empty reply or a missing title.

Seeding and isolation. qa-seed-auth.ts (345 lines) creates a run-scoped user and organisation named for the run, writes the browser's stored sign-in, and handles the auth library's origin check and cookie dates; it has three user personas, including one with non-Latin stress text. qa-seed-fixtures.ts (246 lines) creates cross-tenant fixtures through the product's own procedures, not the database, for the two-organisation security scenarios. qa-prime-userdata.ts (92 lines) puts the seeded cookie into each scenario's browser profile, because the browser silently ignores the stored sign-in when a profile folder is set. qa-cleanup.ts (38 lines) records that no cleanup is needed, because each run's data is invisible to the next.

Scenario loading and the scenario files. qa-load-flows.ts (284 lines) rejects unknown keys, duplicate names and unknown dependencies, adds ten standing edge-case checks (EC-1 to EC-10) to every sign-in, Hub and owner-portal scenario, and generates a broad "explore" twin of every narrow scenario, each with its own agent and budget. There are 67 scenario files in seven groups: 3 sign-in, 7 Hub, 10 owner-portal, 20 discovery, 11 cross-product sweeps, 15 security probes and the canary. The ten checks: tab enumeration for unfinished-feature text, validation parity between the quick-add and the full wizard, form errors clearing, round-trip integrity of emoji, currency and a 200-character name, signed-in visits to sign-in pages, labels on disabled controls, duplicate headings, dead links, text changing after the page loads, and internal identifiers shown as text. The 15 security probes cover reaching another organisation's records, organisation scoping, sign-in bypass, forged requests, the content security policy, injected script in forms, secret leaks, debug exposure, session fixation, tampered cookies, file upload, guessable identifiers, rate limits, injection through the product's own AI features and security headers. The sweeps include dead links, internal strings, duplicate headings, hydration timing, disabled elements, authenticated redirects, round-trip integrity, a responsive audit (44 by 44 tap targets, no sideways scroll), dark mode, error handling and navigation. A scenario declares where to look and what counts as a pass; the finder's instructions say how.

Self-checks. The canary page apps/app/app/qa-canary/page.tsx (89 lines) carries six planted defects keyed C1 to C6: a button with no name, an input with no label, an image with no description, low contrast, a leaked identifier and developer placeholder text. It is available only on the local machine and must return not-found in production. A 314-line comparison script is the baseline gate. qa-contract-check.ts (30 lines) sets out a further check, that every request the interface sends matches the field list the server's input schema declares, with its intended method written out (read each flow's captured network requests against the schema and raise a finding when the interface sends a field the server does not accept or leaves out one it requires). scripts/qa-harness-test/verify-parser.checks.ts (183 lines) checks the verdict parser, and the project's main gate runs the tester's self-tests every time. The accessibility engine is kept as a file inside the product (axe.min.js), and the canary's defects are keyed to rules in that exact copy.

Regression diffing. qa-tz-sweep.sh (42 lines) and qa-tz-diff.ts (80 lines) run the suite in Los Angeles and London time and flag any finding present in only one. qa-visual-diff.ts (85 lines) compares screenshots with baseline images by pixel. Speed budgets (blocking time, first paint, speed index, accessibility score) feed the verdict. qa-quick.sh (95 lines) audits a single page for ad hoc use.

Reporting out. qa-triager.ts (99 lines) files and closes GitHub issues from the ledger. The nightly workflow .github/workflows/qa.yml (122 lines) runs the system every day at 06:00 UTC, on demand and on pull requests to main, restores the previous run's ledger so the diff means something, allows one run per branch at a time and has a 90-minute limit. scripts/orchestrate/qa.ts (252 lines) is the suite qa command: it wraps the runner and records the severity totals in the orchestrator's own ledger so suite status shows them beside the review and build findings. One session produced 152 raw findings, filed as 53 GitHub issues; a queue of 80 issues was triaged into four waves (32 mechanical fixes, 8 needing a decision and 15 clusters covering 46 issues).

The findings query service. findings (server.py, 316 lines) opens the ledger read-only and offers six tools: open_findings, recent_findings, findings_stats, query_findings, find_similar_bug and findings_for_file. An agent asks what is known to be broken in a file without loading reports.

The Stop hook, qa-progress-evidence-required.sh, 227 lines. Blocks any claim that testing is going well unless the same message carries three numbers read from disk (the anti-gaslighting Stop hook, under How he built it).

The record. The six documents under .claude/docs/qa-system/ (1,723 lines): a README with a glossary and component map, the architecture, the failure ledger, the personas and prompts, the inputs, flows and probes, and the rebuild blueprint. Beside them the operator's guide (684 lines, 15 sections), the two QA v2 plans (807 and 775 lines), the reference findings (75 lines), a further audit (50), the known-issue record for the browser lock race (123), the issue triage (782) and a forensic handoff to a fresh-context agent (472). Its diagnosis is in the known-issue record: the browser tool keeps one lock file in a shared cache folder, so two scenarios started at once attach to the same Chromium and fight over its navigation, whatever profile folder is set; one worker at a time is the default. The record weighs the evidence against a competing hypothesis, a bounce between the sign-in middleware and the page layout, and names the two ways to run scenarios side by side safely (a per-scenario copy of the browser, about 280 MB each, or an upstream change). A counterfactual audit (171 lines) took about 470 findings and sorted them into four classes (14% catchable by a source-code rule, 31% by a sharper written specification, 33% only by a real browser, 22% by process discipline). Three rounds of independent audit (3,241, 126 and 54 lines) and a fresh-audit checklist (152).

What it achieved

  • 920 distinct findings recorded across 72 scenarios, through 383 scenario executions and 1,010 links between runs and findings.
  • The 920 findings carry 49 critical, 378 high (427 critical or high together), 196 medium and 220 low.
  • 33 countermeasures written into the design, each against a named failure mode.
  • 66 scenario files were written in three days.
  • Measured costs: the canary alone about six minutes and $0.50; a full suite of 38 scenarios about four hours and $35.
  • Ruling on a finding by reading source costs about $0.10. Re-running the browser to confirm one costs about $9.
  • The design reduces to six ideas that carry to any software: a fixed program around a narrow AI boundary, the finder separated from the grader, two adversaries joined by a table, findings forced to disk at once, a ledger of defects across runs, and a tester that tests itself.

The problem it solves

  • Maxwell judges the product by the evidence the machine produces, not by reading every line, so this system is the last defence. Its findings have to stand on recorded proof and go straight to repair without a person sorting them.
  • An AI tester's main failure is looking clean while being blind. A run that reports nothing may have seen nothing, and the two look the same from outside. Every part of the design turns a silent failure into a loud one.
  • A single free-ranging session found 79 defects in about 20 minutes, among them a property wizard blocked for good when address validation failed, a button that did nothing, a raw identifier shown in the breadcrumb and a timezone shift that compounded a date. A tester built to check a list cannot discover like that, so that session became the yardstick for everything after: twelve of its findings became the frozen reference set.
  • Running the browser again to see whether a defect comes back treats chance as evidence, and can mark a real, repeatable defect as a fluke. So a reader of the source code rules on each finding.
  • When code faithfully follows a wrong rule, checking the code against the rule can never find the fault, and "fixing the code" would lock the bad rule in. Something has to examine the rule.
  • The agent that finds a defect must not say how bad it is. Two finders gave the same defect different severities.
  • A list of things to probe caps discovery at the length of the list: an agent given twelve probes returns findings matching them one for one.
  • An agent will report that testing is going well while the tester is stuck at the login screen, as long as its reports are prose and not numbers read from disk.
  • Lessons kept only in the notes on individual changes are lost, so he had them written into one set of documents, on the principle that knowledge is an artifact, not a memory.
  • A helper told to be useful can fan out to as many as 72 agents fighting over one login, so launching agents is denied rather than discouraged.
  • A refutation can hide a different defect: "the button does nothing" was refuted because the button did call something, a stub that only said "Not configured", and the leaked developer text vanished with it.
  • Two scenarios started together share one browser lock in the tool's cache folder, however the profile folder is set, so both agents drive one window and the pages reload every millisecond or two. He had it traced to that lock and one worker at a time made the default.
  • A finding with a changed severity must keep its identity, so the fingerprint ignores severity and a reclassification never creates a new row.

How he built it

Maxwell builds software by directing AI agents, and this system was built that way: the agents wrote the programs, the scenario files and the documents under rules and checks he set, and he turned every lesson into a countermeasure.

  • A narrow AI boundary inside a fixed program. scripts/qa-runner.sh owns the server, the test accounts, the order of work, the time limits, the retries and the final verdict. An AI does only two things: find a defect, and rule on one. Everything else is ordinary deterministic code.
  • The canary. If the tester does not report exactly six, the run stops with "Auditor is untrusted".
  • The frozen baseline. A fresh discovery run on the properties scenario is held against a frozen set of twelve reference findings (the critical and high ones) from the free-ranging session, matched by title similarity at 0.5 or by overlapping steps, which guards against the tester's ability quietly falling.
  • The finder never grades. Every finding is written with its severity set to "unclassified".
  • Two independent rulings on every finding. /qa-verify, the code adversary, reads the source without a browser and returns verified, refuted, runtime-only or inconclusive. /qa-dr-adversary, the rule adversary, asks whether the domain rule itself is the fault and returns one of six verdicts, among them under-specified, ambiguous, contradictory and missing. Neither does the other's job.
  • A fixed table decides, not a vote. /qa-severity-classifier takes both verdicts and reads the severity from a table with forcing rules: lost data, bypassed sign-in or a blocked core journey is always critical, and nothing is ever marked down because the fix is hard or marked up to add value.
  • The action class. Work is routed by the pair of verdicts, not by severity: FIX, FIX+SPEC-GAP, SPEC-GAP, CTO, RISK or DISMISS. A critical finding the code adversary refuted is noise; a high one it verified is a repair.
  • G1 to G4, the guardrails on refuting. A visual measurement can never be settled from source. A refutation that uncovers a different defect becomes a verified finding of that defect. A swallowed error is a defect. And nothing can be refuted against a file the agent did not read in full.
  • SPEC-GAP can only ADD. The rule adversary may propose adding a requirement and never removing or weakening one. A rule that looks too strict still stands. When the database lacks a column a rule needs, the right call is to add the column, never to delete the field from the rule.
  • Two finders with opposite instructions. /qa-audit is held in a "scope prison", because its failure is wandering. /qa-discover hunts freely and reads source to find root causes, because its failure is stopping early.
  • The six end_turn gates. A discovery agent may not stop until six conditions hold, among them at least 40 tool calls, at least two source files read, every form field tried with valid, boundary and invalid input, and every step it said it would take carried out. A scope that looks clean must list exactly what was exercised.
  • No answer keys. A scenario file says where to look. The finder's instructions say how.
  • Deterministic probes first. Three checks with no AI run before any browser agent. Each bug class goes to the cheapest detector able to catch it, and the probes are tuned for sensitivity while the code adversary supplies the precision.
  • Coverage amplified at load time. Ten standing edge-case checks (EC-1 to EC-10) are added to every product scenario, and every narrow scenario gets a broad "explore" twin with its own budget.
  • Findings reach disk the moment they are seen. Each finding is appended, forced to disk and closed before the agent goes on.
  • Isolation by construction, not by instruction. Every run gets its own new user and organisation, so one run's test data cannot reach the next. Each agent has a fresh browser profile and is given only the browser and the findings writer as outside tools. Launching other agents is denied outright, and so is the command line.
  • Two watchdogs and loud failure lists. One timer limits total time (30 minutes, 2 hours for discovery) and one limits silence (5 and 10 minutes), ending a process with a polite stop and then an unconditional kill. A run that timed out, hit a rate limit or failed hard is written to its own list, and its counts are marked as lower bounds. Retries happen only for transient API errors, up to four attempts. Exit codes separate clean, defects found and could not run.
  • The findings ledger. A fingerprint that ignores wording, digits and severity gives one defect one identity across runs. A second match on word overlap catches reworded titles. The ledger gates each new run against the last at every severity, and a defect that returns is reopened.
  • Text in the product is content, not control. Words on a page telling the tester to mark the journey as fine are themselves recorded as a high-severity finding, and each run ends with an injection scan.
  • Checks on the tester itself. Besides the canary and the baseline, the part that writes findings has its own tests, which kill it in mid-write and run a thousand lines across processes. The accessibility engine is kept as a file inside the project, and the planted defects are keyed to rules in that exact copy, so the detector and its calibration cannot drift apart. The project's main gate runs the tester's self-tests every time it runs.
  • The anti-gaslighting Stop hook. A status report on testing is blocked unless it carries three numbers read from disk: new findings since the last report, journeys that got beyond sign-in, and seconds since the newest finding. If either of the last two shows a stall, the report must say STALLED.
  • Independent audit of the tester. Three rounds of fresh-context audit read the runner in full with no prior context and probed the live browser tool's real names, each round checking the last.
  • Pinned research before repair. Version-specific questions about the browser tool, the speed-budget tool and the headless command were sent to helpers told to cite primary sources and say "unverified" rather than guess, and the diagnosis came from the files and logs, not from any earlier agent's account.
  • The failure ledger and the rebuild blueprint. Thirty-three countermeasures are listed, each with the failure mode it guards against, under one rule for any later change: name the incident your change preserves or the weakness it removes, and never reopen a documented wound. Every component is tagged preserved, modified or new, so that a rewrite cannot quietly drop a lesson. A portability table says which parts to copy unchanged, which to adapt and which to write again for other software.
  • Measure before changing a limit. A caps rule: the cost distribution is measured before a budget is raised (the verifier budget went from $0.50 to $10, a scenario's from $15 to $100).

Named concepts

The named concepts, defined

Looking clean while being blind · make blindness mechanically detectable · the canary · the frozen baseline · the code adversary · the DR adversary · action class · G1 to G4 · SPEC-GAP can only ADD · scope prison · the six end_turn gates · plan-execute parity · explore companion · run-scoped user · content, not control · sensitivity upstream, precision downstream · isolation by construction, not by instruction · the anti-gaslighting Stop hook · the failure ledger · knowledge is an artifact, not a memory · the finder never grades · auditor is untrusted · preserved, modified or new

What it shows

He can make an AI's test report something a business can act on, by building the checks that prove the tester is not blind and by never letting the agent that finds a problem be the one to judge it.