reconcile-gate-sentinels-with-exit-codes

Reconciles structured gate sentinels with process exit codes using pessimistic-wins semantics.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/shuddl/shuddl-os --skill reconcile-gate-sentinels-with-exit-codes-shuddl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reconcile-gate-sentinels-with-exit-codes
Source: https://github.com/shuddl/shuddl-os/tree/main/.claude/skills/reconcile-gate-sentinels-with-exit-codes
Command: npx skills add https://github.com/shuddl/shuddl-os --skill reconcile-gate-sentinels-with-exit-codes-shuddl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Gate harnesses that parse structured sentinels (##SHUDDL-GATE##) from child output can record a PASS for a command that actually exited non-zero, producing false greens in release artifacts. This Skill defines the reconciliation rule and the package-script mode discipline that prevent those defects. ## Core Features & Use Cases - Sentinel/exit-code reconciliation: A sentinel may degrade a clean exit but never upgrade a failing one; exit 1 + PASS becomes FAIL, exit 2 + PASS becomes BLOCKED, with the disagreement named in detail. - Blocking mode baked into package scripts: Field and promotion gates carry their --mode flag in the package.json script so no documented invocation can silently run in a non-blocking local mode. - Wrapper gate handling: Covers gates that relay nested children's sentinels, where the last nested PASS must not override the wrapper's failure. - Use Case: When adding a Playwright browser gate to package.json, bake --mode release into the script and pin guard tests for every sentinel/exit-code disagreement quadrant. ## Quick Start Ask the AI to review a gate script that parses ##SHUDDL-GATE## sentinels and verify that exit codes always win over a PASS sentinel.

Frequently Asked Questions about reconcile-gate-sentinels-with-exit-codes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reconcile a gate sentinel with a process exit code?▼

Apply pessimistic-wins semantics: if the exit code is non-zero and the sentinel says PASS, downgrade to FAIL (exit 1) or BLOCKED (exit 2) and name the disagreement in the detail field. A sentinel may degrade a clean exit but never upgrade a failing one.

Why does my CI gate report PASS when the command failed?▼

The harness likely preferred the last sentinel found in combined stdout/stderr over the child's exit code. Wrapper gates relay nested output, so a nested child's PASS printed before the wrapper failed gets recorded as the verdict.

Should gate blocking mode be a package.json script flag or caller argument?▼

Bake the mode into the package.json script for gates with no advisory use case, such as field or promotion gates. A mode left to the caller gets dropped, letting an all-skipped run exit 0 while the spec claims it is BLOCKED.

When should sentinel reconciliation not be applied?▼

Skip reconciliation for tools that only ever synthesize results from exit codes, since there is no sentinel to reconcile. Also return the sentinel unchanged when the exit code is 0 or the sentinel is already non-PASS.

What tests prevent sentinel and exit-code disagreement regressions?▼

Pin every disagreement quadrant: exit 0+PASS, exit 1+PASS, exit 2+PASS, null+PASS, and exit 0+BLOCKED. Add per-step CI assertions that each strict browser step carries its mode flag, since one global regex match let steps lose the flag silently.