Skip to content

Pass an Explicit Untracked Mode to the Hub Scripts' Bare Cleanliness Reads #4142

Closed

Description

@ptr727

Finding

Several hub scripts judge a tree clean with a bare git status --porcelain. That read obeys status.showUntrackedFiles. With that setting at no, an untracked file in the checkout prints nothing, so each site reads a dirty tree as clean.

Sites:

  • host-setup/menu.sh hub_root_clean_on_default_ref (status=$(git -C "$HUB_ROOT" status --porcelain))
  • host-setup/menu.sh, the non-default-ref freshness check a few lines below it, the same read
  • host-setup/menu.ps1 Test-HubCleanOnDefaultRef
  • host-setup/menu.ps1, the matching non-default-ref check
  • scripts/carry.py verify_hub, if git(hub, "status", "--porcelain"). Its own working-tree reader reads files from disk, so an untracked file the check missed is carried downstream.
  • scripts/skills_install.py, the dirty stamp's git status --porcelain -- <watched> read. It can stamp dirty=False while copytree installs an untracked skill directory.
  • host-setup/agent-safety/claude/install.py, the same bare read over its payload paths for its dirty stamp.

The comment above ensure_hub_root in menu.sh says the check matches the cleanliness carry.py's own verify_hub requires. carry.py's other status read passes --untracked-files=all, and so do scripts/pr_review.py and scripts/pr_cleanup.py.

Reproduction

A constructed case, on git 2.47:

git init demo && cd demo && git commit --allow-empty -m init
touch stray.py
git -c status.showUntrackedFiles=no status --porcelain                         # prints nothing
git -c status.showUntrackedFiles=no status --porcelain --untracked-files=all   # ?? stray.py

Expected

Each read above passes an explicit --untracked-files=all, as carry.py's other status read and pr_review.py already do, so a clean or dirty verdict holds whatever the host's status setting is.

Where It Was Raised

A local review pass on #4138, which fixed the same class in the session-handoff, repo-worktree, and backlog-burndown skills.

Activity

  1. added
    pre-existing
    on Nov 13, 2026
  2. changed the title [-]Pass an Explicit Untracked Mode to the Host Menu's Hub-Checkout Cleanliness Reads[/-] [+]Pass an Explicit Untracked Mode to the Hub Scripts' Bare Cleanliness Reads[/+] on Nov 13, 2026
  3. ptr727 commented on Nov 13, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim (away run 2026-11-13, round 3). Branch: burndown/untracked-mode-reads. Issues: #4142, #4143, #4144. Tier: frontier.

    Scope note: the host-setup/agent-safety/claude/install.py site #4142 lists is under host-setup/agent-safety/, which this away run holds. The group fixes the other sites and files that one as its own issue for an attended run.

    Predicted file set:

    • host-setup/menu.sh
    • host-setup/menu.ps1
    • scripts/carry.py
    • scripts/skills_install.py
    • tests/test_carry.py
    • tests/test_skills_install.py
    • .agents/skills/repo-worktree/SKILL.md
    • .github/skills/repo-worktree/SKILL.md
    • .claude-plugin/fleet-skills/skills/repo-worktree/SKILL.md
    • .claude-plugin/fleet-skills/.source-digests/repo-worktree
    • .agents/skills/backlog-burndown/SKILL.md
    • .github/skills/backlog-burndown/SKILL.md
    • .claude-plugin/fleet-skills/skills/backlog-burndown/SKILL.md
    • .claude-plugin/fleet-skills/.source-digests/backlog-burndown

    Claim extended (orchestrator adjudication, round 3): tests/test_bootstrap.py, for a regression case covering the menu.sh and menu.ps1 hub-root reads (a local-review test-gap finding). No other in-flight group, branch, or open PR holds it.

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

    pre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions