Skip to content

Declare closed heads to the pass graph; keep the board for live commanders - #3754

Merged
trissim merged 2 commits into
mainfrom
hotfix/closed-head-unreferenced
Oct 30, 2026
Merged

trissim merged 2 commits into
mainfrom
hotfix/closed-head-unreferenced

Conversation

@trissim

@trissim trissim commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Two board outages from 2026-10-30, 17:10 onward; 2 owners fixed, 1 new CommitBase member, 2 regression tests.

ClosedPullRequestWatch: failing since 17:10:30

closed_pull_requests.py acquired closed heads with require_commits but never called history.include. CheckoutHistory.graph holds only what refs reach, so once #2708's branch ref was pruned, repo.py:902 raised UnavailableCommitError for 184edef even though git cat-file -t answered commit. That is why a manual fetch cleared nothing: the object was never the problem, the graph was.

Before: test_closed_head_no_ref_reaches... on base raises UnavailableCommitError at src/agent_comms/repo.py:902, the same line as the live traceback.
After: passes. A head the remote refuses becomes UnservableCommitBase, its own LOST line, and the other heads still scan. Base commit, unrelated history and acquisition of main's tips keep require_commits.

"Tristan frame missing" and "FIX Tristan has been silent"

Not the same fault. CommanderService.boards returned () when the registered lead's process was gone, so at 17:37:10, right after claude-code's session closed, the pass completed nobody and CommanderFrame.replace_all deleted all three frames. Live claude-nra and claude-board lost the board until claude-code rejoined; the frames returned at 17:46:41. The board now stands while any commander is live and any commander is owed service.

Tests

  • tests/test_publication_rules.py: all pass, new test included.
  • test_a_closed_lead_session_leaves_the_board_for_the_live_commanders, test_a_commander_that_stood_down...: pass.
  • test_one_pass_gives_every_commander_its_own_packet is red: the same ValueError: too many values to unpack also fails on base 1ee5aae, unrelated. claude-nra took the test_commander_notifications reds in #comms.
  • Not run on an installed build yet.

Assumed:

  • A packet to a dead lead is harmless because should_publish dedupes it and it waits in that thread's inbox.
  • Fetching each missing head separately is cheap because missing heads are rare after the first scan.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XbFMSpxUkNUcAPqceQ1zkG

trissim and others added 2 commits October 30, 2026 18:07
…manders

ClosedPullRequestWatch fetched each closed head but never included it in
CheckoutHistory, whose graph holds only what a ref reaches. Once a closed
PR's branch ref is pruned, repo.py:902 calls a commit that is on disk
"unavailable" and the pass fails for good, which is why fetching it by hand
cleared nothing. Every head now enters the graph, and a head the remote
refuses is its own UnservableCommitBase line instead of killing the pass.

CommanderService.boards returned nothing when the registered lead's process
was gone, so the pass completed nobody and replace_all deleted every live
commander's frame. The lead's board now stands while any commander is live
and any commander is owed service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbFMSpxUkNUcAPqceQ1zkG
Copilot AI balanced review requested due to automatic review settings October 30, 2026 22:07
@trissim
trissim merged commit 4481bfc into main Oct 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants