You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(scripts): measure-self-test-floor recognises a ternary process.exit as a failure producer (#15339) (#15413)
* fix(scripts): measure-self-test-floor recognises a ternary process.exit as a failure producer
`classifyFloor` awards ROSTER only when a roster comparison AND a failure
production both match. The failure half read five literal spellings, none of
which covers `process.exit(cond ? 0 : 1)` -- so a file could carry a complete,
working roster floor and still classify NONE. Measured on
`scripts/check-regen-pending.mjs` before its verdict was respelled as an
explicit branch; the cost is prospective, since nothing on main mis-classifies
today.
The criterion is now published in two halves, NAMED and TERNARY, so each can be
controlled on its own. TERNARY reads a ternary exit whose failing arm is a
non-zero literal, in both orders. A bare `process.exit(<expr>)` stays
unrecognised on purpose: over a self-test that returned early it is
`process.exit(undefined)` -- exit 0, the accident shape this instrument exists
to tell apart from a handshake.
Six inline controls come with it, run on every invocation like the rest: a
roster floor whose only failure production is the ternary reads ROSTER (with a
setup control proving the fixture carries no other recognised spelling), the
non-1 and inverted arms read ROSTER, a bare opaque exit reads NONE, the same
fixture with the roster renamed reads NONE, and the recognised shape is pinned
to the dispatch line the ACCIDENT fixture already carries.
Census tallies are unchanged: 170 rows, 163 ROSTER / 6 NONE / 1 COUNT, with
`--json` byte-identical before and after. No key renamed; additive.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* docs(scripts): correct a direction word in the ternary-exit control comment
The ACCIDENT fixture is defined above `runControls`, not below it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
---------
Co-authored-by: Claude <noreply@anthropic.com>
'CONTROL FIXTURE INVALID: the ternary fixture picked up one of the NAMED failure spellings; every verdict below it would then be passing for the wrong reason');
'POSITIVE CONTROL FAILED: a bare `process.exit(<expr>)` was read as producing a failure -- an opaque expression is the accident shape (it is `process.exit(undefined)` after an early return), not a floor');
'POSITIVE CONTROL FAILED: the ternary exit alone was classified ROSTER -- producing a failure is HALF the criterion; a roster this criterion can NAME is the other half');
395
+
// Reuse rather than invention: the shape now recognised is the one the ACCIDENT
396
+
// fixture above actually dispatches with (and the audit file it is reduced
397
+
// from), so the criterion stays pinned to a spelling measured in this tree.
0 commit comments