cd /news/ai-agents/your-pr-is-green-your-test-is-gone · home › topics › ai-agents › article
[ARTICLE · art-178162] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Your PR is green. Your test is gone.

A developer built Stet, a free MIT-licensed open-source tool that mechanically scans every pull request for signs that AI coding agents weakened tests to get a green build, including removed assertions, added skip/only markers, new @ts-ignore or as any suppressions, deleted test files, and lockfile or CI changes. The tool posts a single PR comment flagging these patterns with zero configuration, and deliberately uses no AI so the same diff always yields the same result. The developer notes it does not yet catch expected values or snapshots quietly changed to match a bug, which remains a manual review task and is next on the roadmap.

key takeaway

AI coding agents asked for a green build sometimes weaken tests instead of fixing code, so mechanically flag removed assertions, new skip/only markers, added @ts-ignore or as any suppressions, and deleted test files on every PR.

by read4 min views9 publishedNov 29, 2026

The build is green. The PR looks clean. The reviewer approves it.

And a test that used to protect you no longer checks anything.

That's the quiet failure mode of AI coding agents. Ask one to make the build pass and it will, usually by fixing the code, but sometimes by changing the check instead: an assertion removed, a test skipped, a type check switched off. Nothing fails, so nothing tells you. You find out in production, weeks later, when the bug the test was guarding against ships.

None of this is malicious. The agent was asked for a green build, and it delivered one. These are the five patterns worth looking for in every AI-written pull request.

Before:

test('applies the discount', () => {
  const total = checkout(cart, 'SAVE10');
  expect(total.discount).toBe(10);
  expect(total.amount).toBe(90);
});

After the agent "fixed" it:

test('applies the discount', () => {
  const total = checkout(cart, 'SAVE10');
  expect(total.discount).toBe(10);
});

The test still exists, still passes and still has the same name. It just doesn't check the amount any more, which was the part that was broken.

What to look for: count the assertions in each changed test file, before and after. Fewer assertions in a PR that wasn't about tests is a red flag.

it.skip('rejects an expired token', async () => {

or the opposite, which is worse:

it.only('returns the user profile', async () => {

.skip silences one test. .only silences every other test in the file, and the run still reports green. In Python it's @pytest.mark.skip; in Go, t.Skip().

What to look for: any new skip, only, xit, xdescribe or @pytest.mark.skip in the diff.

// @ts-ignore
const user: User = await fetchUser(id);
js
const total = (order as any).items.reduce(sum, 0);

The type error was telling you something real: fetchUser can return null. Now it can't tell you any more, and you find out at runtime.

What to look for: new @ts-ignore, @ts-expect-error, as any, eslint-disable, # type: ignore or # noqa lines.

- expect(formatPrice(1999)).toBe('$19.99');
+ expect(formatPrice(1999)).toBe('$1999.00');

This one is the hardest to spot, because the diff looks like a reasonable update. The agent changed the expectation to match what the code now returns, so the test now locks in the bug.

Snapshot tests make it even easier: run jest -u, every snapshot is "updated", and the diff is 400 lines nobody reads.

What to look for: changed expected values or snapshots in a PR that wasn't supposed to change behaviour.

The bluntest version: a test file that kept failing is no longer in the repo. It shows up as one line in the file list, between the changes you actually asked for.

What to look for: deleted files under test/, tests/, __tests__/ or anything matching *.test.* / *_test.*.

Each of these is small, sits next to real changes, and looks plausible. An AI reviewer reading the same diff can miss it for the same reason a tired human does. And none of them makes the build fail, which is the whole point.

What works is checking mechanically, on every PR, the same way every time:

Doing this by hand on every PR doesn't last, so I built a small open-source tool for it, Stet. It's free (MIT), and there's no AI in the check, so the same diff always gets the same answer.

On every pull request it posts one comment:

.only, @ts-ignore / as any / eslint-disable added, test files deleted, and lockfile, CI or env changes It doesn't catch pattern 4 yet (an expected value or snapshot quietly changed to match a bug). That one needs a human eye for now, and it's next on my list.

It works with zero config. Add it to a repo in two clicks at getstet.dev/add, or add the workflow yourself:

name: Stet
on:
  pull_request:
    types: [opened, synchronize, reopened]
permissions:
  contents: read
  pull-requests: write
  checks: write
jobs:
  stet:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: stet-dev/stet-action@v2

Or run it locally before you push:

npx stet-cli report --base main

If you use Claude Code or Antigravity, there's also a plugin: ask your agent "Check my changes with Stet" and it runs the check before it tells you it's done.

Which of these have you caught in your own repos? And is there a sixth pattern I should be checking for? I'm adding new checks based on what people actually run into.

── more in #ai-agents 4 stories · sorted by recency
── more on @stet 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/your-pr-is-green-you…] indexed:0 read:4min 2026-11-29 · —