Skip to content

[Task] Make goal-finish human review handoff idempotent #588

@StatPan

Description

@StatPan

Goal

Make gira goal finish --terminal human_review --apply idempotent so repeated runs do not post duplicate goal-finish-receipt/v1 handoff comments for the same terminal state.

Parent: #521

Scope

Detect an existing goal-finish-receipt/v1 comment on the goal issue before planning or applying the human-review handoff. Dry-run should report a skip/no-op action when the receipt already exists, and apply should not post another comment. The command should keep preserving blockers and should not close the goal.

Acceptance Criteria

  • Dry-run reports an already-present/skipped handoff action when a goal receipt exists.
  • Apply is idempotent and does not post a second goal-finish-receipt/v1 comment.
  • JSON exposes whether the handoff receipt already exists.
  • Tests cover dry-run no-op, apply no-op, and first apply comment posting.
  • Docs mention that human-review goal finish apply is idempotent.

Doctor Impact

No doctor behavior expected.

Expected Evidence

  • go test ./internal/gira
  • go test ./internal/cli
  • go test ./...

Expected Delivery

Draft PR first, then normal Gira review/finish lifecycle.

base_branch: main
base_source: branch_policy.default
branch_policy_mode: github-flow
target: default
work_branch: issue-588-task-make-goal-finish-human-review-handoff-idempotent

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aiAI and agent workflow behavior.area:backendBackend, CLI, and core workflow implementation.priority:p2Medium priority work.status:doneWork is completed with merged, closed, or accepted completion evidence.type:taskConcrete implementation task.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions