feat(FAFF-398): fail-closed on mandatory review-chain exhaustion#284
Merged
Conversation
A lights-out (L4) adversarial review whose whole backend chain is exhausted with no opinion obtained (all-unreachable exit 5, or deadline exit 8) now fails CLOSED to needs-human instead of the pass+skip that silently no-ops the L4 second-opinion gate on an outage. - review-call.mjs: new EXIT.MANDATORY_OUTAGE (9) + a pure mandatoryRemap(exit, mandatory) applied ONCE at main()'s res.exit chokepoint, so every exhaustion path (the three deadline returns + the chain-exhausted return) is covered by construction; runReviewChain stays level-agnostic. New --lights-out flag. - SKILL.md: exit-9 row, the --lights-out pass-through (iff forwarded lights_out), the intentional autonomous-vs-lights_out asymmetry, checkpoint note (terminal needs-human, not a skip). - Advisory (L1-L3, flag absent) is byte-for-byte unchanged; config-fault classes (2/4/6/7) pass through unremapped. Step-10 merge gate needs no edit. Tests: 8 new cases in test/adversarial-call.test.mjs (pure remap, level-agnostic chain, main() integration for unreachable/deadline/served/no-flag/config-fault).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes FAFF-398.
What
On a lights-out (L4) run, a mandatory adversarial review whose whole backend chain is exhausted with no opinion obtained (all-unreachable exit
5, or deadline exit8) now fails closed →needs-humaninstead of the pass+skip that silently no-ops the L4 second-opinion gate on an outage (recurred: all 4 merges in run-140848). Advisory (L1–L3, flag absent) is byte-for-byte unchanged.How
review-call.mjs: newEXIT.MANDATORY_OUTAGE(9) + a puremandatoryRemap(exit, mandatory)applied once atmain()'sres.exitchokepoint — every exhaustion path (the three deadline returns + chain-exhausted) funnels through it, so it is miss-proof by construction;runReviewChainstays level-agnostic. New--lights-outflag.SKILL.md: exit-9 row, the--lights-outpass-through (iff forwardedlights_out), the intentionalautonomous-vs-lights_outasymmetry, and the checkpoint carve-out (exit 9 is a terminal needs-human, not a skip).needs-humanauto-parks viadecideFloor).Acceptance Criteria
EXIT.MANDATORY_OUTAGE(9) added —test/adversarial-call.test.mjs--lights-out→mandatory(default false) — parseArgs testmandatoryRemapmaps 5/8→9 only when mandatory; config-faults + OK pass through — mandatoryRemap testmain()integration: unreachable→9, deadline→9, served→0, no-flag→5, config-fault(AUTH)→7runReviewChainstays level-agnostic (ignores a passedmandatory) — level-agnostic testfaff validate-adapterspassesVerified:
node --test test/adversarial-call.test.mjs→ 80/80; fullnode --test→ 1159 pass / 3 fail (pre-existing docker/spawn, unrelated to this diff);faff validate-adapters→ PASS.Spec:
docs/specs/2026-07-07-faff-398-mid-run-fail-closed-on-review-chain-exhaustion-design.md. Settled punts: exit value =9; exit 9 writes no--phase2 skipped*status.