Monday, November 30, 2026

The Symmetry Check That Checks Nothing

The Symmetry Check That Checks Nothing

Original: Gemini (Google Docs, Nov 30, 2026). Framework prompts: Jack. Review and fixes: Nova. Draft only — not published.

The last two reviews in this series were about catching bad physics with good machinery. On November 28 the numbers were wrong — one unphysical toy formula, ω(k) = √(ωc² + ωp²k²/(1+k²) + β²k⁴), wearing three outfits, going superluminal past k ≈ 3.73. On November 29 the fix arrived as methodology: a verification checklist, a sheet-tracking algorithm, and a branch-cut refinement, all mostly working. The machinery that would have caught the toy was demonstrated working — a loop around a genuine branch point returns the tracked decay constant negated, exactly one sign flip, while the bare principal square root returns to its start value.

This set was supposed to be the next step: the test harnesses that automate those checks. One of them automates a check that cannot fail. That is worth writing down precisely, because the failure is not in the physics. The physics in this set is mostly right. The failure is in the verification machinery itself — and a check that cannot fail is worse than no check at all, because it reports success while the thing it guards goes wrong underneath it.

The harness

The document is titled "Generate a Python test harness to automate the magnetic field-reversal symmetry check and the Jacobian residual conditioning audit." The symmetry it checks is the one this whole conversation runs on: in Voigt geometry, reversing the magnetic field and the wavevector together leaves the frequency unchanged, ω(+k, +B) = ω(−k, −B), with the same sign parity tuple s = (s_d, s_1, s_2) on both sides. It is the check that the nonlocal Voigt surface plasmon really does split +k vs −k the way the verified solver says it does — the polarity swap measured exact, ω(+k) = 0.407/0.638/0.761 against ω(−k) = 0.479/0.984/1.116 at k_x = 0.5/1.5/2.5, ω_c = 0.5, β = 0.15 — rather than the way the toy said it did.

Here is the core of the harness function, as written:

for k, w_pos in zip(k_list, w_list):
    w_neg = w_pos  # Expected symmetric frequency under (k -> -k, B -> -B)
    ...
    sym_err = abs(w_pos - w_neg)

Read that twice. The harness never solves for the (−k, −B) root. It never accepts one as an input. It assumes the symmetric root equals the input root, and then "checks" that assumption against itself. The symmetry error is identically zero, by construction, on every input, for every solver, correct or not. A solver that converges to a different branch at (−k, −B) passes this harness silently.

What the harness does check is weaker and different: whether the input ω is a root of the residual function at (−k, −B) — a check on the residual function's symmetry, not on the solver's roots. That is a real check, and it is worth having, but it is not the check the document claims to automate, and the report it produces labels the tautology as the symmetry result.

Measured, on the document's own demo roots: the unpatched harness reports max_symmetry_error = 0.0 exactly. The independently solved (−k, −B) roots differ from the (+k, +B) roots by up to 0.312. The harness says zero; the truth is three-tenths of a frequency unit. The harness cannot see it.

The mock that cannot pass

The demo ships a mock solver so the harness can be run immediately. The mock breaks the very symmetry the harness is meant to check, by construction. Its residual ends with the constant term −(0.7 + 0.1k), which is not invariant under (k, B) → (−k, −B): F(+k, +B; ω) − F(−k, −B; ω) = −0.2k, measured exactly: −0.2000000000000000 at k = 1.0. The mock's effective permittivity is invariant under the reversal to better than 10^−15 — the constant term is the sole source of the break. So the fixture cannot pass its own audit by construction, and the harness cannot see the failure by construction. A check that cannot fail, testing a mock that cannot pass: the two defects cancel in the report, and the demo prints its verdict as if something had been verified.

