Skip to content

Host limits: which filesystem should the Console's disk measurement describe? #2105

Open

Description

@JacobStephens2

Finding

PR #2104 (for #2091) adds a minimum free disk space to Host limits. The Spec review of that pull request raised this finding.

Evidence

#2091 asks for the measurement to be "the free space available to the user on the filesystem that holds the Launch directory's worktrees".

  • Commands: in src/resources.rs, observe() measures the parent of the repository that holds the process's current directory. For a Command, that is the Launch directory, and the result matches where src/worktree.rs sibling() creates worktrees.
  • Console and thirdshift resources: these have no Launch directory, so they measure the directory they were started in. For a Console run as a service that is often ~ or /, not any Launch directory. Their "Available disk" and their ready or busy status can then describe a different filesystem from the one a Command waits on.
  • Documentation: docs/guide.md, under Host resources, documents this behaviour.

Why this needs a decision

#2091 does not say which directory a Console should measure. A Console may know several Launch directories, through launch_directories and cron jobs, and they may sit on different filesystems. The Console could:

  • show the lowest of them;
  • show one row per filesystem;
  • keep today's behaviour.

Each changes what the Resources page and the header indicator mean, so the choice belongs to a Spec or the Day shift, not to the implementing session.

Activity

  1. added
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 12, 2026
  2. JacobStephens2 commented on Nov 12, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Investigation summary

    Confirmed at selected Base snapshot b35dc5e: the Console can report disk availability and readiness for a different filesystem from a Command's Launch directory. This is an unresolved display-policy decision, not a demonstrated failure of the disk admission comparison.

    Evidence:

    • src/resources.rs:53 reads the process current directory. available_disk_mb at line 81 takes the minimum of its worktree-parent filesystem's user-writable free space and the system temporary directory's free space. worktree_parent at line 87 selects the enclosing repository's parent, or the current directory outside a repository.
    • src/worktree.rs:633 creates worktrees beside the Launch directory's repository. Console starts explicitly give Commands their selected Launch directory as cwd (src/console/start.rs:478,554).
    • src/console/resources.rs:27,93 uses observe without selecting a Launch directory, both for the header and Resources page/API. src/resources.rs:112 does the same for the CLI. Snapshot contains one available_disk_mb value and no measured-path provenance.
    • src/console/resources.html:9 describes this value as space 'where worktrees and temporary files go'; the header broadly says 'Host ready for another session' or 'Host busy · new sessions wait'. These statements can mislead when Launch directories use other filesystems. The generated service in src/console/install.rs:123-137 sets no WorkingDirectory.
    • src/launch_directories.rs:51,104 already discovers configured and cron-derived Launch directories. Resources does not consume that inventory.
    • docs/guide.md:1935 explicitly documents startup-directory measurement. Closed Host limits: wait for free disk space instead of starting sessions that fail on a full disk #2091 specifies Launch-directory worktree space for admission but does not resolve Console aggregation. PR Host limits wait for free disk space (#2091) #2104 is merged.

    Consequence inferred from the code: with different worktree filesystems and enough temporary-directory space, the Console can say ready while a Command waits for disk, or busy while a Command's own filesystem passes. A shared low temporary-directory measurement can make both wait.

    Recommendation: retain #2105 for the Day shift to settle the questionnaire before implementation. Prefer showing each distinct known worktree filesystem with its associated Launch directories and measured path, plus temporary-directory capacity, so a low filesystem is identifiable. The header must explicitly distinguish partial availability if it summarizes multiple filesystems; its exact policy remains a decision.

    After that decision, update CLI/HTTP snapshots, Console page/header and documentation together. Add deterministic coverage for two filesystems with opposite admission outcomes, shared-filesystem deduplication, temporary-directory bottlenecks, and empty or failed discovery. Existing src/resources.rs:322 and tests/resources.rs cover cwd selection and disk thresholds; tests/console/resources.rs covers display and config reload, but none establishes the intended multi-filesystem behavior. Include docs/guide.md and its generated manual, and check site/index.html, site/how-it-works/index.html and site/architecture/index.html for affected claims.

    Questionnaire

    For the Day shift deciding #2105: the Console currently measures its startup directory, while Commands measure their Launch directory's worktree filesystem; both also account for temporary-directory space. The implementation and guide agree, but multiple Launch directories make the host-wide readiness wording ambiguous.

    1. Should Resources retain startup-directory measurement, show the minimum across known Launch directories, or show one row per filesystem with associated Launch directories? I recommend per-filesystem rows to identify which work can proceed. This determines the display and snapshot contract.
    2. If some Launch directories pass disk admission and others fail, should the header report partial availability, busy whenever any fails, or ready whenever at least one passes? This determines what its readiness claim promises.
    3. Should thirdshift resources and both Resources API endpoints use the same discovered-directory scope as the Console, or should the CLI retain cwd scope with explicit path information? This determines CLI/Console parity and compatibility expectations for the existing scalar JSON fields.
    4. If discovered-directory scope is chosen, what should happen when no Launch directories are known, or discovery or a filesystem measurement fails: an explicit unknown state, a visibly labelled cwd fallback, or partial results with errors? This determines fallback and failure acceptance criteria.
  3. added
    enhancement
    ready-for-human
    and removed
    in-progress
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions