ISS-012: mol-dog-stale-db bd close refused on actor mismatch, then trap drain-acks with bead still open #3

Open
opened 2026-09-02 02:23:43 +00:00 by forgejo-admin · 0 comments

Migrated from gc-scratch/issues/ISS-012-dog-formula-close-refused-then-drain-acks.yml on 2026-09-01. That directory is a local YAML tracker in the gc-scratch city; this repo is now the home for these defects.

id: ISS-012
title: mol-dog-stale-db bd close refused on actor mismatch, then trap drain-acks with bead still open
type: bug
status: open
priority: P2
component: examples/bd/dolt/formulas/mol-dog-stale-db.toml
created: 2026-09-01
reported_by: bd.dog-1
upstream: gs-76trr
description: |
  The bd.dog pool session (gs-fr8k6, session name bd__dog-1-pool) claimed the
  routed wisp gs-76trr and ran the mol-dog-stale-db formula script verbatim.
  The scan ran, the report was appended, and the script reached its final
  `bd close "$WORK_BEAD" --reason ...`. That close failed:

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

  The formula is assigned to the session id (gs-fr8k6) but bd resolves the
  closing actor to the session name (bd__dog-1-pool). The two never match, so
  the scripted close can never succeed as written. Because the close is the
  last line before the EXIT trap, `set -e` aborted the script, the trap ran
  `gc runtime drain-ack`, and the controller logged
  session.drain_acked_with_assigned_work. The bead sat in_progress until the
  operator closed it with --force.

  Expected: the scripted close succeeds under the same identity the claim
  used, and a failed close leaves the drain un-acked so the failure surfaces.
evidence:
  - gs-76trr close attempt on 2026-09-01T22:58Z failed with the
    assignee/actor mismatch quoted above; exit 1 from the formula script.
  - gc events seq 259731 records session.drain_acked_with_assigned_work for
    gs-fr8k6 with bead gs-76trr still in_progress.
  - Manual `gc bd close gs-76trr --force` succeeded immediately, so the work
    was done; only the identity check blocked the scripted close.
proposed_fix: |
  In the formula script, close under the session identity the claim used, or
  pass --force (the close is the script's own assigned work, so force here is
  safe). Also reorder the failure path so a refused close does not trigger the
  drain-ack: check the close result and leave the bead open without
  acking, so the controller resurfaces it instead of marking the order done.
Migrated from `gc-scratch/issues/ISS-012-dog-formula-close-refused-then-drain-acks.yml` on 2026-09-01. That directory is a local YAML tracker in the gc-scratch city; this repo is now the home for these defects. ```yaml id: ISS-012 title: mol-dog-stale-db bd close refused on actor mismatch, then trap drain-acks with bead still open type: bug status: open priority: P2 component: examples/bd/dolt/formulas/mol-dog-stale-db.toml created: 2026-09-01 reported_by: bd.dog-1 upstream: gs-76trr description: | The bd.dog pool session (gs-fr8k6, session name bd__dog-1-pool) claimed the routed wisp gs-76trr and ran the mol-dog-stale-db formula script verbatim. The scan ran, the report was appended, and the script reached its final `bd close "$WORK_BEAD" --reason ...`. That close failed: cannot close gs-76trr: assignee is "gs-fr8k6", actor is "bd__dog-1-pool"; reclaim or use --force to override The formula is assigned to the session id (gs-fr8k6) but bd resolves the closing actor to the session name (bd__dog-1-pool). The two never match, so the scripted close can never succeed as written. Because the close is the last line before the EXIT trap, `set -e` aborted the script, the trap ran `gc runtime drain-ack`, and the controller logged session.drain_acked_with_assigned_work. The bead sat in_progress until the operator closed it with --force. Expected: the scripted close succeeds under the same identity the claim used, and a failed close leaves the drain un-acked so the failure surfaces. evidence: - gs-76trr close attempt on 2026-09-01T22:58Z failed with the assignee/actor mismatch quoted above; exit 1 from the formula script. - gc events seq 259731 records session.drain_acked_with_assigned_work for gs-fr8k6 with bead gs-76trr still in_progress. - Manual `gc bd close gs-76trr --force` succeeded immediately, so the work was done; only the identity check blocked the scripted close. proposed_fix: | In the formula script, close under the session identity the claim used, or pass --force (the close is the script's own assigned work, so force here is safe). Also reorder the failure path so a refused close does not trigger the drain-ack: check the close result and leave the bead open without acking, so the controller resurfaces it instead of marking the order done. ```
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-packs#3
No description provided.