<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ajay Sharma</title>
    <description>The latest articles on DEV Community by Ajay Sharma (@sharmaajay19).</description>
    <link>https://dev.to/sharmaajay19</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F308827%2F90defb9e-ad8f-469f-b9c7-7bd9c5a66c6c.png</url>
      <title>DEV Community: Ajay Sharma</title>
      <link>https://dev.to/sharmaajay19</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sharmaajay19"/>
    <language>en</language>
    <item>
      <title>Green CI, Wrong Code: 7 Ways AI Agent PRs Fool Reviewers (and the 2 Docs That Fix It)</title>
      <dc:creator>Ajay Sharma</dc:creator>
      <pubDate>Wed, 25 Nov 2026 23:55:24 +0000</pubDate>
      <link>https://dev.to/sharmaajay19/green-ci-wrong-code-7-ways-ai-agent-prs-fool-reviewers-and-the-2-docs-that-fix-it-13k2</link>
      <guid>https://dev.to/sharmaajay19/green-ci-wrong-code-7-ways-ai-agent-prs-fool-reviewers-and-the-2-docs-that-fix-it-13k2</guid>
      <description>&lt;p&gt;The agent's pull request looked great. Clean diff, tidy description, every test green. I came close to skimming it and clicking merge.&lt;/p&gt;

&lt;p&gt;Then I read the integration test. It never touched the integration. It wrote the expected record straight into the datastore, then asserted the record was there. The code it was supposed to test never ran.&lt;/p&gt;

&lt;p&gt;That's the pattern this post is about. A PR from a coding agent usually &lt;em&gt;looks&lt;/em&gt; better than one from a person, and that polish invites a skim. The questions that decide whether a change is safe don't get asked: is this the right problem, what does it cost at production volume, and who depends on the behavior it changed?&lt;/p&gt;

&lt;p&gt;Below are seven ways this has bitten me, a check for each one that takes minutes, and two short documents that make the checks routine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this keeps happening
&lt;/h2&gt;

&lt;p&gt;Writing code used to be how you came to trust it. Agents removed the writing, and your mental model of the change went with it. Generating a plausible change now costs a prompt. Verifying it costs what it always did.&lt;/p&gt;

&lt;p&gt;The data backs this up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stack Overflow 2026 survey:&lt;/strong&gt; of 14,000+ developers, 48% trust AI output only when they can easily verify it, and just 7% trust it with important decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;METR randomized trial (2025):&lt;/strong&gt; experienced open-source maintainers took 19% &lt;em&gt;longer&lt;/em&gt; on tasks where AI was allowed, while believing it made them 20% faster.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Almost every failure below comes from one of three agent habits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;It grades itself with the cheapest rubric available.&lt;/strong&gt; Compiles, tests green, reads well. Making that scoreboard green is always easier than making the system correct.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It reasons about the diff.&lt;/strong&gt; Latency under load, downstream consumers, and architectural fit live in the running system, not the patch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It doesn't fetch context it wasn't handed.&lt;/strong&gt; Telemetry, other repos, and its own unverified assumptions stay unchecked.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  7 ways agent PRs look done and aren't
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. The integration test mocks out the integration
&lt;/h3&gt;

&lt;p&gt;Here's the test from the intro, reduced to its shape:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_order_is_persisted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"orders/123"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"accepted"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# the test writes the result&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/orders/123"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"accepted"&lt;/span&gt;         &lt;span class="c1"&gt;# then asserts that it exists&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't a one-off. A study of 1.2M commits across 2,168 repos found 36% of coding-agent commits add mocks to tests, compared with 26% of commits by everyone else (Hora &amp;amp; Robbes, 2026). Mocks are the fastest path to green.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it:&lt;/strong&gt; run the new tests against the &lt;em&gt;old&lt;/em&gt; production code. If they still pass, they don't test the change.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout origin/main -- src/orders/        &lt;span class="c"&gt;# old production code, new tests&lt;/span&gt;
pytest tests/integration/test_orders.py        &lt;span class="c"&gt;# expected: FAIL&lt;/span&gt;
git checkout HEAD -- src/orders/               &lt;span class="c"&gt;# restore&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then grep what the "integration" test replaced:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rg -n &lt;span class="s2"&gt;"mock|patch\(|MagicMock|jest\.mock|sinon\.stub"&lt;/span&gt; tests/integration/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also flag any removed, skipped, or loosened test, and any &lt;code&gt;|| true&lt;/code&gt; added to CI.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Excellent work on the wrong problem
&lt;/h3&gt;

