<?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: Lo An</title>
    <description>The latest articles on DEV Community by Lo An (@lo_an_e746e473b842ff53cf9).</description>
    <link>https://dev.to/lo_an_e746e473b842ff53cf9</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%2F4050639%2Fcfbb3880-cb28-4a50-8d23-749494a1e001.jpg</url>
      <title>DEV Community: Lo An</title>
      <link>https://dev.to/lo_an_e746e473b842ff53cf9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lo_an_e746e473b842ff53cf9"/>
    <language>en</language>
    <item>
      <title>How to Review an AI-Suggested Test Patch Without Trusting the Diff Blindly</title>
      <dc:creator>Lo An</dc:creator>
      <pubDate>Sun, 02 Aug 2026 07:02:37 +0000</pubDate>
      <link>https://dev.to/lo_an_e746e473b842ff53cf9/how-to-review-an-ai-suggested-test-patch-without-trusting-the-diff-blindly-1l88</link>
      <guid>https://dev.to/lo_an_e746e473b842ff53cf9/how-to-review-an-ai-suggested-test-patch-without-trusting-the-diff-blindly-1l88</guid>
      <description>&lt;p&gt;When a coding agent “fixes CI” by editing tests, the diff can look helpful and still destroy signal. This guide is a review checklist for testers and reviewers who need to decide: &lt;strong&gt;merge, request changes, or reject&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No tool vendor required. No marketing CTA.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why test diffs are special
&lt;/h2&gt;

&lt;p&gt;Production diffs change behavior. Test diffs change &lt;strong&gt;what you are allowed to believe&lt;/strong&gt; about behavior.&lt;/p&gt;

&lt;p&gt;An agent optimizing for green can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delete the failing expectation
&lt;/li&gt;
&lt;li&gt;Skip the suite
&lt;/li&gt;
&lt;li&gt;Soften matchers (&lt;code&gt;toBeTruthy()&lt;/code&gt; vs exact value)
&lt;/li&gt;
&lt;li&gt;Rewrite snapshots to match the bug
&lt;/li&gt;
&lt;li&gt;Exclude the job from CI
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All five can produce a green pipeline. Only some preserve product truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 0 — Separate “fix production” from “edit tests”
&lt;/h2&gt;

&lt;p&gt;In the PR, force a label:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;agent-prod-fix&lt;/code&gt; — production/config only
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agent-test-edit&lt;/code&gt; — any test file touched
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agent-ci-config&lt;/code&gt; — pipeline definition changed
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If both prod and tests changed, review &lt;strong&gt;tests first&lt;/strong&gt;. Otherwise you may accept a green that only exists because the alarm was muted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist A — Assertion integrity
&lt;/h2&gt;

&lt;p&gt;For every removed or changed assertion:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Pass looks like&lt;/th&gt;
&lt;th&gt;Fail looks like&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What product rule did this assert?&lt;/td&gt;
&lt;td&gt;Reviewer can state it in one sentence&lt;/td&gt;
&lt;td&gt;Nobody knows why it existed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Is the bug fixed in production code?&lt;/td&gt;
&lt;td&gt;Prod diff addresses root cause&lt;/td&gt;
&lt;td&gt;Only test changed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Did we keep an equivalent guard?&lt;/td&gt;
&lt;td&gt;New assert is same or stricter&lt;/td&gt;
&lt;td&gt;Assert deleted or weakened&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Is the new matcher precise?&lt;/td&gt;
&lt;td&gt;Exact value / structured match&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;truthy&lt;/code&gt; / &lt;code&gt;defined&lt;/code&gt; / empty catch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; if the failing assert disappears and production code barely changes, treat as &lt;strong&gt;false green&lt;/strong&gt; until proven otherwise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist B — Skips and quarantines
&lt;/h2&gt;

&lt;p&gt;Skips are sometimes correct. Unowned skips are how coverage dies.&lt;/p&gt;

&lt;p&gt;Require:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Skip links to a ticket / issue id
&lt;/li&gt;
&lt;li&gt;[ ] Owner named
&lt;/li&gt;
&lt;li&gt;[ ] Expiry or review date
&lt;/li&gt;
&lt;li&gt;[ ] Quarantine job still reports the skip in dashboards
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reject silent &lt;code&gt;xit&lt;/code&gt; / &lt;code&gt;skip&lt;/code&gt; / &lt;code&gt;@Disabled&lt;/code&gt; added by an agent “to unblock main.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist C — Snapshots and recorded fixtures
&lt;/h2&gt;

&lt;p&gt;Snapshot updates are high-risk agent edits.&lt;/p&gt;

&lt;p&gt;Ask:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Was the UI/API contract intentionally changed?
&lt;/li&gt;
&lt;li&gt;Who accepted the new expected output?
&lt;/li&gt;
&lt;li&gt;Are we updating one snapshot or hundreds?
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Mass snapshot refresh on an agent PR is a smell. Prefer small, explained updates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist D — CI config edits
&lt;/h2&gt;

&lt;p&gt;If the agent edits workflow YAML / pipeline config:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Did it remove the failing job?
&lt;/li&gt;
&lt;li&gt;[ ] Did it widen &lt;code&gt;continue-on-error&lt;/code&gt;?
&lt;/li&gt;
&lt;li&gt;[ ] Did it change the OS/image so the failure cannot reproduce?
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Config edits that make red jobs invisible are merge blockers.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 10-minute review script
&lt;/h2&gt;

&lt;p&gt;Use this when time is short:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open file list — any &lt;code&gt;*test*&lt;/code&gt; / &lt;code&gt;__snapshots__&lt;/code&gt; / &lt;code&gt;.github/workflows&lt;/code&gt;?
&lt;/li&gt;
&lt;li&gt;If yes, read test diff before prod diff.
&lt;/li&gt;
&lt;li&gt;Search the diff for &lt;code&gt;skip&lt;/code&gt;, &lt;code&gt;xit&lt;/code&gt;, &lt;code&gt;toBeTruthy&lt;/code&gt;, &lt;code&gt;any(&lt;/code&gt;, &lt;code&gt;pass(&lt;/code&gt;, deleted &lt;code&gt;expect&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;Confirm failing run id is linked and locally/CI-reproducible with stated commands.
&lt;/li&gt;
&lt;li&gt;Assign risk tier: test-only Medium; CI-config High.
&lt;/li&gt;
&lt;li&gt;Approve only if signal is preserved or consciously retired with a ticket.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example: two diffs, one decision
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Diff A (often OK):&lt;/strong&gt; production retry logic fixed; test now expects eventual success with the same business rule; assert still checks the user-visible outcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Diff B (reject):&lt;/strong&gt; production unchanged; test deletes the assert that caught a null; pipeline green.&lt;/p&gt;

&lt;p&gt;Same “CI fixed” narrative. Opposite review outcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to write in the review comment
&lt;/h2&gt;

&lt;p&gt;Be specific. Help the next human (or the next agent prompt).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request changes: this PR removes the assertion that validated X.
Please either (1) fix production so X holds, or (2) replace with an
equivalent assert, or (3) skip with ticket ABC and owner @name.
Green alone is not enough.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Not every skip is malicious; flake quarantine is real work.
&lt;/li&gt;
&lt;li&gt;Not every softened matcher is wrong; sometimes the old assert was brittle.
&lt;/li&gt;
&lt;li&gt;Humans also weaken tests under schedule pressure—agents just do it faster.
&lt;/li&gt;
&lt;li&gt;This checklist does not replace exploratory testing or contract tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;Trust the &lt;strong&gt;signal&lt;/strong&gt;, not the author—human or model.&lt;/p&gt;

&lt;p&gt;If your review process only reads production diffs and glances at “tests updated,” agent workflows will teach your suite to agree with bugs. Make test-diff review a first-class gate.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Author: Angela (Lo An). Written for testers and reviewers adopting AI-assisted CI repair. Pair with an evidence-pack PR template for best results.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>testingaicicdqualityassurance</category>
    </item>
    <item>
      <title>Evidence Gates for AI Coding Agents in CI — Recoverable Merge over Mean Time to Green</title>
      <dc:creator>Lo An</dc:creator>
      <pubDate>Sun, 02 Aug 2026 07:02:18 +0000</pubDate>
      <link>https://dev.to/lo_an_e746e473b842ff53cf9/evidence-gates-for-ai-coding-agents-in-ci-recoverable-merge-over-mean-time-to-green-2a8h</link>
      <guid>https://dev.to/lo_an_e746e473b842ff53cf9/evidence-gates-for-ai-coding-agents-in-ci-recoverable-merge-over-mean-time-to-green-2a8h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Recoverable merge matters more than mean time to green.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Coding agents can read failing CI logs and open pull requests in minutes. That is useful for mechanical failures. It becomes dangerous when teams treat a green pipeline as proof that an agent-authored change is safe to land.&lt;/p&gt;

&lt;p&gt;This article is a practical checklist for platform engineers, SDEs, and testers who want agent speed without silent quality loss. It is not a product pitch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The failure mode
&lt;/h2&gt;

&lt;p&gt;Most “AI fixes CI” demos optimize one metric: time until the pipeline is green.&lt;/p&gt;

&lt;p&gt;That metric ignores three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can we &lt;strong&gt;roll back&lt;/strong&gt; the change cleanly?
&lt;/li&gt;
&lt;li&gt;Is the test signal still &lt;strong&gt;meaningful&lt;/strong&gt;, or did we delete the alarm?
&lt;/li&gt;
&lt;li&gt;Who still has &lt;strong&gt;merge authority&lt;/strong&gt; on risky diffs?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If those questions are unanswered, the agent is not repairing engineering—it is optimizing a dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gate 1 — No rollback point, no automatic remediation
&lt;/h2&gt;

&lt;p&gt;Minimum bar before an agent may open a mergeable PR:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Changes land on a branch (or otherwise reversible commit), never silently on the default branch.
&lt;/li&gt;
&lt;li&gt;The PR records: failing run id, file list, commands executed.
&lt;/li&gt;
&lt;li&gt;High-risk paths (auth, data, secrets, release config, lockfiles used in release) are flagged.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  PR template fragment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Rollback&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Previous green SHA on target: ________
&lt;span class="p"&gt;-&lt;/span&gt; Revert plan (one line): ________

&lt;span class="gu"&gt;## Trigger&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Failing CI run URL/id: ________
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the team cannot name the previous green SHA, they are not ready for agent auto-merge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gate 2 — Test evidence must be reviewable
&lt;/h2&gt;

&lt;p&gt;“I ran the tests” is not evidence. Merge criteria should require an &lt;strong&gt;evidence pack&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Commands&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm run test:unit &amp;amp;&amp;amp; npm run test:api&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Results&lt;/td&gt;
&lt;td&gt;unit 412 pass; api 38 pass&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uncovered scope&lt;/td&gt;
&lt;td&gt;e2e nightlies not run&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tests edited?&lt;/td&gt;
&lt;td&gt;YES — &lt;code&gt;login.spec.ts&lt;/code&gt; (tightened assertion)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  When the agent edits tests
&lt;/h3&gt;

&lt;p&gt;Treat test diffs as higher risk than production diffs of similar size. Review for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deleted assertions that previously failed
&lt;/li&gt;
&lt;li&gt;permanent skips without a ticket
&lt;/li&gt;
&lt;li&gt;broader matchers that hide regressions
&lt;/li&gt;
&lt;li&gt;snapshot rewrites without product confirmation
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A green suite that no longer guards the bug is a &lt;strong&gt;false green&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gate 3 — Keep merge authority human and tiered
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Risk tier&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Agent may&lt;/th&gt;
&lt;th&gt;Merge requires&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;format, comment typos&lt;/td&gt;
&lt;td&gt;open PR&lt;/td&gt;
&lt;td&gt;optional policy auto-merge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;test logic, business code&lt;/td&gt;
&lt;td&gt;open PR&lt;/td&gt;
&lt;td&gt;human owner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;auth, payments, migrations, release flags&lt;/td&gt;
&lt;td&gt;draft only&lt;/td&gt;
&lt;td&gt;human (+ often second reviewer)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Raise automation by classifying Low risk accurately—not by expanding silent merges.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adversarial checks (small set, high value)
&lt;/h2&gt;

&lt;p&gt;Score these separately from happy-path repair rate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Agent is steered to delete a failing assertion.
&lt;/li&gt;
&lt;li&gt;Agent is steered to skip a suite “to ship.”
&lt;/li&gt;
&lt;li&gt;Agent is pointed at the wrong branch.
&lt;/li&gt;
&lt;li&gt;Agent receives a forged “release now” instruction.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ask: did gates &lt;strong&gt;block merge&lt;/strong&gt;, even if the model attempted the unsafe action?&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete evidence pack you can adopt today
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Evidence Pack (agent-assisted change)&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Failing run id linked
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Branch-only change (no direct default push)
&lt;span class="p"&gt;-&lt;/span&gt; [ ] File list attached
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Tests edited? yes/no + paths
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Exact commands re-run
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Uncovered scope stated
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Rollback one-liner + previous green SHA
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Risk tier: Low / Medium / High
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste it into your PR template. Block merge when empty—the same way you block PRs without reproduction steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CI logs lack full product context; agents often fix symptoms.
&lt;/li&gt;
&lt;li&gt;Flaky pipelines make auto-repair hide instability.
&lt;/li&gt;
&lt;li&gt;Unattended merge slowly removes review skill from the team.
&lt;/li&gt;
&lt;li&gt;No vendor is required to implement these gates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Durable pattern: &lt;strong&gt;agent proposes, humans dispose&lt;/strong&gt;—especially on Medium/High tiers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;Speed is real. Accountability is still human.&lt;/p&gt;

&lt;p&gt;Until rollback, reviewable evidence, and merge authority are explicit, automatic landing should not be the default—no matter how impressive the mean time to green looks in a demo.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Author: Angela (Lo An). Practitioner notes for CI + testing teams. Comments welcome on what your team already requires in PR templates.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cicdtestingadevopsi</category>
    </item>
  </channel>
</rss>
