← Back to Pull requests

fix(#2210): reconcile duplicate finding threads in the fix post-script #2212

Open
unknown opened this pull request with 485 lines diff across 6 files
View on GitHub
unknown unknown commented on Nov 30, 2026 11:55 UTC
Author

Summary

scripts/process-fix-result.py no longer gives up when one stable finding ID has several open review-bot threads (one per review run). It now picks the current thread with the same rule the review post-script uses (_FINDING_THREAD_CLASSIFY in scripts/lib/review-ops.lib.sh): the owned thread, resolved or not, whose first comment is strictly newest. Every other open owned thread is treated as a stale copy.

  • Current thread: the disposition is applied as before. fixed and declined get the explanatory reply and the thread is resolved. needs_human gets the reply and the thread stays open.

  • Stale copies: each one gets an idempotent pointer reply linking the current thread (<!-- fullsend:fix-stale ... --> marker), then it is resolved. This happens only after the current thread is settled: replied and resolved (or already resolved) for fixed/declined, or replied for needs_human.

  • - For needs_human, the current thread is re-read (node(id:) query) before each copy. Once it is resolved, gone or unreadable, the remaining copies stay open, so the finding always keeps an open thread.
    - If the newest thread is already resolved and the disposition is needs_human, the older copies are left open and listed.
  • Safeguards kept, now per thread:

  • - Copies with a human reply the agent did not read, or with truncated comments, stay open.
    - If the first-comment times tie or a time is missing, the listing is incomplete, or the PR head changed, every open thread stays untouched and is listed on its own line with its link and next step.
    - Reply and resolve failures are reported per thread and never fail the run.
    - The outdated sweep still skips every thread a finding action names.
  • Docs: docs/fix.md (Finding threads) and skills/finding-ids/SKILL.md now describe this behaviour, including what the manifest's ambiguous: true flag now means for the agent.
  • The pre-fix manifest's ambiguous flag in scripts/lib/github-fix-ops.lib.sh is unchanged. It still marks IDs with several open threads; only its documented meaning changed, so no bundled scripts needed rebuilding.

    Context

    On fullsend-ai/fullsend#9891, fix iteration 3 left eight finding actions untouched because of the old ambiguous-match rule. #2204 (for #2197) added the same reconciliation on the review side.

    Testing

  • python3 scripts/process-fix-result-test.py: 224 tests pass, 21 of them new. They cover:

  • - several open threads for one ID across runs, for fixed, declined and needs_human;
    - ordering by fractional seconds;
    - the current thread being resolved or gone mid-run, or unreadable;
    - the newest thread already resolved;
    - ties and missing or invalid times;
    - stale copies with unseen or seen human replies, and with truncated comments;
    - incomplete listings and a changed head with duplicates;
    - stale copies kept when the current thread was not settled;
    - per-thread pointer and resolve failures;
    - idempotent reruns, and the outdated sweep skipping stale copies.
  • skillsaw --strict (make lint) passes.

  • pre-commit could not fetch its hook repositories (TLS failure in the sandbox). The pre-commit-hooks v6.0.0 checks, lint-agent-docs and lint-release-cases were run directly and pass, and gitleaks ran via scan-secrets.

  • scripts/post-fix-test.sh: the finding-thread cases pass. Seven unrelated cases (harness YAML and git-identity checks) fail the same way on main in this sandbox.
  • 🤖 Generated with Claude Code

    ---

    Closes #2210

    Post-script verification

  • Branch is not main/master (agent/2210-reconcile-fix-duplicate-threads)

  • Secret scan passed (gitleaks — ef1bb84698bf824d266c4538870dfb21995a4420..HEAD)

  • PR body secret scan passed (gitleaks — no-git)

  • Final PR description secret scan passed (gitleaks — no-git)
  • Diff: 485 lines (+363 / -122) across 6 files Reviewer: fullsend-ai-coder[bot] Review duration: 325m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.47) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 485 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.370
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #2212"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.3% (MEDIUM) · Higher = larger blast radius
    47.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 25.2% · Safe to merge
    25.2%