&lt;p&gt;The task: make an identifier consistent across several code paths. The agent nailed it. One helper, every call site, a test per path. Hours later we found the real bug: one important caller never reached that code path at all. Consistency was never the problem.&lt;/p&gt;

&lt;p&gt;Agents commit to the first interpretation that holds together. Good execution hides the mismatch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it:&lt;/strong&gt; require a failing repro of the user-visible problem &lt;em&gt;before&lt;/em&gt; the fix, and ask for this up front:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before writing any code, reply with:
1. The user-visible problem, in one sentence.
2. Your root-cause hypothesis and the evidence for it.
3. A failing test or repro that shows the problem today.
4. One observation that would prove your hypothesis wrong.
Don't implement until I confirm.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Item 4 does most of the work. If the agent can't say how it might be wrong, it hasn't separated symptom from cause.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Cost that only shows up at production size
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;                   &lt;span class="c1"&gt;# a few in the fixture, thousands in prod&lt;/span&gt;
    &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;policy_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sku&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# one network round trip each&lt;/span&gt;
    &lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;policy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nobody wrote a slow function. A cheap call got multiplied by a number the agent never saw.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it:&lt;/strong&gt; make cost part of the agent's output on any request-path change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For every call this diff adds or moves, report:
  where it runs, how many times per request, whether it does I/O,
  and the largest real value of that count (from data, not the test fixture).
Flag every I/O call inside a loop.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I/O in a loop over user-sized input means: batch it, or benchmark at real max size.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Callers nobody checked
&lt;/h3&gt;

&lt;p&gt;A change altered a default that another module had relied on for years. Nothing in the diff referenced it. We caught it because an unrelated test happened to fail. That's luck, not process.&lt;/p&gt;

