Skip to content

Fix agent should reconcile GitLab finding discussions #1946

In review

Description

@fullsend-ai-triage

Parent

#478

What to build

Extend this existing GitLab discussion issue to use the shared stable finding-ID and disposition contract from #2187. The fix run should receive each current open bot-stamped finding discussion with its link and complete comment context, then tie its decision to that exact discussion. The post-script should reply and resolve fixed and declined findings, reply and leave needs_human findings open, and provide a useful per-discussion summary when an API action cannot be completed.

Acceptance criteria

  • The fix input includes current open, bot-stamped GitLab finding discussions with stable IDs, working links, and complete comment context, including human replies.
  • Each handled discussion maps to one exact, unique stable finding ID and one disposition: fixed, declined, or needs_human.
  • The post-script re-fetches live state and posts an idempotent explanatory reply before resolving fixed or declined; it explains and leaves needs_human discussions open.
  • Missing, ambiguous, changed-head, human-owned, or incomplete matches are left open.
  • An API failure does not fail the fix run. The PR summary lists affected discussions with working links and a suggested next step, such as closing manually or rerunning with further instructions.
  • Tests cover GitLab discussion pagination, exact matching, human replies, dispositions, retries, and per-discussion failure reporting.
  • GitHub-only outdated-thread cleanup remains specific to GitHub; no GitLab equivalent is added.
  • The implementation uses the agents repo's direct GitLab API access and does not require a Fullsend change.

Blocked by

Activity

  1. changed the title [-]Fix agent: post evidence replies in GitLab MR discussions without resolving them[/-] [+]Fix agent should reconcile GitLab finding discussions[/+] on Nov 26, 2026
  2. added
    ready-to-code
    on Nov 26, 2026
  3. fullsend-ai-triage commented on Nov 26, 2026

    @fullsend-ai-triage
    Author

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

    Commit: 95c8650 · View workflow run →

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

  4. fullsend-ai-coder commented on Nov 26, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 1:56 PM UTC · Completed 1:58 PM UTC

    Commit: 95c8650 · View workflow run →

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

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

    @fullsend-ai-triage
    Author

    This issue is clearly scoped, but it can't be implemented yet. It depends on #2187, which is still open. #2187 introduces the shared stable finding-ID skill and the fix-thread contract (stable ID plus a fixed, declined or needs_human disposition). The GitLab discussion handling here is meant to reuse that contract, so building it first would risk a divergent design.

    No open pull request currently addresses #2187 or this issue. Once #2187 is resolved, this issue can be re-triaged and should be ready for implementation.

    Blocked by:

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

    @fullsend-ai-coder
    Contributor

    ℹ️ No PR created — agent determined no changes needed

    The code agent ran and evaluated issue #1946, but did not produce changes to submit as a pull request.

    Reason: Agent did not create a feature branch (current: 'main')

    Agent context:
    No PR opened: this issue has no ready-to-code label, so triage has not cleared it for implementation.

    The issue also says it is blocked by #2187 (shared finding-ID skill and fix-thread contract). #2187 is still open. This GitLab work has to use the stable finding-ID and disposition contract that #2187 defines, so building it first would mean guessing at that contract.

    To unblock:

    1. Land Fix agent should reconcile GitHub finding threads #2187 so the shared finding-ID and disposition contract exists in the repo.
    2. Triage this issue again and add the ready-to-code label.

    Workflow run: https://github.com/fullsend-ai/agents/actions/runs/45833783728

    Retry with /fs-code if appropriate.

  8. ifireball commented on Dec 1, 2026

    @ifireball
    Member

    /fs-triage Please re-evaluate the scope, goals, and blockers for this issue against the current GitHub work.

  9. fullsend-ai-triage commented on Dec 1, 2026

    @fullsend-ai-triage
    Author

    🤖 Finished Triage · ✅ Success · Started 8:48 AM UTC · Completed 8:50 AM UTC

    Commit: 7c5993f · View workflow run →

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

  10. fullsend-ai-triage commented on Dec 1, 2026

    @fullsend-ai-triage
    Author

    Re-triage result: this issue is ready for implementation as a single GitLab slice.

    Blocker: #2187 is closed as completed, so the stale blocker no longer applies. #2197, #2210 and #2208 are also closed, and the duplicate-thread reconciliation for the GitHub fix path is already merged. No open PR currently addresses this issue.

    Current gap: the finding-thread manifest writer exists only in the GitHub fix ops library. The GitLab fix ops library has none, and the post-fix result handling has no GitLab discussion path.

    Duplicate stable IDs (the new question): Treat multiple open discussions with one finding ID as something to reconcile, not as automatic ambiguity. Use the GitHub approach from #2210 for the design:

    • Use discussion history (creation order, prior-run data, notes) to pick the current discussion.
    • For fixed/declined, reply to and resolve the current discussion. Before resolving each proven stale copy, post an idempotent pointer to the current one.
    • For needs_human, keep the current discussion open and resolve only proven stale copies.
    • If history can't identify the current one safely, leave every uncertain discussion open and list each with its direct link and a next step.
    • Changed-head detection should work without a Fullsend change: compare each discussion's position SHAs against the MR's current diff refs. Treat an unknown state as unsafe and leave the discussion open.

    Failure reporting: reply and resolve errors stay non-fatal. Following the sanitized-reason approach from #2208, the MR summary should list each affected discussion with a working link, the sanitized failure reason, what succeeded, and a next step (close manually or rerun with /fs-fix <instructions>). Per AGENTS.md section 9, attempt the mutation and report the actual API response. Don't add a permission-lookup preflight.

    Safeguards stay as written: unseen human replies, incomplete pagination, changed head and uncertain ownership all leave the discussion open. The GitHub-only outdated-thread sweep stays out of scope.

    One slice or more? One. The manifest, the disposition handling (including duplicate IDs) and the failure reporting share one contract, and none of them has an independent deliverable or blocker. Open #2111 (GitLab ID preservation across shifted lines on the review side) is related but does not block this work, since this issue only consumes stamps that already exist.

    Proposed test case: GitLab API fixtures covering the cases below.

    - multi-page discussion pagination; a truncated page marks the manifest incomplete and nothing is acted on
    - exact ID match; a non-bot lookalike stamp does not match
    - human replies leave the discussion open
    - fixed/declined: reply then resolve; needs_human: reply, stays open
    - rerun does not duplicate replies (marker-based)
    - one ID on several discussions: current resolved, stale copies pointed and resolved; inconclusive history leaves all open and listed
    - changed MR head / unknown outdated state: left open
    - reply failure (no resolve attempted) and resolve failure (reply kept): reported per discussion with link, reason and next step; run still succeeds
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  11. ifireball commented on Dec 1, 2026

    @ifireball
    Member

    /fs-code

  12. self-assigned this
    on Dec 1, 2026
  13. fullsend-ai-coder commented on Dec 1, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 10:47 AM UTC · Completed 11:12 AM UTC

    Commit: 7c5993f · View workflow run →

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions