Urgent.News

What's breaking now, across thousands of outlets.

Tech

If the Patch Authored the Test, Score the Overlap

Same-session tests are not evidence. If an agent writes a production hunk and the assertions in one pass, a green build often means the two files agreed on a private story, not that the public contract holds. Score the overlap first. Then rewrite the oracle in a session that never sees the patch. This is not a flake policy and not a fixture lock. Those gates ask whether a test is stable. This…

In software development, tests are not evidence of a successful implementation. If an agent writes a production hunk and assertions are included in a single pass, a green build does not necessarily mean that the public contract is being met. It is essential to score the overlap between production code and test code before rewriting the oracle in a session that does not have access to the patch.

This approach is not a flake policy or a fixture lock; it is a gate that asks whether a test is independent. A stable, overlapping oracle is worse than a noisy one because it fails closed on the wrong question. The failure mode occurs when agents patch the code in a repeatable way, and the model emits the source file and the corresponding test file together.

Shared literals appear in both the production code and the test code, such as the same timeout, error substring, and a sentinel UUID. The test does not probe the API; it merely echoes the implementation. A second pattern is more subtle, where the production function grows an extra branch to satisfy a comment in the test. While coverage may increase, the behavior for real callers does not change.

Token overlap can catch the first pattern, while literal mutation combined with an isolated oracle session can detect the second. Both scenarios should be treated as merge smells. It is crucial not to treat a passing Pytest run as a property of the code. Instead, use an artifact that combines the overlap score and literal mutation as a proposed pre-merge check.

This gate is not based on a published benchmark and has not been tested against a private corpus. Label it as a method rather than a result.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Reduce Expo Monorepo CI Build Time

Expo monorepo CI gets slow and flaky for the same reason: we treat all caches as one thing. Then builds run from the repo root, one app reuses another app’s Metro state, or native cache is blamed for…

  • Establish clear boundaries for each cache layer in Expo monorepo CI builds
  • Execute EAS commands from app directory, not monorepo root
  • Restore pnpm store and Metro cache per app for independent speedups

Alertmanager Routing Fixes to Cut Prometheus Alert Fatigue

Originally published on kuryzhev.cloud A pager goes off at 3 a.m. with dozens of notifications for the same disk-pressure event on one node, spread across three teams who all have the node exporter…

  • Alert fatigue caused by improper configuration in Prometheus Alertmanager routing
  • Grouping alerts by scope reduces duplicate notifications for same root cause
  • Inhibition rules suppress lower-severity alerts when higher-severity alert active

More from Thursday 17 September →