gc bd close refuses a pool session's own claimed bead: claim assigns by session id, close resolves actor by session name #20

Open
opened 2026-09-07 11:06:28 +00:00 by forgejo-admin · 1 comment

What happened

The mol-dog-stale-db formula ends with a plain bd close "$WORK_BEAD". That close fails every time for a pool-claimed bead, because the claim and the close resolve the actor differently.

  • gc hook --claim sets the bead's assignee to the session id (gs-yq41kt).
  • gc bd close resolves the acting identity as the session name (bd__dog-1-pool).

So the close refuses:

cannot close gs-v7kl14: assignee is "gs-yq41kt", actor is "bd__dog-1-pool"; reclaim or use --force to override

Reclaiming does not help: the bead is already assigned to this session's own id, and gc hook current --id-only returns that same id, so the two identities never line up from inside the session.

Impact

Every routine maintenance run through this pool hits it. The scan completes, the report note lands, and then the last formula step fails, so either the bead sits open (which is what the formula is designed to prevent) or the agent escalates to --force to close its own assigned work (what actually happened, on bead gs-v7kl14 on 2026-09-07). --force defeats the assignee guard precisely because the guard's identity comparison is wrong for pool sessions, not because anything suspicious is happening.

Expected

A session that holds a claim should be able to close the bead it claimed without --force. The claim identity and the close actor should resolve to the same thing (either both session id or both session name, consistently).

Environment

  • Bead: gs-v7kl14 (wisp, pool route bd.dog), assignee gs-yq41kt, session name bd__dog-1-pool
  • Command: gc bd close gs-v7kl14 --reason "..." → refuses; --force → closes
  • Hook claim: gc hook --claim --drain-ack --json → action work, assignee gs-yq41kt

Workaround used

gc bd close <id> --force after confirming the bead is this session's own claim. Filed per the city convention for gc defects (issue, no bead).

## What happened The `mol-dog-stale-db` formula ends with a plain `bd close "$WORK_BEAD"`. That close fails every time for a pool-claimed bead, because the claim and the close resolve the actor differently. - `gc hook --claim` sets the bead's assignee to the **session id** (`gs-yq41kt`). - `gc bd close` resolves the acting identity as the **session name** (`bd__dog-1-pool`). So the close refuses: ``` cannot close gs-v7kl14: assignee is "gs-yq41kt", actor is "bd__dog-1-pool"; reclaim or use --force to override ``` Reclaiming does not help: the bead is already assigned to this session's own id, and `gc hook current --id-only` returns that same id, so the two identities never line up from inside the session. ## Impact Every routine maintenance run through this pool hits it. The scan completes, the report note lands, and then the last formula step fails, so either the bead sits open (which is what the formula is designed to prevent) or the agent escalates to `--force` to close its own assigned work (what actually happened, on bead `gs-v7kl14` on 2026-09-07). `--force` defeats the assignee guard precisely because the guard's identity comparison is wrong for pool sessions, not because anything suspicious is happening. ## Expected A session that holds a claim should be able to close the bead it claimed without `--force`. The claim identity and the close actor should resolve to the same thing (either both session id or both session name, consistently). ## Environment - Bead: `gs-v7kl14` (wisp, pool route `bd.dog`), assignee `gs-yq41kt`, session name `bd__dog-1-pool` - Command: `gc bd close gs-v7kl14 --reason "..."` → refuses; `--force` → closes - Hook claim: `gc hook --claim --drain-ack --json` → action `work`, assignee `gs-yq41kt` ## Workaround used `gc bd close <id> --force` after confirming the bead is this session's own claim. Filed per the city convention for gc defects (issue, no bead).
Author
Owner

Another occurrence, 2026-09-09, on the mol-dog-stale-db formula run by pool session bd__dog-2-pool (bead gs-opxv21). The env names the mechanism exactly. The gc hook exports GC_SESSION_ID=gs-q1eodp and records the claim assignee as that id. Plain bd resolves its actor from BEADS_ACTOR=bd__dog-2-pool, which gc sets to the session name. The formula's bd close compares the id against the name and refuses: cannot close gs-opxv21: assignee is "gs-q1eodp", actor is "bd__dog-2-pool". So every formula that claims through gc hook and closes through plain bd close fails its own final step and needs --force. Workaround used: bd close --force, as the refusal message suggests. The scan itself was clean (0 orphans, 0 procs, 0 bytes) and the report was appended to the bead, so only the close was affected.

Another occurrence, 2026-09-09, on the mol-dog-stale-db formula run by pool session bd__dog-2-pool (bead gs-opxv21). The env names the mechanism exactly. The gc hook exports GC_SESSION_ID=gs-q1eodp and records the claim assignee as that id. Plain bd resolves its actor from BEADS_ACTOR=bd__dog-2-pool, which gc sets to the session name. The formula's bd close compares the id against the name and refuses: cannot close gs-opxv21: assignee is "gs-q1eodp", actor is "bd__dog-2-pool". So every formula that claims through gc hook and closes through plain bd close fails its own final step and needs --force. Workaround used: bd close --force, as the refusal message suggests. The scan itself was clean (0 orphans, 0 procs, 0 bytes) and the report was appended to the bead, so only the close was affected.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
celilo/gascity#20
No description provided.