Three Upstream Bug Fixes Show What a Green Test Suite Can Miss
In this article
A green test suite establishes that the assertions it ran passed. Three upstream fixes show why a regression test also needs to cover the surrounding contract: request payloads, an immutable base state and numeric accuracy near a boundary. These cases are useful when reviewing an AI-generated patch, without treating a few library bugs as a ranking of model capability.
Correction, 22 October 2026: The earlier article reported an exact 28-run model comparison, hidden-test counts and a reviewer quotation. The original author report and raw runs could not be inspected during this review, so those specific results and the quotation are withdrawn here pending verification. The revised account links the upstream records and distinguishes their reported tests from our proposed review procedure. AI Mastery has not rerun the upstream suites or a coding-agent benchmark for this revision.
Ky: distinguish an option from user data
Ky pull request 867, merged on 6 July, addresses numeric retry limits lost during an options merge. A parent configured with retry: 3, extended with an object specifying retry methods, should retain its limit. Passing a number into a generic deep merge dropped it.
Expanding numeric shorthand into {limit: number} repairs that symptom, but doing so at every recursion level also changes a user's nested JSON field named retry. The maintainer demonstrated the outgoing-body change and requested a regression test. The final patch scopes shorthand handling to the root options merge; recursive merges do not apply that option rule.
The important review boundary is the meaning of a key at a particular location. A field inside a request body is application data, even if it shares an option's name. A test that checks only retry counts cannot establish payload preservation.
Immer: preserve the object behind a reordered position
Immer pull request 1255, merged on 16 July, concerns the array-methods plugin. After a native reverse() or sort(), a base object can move to another index. A positional check that only recognizes the original index can then expose the raw object, letting a later write mutate the base state.
The fix recognizes relocated base references and drafts them before exposure. It must still distinguish those references from newly assigned values that should remain undrafted. The discussion explains why accepting every draftable value is too broad, and replaces a repeated membership scan with a Set-based check. The reported regression cases cover base-state preservation and a patch/inverse-patch round trip.
This is a different contract from merely producing the expected reordered result. A result can look correct while an object retained by the caller has been changed. A regression assertion should inspect that retained object too.
decimal.js: test the numerical boundary
decimal.js pull request 260, merged on 13 July, changes the expression used by asin near the boundary. Evaluating 1 - x*x close to one suffers cancellation; the change uses (1 - x)(1 + x). The contributor reports near-±1 cases checked against mpmath, with updates to both distributed source variants.
The algebraic expressions are equal in exact arithmetic, but their finite-precision evaluation can differ. A proposed acceptance check should therefore retain an independent high-precision reference for boundary inputs rather than checking only ordinary values or whether the result has the expected type.
Turn the surrounding contract into a review check
The following matrix is our proposed review aid, not an experiment performed on coding models.
| Change under review | Symptom check | Contract check |
|---|---|---|
| Normalize a library option | Requested option remains effective | Nested caller data reaches the boundary unchanged |
| Reorder an immutable collection | Result has the expected order | Retained base references remain unchanged and inverse patches restore state |
| Repair a numeric expression | Ordinary inputs return plausible values | Boundary cases agree with an independently checked reference |
For each proposed fix, write down which values the caller owns and which behavior the library promises to preserve. Keep an assertion for that contract outside the implementation being changed. When a reviewer identifies a concrete unintended mutation, reproduce it and resolve it before accepting the patch; do not dismiss it because the visible suite is green.
These records do not establish how often any model will make the right decision. They supply concrete cases for a future controlled evaluation. Retain prompts, raw patches, runtime versions and hidden-test outcomes before publishing a model ranking, as described in our preservation and evaluation method.
Frequently asked questions
Does this review reproduce the original 28-run coding-agent study?
No. The original author report and raw runs could not be verified in this review. Its exact model results and reviewer quotation are withdrawn here; the revised account uses upstream fixes.
Why can retry normalization corrupt a JSON body?
A generic recursive merge can apply an option-specific rule to a nested user field with the same name. Ky's fix scopes numeric retry expansion to the root options merge.
Why does the decimal.js fix change the expression instead of only increasing precision?
The upstream change uses (1 - x)(1 + x) instead of 1 - x*x near the boundary, addressing cancellation in the expression itself. The authors report regression tests near plus and minus one.
Related Reading
StepFun Opens 600B MoE Weights: 27B Active, 1M Context
StepFun's Step 5 Preview is now open weights: a 600B sparse MoE with 27B active parameters, 1M context, and a $1.00/$2.70 API.
JEPA-Anything Cuts Interventional Pong Error 34.83% With One Recipe
Researchers report Orthogonal Predictive Factorization lets one JEPA recipe handle seven domains, cutting single-intervention Pong MSE by 34.83%.
GPT-6.1 Sol Matches Astra on Coding at One-Fifth the Price
OpenAI's GPT-6.1 Sol hits $2/$10 per million tokens—one-fifth of Astra's rate—while matching it on DeepSWE and closing to within 2.1 points on computer use.