Skip to content

fix(report-back): every finding names a file so repo-level rules grade as standing - #668

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/report-back-scope
Nov 13, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
fix/report-back-scope

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Problem

On every rsr-template-repo PR the verdict grid showed finishingbot "9 high, 5 medium" and glambot "5 minor", identical for a PR touching 2 Agda files and one touching 7 shell files.

Root cause (measured, not assumed)

Running the unmodified adapters on rsr-template-repo: finishing-bot emits exactly 14 findings with file: null (9 error = PH-100, SCM-001 x6, TOOL-001, V1-DOC-ROADMAP; 5 warning = REL-004, TEST-AG-002, V1-SEC-001, V1-COM x2) and glambot 5 info. That is exactly 9 high / 5 medium / 5 minor.

  • adapters: Finding::new sets file: None (bots/finishingbot/src/analyzers/mod.rs:65, bots/glambot/src/analyzers/mod.rs:61); repo-level rules never call .with_file.
  • driver: file: ((.file // .location // "") | rel) turns null into "" (scripts/fleet-report-back.sh:536).
  • canon renderer: elif any($paths[]; . == "") then "graded" (standards scripts/lib/verdict-grid.jq:215), by design: fork-governance SPEC 3.0 "A finding with no path is graded: absence of a location is not evidence of absence of a defect". So the canon is right and the adapters were wrong. standards is not edited.

Fix (at the adapters)

  • Repo-level rules in finishingbot and glambot now carry the file they are about: the expected path for a missing-file rule, the manifest/config that would fix a whole-repo property. A PR that does not touch that path now reports them as standing.
  • glambot GS-001 ("install git-seo") described the runner, not the repo; it is now logged (warn), not reported. GS-003 names .git/config.
  • Both bots now log to stderr. stdout carries the JSON report; a log line there makes it unparseable (found while verifying: my new GS-001 warn broke the driver's parse).
  • scripts/fleet-report-back.sh prints a WARNING for any member emitting a path-less finding; docs/REPORT-BACK.adoc states the contract.

Verification

Real driver + real standards renderer on rsr-template-repo, --changed = 2 Agda files, before/after:

  • before: finishingbot red, counts high 9 / medium 5; glambot blue, minor 5; driver warns 14 + 5 path-less.
  • after: finishingbot green, graded 0, standing high 19 / medium 889; glambot green, graded 0; no warnings. A 3-shell-file change also grades 0 (the rows are no longer identical regardless of change, they now reflect it).
  • cargo test --locked: finishingbot 71 passed / 0 failed; glambot 51 passed / 0 failed. New tests: every finding from empty/Rust/Deno repos carries a path (allowlist: TEST-001), GS-001 not emitted, GS-003 pathed, glambot stdout is pure JSON.
  • bash tests/fleet-report-back-test.sh (with and without STANDARDS_DIR): 0 failed; build-helper suite 0 failed.

Findings that still have no path (listed, not invented)

  • finishingbot TEST-001 (unknown project type): no meaningful file.
  • glambot GS-002 (git-seo ran and failed): a tool failure, which belongs in an error row, not a finding.
  • PH-100 (placeholder count) points at .finishing-bot/config.yml, the file that sets max_allowed; it is an aggregate of already-pathed PH findings.

Notes

  • Overlaps with the finishingbot-estate-canon PR (same files). The stderr-logging and git_seo_integration hunks are identical in both; others will need a mechanical rebase. Suggest merging this one first.

Generated by Claude Code

…e as standing

The verdict grid showed finishingbot '9 high, 5 medium' and glambot '5 minor'
on every rsr-template-repo pull request, whatever it touched. Cause: the
adapters emitted repository-level findings (missing-file and whole-repo
rules) with no path; the fleet driver turned the null into an empty string,
and the canon renderer grades a finding with no path as part of the change
(fork-governance SPEC 3.0: absence of a location is not evidence of absence
of a defect). Measured on the template: finishing-bot emits exactly 14
path-less findings (9 error, 5 warning) and glambot 5 info; with this change
the same scan has none, and a 2-file delta grades 0 with the repo-level
findings reported as standing.

Fix at the source (the adapters), leaving the canon unchanged:
- finishingbot and glambot repo-level rules now carry the file they are
  about: the expected path for a missing-file rule, the manifest or config
  that would fix a whole-repo property. TEST-001 (unknown project type) has
  no meaningful file and stays path-less; a test pins that list.
- glambot GS-001 (git-seo not installed) described the runner, not the
  repository; it is logged instead of reported, and GS-003 names .git/config.
- both bots now log to stderr: stdout carries the JSON report the driver
  parses and a log line there made it unreadable.
- fleet-report-back.sh warns loudly when any member emits a path-less
  finding, so a new such rule cannot quietly re-create this; the contract is
  written down in docs/REPORT-BACK.adoc.

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

coderabbitai Bot commented Nov 12, 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 59 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 4dbf6d8 and 5b1dc79.

Files selected for processing: 20

  • bots/finishingbot/src/analyzers/claims.rs
  • bots/finishingbot/src/analyzers/license.rs
  • bots/finishingbot/src/analyzers/mod.rs
  • bots/finishingbot/src/analyzers/placeholder.rs
  • bots/finishingbot/src/analyzers/release.rs
  • bots/finishingbot/src/analyzers/scm_files.rs
  • bots/finishingbot/src/analyzers/testing.rs
  • bots/finishingbot/src/analyzers/tooling.rs
  • bots/finishingbot/src/analyzers/v1_readiness.rs
  • bots/finishingbot/src/main.rs
  • bots/glambot/README.adoc
  • bots/glambot/src/analyzers/git_seo_integration.rs
  • bots/glambot/src/analyzers/machine.rs
  • bots/glambot/src/analyzers/mod.rs
  • bots/glambot/src/analyzers/visual.rs
  • bots/glambot/src/main.rs
  • bots/glambot/tests/integration.rs
  • docs/REPORT-BACK.adoc
  • scripts/fleet-report-back.sh
  • tests/fleet-report-back-test.sh
  • 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

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 13, 2026 11:03
@hyperpolymath
hyperpolymath merged commit 62e5008 into main Nov 13, 2026
59 checks passed
@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.

@hyperpolymath
hyperpolymath deleted the fix/report-back-scope branch November 13, 2026 11:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 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-13T11:11:40.551101Z 5b1dc79 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b1dc792ec

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +39 to 42
if !git_seo_installed {
warn!("git-seo is not installed; the Git-SEO analyzer did not run (no findings reported, not a clean result)");
result.duration_ms = start.elapsed().as_millis() as u64;
return Ok(result);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Report unavailable Git-SEO scans instead of returning clean

In the fleet report-back context, .github/workflows/fleet-report-back-reusable.yml only builds the Rust adapters and never provisions git-seo, while scripts/fleet-report-back.sh:491 launches adapters with RUST_LOG=off and discards captured stderr after valid JSON. Consequently this branch normally returns an empty successful analyzer result, the driver emits status: ran, and the verdict grid treats Git-SEO as clean even though it never executed. Preserve an unavailable/error signal in structured output or install the required tool rather than returning Ok with no findings.

Useful? React with 👍 / 👎.

Severity::Error,
"Rust project missing benches/ directory for criterion benchmarks.",
)
.with_file(benches_dir.clone())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Point directory-level rules at a trackable file

When a PR introduces a Rust project by adding Cargo.toml without a benchmark, this error is now scoped to benches, but the grid matches finding paths against git diff --name-only and Git never reports directories. Thus TEST-RU-001 can never be classified as part of the change and is always downgraded to standing; the same problem affects the newly assigned directory paths for empty benchmarks, fuzzing, release artifacts, tests, and workflow directories. Use a concrete expected file such as a benchmark source, or the tracked manifest that activates the rule.

Useful? React with 👍 / 👎.

hyperpolymath pushed a commit that referenced this pull request Nov 13, 2026
Resolves conflicts with #667/#668/#670: every finding names a file (#668)
while SCM-001/MACH-007 stay retired, git-seo reports as skipped, and
fleet-report-back keeps skip reasons beside the adapter exit-status guard
and the unpathed-finding warning. Drops default() on unit structs in the
new finishingbot scope test so clippy stays clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
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