Skip to content

[fatal-guard] CLI entry point hardening: error messages, exit codes, help text #1010

Description

@Ikalus1988

Goal

Harden the fatal-guard CLI entry point for production use.

Context

fatal-guard has a CLI at bin/fatal-guard.js but it lacks:

  • Consistent exit codes (0=success, 1=error, 2=usage)
  • Helpful error messages when things fail
  • --help and --version flags
  • Graceful handling of missing Node.js
  • Timeout for hung processes

Scope

  • Add --help flag with usage examples
  • Add --version flag
  • Define exit codes: 0=normal, 1=error caught, 2=usage error, 3=timeout
  • Add --timeout <ms> flag (default: 0 = no timeout)
  • Improve error messages for common failures:
    • Missing FATAL_HANDLER
    • Invalid JSON output from handler
    • Process not found
  • Test all exit codes and error paths

Deliverable

  • fatal-guard --help shows usage
  • fatal-guard --version shows version
  • Exit codes are consistent and documented
  • Error messages are actionable

Labels

ready, agent-friendly, zero-bounty


This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount).
🕵️‍♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know!
🙌 And when they open the PR, they can comment /claim #1010 either in the PR description or in a PR's comment.

🪙 Also, everyone can tip any user commenting /tip 20 @Ikalus1988 (replace 20 with the amount, and @Ikalus1988 with the user to tip).

📖 If you want to learn more, check out our documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-friendlyIssue has clear file path, commands, and expected outputneeds-acreadyzero-bountyZero monetary reward — merge credit + leaderboard only

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions