Skip to content

worktree_drift: false missing, symlink double-counted dirt, parked orphans #123

Closed

Description

@Jammy2211

Problem

heart/checks/worktree_drift.sh produces noisy, misleading totals (e.g. 2 orphan / 2 missing / 66 dirty): (1) claims outside ~/Code/PyAutoLabs-wt are compared against the wt-root listing instead of path-tested, so an existing .codex-worktrees/... claim reads missing forever; (2) the dirty scan follows the symlinks worktree_create installs, counting one dirty canonical checkout once per task worktree linking it; (3) parked.md worktrees read as orphans. CI/release-audit finding E, series task 5.

Plan

Extract the heredoc python into a testable heart/checks/worktree_drift.py (pure scan() + main(); the .sh becomes a thin shim so tick.sh keeps working). Fixes: path-test claims (accepting only path-shaped values — parked.md carries prose like none (…)); track existing claims outside the wt root; skip symlinked children in the dirty scan and dedupe dirty canonical checkouts into their own canonical_dirty category (counted once); label parked dirs, excluded from orphans. Dashboard section renders the new shape. New tests/test_worktree_drift.py over scan().

Branch: feature/worktree-drift-fixes · Worktree: ~/Code/PyAutoLabs-wt/worktree-drift-fixes/ (PyAutoHeart)
Prompt: PyAutoMind/active/worktree_drift_false_missing_and_symlink_double_count.md · Series: CI/release audit 2026-07-30

Activity

  1. Jammy2211 commented on Jul 30, 2026

    @Jammy2211
    ContributorAuthor

    Implemented — PR #124 open, awaiting human merge. Live run on the dev box: missing now names only the genuinely-absent vacuous-jax-assertions claim; the .codex-worktrees/python-312-floor claim no longer false-flags; 7 dirty canonical checkouts appear once each in the new canonical_dirty category (previously multiplied per linking worktree — the '66 dirty'). Suite 328 passed (8 new tests).

  2. added a commit that references this issue on Jul 30, 2026
    7d852a7
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions