|
Bootstrap
Bash-based bootstrap engine reference documentation
|
Accepted
This Architecture Decision Record establishes the philosophy governing process exit codes returned by the bootstrap engine.
Exit codes form part of the project's public interface and should communicate high-level outcomes consistently to both interactive users and automation.
The bootstrap engine is expected to be used interactively, within shell scripts, and by continuous integration systems.
Previous ADRs establish that diagnostics are written for humans and logging is optimized for progressive disclosure. Exit codes complement those interfaces by providing a concise, machine-readable indication of overall success or failure.
As the project evolves, additional features should not require consumers to reinterpret existing exit code meanings.
The bootstrap engine shall treat exit codes as a stable public contract.
Exit codes should represent categories of outcomes rather than individual implementation details.
Representative categories include:
Each category should remain stable across releases whenever practical.
Human-readable diagnostics shall accompany non-zero exit codes.
Stable exit codes enable reliable automation.
By categorizing failures rather than assigning unique codes to every possible condition, the project preserves flexibility while remaining predictable.
Users receive detailed explanations through diagnostics while scripts receive a stable mechanism for detecting broad classes of outcomes.
The bootstrap engine could return the same non-zero exit code for every error.
This was rejected because automation often needs to distinguish user mistakes from environmental or backend failures.
The project could assign a unique exit code to nearly every failure.
This was rejected because such schemes become difficult to document, maintain, and evolve without breaking consumers.
Exit code assignments should be documented and tested.
Changes to existing exit code meanings should be treated as compatibility changes.
Future features should map naturally onto existing outcome categories whenever possible.
This ADR does not assign specific numeric exit codes.
It does not define shell signal handling.
It does not require every internal error condition to have a unique exit code.
Future versions may publish a formal exit code reference and expose structured diagnostics alongside traditional process exit status.
Those additions should complement, rather than replace, the stable exit code contract.
Exit codes are part of the bootstrap engine's public interface.
They should communicate stable categories of outcomes while detailed diagnostics provide the information needed to understand and resolve failures.