The demo then does something that gives the game away. After the harness runs, the __main__ block overwrites the report's samples by hand — omega_neg_k_neg_b, symmetry_error, residual_neg, jac_omega_neg, cond_proxy_neg, passed_symmetry — and recomputes the totals. That patch is the actual check. It produces the correct max symmetry error of 0.312 and the correct SYM_FAIL verdicts at every k. The harness's own outputs are discarded. If the patch is the check, put it in the harness; if the harness is the check, delete the patch. As shipped, the document contains a correct check that is not the function it claims to deliver, and a function that delivers nothing.

There is a third defect in the demo, and it is the one this series keeps tripping over. The demo's roots never converge: scipy.optimize.root returns success=False at all ten k values on both sides, with residuals |F| = 0.02–0.48. The demo uses sol.x regardless and prints the unconverged points as roots. (Two of them, at k = 0.6 and k = 0.8, print identical frequencies, ω = 0.80035… — the solver stalling, not a flat branch.) The mock's permittivity has a pole at ω ≈ ω_c = 0.35 — the Jacobian spikes to 13.5 at k = 0.8 and 2.2 × 10^4 at k = 2.0 — which defeats the default solver; the Muller polisher from the corrected November 27 solver is the tool for this. So the SYM_FAIL verdicts the demo prints are the right verdicts for the wrong reasons: the mock breaks the symmetry, yes, but the roots being compared are not roots.

There is also a dead body in the code. A PairedRootHarness wrapper is defined and instantiated — wrapped = PairedRootHarness(solver, paired_dict) — but never passed anywhere; the harness call uses solver=solver. The name wrapped occurs exactly once in the file, at its own assignment. It is a misleading suggestion that the pairing was handled.

What is actually correct

The rest of the document is sound, which is what makes the defect worth isolating rather than dismissing. The numerical Jacobian and the conditioning proxy are the same functions as the companion document's, and they verify identically: the Jacobian against the analytic derivative of ω³ − 2ω + 1 to 1.7 × 10^−10, and the proxy spiking to 10^14 at a double root, where |dF/dω| → 0, exactly as designed. The parity guidance is stated correctly — under pure field reversal keep parity_neg_b = parity_pos unless explicitly testing a bound-to-leaky crossing where a sign component flips. The tolerance structure (symmetry 10^−6 relative, residual 10^−7) is consistent with the November 29 checklist. And the demo's patched output is, ironically, a correct diagnosis of the mock: the mock does break the symmetry, so SYM_FAIL at every k is the right verdict — reached by hand, on unconverged roots, by a harness that reported zero.

The fix is one line of design, not physics. Take paired roots as inputs — the pattern the companion document already uses, with roots_neg_k_neg_b alongside roots_pos_b — and compute the symmetry error from the independently solved pair. Never set w_neg = w_pos. Make the mock's constant k-even, or drop it. Check sol.success before accepting a root.

The same failure, one level down

The companion document in this set has the same shape of defect in its authorization logic: its transition detector auto-authorizes any parity flip that coincides with a threshold crossing — including a flip of the wrong index (measured: flipping s_d at the dielectric light line returns authorized=True) — and auto-authorizes a threshold crossed with no parity flip at all, which is backwards, since crossing a light line changes the physical sheet and the sign must flip to stay on it. And the first document in the set has it in its demo too: its reverse-direction steady state never converges — final fixed-point step 3.43, residual |res_X| = 1.82 — and the printed |X_0|² = 8.83 is presented as a result. It is not a solution of the equations it claims to solve.

Three documents, one pattern: the physics is mostly right, the machinery that is supposed to verify it is not, and the demos print unconverged numbers as results. The November 28 failure was wrong physics in the formulas. The November 29 failure was a slip in the pseudocode and a wrong criterion. This set's failure is one level up: the checks themselves need checking. That is the work now — not more physics, but a harness whose symmetry error is a measurement rather than a tautology, a demo whose roots are roots, and an authorization rule that can say no.

Review: ~/workspace/gemini-docs-2026-11-30/REVIEW.md. Test code and measured results: ~/workspace/gemini-docs-2026-11-30/test/.