Repository navigation
feat(addie): add non-admitting matched NI diagnostic - #7306
Conversation
c684dbc to
c88dd12
Compare
20fb27a to
48ab9f6
Compare
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
New, research-only Lloyd-Moldovan matched-pair NI diagnostic module added under server/src/addie/eval/matched-pair-ni/** (8 files, all additions). Non-admitting, unwired, no protocol surface touched — so no changeset is owed, and schema↔docs / oneOf / artifact-immutability gates do not apply.
Reviewed the load-bearing files: engine.ts (two-worker concurrency gate + worker timeout backstop), algebraic.ts (Sturm root isolation, signed-interval division), and exact-inference.test.ts — all correct and fail-closed. The only operational note (worker errors swallowed without alerting) is acceptable given the diagnostic-only, non-admitting, unwired nature and does not rise to medium.
Decision-table walk: no critical/high/medium findings (rows 1, 4, 5, 6, 8 do not fire). gated_paths is false (row 2 n/a). high_risk is true but every reason is (added) — new scaffolding, which the risk-reading rules treat as inherently low risk; no (deleted) or (modified) entries (rows 3, 5 n/a). No no-auto-approve team match (row 7 n/a). Falls through to row 9 → approve.
Summary
Adds a standalone, research-only Lloyd–Moldovan (2008) restricted-score E+M exact-unconditional matched-pair noninferiority diagnostic. It uses normalized BigInt rationals, rational probability polynomials, square-free Sturm derivative-root isolation with rational interval enclosures, and continuous null-boundary maximization. The published n=25, x=2, t=2, m=.10 fixture is enclosed and rounds to .0085.
Primary source: Lloyd CJ, Moldovan MV. A more powerful exact test of noninferiority from binary matched-pairs data. Statistics in Medicine. 2008;27(18):3540-3549. doi:10.1002/sim.3229.
Exact safety and isolation scope
compareScorePreciselyresolves the reviewed score comparison.mapand iterator methods are never invoked by the engine core; poisoned versions therefore do not execute through the core’s array construction, population, or iteration paths.RegExp.prototype.test,String.prototype.startsWith/indexOf/slice/endsWith,Map.prototype.get/set/has, andWeakSet.prototype.add/has. A detected replacement returns the existing conservative worker failure response before the core starts. This is a finite named-method check, not a general arbitrary-intrinsic isolation claim.node --import tsxhas one explicit exclusion: poisoning mutable built-ins before dynamically importingengine.tsis outside the engine isolation contract.tsx's external resolver runs before engine evaluation and can hang first; the engine worker timer cannot cover it. This is not presented as engine isolation. The emitted-JavaScript pre-evaluation and TypeScript post-loader/pre-core guarantees above remain covered.Deliberate non-admission and constrained domain
Admission remains blocked by missing independent-reference match, continuous type-I certificate review, no confirmatory sample-size validation for supported N, and unvalidated adaptive re-estimation. The checked-in fixture is provenance only, not an independent-reference claim. The support predicate is non-Cartesian: inference uses S²·b <= 1,500,000; exhaustive size additionally requires n <= 8 and S³·b <= 1,500,000, with S=(n+1)(n+2)/2 and b margin bit length. Unsupported requests return conservative diagnostic evidence.
Validation
map/iterator methods and assert normal completion without calling those helpers. For each explicitly audited RegExp/String/Map/WeakSet method, they assert bounded{ ok: false }settlement and no core-start/core-complete telemetry across inference and size tasks.npx vitest run --config server/vitest.config.ts server/tests/unit/addie/matched-pair-ni/exact-inference.test.ts -t 'does not claim TypeScript source pre-evaluation'npx vitest run --config server/vitest.config.ts server/tests/unit/addie/matched-pair-ni/exact-inference.test.ts -t 'keeps post-loader/pre-core TypeScript'npx vitest run --config server/vitest.config.ts server/tests/unit/addie/matched-pair-ni/exact-inference.test.ts -t 'does not export worker-only expensive cores'Review request
Please perform a fresh independent exact Sol review. Do not approve or merge: this remains research-only and non-admitting.