Skip to content

Attempt GitHub thread mutations instead of preflighting bot permissions #2196

Done

Description

@ifireball

Parent

#478

What to build

Have the GitHub review and fix post-scripts attempt the thread reply or resolve mutation when the finding disposition calls for it, instead of skipping the operation because a bot-token permission lookup says it cannot resolve the thread. On fullsend #9891, the review post-script reported that it could not resolve a thread after viewerCanResolve was false; the available evidence does not show that it attempted the resolve mutation. Bot-token permission introspection can be an unreliable proxy for whether the operation itself will succeed, so the mutation response should be authoritative.

If the attempted operation fails, leave the thread open, continue processing other threads, and report the failure in the PR summary. The summary should link directly to each affected thread and say whether the user should close it manually or rerun the fix agent with further instructions. The run must not fail, and the user should not need to post a closing comment.

Acceptance criteria

  • A false viewerCanResolve value alone does not suppress a reply or resolve mutation requested by a validated finding disposition.
  • The review and fix GitHub paths attempt the requested thread operation and handle the actual API response.
  • Reply-before-resolve ordering remains in place; if the explanatory reply fails, the thread is not resolved.
  • If a reply or resolve mutation fails, the thread remains open and the run continues.
  • The PR summary identifies the failed action, links to the exact thread, and suggests a useful next step, such as closing the thread manually or rerunning the fix with instructions.
  • Coverage includes a bot-token permission lookup returning false while the mutation succeeds, and a mutation that genuinely fails.

Activity

  1. added
    bug
    ready-to-code
    on Nov 28, 2026
  2. fullsend-ai-coder commented on Nov 28, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Code · ⚠️ Cancelled · Started 12:56 PM UTC · Ended 12:58 PM UTC

    Commit: 0e5514e · View workflow run →

  3. fullsend-ai-triage commented on Nov 28, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 12:56 PM UTC · Completed 12:58 PM UTC

    Commit: 0e5514e · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.10

  4. added
    ready-to-code
    and removed
    ready-to-code
    on Nov 28, 2026
  5. fullsend-ai-triage commented on Nov 28, 2026

    @fullsend-ai-triage

    Triage found this actionable as written.

    Findings

    • viewerCanResolve is currently used as a gate in the review path (a filter and a can_resolve field in the review scripts/library) and explicitly checked in the fix post-script's result processing. These are the places to change so the mutation is attempted and its response is authoritative.
    • pre-review.sh also reads the field; check whether it feeds any suppression decision and keep it informational only.
    • No open PR currently addresses this. Sibling issue Document bot-token permission lookup limits in agent guidance #2198 (guidance wording for the same caveat) is related and should match the behavior defined here, but it does not block this work.
    • If the *.src.sh sources are edited, rebuild the bundled scripts (make script-build, make check-bundle).

    Proposed test case

    Fixtures (run for both the review and fix post-script paths):
    1. viewerCanResolve=false, reply + resolve mutations succeed -> both issued, thread resolved.
    2. reply mutation fails -> resolve NOT attempted, thread open, run continues.
    3. resolve mutation genuinely fails -> thread open, remaining threads still processed, run succeeds,
       PR summary lists the failed action, an exact thread link, and a next step
       (close manually or rerun fix with instructions).
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  6. fullsend-ai-coder commented on Nov 28, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ⚠️ Cancelled · Started 12:56 PM UTC · Completed 12:58 PM UTC

    Commit: 0e5514e · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high

  7. fullsend-ai-coder commented on Nov 28, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 1:00 PM UTC · Completed 1:07 PM UTC

    Commit: 0e5514e · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $1.71

  8. self-assigned this
    on Nov 28, 2026
  9. removed
    ready-to-code
    on Nov 28, 2026
  10. added 3 commits that reference this issue on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfix-agentreview-agent

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions