Hi, I’m Cosmin Pop. I’m a QA automation engineer, and this is where I write things down.
December 2026 2 posts
`*/45` is not every 45 minutes: a week of agent logs, read back
A cron job meant to refresh auth tokens every 45 minutes fired 379 times in eight days and found the QA token already expired on 141 of them, because */45 fires at :00 and :45. Reading those logs back produced five rulings, and two of my answers went against the proposed fix.
The gate that fired after the damage
A pre-commit gate meant to protect live test runs from core-file changes was overridden at least 14 times, always for the same reason, because the harm happens when a file is saved. This post traces the hazard back to the write and replaces the gate with an edit-time warning that lists live runs.
November 2026 8 posts
The CI tier that died at 75 minutes
A CI browser-test tier was killed at its 75-minute limit, and I was ready to blame the data finders. Measuring the runs I already had put the finders at about 3% of compute, and showed a worker budget that could never fit and failed tests burning compute.
The falsifier left the commit path
I rebuilt a test falsifier so it grades the assertion a test exists for, then ran it on every commit for ten days. It found no real problem and cost each ship 5 to 23 minutes, so I moved it to authoring time and a weekly batch.
What a verified morning costs
A measured morning agent run cost $47.30 to $65.50, and a review proposed dropping the verifiers to save an estimated $15 to $25. This post shows what that cheaper default would give up, why I kept the verifiers, and how choosing a model per stage moved the cost instead.
The agent never posts: paste-ready text and the contract behind it
Shows the written contract behind every tracker comment my agents draft and I post by hand: verdict first, evidence below a divider, and a 509-line linter that fails any payload value missing from the captured files. It also covers the dry-run posting tool and the edits that became rules.
Lanes as a pipeline: validate, verify, edit
How a morning run of parallel agent lanes became a pipeline, where each lane flows to its own verifier and commit and only the sweep, gate and push wait for the last lane. It also shows why a 31-minute question to me stalled three finished lanes, and the table of defaults that replaced it.
Three cheap canaries before any agent spends time
Three cheap checks that run before my morning agent lanes: a known-red hold, a pool gauge and a drift canary, each with a written response and no gate. Over two weeks the opt-in drift canary ran once, although its slowest run took about six seconds for all five reads.
What is actually mine today? Scope and carry-over for a morning action page
How my morning agent run decides which tracker tickets are mine today, as a union of three sets, after a timestamp rule parked 12 tickets of which 4 needed me. It also matches yesterday's drafts to the comments I really posted, by content at a 0.5 threshold, and ages every chase.
From overnight tracker noise to one action page
How I turned one Monday's 56 waiting tracker tickets into a single HTML page that I act from each morning. The skill triages, runs verified lanes and drafts every reply, and I post every comment myself.
September 2026 16 posts
A pathspec bounds files, not hunks, and it does not bound the commit at all
File ownership stops two agent sessions editing the same file, but nothing stops them at commit time. With six sessions on one shared git tree, a pathspec on git add did not bound the commit, a pathspec on the commit still took a peer's lines, and a bare stash swept the whole repository.
Comments are a maintained artifact, not a one-time deposit
A slimming pass cut 5,880 comment lines to 3,820 across fourteen spec files, and a grep filter proved that no non-comment line changed. The same pass corrected five comments that were wrong about their code and added a ratchet guard that stops comment density growing back.
Your suite has too many tests
A consolidation campaign folded 246 near-duplicate tests out of a 4,911-test Playwright suite, and every retired case kept its traceability tag. A token similarity report found the mechanical duplicates in about 15 seconds, while the rest needed a full reading pass and an adversarial check of each estimate.
Sure enough to file a bug: the evidence ladder before you blame the product
A red assertion proves only that the app disagrees with the test: of six defect candidates in one batch, four were the test's own wrong assumptions. These are the six checks, cheapest first, that I now run before filing a defect.
Five outages that were not outages: get one known-good 200 before you call it down
Five incidents against a shared test environment looked like an outage, and each fault sat in my own request path: a missing Bearer prefix, an unmatched gateway route, a dropped DNS resolver, a schema-valid empty response, and a zero-byte compiled test cache. For each one, a cheap probe would have settled it before I called the environment down.
Retiring a tolerated lie: removing a schema-drift exception the right way
Removing a schema-drift toleration looks like a one-line diff, but six traps sit around it. They run from a runtime discovery check that silently orphans an emptied array to a freshness guard that diffs the working tree against the git index.
Drift your types can’t see: four shapes that pass every gate
Generated TypeScript types plus a runtime schema validator look like full contract coverage, yet over sixteen days four kinds of API drift passed both layers green. One was a create-invoice dialog that charged tax twice because a field changed meaning without changing its name or type.
Never bless the as-built: what a defect pin should assert, and how a pin lies
A spec written against the running build looks identical to a correct spec until the bug is fixed, and then the fix arrives as a red run. On one ticket I hit four versions of that mistake, and this post shows how to assert the requirement instead and why every defect pin needs a control request in front of it.
The fixture that stopped meaning what it said: a finder trait is not the capability
Four Create Invoice cases turned red on a locator that never attached, because a fee-tracking redesign changed what the dialog reads while the finder predicate stayed true. The same kind of fault also hit a seed anchor and a fee-row finder after backend deploys, and nearly slipped into a migration plan.
Non-vacuity is harder than a row count
A row-count non-vacuity check passes on a grid whose only row is the empty-state placeholder. Ordering, filtering and deduplication claims each need a floor sized to what they assert, and every oracle should be inverted once before you trust it.
The skip that isn’t there: auditing the claims your suite makes when it declines to run
A skipped test claims the data it needs does not exist, and that claim can be false in three ways that survive code review and the type checker: a gate that never fires, a reason that blames the wrong cause, and a parked case that records no reason. A typed miss error routed through one adapter tells the reader whether to seed data or raise the search budget.
From four guards to twenty-eight: running a convention gate at scale
Four AST convention guards grew to twenty-eight, and the larger set became a policy layer that other people's changes must pass. The post shows what that layer needed: a ratchet baseline, an escape hatch that requires a reason, and calibration of every new rule against the live corpus before it blocks anything.
Counting your oracles instead of mutating them
Some green tests pass without executing a single assertion, because an early return or a swallowed catch skipped every oracle on the path they took. A runtime counter at the one import seam every assertion already passes through finds them on every ordinary run, without inverting roughly 9,400 assertion call sites.
Can this test fail at all? A falsifier that inverts every assertion
Static quality gates check that a test looks right and never check whether it can turn red. Running a folder twice, once clean and once with every assertion inverted through Playwright's own negation, showed 1,787 of 1,894 tests able to fail and sent the 107 survivors to a review queue.
5,000 lines of armour I never needed: retiring the infrastructure you built for a storm
After a 502 storm, a discovery hot path got a deadline, a circuit breaker and a run broker. Once a cheaper query removed the load that justified them, a gate run through a live storm recorded zero fires, and the armour came out in one commit of 4,975 deleted lines.
Reconcile, don’t regenerate: stable IDs for AI-generated test docs
A generator regenerates every test from a changed ticket, which overwrote human edits and broke downstream links. A reconciler gives each test a stable ID hashed from what it covers, and a deterministic planner marked over 80% of about 300 tests as keep before any model call.
August 2026 27 posts
Prompt A/B testing for an agent task: engineering the minimal instruction set
I ran the prompt behind a browser-validation agent as an experiment, with held-out cases, measured turn counts and every losing variant kept in version control. Three explicit anti-pattern bans and a turn budget took the task from 34 turns per case to 9.
“Not deployed” is a first-class verdict: giving your test suite a richer vocabulary than green and red
A binary pass/fail suite has no honest label for a spec that correctly describes a feature that has not shipped yet. A deployment-guarded skip with its own NOT-DEPLOYED verdict turns that spec into queued work that activates automatically on deploy, without adding red noise.
31 browser agents, hundreds of manual tests, one run: scaling live verification without losing trust
31 parallel, isolated Playwright agents reconciled 316 legacy manual test cases against a live app in a single run. Pre-assigning each agent's case slice, output directory and session name before the fan-out kept the results trustworthy.
Don’t trust “Done”: AI agents that validate tickets against the live app
A ticket marked "Done" and a test case marked "Pass" can still hide a clause the app does not satisfy. My agent grounds every acceptance-criteria clause in a live API or headless-browser probe against the running app, and when a clause fails it works out which layer is responsible.
Your backlog as a queryable corpus: a read-only snapshot of the issue tracker
A ticket lookup through the live tracker API takes at least four round-trips and about thirty seconds, so I ingest the whole tracker nightly into a read-only SQLite snapshot that agents query offline in milliseconds. The schema also carries what I learned about the data, such as a normalized status column, because filtering on the raw Done label misses roughly half the done tickets.
69 changes without a merge disaster: wave-gated agent remediation
A code-review pass produced 69 mechanical fixes: the kind of list that sits in a ticket for months. Doing them serially takes weeks, and bundling them into one agent prompt yields a 185-file diff nobody can review. The fourth option is a wave-gated campaign of parallel LLM subagents, with a read-only census first, a self-healing static-check gate between every edit wave, and folder-scoped write access. 61 of 69 landed in one branch, zero merge conflicts.
When not to let the LLM figure it out: deterministic orchestration for zero-ambiguity, high-blast-radius tasks
Reorganizing 185 test files is a task with no ambiguity and a high blast radius, so I wrote a script that checks its invariants before any git mv runs, and the agent only runs it. Ambiguity and blast radius are the two axes I now use to decide what to give an LLM.
Filesystem as message bus: hallucination-resistant multi-agent pipelines
An agent asked to list a 161-item corpus returned four plausible, made-up items with no error signal. Having agents write their data to files and return only counts makes a multi-agent pipeline resistant to that failure.
The orchestrator that kills its own children: circuit breakers for agent fan-out
When the backend died mid-run, the subagents logged every remaining item as a failure and buried the real findings in noise. I added a circuit breaker to the orchestrator: subagents report their 5xx counts, and it halts the fan-out once the total reaches the threshold of 10.
Testing the author: eval-driven development for AI skills
A skill that does well on softball prompts tells you nothing about whether it works. Eval-driven development for AI skills: harvest real failure modes from unguided runs, then build discriminator assertions that check whether the agent avoided the most tempting wrong answer.
Your skill description is a classifier, not a summary
An agent picks which skill to run by matching the prompt against each skill's description, so the description works as a classifier. I write it to name the actions, files and inputs that should trigger it, plus "NOT for X, that is Y" clauses that route the other prompts to sibling skills.
Six agents, one repo, zero collisions: file ownership as a coordination primitive
One agent's git add -A swept in another agent's half-written edits and committed them under the wrong name. The fix is file ownership: each agent session gets a disjoint allowlist enforced by a pre-write hook, and commits stage files by name.
Giving an AI agent a shell without giving it your secrets: allowlist-first subprocess environments
Spawning an AI agent with env: process.env hands it every secret the parent process holds, including the tracker token. This post builds the subprocess env from an allowlist instead, with a deny set for the AGENT_SESSION_ID prefix bug.
ThinkPad X390 Yoga supervisor password bypass: grounding DBG1 pin 9 on the LBB-1 board
Two £100 Marketplace ThinkPad X390 Yogas, both locked by an unknown BIOS supervisor password. Grounding DBG1 pin 9 on the LBB-1 board during POST got me into BIOS and turned them into two working laptops.
Defense in depth for autonomous agents, and the guardrail I turned off
Two hooks guard against an autonomous coding agent editing read-only OpenAPI contract specs. I disabled the third layer, a commit-time check, because it got in the way of legitimate human contract updates, and kept it commented out instead of deleting it.
The bash-shaped hole: why one agent guardrail is never enough
A pre-tool hook that guards the Edit and Write tools leaves a bash-shaped hole, because the agent can write the same file with a shell command. This post shows the second hook that covers the shell tool, its known evasions, and the pre-commit backstop behind both.
Three kinds of memory: how an agent remembers a project across sessions
A coding agent's project memory, split into three tiers: a SQLite-backed issue tracker checked into git, a ~10KB working set loaded on session start, and linked topic files. Feedback files record each behavioral correction with the reasoning behind it, so the agent can handle adjacent cases.
Your context file is code, so give it a test suite
An agent's context file is the most-read file in the codebase, so its bugs reach every session. Here is the checker I run on it in the CI gate: stale paths, dead scripts, closed tickets and a 40KB size budget.
The 10KB working set: context budgeting for long-running agents
How I cut an 88KB tracker dump, injected at every session start and every pre-compaction pump, down to a 10KB evergreen override held to a hard byte budget. The full dump stays available through an on-demand tool call.
Adversarial verification you can’t talk your way out of: encoding the direction of doubt into your data shape
A verifier agent that shares the classifier's output schema can reach COVERED by the same optimistic path, so I made its verdict field a downgrade-only enum keyed to the original verdict. Across 316 legacy manual test cases, it downgraded 31 of 89 COVERED findings and could not upgrade any.
The unflashy truth about AI in testing: the agent explores, the code decides
Self-healing test demos look great, but on a real app a regression can make the Submit order button disappear, healing binds to a similar-looking button, and the test goes green while the broken order submission ships. This post explains why the marketed AI-testing promises fail on a real enterprise app and frames the pattern behind the next twenty posts: the agent explores, deterministic code decides.
Agentic QA in practice: multi-agent workflows that maintain the test suite
In a mature test suite my bottleneck is maintenance, so I keep about twenty workflow scripts in plain, checked-in JavaScript. Loops, fan-out, and aggregation are deterministic code, and only the leaf tasks are LLM calls.
Don’t photocopy your manual tests into Playwright: port by combining, not translating
Porting several hundred manual regression cases 1:1 into Playwright buries the real coverage under hundreds of tiny specs that each repeat login and navigation. I clustered the cases by product surface instead, with one spec per cluster and one test per distinct behavior.
Strangling two legacy test suites into one repo, without a big-bang rewrite
Two aging Playwright suites for the same platform, one browser E2E and one API-only, had drifted apart in separate repos with their own auth and test-data hacks. I merged them with a strangler-fig migration into one repo with a shared core, moving CI trust one domain at a time and proving parity with a ledger of donor SHAs.
Finding the knee: a ramp-to-knee load probe inside your Playwright project
Bumping the Playwright worker count sent a few concurrent GET /orders calls to the shared dev environment, which answered with 502s, and nobody could say at what concurrency the endpoint broke. I answered it with about 500 lines of TypeScript inside the existing Playwright repo: a probe that ramps concurrency and stops at the first level that breaks the SLO.
Lint rules regex can’t write: enforcing test conventions with AST guards
Code review let a handful of test conventions decay, and grep-based pre-commit checks either missed violations or cried wolf. Four small scripts that parse every spec with the TypeScript compiler API and check the rules on the AST now block the merge on a violation.
Every test knows its ticket: lightweight traceability annotations for Playwright
Every Playwright test in this suite opens with typed trackingRef, testType and severity calls, at about four lines per test and with no test-management plugin. An auto-fixture reports them on every run, a script generates a ticket-to-tests index, and an AST guard in the merge gate enforces the calls.
July 2026 13 posts
Auth for a Playwright suite that never sleeps
A Playwright suite running 24/7 against a shared Cognito and SSO environment had more red runs from auth than from the product: tokens expired mid-run into waves of opaque 401s, or two processes refreshed at once. The fix is three layers (validate, refresh, recover) and one rule: exactly one process ever refreshes.
Net-zero test data: a written cleanup policy for shared test environments
The shared dev order list opened to three pages of garbage, one leaked entity per write-path test per run. The fix was a one-page written policy: net-zero by default with a verified delete, and at most one tagged residue entity per run for entities that cannot be deleted.
Seed data that heals itself: idempotent find-or-create pools for a shared test environment
On a shared dev environment where orders can't be deleted, seeded test data drifts, and creating fresh entities every run leaves permanent junk. This post shows find-or-create seed pools keyed on deterministic titles, which sort every slot into one of four outcomes and repair drift with idempotent writes.
Page objects that scale in Playwright: a base class, modules, and one promotion rule
Roughly fifty Playwright page objects across five domains did not rot into forks, because of three structural decisions: one abstract base class for entity forms, modules as the only public API, and a rule that nothing enters the shared layer before a second real consumer exists. With the base class, a new entity form costs about 40 lines instead of 400.
The Angular Material traps that make Playwright tests lie
Angular Material can make a Playwright suite go green while the app saves the wrong thing, because what the DOM shows differs from the state the form will submit. fill() can leave a ReactiveForms control pristine, so the PATCH drops the field and the backend still returns 200.
143 failures is not 143 bugs: a test-failure triage taxonomy for big runs
A freshly re-architected Playwright suite came back with 143 failures, and everybody discounted the number. Putting every failure into exactly one of five buckets (DEFECT-API, DEFECT-SPEC, ENV, TEST, REGRESSION), each with its own owner and SLA, turned it into 29 residual failures that each had an owner and a next action.
False passes: the anti-pattern catalog that keeps the green suite honest
When I audited a legacy API suite, 34% of its search tests passed while asserting nothing. This is the catalog of false-pass anti-patterns I now audit every spec against, each with its fix, plus the three ways I enforce it.
Playwright test.fail as a living bug tracker: defect specs that celebrate when they break
A skipped test, a softened assertion or a ticket comment never tells you when the backend fixes a bug. I pin each known defect in a co-located *.defect.api.spec.ts that asserts the spec-correct behavior under Playwright's test.fail(), so the run stays green while the bug lives and flags an unexpected pass the day the fix ships.
Your OpenAPI spec is read-only: treating contract drift as a defect, not a merge conflict
Add nullable: true every time a test reddens, and after eighteen months your OpenAPI spec is a changelog of every backend bug you shipped. With the vendored specs read-only, a mismatch is either a bad test or an API defect, and each defect is pinned with test.fail.
A ledger of known lies: tolerating API schema drift without losing accountability
One ticketed backend bug turned 76 happy-path tests red overnight under strict Ajv validation, so a new regression would drown in the noise. This post shows a central ledger of named drift exceptions, each naming its ticket and a removal condition, plus a defect spec that reports an unexpected pass when the bug is fixed.
The 200 that lies: runtime schema validation with Ajv on top of generated types
A backend deploy regressed an ID field from integer to string, and every response still returned 200 OK while every test stayed green. This post shows assertValid(), a thin Ajv wrapper that every API response in the suite passes through, so the contract is checked at run time as well as compile time.
Parallel Playwright workers vs a 502 storm: one line of modular arithmetic
Four parallel Playwright workers made GET /orders return 502s within a minute on a shared test environment. Lazy worker-scoped fixtures staggered the discovery load, and one line of Euclidean modulo fanned the workers out across distinct entities, with no lock server or reservation service.
Discovery without a meltdown: a bounded find-an-entity helper for live test environments
A naive test-data finder pages the whole list and fires a per-entity GET for every row, all at once. pagedFind makes every cost dimension of the search an explicit, named bound, and on a miss its per-stage counters show which stage lost the candidates.
June 2026 3 posts
Adapting local ESP32 inverter control for other brands (part 3)
A reference page for adapting my ESP32 and ESPHome inverter control build to brands other than Growatt. It covers what transfers unchanged, what changes per brand, where to find register maps, and common quirks such as inverters that only accept 0x10 multi-register writes.
The CT clamp fix: when the real problem isn’t software (part 2)
My inverter could not see my heat pump, and my EV charger's 7kW draw made it drain the battery during cheap tariff slots. Moving one CT clamp to the main tail fixed the heat pump with no software, and a small Home Assistant automation driving the part 1 ESP32 handles the EV.
Stop hardcoding test IDs: discovery-first test data with a ScenarioResolver
Hardcoded entity IDs go stale as soon as someone reshapes the shared test environment. I banned them, so every spec now names the shape of data it needs and a ScenarioResolver finds a real entity at fixture time.
February 2026 1 post
Taking back your Growatt inverter: local control with ESP32 + Modbus (part 1)
Wire £5.75 of hardware (an ESP32, an RS485 converter and a cut-up Ethernet cable) to a Growatt SPH5000 inverter and flash ESPHome. You get a local Modbus web UI for monitoring and mode control, with no cloud and no app.
December 2025 1 post
Automated Playwright Authentication with Microsoft SSO Push Notifications in CI/CD
Security said no to TOTP, to service accounts and to disabling MFA, so I kept Playwright sessions alive in GitLab CI/CD with OAuth2 refresh tokens. After one manual login, push notification MFA never fires again, and a scheduled job keeps the 30-day refresh token active.
No posts match.