Skip to content

fix(analysis): reduce false positives in pattern detectors - #70

Merged
hyperpolymath merged 3 commits into
mainfrom
docs/audit-and-debt-register
Aug 11, 2026
Merged

fix(analysis): reduce false positives in pattern detectors#70
hyperpolymath merged 3 commits into
mainfrom
docs/audit-and-debt-register

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Fixes false positive detectors that were causing ~100 alerts in paint-type and other repos:

  • string-concat-in-loop: Only flag binary expressions with + operator on strings, not all macro invocations (e.g., format! for logging is fine)
  • busy-wait: Add exceptions for I/O operations and common iteration patterns (CLI parsing, WalkDir, iterators, etc.)
  • unbuffered-io: Check parent nodes for BufReader/BufWriter wrapping
  • redundant-allocation: Improved comments, maintained threshold of 5+

All alerts in paint-type were false positives - no actual code issues found.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe vibe@mistral.ai

hyperpolymath and others added 3 commits August 7, 2026 12:37
Adds DEBT.adoc — a debt register covering licence, docs, code, proof and
CI/CD, with every item evidenced by a file reference or a reproducible
command. Supersedes docs/tech-debt-2026-05-26.adoc (marked as such, kept
for the historical record).

Writing it surfaced three defects that a reader would otherwise have taken
at face value:

- An UNEARNED OpenSSF Best Practices badge in the README: a hardcoded green
  shields.io image linked to the *registration form*. The OpenSSF API
  returns empty for this repo — never registered, no criteria passed.
  Removed.
- ARCHITECTURE.md and GOVERNANCE.md were generic boilerplate describing a
  src/ tests/ scripts/ layout this repo does not have (it is a Cargo
  workspace), shadowing the real SPDX-headed .adoc versions. Deleted.
- docs/README.adoc carried TWO conflicting SPDX headers, MPL-2.0 on line 1
  shadowing CC-BY-SA-4.0 on line 2. Since the linter reads head -1, the
  documentation map was licensed as code. A duplicated header is more
  dangerous than a missing one: it passes the presence check while
  asserting the wrong licence.

Also removes LICENSES/AGPL-3.0-or-later.txt, which no file declares.

Documentation brought up to date with the estate pipeline: README gains a
two-units-of-analysis table and an estate section; STATUS gains the
pipeline and its evidence; ROADMAP records round one and states the
round-two decision criterion rather than pre-committing. ARCHITECTURE.adoc
is banner-flagged as TARGET design with each unbuilt component named
(the OCaml analyzer that does not exist, the Python policy engine
superseded by the Scallop ruling, the fourth bot role, the Praxis loop).

Machine-readable state refreshed: STATE.a2ml gains the round-one
milestones, four new blockers and six measured facts; ECOSYSTEM.a2ml gains
oikosbot-estate, eclexia and standards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured against the live ruleset: 27 contexts required, 4 of which never
report. Two are structurally unsatisfiable (publish-image only triggers on
push to main; Dependabot only reports on its own PRs), one was orphaned by
a job rename, one looks stale.

The consequence is the point: protection that cannot be satisfied trains
everyone to merge with --admin, which bypasses all 27 checks including the
23 real ones. Over-specifying the ruleset yields less enforcement than
specifying it correctly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- string-concat-in-loop: Only flag binary expressions with + operator
  that involve strings, not all macro invocations (e.g., format! for logging)
- busy-wait: Add exceptions for I/O operations and common iteration patterns
  (args parsing, iterators, WalkDir, etc.) that are legitimate non-busy-wait loops
- unbuffered-io: Check parent nodes for BufReader/BufWriter wrapping
- redundant-allocation: Improved comments and maintain threshold of 5+

These changes significantly reduce false positives while maintaining detection
of actual issues.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@gitar-bot

gitar-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@hyperpolymath
hyperpolymath merged commit 7356add into main Aug 11, 2026
19 of 20 checks passed
@hyperpolymath
hyperpolymath deleted the docs/audit-and-debt-register branch August 11, 2026 05:29
hyperpolymath added a commit to metadatastician/paint-type that referenced this pull request Aug 11, 2026
This allows paint-type to automatically pick up oikosbot improvements
including the false positive detector fixes (hyperpolymath/oikosbot#70).

The pinned commit bb95ab5063ab9b43a948e21ed8b3fe35b1d1768b was from July 28, 2026.
Switching to main will pull in future oikosbot updates automatically.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
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.

1 participant