&lt;p&gt;Consumers include more than code references: serialized field names, config keys, defaults, even log lines someone's alert parses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it:&lt;/strong&gt; list the readers of everything the diff changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rg -n &lt;span class="s2"&gt;"\bresolveRegion\b|\bDEFAULT_TIMEOUT_MS\b"&lt;/span&gt; --glob &lt;span class="s1"&gt;'!**/test/**'&lt;/span&gt;
gh search code &lt;span class="s2"&gt;"resolveRegion"&lt;/span&gt; --owner my-org --limit 50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ask the agent for a table: &lt;code&gt;symbol | consumer | old behavior | new behavior | action&lt;/code&gt;. Any "unknown" in the new-behavior column is unfinished work.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. A third version of the same concept
&lt;/h3&gt;

&lt;p&gt;The codebase had one concept in two slightly different forms. Instead of merging them, the agent added a third, plus a converter. Each step was defensible. The sum was a mess.&lt;/p&gt;

&lt;p&gt;This one is measured too: agent PRs showed roughly double the redundancy of human PRs, and reviewers felt &lt;em&gt;more&lt;/em&gt; positive about them (Huang et al., 2026, "More Code, Less Reuse").&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;List every new type, enum, converter, and helper in this diff.
For each: closest existing equivalent | why it can't be reused or extended
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the answer is "different shape" or "simpler this way," push back.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Numbers with no source
&lt;/h3&gt;

&lt;p&gt;The agent picked thresholds from an old backtest in a design doc. Live telemetry that could have confirmed or killed them was one query away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it:&lt;/strong&gt; every threshold, limit, timeout, or batch size comes with the &lt;strong&gt;query, time window, and percentile&lt;/strong&gt; that produced it, or is explicitly labeled a guess. Give the agent read-only telemetry access and it can usually run the query itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Guesses that become facts after compaction
&lt;/h3&gt;

&lt;p&gt;Long sessions compact their context into summaries, and summaries drop qualifiers. An early guess about how a request was classified came out of compaction as a plain fact. It shaped the whole implementation and only collapsed when a test near the end disagreed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check it:&lt;/strong&gt; keep assumptions in a file the summarizer can't rewrite:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;| #  | Assumption                              | Status     | How verified / how to verify            |
|----|-----------------------------------------|------------|-----------------------------------------|
| A1 | Batch requests are classified as writes | UNVERIFIED | read classifier.route() for batch path  |
| A2 | Every write carries a tenant id         | VERIFIED   | middleware + 7d logs, 0 missing         |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add to your agent instructions: record assumptions as you make them, re-read the file after compaction, and never report done while any row is UNVERIFIED.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real fix: two documents
&lt;/h2&gt;

&lt;p&gt;Line the seven failures up and they reduce to two things nobody wrote:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A pass-standard&lt;/strong&gt; before the work: what "correct" means for this task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A verification report&lt;/strong&gt; after the work: each claim mapped to evidence, with gaps stated plainly.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A PR is a claim. A transcript is the agent's story about itself. Neither can be checked against anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  The pass-standard
&lt;/h3&gt;

&lt;p&gt;Written after design, before code. One rule makes it work: &lt;strong&gt;every criterion names the source to consult and the proof to produce.&lt;/strong&gt; A criterion with no evidence can't fail, so it constrains nothing.&lt;/p&gt;

&lt;p&gt;Weak vs. strong, for a per-tenant rate limit:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Weak&lt;/th&gt;
&lt;th&gt;Strong&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tests pass&lt;/td&gt;
&lt;td&gt;A test sends N+1 real requests, asserts the last gets 429, and fails against main&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No perf regression&lt;/td&gt;
&lt;td&gt;Added p99 under 2 ms at or above current peak RPS, before/after graph attached&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Doesn't break anything&lt;/td&gt;
&lt;td&gt;Every caller of &lt;code&gt;getTenantId&lt;/code&gt; and reader of the &lt;code&gt;limits&lt;/code&gt; config is listed with old/new behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sensible limit&lt;/td&gt;
&lt;td&gt;N = p99.9 per-tenant RPS over 30 days + 20% headroom, query attached&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Let the agent draft it (it's good at proposing sources and finding consumers). You own the goal, non-goals, budgets, and anything it marks as a guess. Ten minutes of editing here is the cheapest point to catch failure #2.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  Full pass-standard example
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PASS-STANDARD: Per-tenant rate limit on POST /v1/items

GOAL
  Stop one tenant's traffic from starving others on the shared write path,
  without changing behavior for tenants under normal load.

NON-GOALS
  Read endpoints. Global limits. Auth or tenant identity changes.

FUNCTIONAL
  F1  Need : tenant above N writes/sec gets 429 + Retry-After; others unaffected.
      Proof: test saturates tenant A, asserts tenant B still gets 2xx.

OFF-DIFF
  P1  PERFORMANCE   Need   : &amp;lt; 2 ms added p99 on the hot path.
                    Consult: load test on the real limiter at &amp;gt;= peak RPS.
                    Proof  : before/after p99 graph.
  P2  BLAST RADIUS  Need   : no legitimate tenant newly throttled today.
                    Consult: per-tenant peak RPS, last 30 days.
                    Proof  : query output vs chosen N.
  P3  REAL PATH     Need   : limit exercised through the actual request path.
                    Proof  : N+1 real requests, last is 429; fails against main.
                             Seeding the counter or mocking the store doesn't count.
  P4  GROUNDING     Need   : N derived from real usage.
                    Proof  : query, percentile, one-line rationale.
  P5  REUSE         Need   : key reuses existing tenant id; no new identity type.
                    Proof  : file:line of key derivation.

DONE
  Every criterion PASS with evidence. Any FAIL or UNVERIFIED blocks merge.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Scale it to risk. Docs changes: skip it. New request-path logic: functional + perf + real path + blast radius + grounding. Auth, billing, or anything irreversible: everything, plus your own sign-off per line.&lt;/p&gt;

&lt;h3&gt;
  
  
  The verification report
&lt;/h3&gt;

&lt;p&gt;Graded line by line against the pass-standard. Each line is &lt;strong&gt;PASS&lt;/strong&gt;, &lt;strong&gt;FAIL&lt;/strong&gt;, or &lt;strong&gt;UNVERIFIED&lt;/strong&gt; (couldn't get the proof). UNVERIFIED is a real result. The worst thing a report can do is turn "didn't check" into "looks fine."&lt;/p&gt;

&lt;p&gt;Evidence means a test name and run id, a command and its output, a query and its result, or a &lt;code&gt;file:line&lt;/code&gt;. It doesn't mean "I verified this" or anything the implementing agent said about its own work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't let the author write it.&lt;/strong&gt; Models are bad at catching their own reasoning errors without outside feedback, and sometimes make answers worse when they try (Huang et al., ICLR 2024). Use a fresh session that gets the pass-standard, the diff, and tool access, and &lt;em&gt;not&lt;/em&gt; the implementation transcript.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  Reviewer prompt
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are reviewing a change you did not write. You have:
  docs/verify/&amp;lt;task&amp;gt;/pass-standard.md
  the diff: git diff origin/main...HEAD
  permission to run tests, search code, and run read-only telemetry queries
You do not have the implementation transcript. Don't ask for it.

For each criterion, in order:
  1. Obtain the proof it names. Run the command or query yourself.
  2. Mark PASS, FAIL, or UNVERIFIED (could not obtain the proof).
  3. Cite evidence: test + run id, command + output, query + result, or file:line.
"I checked", "looks correct", code comments, and the PR description are not evidence.
Run every relied-on test against origin/main's production code and confirm it fails.
End with READY or NOT READY and a numbered MUST CHANGE list.
Write it to docs/verify/&amp;lt;task&amp;gt;/verification-report.md.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Here's what a useful one looks like. Note that it's allowed to say no:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VERDICT: NOT READY (4 PASS, 2 FAIL, 1 UNVERIFIED)

  F1  429 above N, others unaffected ....... PASS
      test_ratelimit_isolation, run #1423
  P1  &amp;lt; 2 ms added p99 ..................... UNVERIFIED
      Only a micro-benchmark exists. No load test at peak.
  P2  No legit tenant newly throttled ...... FAIL
      2 active tenants peak above N today.
  P3  Exercised through real path .......... FAIL
      Test writes the counter directly; still passes against main.
  P4  N from real usage .................... PASS
  P5  No new identity type ................. PASS

MUST CHANGE
  1. P2: raise N or exempt the 2 tenants (owner decision).
  2. P3: replace seeded-counter test with real requests.
  3. P1: load test at peak, attach p99 graph.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That report caught the hollow test, the throttled consumers, and the unmeasured hot-path cost before merge. That happened because the pass-standard named each one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Make it the default
&lt;/h3&gt;

&lt;p&gt;Keep both docs (plus &lt;code&gt;ASSUMPTIONS.md&lt;/code&gt;) in &lt;code&gt;docs/verify/&amp;lt;task&amp;gt;/&lt;/code&gt; and commit them with the PR. Then add two things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standing instructions&lt;/strong&gt; in &lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Verification (all tasks except docs/copy)
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;Before coding, draft docs/verify/&amp;lt;task&amp;gt;/pass-standard.md and stop for approval.
&lt;span class="k"&gt;- &lt;/span&gt;Log assumptions in docs/verify/&amp;lt;task&amp;gt;/ASSUMPTIONS.md as VERIFIED/UNVERIFIED.
  Re-read it after any context compaction.
&lt;span class="k"&gt;- &lt;/span&gt;Don't remove, skip, or loosen tests unless the pass-standard says why.
&lt;span class="k"&gt;- &lt;/span&gt;When done, don't write the verification report. Say "ready for verification" and stop.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;A merge gate&lt;/strong&gt; that blocks PRs with a missing report or any unresolved line. Add a &lt;code&gt;verify-exempt&lt;/code&gt; label for trivial changes.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  GitHub Actions gate
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;verification-gate&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;opened&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;synchronize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;reopened&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;labeled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;unlabeled&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;gate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"!contains(github.event.pull_request.labels.*.name, 'verify-exempt')"&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;fetch-depth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Require a clean verification report&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;dirs=$(git diff --name-only "origin/$GITHUB_BASE_REF...HEAD" \&lt;/span&gt;
                 &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="s"&gt;grep -oE '^docs/verify/[^/]+' | sort -u || true)&lt;/span&gt;
          &lt;span class="s"&gt;if [ -z "$dirs" ]; then&lt;/span&gt;
            &lt;span class="s"&gt;echo "No docs/verify/&amp;lt;task&amp;gt;/ folder. Add one or label verify-exempt."&lt;/span&gt;
            &lt;span class="s"&gt;exit 1&lt;/span&gt;
          &lt;span class="s"&gt;fi&lt;/span&gt;
          &lt;span class="s"&gt;status=0&lt;/span&gt;
          &lt;span class="s"&gt;for d in $dirs; do&lt;/span&gt;
            &lt;span class="s"&gt;for f in pass-standard.md verification-report.md; do&lt;/span&gt;
              &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="s"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"$d/$f"&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Missing $d/$f"&lt;/span&gt;&lt;span class="s"&gt;;&lt;/span&gt; &lt;span class="s"&gt;status=1;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="s"&gt;done&lt;/span&gt;
            &lt;span class="s"&gt;if [ -f "$d/verification-report.md" ] &amp;amp;&amp;amp; \&lt;/span&gt;
               &lt;span class="s"&gt;grep -nE '\.{3,} (FAIL|UNVERIFIED)$' "$d/verification-report.md"; then&lt;/span&gt;
              &lt;span class="s"&gt;echo "Unresolved criteria in $d"&lt;/span&gt;
              &lt;span class="s"&gt;status=1&lt;/span&gt;
            &lt;span class="s"&gt;fi&lt;/span&gt;
          &lt;span class="s"&gt;done&lt;/span&gt;
          &lt;span class="s"&gt;exit $status&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The gate checks that the process happened, not that the evidence is true. That's still on the reviewer and whoever clicks merge.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR: paste this into your PR template
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AGENT PR CHECKS
[ ] Revert check: new tests fail against main's production code.
[ ] Mock audit: no mock of the thing an integration test is named after;
    no test writes the state it asserts; no tests removed/skipped/loosened.
[ ] Intent: a failing repro of the user-visible problem existed before the fix.
[ ] Cost: per-request call counts from real data; no I/O in unbounded loops
    without a production-size benchmark.
[ ] Blast radius: consumers of every changed symbol/field/default/config listed.
[ ] Reuse: every new type/helper names its closest existing equivalent.
[ ] Grounding: every threshold cites a query, window, and percentile.
[ ] Assumptions: no UNVERIFIED rows.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I use coding agents every day and I'm not going back. But the job has moved. Writing code is cheap now. Judging it is the expensive part, and most of our tooling still treats that as a skim at the end.&lt;/p&gt;

&lt;p&gt;An agent can write the change. Only evidence can tell you it's correct.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What's the most convincing-looking agent PR you've caught being wrong? I'd like to hear what tipped you off.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Becker, Rush, Barnes &amp;amp; Rein (2025). &lt;a href="https://arxiv.org/abs/2507.09089" rel="noopener noreferrer"&gt;Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity&lt;/a&gt;. METR.&lt;/li&gt;
&lt;li&gt;Griffiths (2026). &lt;a href="https://github.blog/ai-and-ml/generative-ai/agent-pull-requests-are-everywhere-heres-how-to-review-them/" rel="noopener noreferrer"&gt;Agent pull requests are everywhere. Here's how to review them.&lt;/a&gt; The GitHub Blog.&lt;/li&gt;
&lt;li&gt;Hora &amp;amp; Robbes (2026). &lt;a href="https://arxiv.org/abs/2602.00409" rel="noopener noreferrer"&gt;Are Coding Agents Generating Over-Mocked Tests? An Empirical Study&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Huang, H. et al. (2026). &lt;a href="https://arxiv.org/abs/2601.21276" rel="noopener noreferrer"&gt;More Code, Less Reuse&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Huang, J. et al. (2024). &lt;a href="https://arxiv.org/abs/2310.01798" rel="noopener noreferrer"&gt;Large Language Models Cannot Self-Correct Reasoning Yet&lt;/a&gt;. ICLR 2024.&lt;/li&gt;
&lt;li&gt;Stack Overflow (2026). &lt;a href="https://survey.stackoverflow.co/2026/ai/data/ai-trust" rel="noopener noreferrer"&gt;2026 Developer Survey: Trust in AI tools&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;A longer two-part version of this post is on &lt;a href="https://SharmaAjay19.github.io/blog/agentic/" rel="noopener noreferrer"&gt;my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codereview</category>
      <category>testing</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
