Skip to content

t18648: Approved external parent-task issues never auto-close after children complete... #34281

Description

@marcusquinn

Task ID: t18648 | Status: open
Tags: bug

Outcome

Approved external parent-task issues never auto-close after children complete (stale approval blocks terminal close)

Brief workflow contract

Brief Workflow

This issue body is composed under .agents/workflows/brief.md. Newly queued auto-dispatch work must pass its Dispatch Readiness Contract (brief schema v2): complete write surface, hazards and compatibility, executable verification mapped to affected surfaces, and positive plus negative/regression acceptance criteria.


Synced from TODO.md by issue-sync-helper.sh


aidevops.sh v3.39.0 automated scan.

Activity

  1. self-assigned this
    on Oct 10, 2026
  2. added
    status:claimedInteractive implementation is actively claimed
    and removed on Oct 10, 2026
  3. marcusquinn commented on Oct 10, 2026

    @marcusquinn
    OwnerAuthor

    Interactive session claimed by @marcusquinn in aidevops-bugfix-parent-close-stale-external-approval on Mac.
    Pulse dispatch blocked via status:claimed + self-assignment.


    aidevops.sh v3.39.0 plugin for OpenCode v1.18.35 with claude-opus-5-5 spent 3h 27m and 336,556 tokens on this with the user in an interactive session.

  4. Repository owner locked as resolved and limited conversation to collaborators on Oct 10, 2026
  5. added
    status:in-reviewNon-draft PR ready for review/merge
    and removed
    status:claimedInteractive implementation is actively claimed
    on Oct 10, 2026
  6. removed their assignment
    on Oct 10, 2026
  7. Repository owner unlocked this conversation on Oct 10, 2026
  8. changed the title [-]t18648: Approved external parent-task issues never auto-close after children complete (stale approval blocks terminal close)[/-] [+]t18648: Approved external parent-task issues never auto-close after children complete...[/+] on Oct 10, 2026
  9. marcusquinn commented on Oct 10, 2026

    @marcusquinn
    OwnerAuthor

    Reopening: PR #34282 fix is unreachable in the production loop

    After #34282 merged and was deployed (setup.sh --non-interactive, deployed module contains _PIR_PARENT_TRUST_STALE_APPROVED_CLOSE), #34180 and #34125 still stayed open. The pulse log kept printing on every cycle:

    External issue trust reconcile: blocked #34125 in marcusquinn/aidevops; approval verification=STALE_APPROVAL, labels unchanged
    

    Root cause: in .agents/scripts/pulse-issue-reconcile.sh _pir_reconcile_issue_stages, Stage 0b (_action_reconcile_external_issue_gate) returns 0 for STALE_APPROVAL, and the router return 0s before Stage 4. The stale-approved close basis added in #34282 lives in Stage 4 (_pir_parent_mutation_is_allowed ... close), so the scheduled single pass never reached it. The #34282 regression test called the Stage 4 helpers directly, not the router, so it missed this.

    Follow-up fix: Stage 0b routes only an unmutated STALE_APPROVAL parent-task issue (no NMR or persistent label) straight to Stage 4, skipping Stages 1–3. Stage 4 still re-reads live state per mutation. Close requires graph-backed children; nudges, phase filing, escalations and backfills stay blocked unless VERIFIED.

    Verification: bash .agents/scripts/tests/test-pulse-issue-reconcile.sh includes test_stage0b_routes_stale_approved_parent_to_stage4, which drives the real _pir_reconcile_issue_stages body. It fails without the routing change (stale-parent:[]) and passes with it. Acceptance: after deploy, the pulse log shows Reconcile parent-task: closed #34180 / #34125 ... trust=stale-approved-terminal-close.


    aidevops.sh v3.39.0 plugin for OpenCode v1.18.35 with claude-opus-5-5

  10. self-assigned this
    on Oct 10, 2026
  11. added
    status:claimedInteractive implementation is actively claimed
    and removed on Oct 10, 2026
  12. marcusquinn commented on Oct 10, 2026

    @marcusquinn
    OwnerAuthor

    Interactive session claimed by @marcusquinn on Mac.
    Pulse dispatch blocked via status:claimed + self-assignment.


    aidevops.sh v3.39.0 plugin for OpenCode v1.18.35 with claude-opus-5-5 spent 4h 2m and 426,594 tokens on this with the user in an interactive session.

  13. added
    status:in-reviewNon-draft PR ready for review/merge
    and removed
    status:claimedInteractive implementation is actively claimed
    on Oct 10, 2026
  14. removed their assignment
    on Oct 10, 2026
  15. added and removed
    status:in-reviewNon-draft PR ready for review/merge
    on Oct 10, 2026
  16. github-actions commented on Oct 10, 2026

    @github-actions
    Contributor

    Completed via PR #34284. Task t18648 merged to main.


    aidevops.sh vunknown automated scan.

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

    bugSomething isn't workingorigin:interactiveCreated by interactive user sessionsolved:interactiveTask was solved by an interactive sessionstatus:doneTask is complete

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions