Skip to content

Home-resolution inventory audit — disposition every remaining site against the contract #5763

Closed

Description

@dezren39

Home-resolution inventory audit — disposition every remaining site against the contract

Phase 4 of the home-resolution design (design issue #5762; design doc files/designs/code-home-resolution-contract.md
in the keep-the-four-repos-healthy goal workspace).

The contract: a tool that needs the home directory resolves it
exactly one way — a non-empty HOME; empty is unset; unset is a
named error at the first surface that needs a path, never a
substitute directory (no root anchoring, no CWD fallback, no
literal ~, no hardcoded user). Phases 1–3 cover the filed
crates (#5737 fleet-config, #5673 fleet-queue, #5640
atlas-search/fleet-search). This audit dispositions everything
else the inventory finds, so the contract is a repo property,
not a per-crate accident.

Known unfiled sites (from the design pass's grep inventory, origin/main c2bf5fc)

  • pkgs/id/src/world_compile.rs:704 — std::env::var("HOME").unwrap_or_default():
    the fleet-queue shape (root anchoring) in id's own tree, one
    file away from world.rs's hard-error embodiment.
  • JS bin/* proxies — process.env.HOME || '/home/user'
    hardcoded-user fallback (agy-proxy.mjs, sync-models.mjs,
    provider-catalog-sync.mjs) plus template-literal
    ${process.env.HOME}/... path construction at further sites
    (claude-code-proxy, codex-proxy, commandcode-proxy,
    antigravity-ls-proxy): unset HOME yields undefined/...
    relative paths. Disposition may route these to this contract
    or to Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352's env rule — decide with evidence and record it.
  • mcpx (Go) — home, _ := os.UserHomeDir() discards the error
    at ~8 sites (internal/cli, internal/config, internal/daemon,
    internal/mcpclient): on Unix an unset HOME yields "" and
    root-anchored joins. Sites that already handle the error
    (err == nil guards) are conforming; disposition the rest.

Acceptance criteria

  • A grep inventory of home resolution (Rust env::var("HOME") /
    var_os, Go UserHomeDir / Getenv("HOME"), JS/TS
    process.env.HOME, Python os.environ["HOME"] / expanduser)
    is posted on this issue with a disposition per production
    site: conforms / fixed in this phase / filed separately
    (issue link + why its context genuinely differs).
  • Same-shape sites (unset/empty HOME silently producing a
    substitute directory) are fixed in this phase with the
    contract's probe matrix as tests (unset and empty both named
    errors; set = unchanged paths).
  • No production site remains whose disposition is "unexamined".
  • The design issue is commented with the closing inventory so
    its acceptance can be checked off.

Activity

  1. added
    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. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · design phase filed

  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · enqueue outcome

    • Triage packet: hidden_files/queue-packets/packet-5763.json; enqueued as task 9794.
    • Queue incident (self-caught, corrected in-pass): the first enqueue via the repo-queue CLI landed in the default repo-health-code-shadow queue (the CLI ignored the packet's queue field); the task was cancelled with reason recorded and re-enqueued with --queue repo-health-code-pilot — dedupe revived the same row 9794 into the pilot queue (verified by dedupe re-read: queue=repo-health-code-pilot). A worker has since claimed it (attempts=1 at last read).
  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 5, 2026
  6. 108 remaining items

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 10, 2026
  8. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Pickup — lane code-y, task 12780.

    Gate re-verified fresh this claim: Phase 1 #5737 CLOSED, Phase 2 #5673 CLOSED, Phase 3 #5640 CLOSED — the Phase 4 gate is open, so the inventory audit starts now. Plan: full grep inventory (Rust env::var/var_os("HOME"), Go UserHomeDir/Getenv("HOME"), JS/TS process.env.HOME, Python os.environ["HOME"]/expanduser) against current origin/main, disposition per production site posted here, same-shape sites (unset/empty HOME silently producing a substitute directory) fixed in-phase with the contract probe matrix as tests, closing inventory commented on design issue #5762.

  9. added and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 10, 2026
  10. added a commit that references this issue on Nov 10, 2026
  11. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Done — fixed_merged (lane code-y, task 12780; resume/verification pass).

    PR #8222 MERGED 2026-11-10T21:24:17Z, merge commit 578e178dbaedd0d5dbcac54d9b49bf400b336dd6. Credit where due: the fixes are lane code-k's commit 5289c89cac and the inventory/closing comments are lane code-o's; this pass independently verified the work and landed it.

    Verification by lane code-y against the merged head:

    • Diff review of all 10 files against the Home is not optional — one home-resolution contract for the repo's tools #5762 contract (non-empty HOME only; unset/empty = named error; no substitute directory) — conforming, including the world.rs embodiment's own empty-HOME slip and mcpx's new internal/homeutil helper.
    • Rust: cargo test --manifest-path pkgs/id/Cargo.toml roc_home — world_compile::tests::roc_home_candidates_follow_the_home_contract ok.
    • Go: go test ./internal/homeutil/ ./internal/daemon/ ./internal/mcpclient/ ./internal/cli/ — all pass.
    • JS: node --test bin/provider-catalog-sync.test.mjs — 39/39 pass.
    • No Codex findings were posted on PR fix(home): Phase 4 home-resolution inventory audit fixes (#5763) #8222 (reviewer usage-limited this shift); GitHub checks pending (fleet-wide CI stall) — merged on local verification per fleet practice.

    Acceptance: inventory with a disposition per production site is posted on this issue (lane code-o, 2026-11-10T20:09Z); same-shape sites fixed in-phase; the two genuinely different shapes are filed with reasons — Node os.homedir() passwd fallback (#8220) and Python Path.home()/expanduser pwd fallback (#8221); closing inventory commented on design issue #5762. No production site remains unexamined.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions