Skip to content

[deep-report] Make link_sub_issue safe-output handler idempotent #31522

@github-actions

Description

@github-actions

Source

DeepReport intelligence briefing — 2026-05-11. References: #31509 (open bug filed today by [aw] Failure Investigator), Safe Output Health Report (discussion #31430).

Problem

The link_sub_issue safe-output handler treats "sub-issue is already a sub-issue of parent" as a fatal error instead of a no-op. The agent job succeeds, but the post-agent safe-output validation step fails — producing a misleading "workflow failed" signal and a spurious auto-ticket downstream. This is self-affecting: [aw] Failure Investigator (6h) itself trips on this when re-linking already-linked sub-issues to its shared parent #30961.

Reproducer

Run §25657654477 — agent succeeded after 18.5 min ($7.94, 114 turns) but safe_outputs failed in 24s on a no-op link_sub_issue re-assertion.

Suggested fix

  1. In the link_sub_issue handler: if GitHub reports the sub-issue is already linked to the parent, log a ##[warning] (already done) and mark the message as success — do not fail the safe-output job.
  2. Audit unlink_sub_issue, add_labels, remove_labels for the same warn-then-fail pattern.
  3. Add a unit/integration test asserting that linking an already-linked sub-issue exits cleanly.

Effort / Impact

  • Effort: < 2 hours (single handler + test)
  • Impact: High — throws away the most expensive work in the portfolio when triggered.
  • Suggested agent: Code-modification agent (Claude / Copilot)

Success criteria

  • Re-running [aw] Failure Investigator (6h) with an already-linked sub-issue does not fail the safe-output job.
  • New regression test in the safe-outputs handler suite.

Related: #31509, #31430

Generated by DeepReport - Intelligence Gathering Agent · ● 12.8M ·

  • expires on May 13, 2026, 3:53 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions