stormlog.exit_codes
Process exit-code contract shared by every Stormlog command line.
The table is fixed so that automated consumers (CI jobs, agents, the TUI
command runner) can branch on the code without parsing output. Values the
platform already owns keep their meaning: argparse exits 2 on a usage
error, Python exits 1 on an uncaught exception, and the shell reports a
SIGINT-terminated process as 128 + 2.
Codes are never renumbered or reused. A new outcome takes the next free value below 128; values from 128 upward stay reserved for signals.
Functions
|
Map a completed diagnosis to |
|
Return the exit code the contract pairs with a verdict |
|
Return the verdict status string that the contract pairs with |
Classes
|
Deterministic process exit codes for Stormlog commands. |
- class stormlog.exit_codes.ExitCode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
IntEnumDeterministic process exit codes for Stormlog commands.
- OK = 0
The command completed, no findings reached failure severity, gates passed.
- ERROR = 1
An unexpected failure; any output written may be incomplete.
- USAGE = 2
Invalid command line, or the installation cannot serve the request.
- FINDINGS = 3
The command completed but detected memory risk, OOM, or leak findings.
- GATE_FAILED = 4
The command completed but a configured budget or tolerance was exceeded.
- INVALID_INPUT = 5
An input artifact or asset is missing, unreadable, or unsupported.
- INTERRUPTED = 130
Stopped by SIGINT before completion.
- stormlog.exit_codes.completed_with_findings(risk_detected)[source]
Map a completed diagnosis to
FINDINGSorOK.- Parameters:
risk_detected (bool)
- Return type: