Skip to content

Fix/panicbot ponsbot review followups - #730

Merged
hyperpolymath merged 10 commits into
mainfrom
fix/panicbot-ponsbot-review-followups
Dec 5, 2026
Merged

hyperpolymath merged 10 commits into
mainfrom
fix/panicbot-ponsbot-review-followups

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Dec 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (would change existing behaviour)
  • 🕳️ Soundness fix (fixes a checker/proof false-negative)
  • 📖 Documentation
  • 🧹 Refactor / tech debt (behaviour-preserving)
  • ⚡ Performance
  • 🔧 Build / CI / tooling

How has this been verified?

Checklist

  • My commits are signed (git commit -S).
  • I ran the project's own checks/tests locally and they pass.
  • New files carry the correct SPDX-License-Identifier (code/config MPL-2.0,
    prose CC-BY-SA-4.0); I did not relicense existing files.
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole (or I have flagged where I might have).

Notes for reviewers

Summary by CodeRabbit

  • Bug Fixes
    • Reusing a tool directory no longer leaves outdated optional tools available when their installation is skipped or fails. Successful installations replace old versions with the current build.
  • Tests
    • Added checks for stale tools being removed after a refused installation or when the build budget prevents installation, and for accepted installations replacing the old version.

HoTT-stuff and others added 9 commits November 13, 2026 11:56
…joins

Child::kill reaches only pons, so a descendant could outlive the timeout and
hold the output pipes open. Run pons in its own process group, SIGKILL the
group on timeout and wait error, and bound the pipe reads by the same deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
… one preflight deadline

- run each panic-attack in its own process group and kill the group on timeout
  and wait error; bound pipe reads by the same deadline
- canonicalise the located executable before any current_dir change
- text mode no longer prints 'No issues found.' for a part error or an empty run
- --version and diagnostics share one deadline; fleet reuses the suite's
  diagnostics version instead of running diagnostics a second time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
…error are errors

panic-attack #292 (unreleased) makes adjudicate exit 0 for pass/warn, 1 for
fail and 2 for an incomplete run, and adds an 'error' verdict. Accept exit 0
and 1 as complete runs and still read the report; exit 2 and verdict 'error'
are error parts; exit 1 must carry verdict 'fail'. The completeness check is
unchanged, and the pinned 410a8f82 (exit 0 for every verdict) still works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
Replace the unsafe libc::killpg in kill_pgid with rustix's safe
kill_process_group (Pid::from_raw, Signal::KILL). An invalid pid is now
reported as an error; ESRCH stays a non-error. Drops the direct libc dep.
Resolves code-scanning alerts 860/861 (code_safety/unsafe_block).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
Hypatia's code_safety/from_raw rule flagged rustix's safe Pid::from_raw.
Taking the pid from the Child itself also removes the u32->i32 conversion
and its unreachable error path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
# Conflicts:
#	bots/panicbot/tests/envelope_parity_test.rs
The stdout and stderr reads both waited for the time remaining before the
first one started, so staggered pipe holders could block a scan for nearly
twice its timeout. Each read now waits only for what is left of the
deadline. New tests take ~7.5s before the fix and ~4s after (4s timeout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
With a reused --bin-dir, a pons (or panic-attack) left by an earlier run
survived a refused pin, a failed build or a spent budget. fleet-report-back.sh
puts the bin dir on PATH, so ponsbot ran the stale binary instead of reading
not_run. Each requested tool's old copy is now removed before deciding; only
this run's install or cache restore puts one back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
@gitnotebooks

gitnotebooks Bot commented Dec 5, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T11:28:52.401272Z cc39e72 PR opened
🔒 Security Review ❌ Failed 2026-12-05T11:27:26.045688Z
We couldn’t complete this review. Comment @codex security review to try again.
cc39e72 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The build script removes existing panic-attack and pons binaries from a reused --bin-dir before their install checks. Regression tests cover refused and accepted pons pins and a budget-skipped panic-attack install.

Changes: Optional tool build handling

Layer / File(s) Summary
Clear stale binaries and verify install outcomes
scripts/fleet-report-back-build.sh, tests/fleet-report-back-build-test.sh
The script removes existing panic-attack and pons binaries before their install checks. Tests verify removal or replacement for refused and accepted pons pins and a skipped panic-attack install.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to 6d328

This change prevents an old optional tool binary from being used after an install is refused, fails or is skipped. No merge-blocking risk was identified.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Inconclusive The title "Fix/panicbot ponsbot review followups" is vague. It names the affected tools but does not say what was fixed. The PR covers process-group handling, timeouts, exit-code interpretation, and s… Rewrite the title to name the main change. For example: "Remove stale panic-attack and pons binaries before report-back install decisions" or, if the title should cover the wider PR, "Harden panicbot and ponsbot process handling and stale b…
Passed Passed checks: 3 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Fix/panicbot ponsbot review followups" is vague. It names the affected tools but does not say what was fixed. The PR covers process-group handling, timeouts, exit-code interpretation, and stale binary removal. The only related change in the summarized files is stale binary removal in the report-back script. The title does not describe that change or the main fix. It reads like a branch name and a review-cleanup label, so a teammate scanning history cannot tell the primary change.

Resolution

Rewrite the title to name the main change. For example: "Remove stale panic-attack and pons binaries before report-back install decisions" or, if the title should cover the wider PR, "Harden panicbot and ponsbot process handling and stale binary cleanup." Avoid branch-style prefixes such as "Fix/" and generic words like "followups."

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 724961c and 6d32819.

Files selected for processing: 2

  • scripts/fleet-report-back-build.sh
  • tests/fleet-report-back-build-test.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit daabb10 into main Dec 5, 2026
137 checks passed
@hyperpolymath
hyperpolymath deleted the fix/panicbot-ponsbot-review-followups branch December 5, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants