Skip to content

Fix agent should compare the published PR head when reconciling threads #2195

Done

Description

@ifireball

Parent

#478

What to build

Make fix-thread reconciliation compare GitHub's live PR head with the commit this fix run actually published. On fullsend #9891, the fix run published d005694, but its summary reported 10 fixed actions as changed-head while that commit was still the PR head. This prevented the post-script from replying to and resolving those threads; the targeted outdated thread was also skipped by the outdated-thread sweep.

The post-script must distinguish the run's published commit from the runner checkout or event-start commit. It should still leave threads untouched if a later, unrelated commit moves the live PR head past the commit published by this fix run.

Acceptance criteria

  • When the live PR head equals the commit published by the fix run, eligible fixed and declined findings are replied to and resolved instead of being rejected as changed-head.
  • The published commit is identified from the fix run's actual pushed result, not from a stale runner checkout or the event-start SHA.
  • If the live PR head has moved beyond the published commit, the post-script leaves the thread open and reports it with a working link and a suggested next step.
  • The outdated-thread sweep runs when the live head matches the published commit, including for outdated threads targeted by a fix disposition.
  • Regression coverage reproduces the run-start 0961ae9 → published d005694 case and the later-head safety case.

Activity

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

    @fullsend-ai-triage

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

    Commit: 0e5514e · View workflow run →

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

  3. removed
    ready-to-code
    on Nov 28, 2026
  4. 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 →

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

    @fullsend-ai-triage

    Triage found no open PR addressing this issue and no duplicates; it is a child of #478 and the fix belongs in this repository.

    Likely cause (hypothesis, from reading the scripts): the post-fix script sets the published SHA from git rev-parse HEAD after the push step. With signed-commit publishing, the API-based push creates new commits, and local HEAD is only moved to the new tip when a follow-up fetch succeeds and matches. If that doesn't happen, or HEAD otherwise isn't the pushed commit, the value handed to the thread reconciler differs from the live PR head, so every thread is rejected as changed-head and the outdated sweep (gated on the same equality) is skipped. The fix is to capture the tip that was actually pushed (or read back from the remote) and use that. The run logs for the fullsend#9891 fix run should show whether a signed-push warning occurred; that would confirm this.

    Fix targets: scripts/post-fix.src.sh (and the generated scripts/post-fix.sh), scripts/lib/github-signed-push.lib.sh, scripts/process-fix-result.py, plus their tests. No workflow files should need to change.

    Proposed test case:

    Scenario A: run-start HEAD 0961ae9, published commit d005694, live PR head d005694,
      10 'fixed' findings (one on an outdated thread).
      Expect: each thread replied to and resolved; outdated sweep runs.
    Scenario B: same, but live PR head has advanced past d005694.
      Expect: no thread resolved; each reported as changed-head with a working link
      and a suggested next step; sweep does not run.
    Scenario C: published SHA unavailable.
      Expect: threads untouched and reported.
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  7. 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

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

    @fullsend-ai-coder
    Contributor

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

    Commit: 0e5514e · View workflow run →

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

  9. self-assigned this
    on Nov 28, 2026
  10. removed
    ready-to-code
    on Nov 28, 2026
  11. added 2 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-agent

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions