GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads · Issue #5737 · developing-today/code

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

New issue
Copy link
New issue
Copy link
Closed
#7425
Closed
fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads#5737
#7425
Copy link
Assignees
dezren39
Labels
app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 5, 2026
Issue body actions

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

  • A fleet process started without HOME (cron, a minimal systemd unit, env -i, a container) silently reads its configuration from whoever controls its working directory — the exact planted-config hazard fleet-config: empty XDG env vars resolve to CWD-relative paths (a planted ./fleet/fleet.toml is loaded), and a relative FLEET_BROKER_SOCKET bypasses under-HOME resolution #5473 closed for the XDG spelling of this bug.
  • The broker socket and state dir landing in the CWD means two processes in different directories talk to different brokers / keep different state, with no error anywhere.
  • Siblings, same class, different crates and different wrong anchors: atlas-search(fleet-search): HOME unset/empty resolves state/config/token paths relative to the CWD (literal ~ dir) #5640 (atlas-search / fleet-search, literal ~ CWD dir) and fleet-queue(client): HOME unset/empty makes home() empty — broker socket, token, and worker signal paths all anchor at the filesystem root #5673 (fleet-queue client, filesystem root). This one is fleet-config's own copy; neither sibling covers it.

Acceptance criteria

  • With HOME unset or empty (and no absolute XDG/FLEET override), fleet-config never resolves the config file, state dir, or broker socket relative to the CWD: it either resolves a real home (e.g. passwd entry) or fails loudly with an actionable error naming HOME.
  • A planted ./.config/fleet/fleet.toml in the working directory is never loaded in that environment.
  • Pinning tests cover HOME unset and HOME empty for file_path, state_dir, and broker_socket (the existing fleet-config: empty XDG env vars resolve to CWD-relative paths (a planted ./fleet/fleet.toml is loaded), and a relative FLEET_BROKER_SOCKET bypasses under-HOME resolution #5473 tests cover empty XDG with HOME present).
  • Behavior with HOME set is unchanged; existing fleet-config tests stay green.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    developing-todayBot
    on Nov 5, 2026 – with developing.today
    Contributor
    More actions

    CODE-1426

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

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (creator lane B, new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b run 2026-11-04 18:50 CST
    • Found via: filed this run
    • Task: fleet-config home_dir() falls back to "." when HOME is unset/empty — config file, state dir, and broker socket resolve CWD-relative and a planted ./.config/fleet/fleet.toml loads. Verified with a probe crate on the laptop (~/git/fleet/probe-fleetconfig-home) against main a719a69, environment explicitly scrubbed; control with HOME set anchors under the real home. Siblings in other crates: issue atlas-search(fleet-search): HOME unset/empty resolves state/config/token paths relative to the CWD (literal ~ dir) #5640, issue fleet-queue(client): HOME unset/empty makes home() empty — broker socket, token, and worker signal paths all anchor at the filesystem root #5673; fleet-config: empty XDG env vars resolve to CWD-relative paths (a planted ./fleet/fleet.toml is loaded), and a relative FLEET_BROKER_SOCKET bypasses under-HOME resolution #5473 covered empty XDG with HOME present.
    • Expectation: effort s; done = HOME unset/empty never yields CWD-relative fleet-config paths (real home or loud error), pinning tests for file_path/state_dir/broker_socket.
    • Links: queue packet packet-5737-triage.json (repo-health-code-pilot)
  5. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-k
    • Session / ID: task 9786
    • Found via: queue claim
    • Task: task 9786 (triage, direct lane) for issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737: verify the fleet-config HOME-unset CWD-relative fallback evidence against current main and route the fix.
    • Expectation: effort s; done = findings comment on issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737 and a fix task enqueued if the evidence holds.
    • Links: issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 5, 2026
  7. 192 remaining items

    Load more actions
  8. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    status:in-review
    on Nov 8, 2026
  9. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-w
    • Session / ID: task 12774
    • Found via: queue claim (resume after lane code-t's park expired)
    • Task: Resuming task 12774 from code-t's checkpoint: PR fix(fleet-config): passwd-home fallback when HOME is unset/empty/relative (#5737) #7425 (branch queue/12774-5737-home-anchor, commit 18c949e) implements the fleet-config passwd-home fallback for issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737; targeted tests were green on the laptop (cargo test -p fleet-config: 19 passed). I will verify the PR diff, checks, and Codex findings fresh, then merge on green/verified and complete task 12774.
    • Expectation: effort s; done = PR fix(fleet-config): passwd-home fallback when HOME is unset/empty/relative (#5737) #7425 merged, issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737 closed, task 12774 completed as fixed_merged.
    • Links: PR fix(fleet-config): passwd-home fallback when HOME is unset/empty/relative (#5737) #7425 · issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737
  10. developing-today
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 8, 2026
  11. developing-today
    added a commit that references this issue on Nov 8, 2026

    fix(fleet-config): passwd-home fallback when HOME is unset/empty/rela…

    3bd1953
  12. developing-today
    closed this as completedin #7425on Nov 8, 2026
  13. developing-today
    added
    status:done
    on Nov 8, 2026
  14. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-w (implementation by lane code-t, task 12774)
    • Session / ID: task 12774
    • Found via: queue claim (resume after lane code-t's park expired)
    • Task: PR fix(fleet-config): passwd-home fallback when HOME is unset/empty/relative (#5737) #7425 merged — fix(fleet-config): passwd-home fallback when HOME is unset/empty/relative. Verified fresh this shift: PR head was exactly the tested commit 18c949e (cargo test -p fleet-config: 19 passed on the laptop, per code-t's checkpoint), the diff matches every acceptance criterion of issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737 (passwd-home anchor, loud failure naming HOME, pinning tests for HOME unset/empty across file_path, state_dir, and broker_socket), and there were no Codex review findings to disposition. Merge commit 3bd1953; issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737 closed by the merge.
    • Expectation: done — task 12774 completed as fixed_merged.
    • Links: PR fix(fleet-config): passwd-home fallback when HOME is unset/empty/relative (#5737) #7425 · issue fleet-config: HOME unset/empty falls back to "." — config, state dir, and broker socket resolve CWD-relative, and a planted ./fleet.toml loads #5737
  15. developing-today
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.