Build1 distinct publisher2 min readUpdated
A green 22-test suite and a brute-force oracle certified the path that could be enumerated. The bug lived in the fallback, where a 1e-9 tolerance promoted estimates into certainties.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
The number that condemns the code is not 13.96. It is 1e-10.
A mean-field estimate of 0.9999999999 sits that far below 1 [11], and the promotion threshold inside `finalize()` was 1e-9 [9]. The estimate cleared the bar with a factor of ten in hand [12]. That threshold was sized for the residue of exact arithmetic, where binomial weighting and division can return 3e-17 for a cell that is genuinely safe [10], and at that scale it does the job it was written for. Pointed at the output of twelve rounds of iterative relaxation [8], it converts a guess into a claim of proof, because by the time the numbers reach `finalize()` there is no record of which path produced them [11].
The differential test is the more instructive failure. The oracle works by enumerating every legal mine placement and counting [2]. The fallback exists precisely because that enumeration explodes once a component's frontier passes `maxComponentCells` [7]. So the oracle cannot cover the branch: the boards that reach it are the boards it cannot finish. Agreement to 5.551e-16 across 8,000 boards [3] is roughly two and a half units in the last place of a double [4], which is the signature of two implementations doing the same arithmetic, on the same path, correctly. More boards from the same generator buy more of that same evidence.
What the author did test hard is the part he knew was subtle: weighting each global mine total by `C(outsideCells, remainingMines - T)` [5]. On a 5x3 board with one mine left and two clues, the intersection square is a guaranteed mine and the other twelve squares are guaranteed safe [14]. Enumerate the frontier without the global budget and that square comes back at 0.0588 [13], an understatement of about seventeen times [15], and it is the lowest number on the board, so the solver recommends the one click that certainly loses [16]. That path was tested heavily and works [17]. The tests covered the mechanism the author already respected.
The check that would have caught the shipped bug needs no second implementation at all. Per-cell mine probabilities must sum to the mines remaining, exactly, by linearity of expectation [c6b]. The failing board summed to 13.96 against ten mines [6], nearly four phantom mines and a 39.6 percent excess [20], and it is one pass over the grid to notice. That is a check which runs on every board in production, including the boards no enumerating oracle can reach.
The output was consumed by a website taking `safe[]` from the library [21], and four of the six squares it called certain mines were not mines [19].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
The minesweeper probability solver has 22 unit tests and they all pass.
The solver was cross-checked against an independent brute-force implementation that enumerates every legal mine placement and counts.
Across more than 8,000 random boards the maximum deviation between the solver and the brute-force implementation was 5.551e-16, described by the author as floating-point noise.
The solver enumerates configurations per connected component indexed by mine count, convolves components, and weights each global total T by C(outsideCells, remainingMines - T); the author says this global weighting is the step most naive solvers skip.
On the failing position the per-cell probabilities summed to 13.96 on a board with 10 mines.
The sum of per-cell mine probabilities must equal the number of mines remaining exactly, by linearity of expectation.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Mechanically specific but single-source and self-reported
The account is unusually concrete for a single-author post: verbatim finalize() and mean-field code, an explicit EPS value, a reproducible 5x3 counterexample with printed probabilities, a falsifying invariant (probabilities summing to 13.96 against 10 mines), and a follow-up measurement of 65 wrong certainties out of 244 across 12 Expert boards. Against that, every figure is the author's own measurement of his own code, with no repository, commit, or third-party reproduction, and the article's ledger offers no independent corroboration.
One hobby deployment, one user path
Observed usage is limited to the author's own website consuming safe[], exercised over roughly 300 games, plus self-run benchmark harnesses (8,000+ random boards, 12 Expert boards). There is no evidence of external users, downloads, dependents, package release, or third-party integration.
Claims run behind the evidence presented
The framing is deflationary rather than promotional: the author leads with his own passing tests and last-bit oracle agreement in order to undercut them, quantifies his own failure (six claimed certain mines with two real; 13.96 against 10 mines), and reports that his first fix still left 65 of 244 certainties wrong. The generalisable lesson — that a floating-point tolerance applied to a heuristic's output converts an estimate into a proof at an API seam that has discarded provenance — is arguably broader than the post claims for it, which is why the gap reads mildly negative rather than aligned.
Mild self-promotion, offset by self-incrimination
The post is first-person developer marketing in the ordinary sense: a personal dev.to byline promoting a personal project and website, with no disclosed sponsor, vendor, or commercial stake. The content works against the author's own reputational interest by documenting a shipped bug that told users to click mines, which limits distortion pressure; the residual incentive is attention for the project and the author.
Mechanism credible, prevalence unverified
Confidence is moderate: the causal chain from unguaranteed mean-field estimates through a provenance-free finalize() and a 1e-9 tolerance into a certainty list is internally coherent and supported by code and a violated invariant, so the mechanism is likely as described. Everything about scale — how often approximation triggers, how the fixed solver performs, whether anyone else reproduces it — rests on one self-reported source with no repository or external check.
build
Allow-list the closed set, block-list the open one: 193 thin geo pages, one gate1 distinct publisher
build
Three ways to ask who embedded your iframe, and only one the host cannot switch off1 distinct publisher
build
The third answer: a dead-code tool allowed to say "not traced yet"1 distinct publisher
build
A 20-digit ID went into a JSON repair tool and a different number came out1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 23, 2026