Skip to content

Atlas CLI family consistency: exit codes, version strings, and the HOME fallback split (book survey, #13251) #13279

Open

Description

@dezren39

Found by the Atlas book survey (#13251, survey A). Cross-binary consistency gaps in the Atlas CLI family; the book documents each binary's actual behaviour because no family-wide rule can be stated.

  1. Exit-code philosophy is inconsistent across the family. atlas-search: 1 = runtime, 2 = usage. atlas-stage: same split via different mechanics. atlas-classify and atlas-sweep: 2 for everything, including pure runtime failures. atlas-github-comments: 1 for everything, including pure argument errors. atlas-eval: 2 usage / 1 runtime. fleet search adds 3 (routing unavailable) and inherits fleet's 69. No two hand-rolled binaries agree.
  2. Version strings collide. atlas-search --version and fleet search --version both print 0.1.0, but they are different packages' versions (fleet's derived build is 0.1.0-dev+gb8bbcc0 per fleet version). No atlas binary exposes a source revision.
  3. HOME-failure behaviour is split inside atlas-core. atlas-search's home_dir() (and atlas-core path expansion, and fleet-search's copy) panic on missing/empty HOME per the atlas-search(fleet-search): HOME unset/empty resolves state/config/token paths relative to the CWD (literal ~ dir) #5640/Home is not optional — one home-resolution contract for the repo's tools #5762 contract. But JsonlTraceSink::default_dir() and JsonlFeedbackSink::default_dir() fall back to PathBuf::from(".") — traces/feedback land under the CWD in exactly the situation the contract forbids, and the CLI's search path constructs the trace sink from default_dir() on every run.

Book chapters: pkgs/atlas-search/book/reference/*.md exit-code tables; operations/troubleshooting.md.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T12:54:38Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Lane XC claim (archer seat, 2026-11-23). Taking #13279. Plan: premise-check all three parts against current main; land the concrete slice — part 3 (JsonlTraceSink/JsonlFeedbackSink default_dir() CWD fallback violating the #5640/#5762 HOME contract) — and scope parts 1–2 (exit-code philosophy, version strings) for what is mechanically landable vs design-owned. Paginated ownership check before this claim: no prior lane claim on this issue.

  3. added a commit that references this issue on Nov 23, 2026
  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Lane XC — part 3 LANDED via PR #13351 (merged f5334428545a, head SHA-guarded at cb38ee2184e).

    Part 3 (HOME-failure split) — done. atlas-core gains a crate-internal require_home() implementing the #5640/#5762 contract once (missing/empty HOME fails loudly naming HOME); JsonlTraceSink::default_dir() and JsonlFeedbackSink::default_dir() now resolve through it instead of falling back to a CWD-relative path. Verification (laptop route): cargo test -p atlas-core 364 passed / 0 failed (lib re-run on the final tree 169/169, incl. the three new home_tests); behavioural probe run with HOME unset — both default_dir()s panic naming HOME with the fix, both probe tests fail with the pre-fix bodies restored (mutation check); cargo fmt --check clean. One honest gap: a consumer-crate cargo check -p atlas-search stalled ~35 min in the shared sccache queue under multi-lane load and was stood down — the change alters no public API (function bodies + one pub(crate) helper) and atlas-core's own binaries/tests all compile and pass.

    This issue stays OPEN on parts 1–2, which are design-shaped rather than mechanical:

    • Part 1 — family exit-code philosophy: six binaries disagree (1/2 splits via different mechanics, 2-for-everything, 1-for-everything, fleet's 3/69). Unifying means picking the winning philosophy and changing documented per-binary behaviour — an owner decision, not a consistency edit.
    • Part 2 — version strings: atlas binaries print the Cargo package version (0.1.0) and none exposes a source revision; adding one needs build-revision plumbing across the workspace and a decision on the string's shape (fleet's is 0.1.0-dev+g<sha>).

    Premise note: part 3's premise was verified verbatim on main before the fix (both fallbacks present at 619b7e56e6d); parts 1–2 were not independently re-verified this pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions