You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
menu.sh: host_tool/audit_repo hold the hub reader lock even when reusing an on-disk hub checkout #1096
detect_hub_root in host-setup/menu.sh sets HUB_ROOT to the current
checkout's own top-level directory when the menu is run from inside a hub
checkout already on the default ref (IS_HUB_CHECKOUT=true and REF == DEFAULT_REF), so ensure_hub_root can verify and reuse it without
ever touching the shared $DIR/hub fetch cache at all — this is the
documented "a maintainer working in their own ProjectTemplate tree never
pays for a second clone" path.
host_tool() and audit_repo() unconditionally acquire the shared $DIR/hub.lock reader lock (hub_read_lock_acquire) around their entire
span, including Confirm-HubRoot/ensure_hub_root and the tool run itself,
even when HUB_ROOT is this reused on-disk checkout rather than $DIR/hub. Since the lock is scoped to the file $DIR/hub.lock
specifically, this can needlessly block a concurrent menu.sh session's
own exclusive fetch_hub/Invoke-Cleanup for as long as this session's
tool run takes (which can be a long OS package upgrade for host_tool),
even though this session never reads $DIR/hub at all in this scenario.
Suggested direction (not yet designed): acquire the reader lock lazily,
only once ensure_hub_root/fetch_hub actually decides it needs to touch $DIR/hub, rather than unconditionally around the whole calling function.
This needs care: fetch_hub itself already asserts the reader lock is held
before it runs (an internal-error guard added earlier in this same PR), so
naively skipping the lock upfront based on IS_HUB_CHECKOUT risks that
exact guard firing when a locally-reused checkout turns out stale
mid-verification and falls through to a real fetch after all.
Deferred out of PR #1091 as a heavier restructuring than that PR's own
scope (closing concrete rule-6 git-command bypasses) and a contention/
performance nicety rather than a correctness or security defect — worst
case is a longer wait for an unrelated concurrent session, not data loss.
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.
Activity
ptr727 commentedon Oct 23, 2026
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.