Skip to content

fix(ponsbot): accept the dirty stamp from a cargo-installed pons - #676

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/ponsbot-cargo-install-dirty-flag
Nov 14, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
fix/ponsbot-cargo-install-dirty-flag

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What this is

First phase 1 shadow data (standards#1562, run 43602190815): the ponsbot row read error: pons exited 0 without a valid report: pons was built from a dirty tree, so it is not the pinned commit, so the shadow row was orange.

Root cause

CI builds pons with cargo install --git --rev <pin>. The real pons stamps tool.source_dirty: "true" for that build although the checkout is exactly the pinned commit. The direct lane's own report carries the same stamp (source_commit equals the pin, source_dirty: "true"), and the direct lane does not check it. ponsbot's extra dirty check (not in the design doc's error list) turned a correct run into an error.

Change

  • A dirty stamp is an error only with PONSBOT_REQUIRE_CLEAN=1 (for a local build). By default the checked source_commit identifies the binary.
  • A dirty stamp never rescues a wrong commit (tested).
  • interpret keeps its signature; interpret_with takes the policy.

Verified

cargo test --locked in bots/ponsbot: 17 unit + 18 integration pass; cargo fmt --check and cargo clippy --locked --all-targets -- -D warnings clean.

Not verified

A live CI run. After merge, standards#1562's FLEET_REF needs bumping to this commit; the next shadow run is the test.

Second shadow finding (not fixed here)

panicbot reported 51 findings and the grid row showed clean in scope, while the direct panic-attack row showed 1 critical in a file the PR changed (CommandInjection, eval in scripts/tests/dismiss-code-scanning-alerts-test.sh). panicbot has no finding under scripts/tests/ at all, though the direct report has several there (direct: 53 CommandInjection weak points, panicbot: 30 PA009). The two invoke panic-attack differently (assail . --output vs assail <target> --headless). Cause not yet found; it is a verdict-level difference that blocks phase 2 under D2.



Generated by Claude Code

The first phase 1 shadow run (standards#1562) read ponsbot -> error: "pons
exited 0 without a valid report: pons was built from a dirty tree". The CI
build is `cargo install --git --rev <pin>`, and the real pons stamps
source_dirty "true" for it although the checkout is exactly the pinned commit
(the direct lane's own report carries the same stamp). The commit stamp, which
is checked, identifies the binary; a dirty stamp is now an error only with
PONSBOT_REQUIRE_CLEAN=1. A dirty stamp never rescues a wrong commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkEdznGjgTixZgjhB6
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b97e4e1 and d67a8d1.

Files selected for processing: 1

  • bots/ponsbot/src/scanner.rs
  • 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

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 14, 2026 14:09
@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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T14:11:29.467117Z d67a8d1 Draft marked ready
ℹ️ 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.

@sonarqubecloud

Copy link
Copy Markdown

hyperpolymath added a commit that referenced this pull request Nov 14, 2026
…ane does (#677)

## What this is

Second finding from the phase 1 shadow (standards#1562, run
43602190815): the direct panic-attack row read **critical** in a changed
test script, panicbot read **clean**.

## Root cause (measured)
Same panic-attack binary (410a8f8, built locally), same tree. Both
invocations (`assail . --output` and `assail . --headless`) give
byte-identical output, so the invocation is not the cause. Of 75 weak
points: 51 `production`, 6 `test_only` not suppressed, 18 `test_only`
suppressed. The direct lane keeps 51 + 6 = 57; panicbot's
`translate_all` dropped every `test_only`/`doc` finding, so it reported
51. The 6 include the critical `eval` in
`scripts/tests/dismiss-code-scanning-alerts-test.sh`.

## Change (owner ruling 2026-11-14: carry at full severity)
`translate_all` drops only what panic-attack itself suppressed.
Unsuppressed `test_only`/`doc` findings are carried at their own
severity, with `test_context` in the finding metadata. Tests updated:
carries unsuppressed test_only and doc, still drops suppressed.

## Verified
- Against the real tree with the real binaries: panicbot `assail` now
reports **57** findings (was 51), equal to the direct lane.
- `cargo test --locked` in `bots/panicbot` all pass (107 unit +
integration), `cargo fmt --check` and `cargo clippy --locked
--all-targets -- -D warnings` clean.
- `tests/fleet-report-back-test.sh`: 212 passed, 0 failed (also with
`STANDARDS_DIR` set, build test 69 passed). With a real panic-attack on
PATH two tests fail; that setup is not what the suite assumes.

## Not verified
A live CI shadow run. After this and #676 merge, standards' `FLEET_REF`
needs bumping; the next shadow run is the test.

---

---
_Generated by [Claude
Code](https://claude.ai/code/session_0136P7ZkEdznGjgTixZgjhB6)_

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Unsuppressed findings classified as test-only or documentation-related
can now appear in results when they pass severity filtering. Suppressed
findings remain excluded.
* Finding details now include test context when available, providing
additional information about where a weak point was identified.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit 14892a5 into main Nov 14, 2026
66 checks passed
@hyperpolymath
hyperpolymath deleted the fix/ponsbot-cargo-install-dirty-flag branch November 14, 2026 15:38
hyperpolymath added a commit to metadatastician/standards that referenced this pull request Nov 14, 2026
…adow fixes (#1567)

## What this is

Follow-up to #1562 (phase 1 shadow enrolment). One line: `FLEET_REF` in
`.github/workflows/fork-governance.yml` goes from `7fc27784` to
gitbot-fleet `14892a53`, which includes the two fixes the first shadow
run exposed:

- hyperpolymath/gitbot-fleet#676: ponsbot accepts the `source_dirty:
"true"` stamp that a `cargo install --git --rev` pons carries on the
exact pinned commit. Before it the ponsbot row read orange (`error: pons
was built from a dirty tree`).
- hyperpolymath/gitbot-fleet#677: panicbot carries unsuppressed
test-code findings at full severity, as the direct lane does. Before it
panicbot reported 51 findings and read clean where the direct row read
critical (57 findings).

No line moves, so the line-keyed code-scanning dismissal for
`fork-governance.yml` is unaffected (checked: `security-events: write`
stays at line 289).

## What to check
The Hypatia grid on this PR's own run is the first shadow comparison
with both fixes: panicbot should report the same count as the
`panic-attack assail` row, and ponsbot should read a real result (not
orange), both advisory.

---

---
_Generated by [Claude
Code](https://claude.ai/code/session_0136P7ZkEdznGjgTixZgjhB6)_

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants