Skip to content

test gap: hermetic case for the normalize-owners-before-bind preflight #24

Closed

Description

@SSFSKIM

What

review-dispatch.sh (and land-dispatch.sh, which shares the preflight) normalizes lingering finished ticket owners before binding: a claude-species implement worker has no self-finalizer, so its registry meta lingers at status=working after its turn ends, and board-bind protects it as a stable ACTIVE owner — blocking the incoming reviewer's bind. The preflight runs daemon-finalize.sh on every meta bound to the ticket so finalize settles the truth (a genuinely live owner stays live and bind still refuses, correctly).

The gap

The fix has live validation only — it is the remedy for the three retired reviewers in the 2026-07-18 ida-solution shakedown, and the ExecPlan (docs/doperpowers/execplans/2026-07-18-unattended-sweep-dispatch.md) discloses that no dedicated hermetic case exists. tests/reviewing-prs/test-review-dispatch.sh exercises the surrounding dispatch path but never seeds a stale owner.

Follow-up

Add hermetic cases to tests/reviewing-prs/test-review-dispatch.sh:

  1. Seed a stale status=working meta bound to the target ticket in a fake DAEMON_HOME; run dispatch; assert the meta was finalized and the reviewer's bind succeeded.
  2. Counter-case: a genuinely live owner (finalize keeps it live) → assert bind refuses and the reviewer is retired cleanly.

Noted as non-blocking in the PR #23 pre-merge review; filed instead of blocking the merge.

Activity

  1. added
    tech-debt
    on Jul 18, 2026
  2. SSFSKIM commented on Aug 20, 2026

    @SSFSKIM
    OwnerAuthor

    Landed in #79 — both directions of the preflight are now pinned hermetically:

    1. A stale status=working meta bound to the target ticket, seeded in a fake DAEMON_HOME, with the agents view showing the turn finished → dispatch finalizes it to idle, records its closing reply, and the reviewer's bind succeeds and takes ownership of feat(triaging-feedback): 피드백 자동 트리아지 스킬(Plan B) — Codex-SDK 워커·게이트·needs-human 티켓 #7.
    2. Counter-case: a genuinely live owner (state=working, status=busy) → finalize keeps it live, board-bind refuses, and the reviewer is retired with its startup barrier torn down, so the spawned session can never begin reviewing work it does not own.

    One thing worth recording, because it was the actual obstacle: neither assertion could have existed against the previous board-bind stub. It stripped old owners unconditionally and so could never refuse — a test written against it would have passed with _finalize_ticket_owners deleted. The stub now carries the real ACTIVE-owner rule (status in working/blocked AND alive_here, mirroring the host/boot liveness check).

    Mutation-checked: commenting out the dispatcher's _finalize_ticket_owners call trips four named assertions in case (a), and the reviewer still spawns — it just cannot bind, which is the exact production signature from the 2026-07-18 shakedown.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions