Skip to content

fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737

Open

Description

@dezren39

fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads

Evidence (verified this run, laptop primary @ a719a69)

pkgs/fleet/crates/fleet-config/src/lib.rs:198-200:

fn home_dir() -> PathBuf {
    env_path("HOME").unwrap_or_else(|| PathBuf::from("."))
}

home_dir() feeds Config::file_path() (lib.rs:216-224), Config::state_dir() (lib.rs:396-398), and Config::broker_socket() (lib.rs:273-291, via resolve_under_home / resolve_under). #5473 made empty XDG/FLEET_* values count as unset, but when HOME itself is unset or empty — and no absolute XDG base is set — every one of these paths becomes relative to the process's current working directory.

Probe (laptop, ~/git/fleet/probe-fleetconfig-home, real fleet-config crate as a path dependency; run from a scratch dir containing a planted ./.config/fleet/fleet.toml with [domains] planted = false; environment explicitly scrubbed):

  • env -u HOME -u XDG_CONFIG_HOME -u XDG_STATE_HOME -u FLEET_CONFIG -u FLEET_BROKER_SOCKET:
    • file_path=./.config/fleet/fleet.toml
    • state_dir=./.local/state/fleet
    • broker_socket=./.cache/laptop-agent/broker.sock
    • Config::load() succeeds and domain_enabled("planted") == false — the planted CWD config was loaded (an unknown domain defaults to enabled; false can only come from the planted file).
  • HOME= (empty) with empty XDG bases: identical CWD-relative results, planted config loads.
  • Control (HOME=/home/user): all paths anchor under /home/user, planted CWD config ignored.

Note: a process environment that happens to set absolute XDG_CONFIG_HOME/XDG_STATE_HOME masks the config/state paths (the broker socket has no XDG source and stays CWD-relative), which is presumably why this survived #5473's fix — that issue covered empty XDG values given a present HOME.

Why it matters

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  7. 158 remaining items

  8. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    work/assignedQueue worker lifecycle state
    on Nov 6, 2026
  9. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 9788 · repo-fleet-monitor run 2026-11-05 22:12 CST
    • Found via: monitor reconciliation
    • Task: Claim evaporated — the previous holder's claim on task 9788 ended without a terminal verb and the task is queued unclaimed (attempts 16/16, last checkpoint stage: handed_off). Labels reset to the truth: queue/queued + status/needs-triage. The fleet monitor's dead-in-queue pass this run also doubled the attempt cap (16 -> 32) where it had been reached.
    • Expectation: the next queue claimant picks up task 9788 from the handed_off checkpoint; no work was lost.
  10. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued task in the Supabase agent queue
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 6, 2026
  11. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  12. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · PR opened; queue reconciliation pending

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

Metadata

Metadata

Assignees

Labels

app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)queue/claimedQueue worker lifecycle statesource/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus/in-progressQueue worker lifecycle statestatus:in-reviewtask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions