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
Both Menus Judge a Cached Hub Fresh Against main Whatever --ref Names #2541
Found during the local strict review for #1093 (pre-existing, unchanged by that fix).
Both menus confirm a cached hub tree is fresh by comparing its HEAD with origin/<default ref> alone, whatever --ref / -Ref the session was started with: ensure_hub_root in host-setup/menu.sh and Confirm-HubRoot in host-setup/menu.ps1.
A fetch for a non-default ref sets HUB_ROOT to $DIR/hub with that ref checked out, so two things follow:
A session started with a non-default ref re-clones on every task. Its own tree's HEAD is the ref's commit, which differs from origin/main, so each later task reads its own fetch as stale and fetches again.
It can run tools from the wrong ref. Where another session sharing the same cache directory has since fetched the default ref, that tree's HEAD equals origin/main, so the first session accepts it as fresh and runs its next task from main rather than the ref it asked for, with no message saying so.
Constructed reproduction: session A runs menu.sh --ref develop and completes one task. Session B, sharing the same --dir, runs a task on the default ref, which replaces $DIR/hub with a main clone. A's next task passes the freshness check and runs from main.
Done means the freshness check compares against the commit the session's own ref resolves to (or a non-default ref always re-fetches deliberately and says so), with a test per menu covering the mixed-ref interleaving above.
Activity
Record a Per-Fetch Token in hub.owned So a Menu Removes Only the Hub …
Promote develop to main: Record a Per-Fetch Token in hub.owned (#2545)
Judge a Cached Hub Fresh Against the Session's Own Ref in Both Menus (#…
ptr727 commentedon Oct 8, 2026
Fixed by #2571, which reached
mainthrough promotion #2568. That promotion carried no closing keyword for this issue, so it is closed by hand.