Skip to content

fix(review): thread commitMessages to the live slop gate, wire screenshot-gate advisory mode, and scope rate limits per-repo - #6457

Merged
JSONbored merged 1 commit into
mainfrom
fix/live-gate-slop-and-rate-limit-bugs
Jul 16, 2026
Merged

fix(review): thread commitMessages to the live slop gate, wire screenshot-gate advisory mode, and scope rate limits per-repo#6457
JSONbored merged 1 commit into
mainfrom
fix/live-gate-slop-and-rate-limit-bugs

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Fixes 3 confirmed adversarial-audit finding(s) in src/queue/processors.ts:

  • Live PR gate never passes commitMessages to buildSlopAssessment, so the documented low_quality_commit_message signal (weight 15) can never fire on the actual merge-blocking score (src/queue/processors.ts)
  • Screenshot-table gate's "advisory" action is a silent dead no-op — a configured, validated setting that produces zero observable effect (src/queue/processors.ts)
  • commandRateLimitPolicy and the intent-routing throttle count invocations per-issue instead of per-repo, letting a contributor reset the AI-cost-bearing budget by opening a fresh issue/PR — the exact bypass class already found and fixed for review-nag (src/queue/processors.ts)

Each fix follows the audit's own verified failure scenario and root-cause analysis (2-independent-skeptic adversarial verification pass, both had to vote "confirmed").

Closes #6408
Closes #6409
Closes #6412

Test plan

  • Regression test(s) reproducing the audited failure scenario for each finding
  • Full local gate (npm run test:ci) green

…imit scope

- Fetch the PR's own commit messages via a new listPullRequestCommitMessages
  helper and thread them into the live gate's buildSlopAssessment call, so
  low_quality_commit_message (weight 15) can actually fire in production
  instead of unconditionally short-circuiting on undefined commitMessages.

- Screenshot-table gate: action: "advisory" previously discarded a violation
  entirely (only "close" produced any signal). Add
  maybeAddScreenshotTableAdvisoryFinding, mirroring the lockfile-tamper-risk
  advisory pattern, so an advisory-mode violation appends a visible,
  non-blocking finding instead of silently doing nothing.

- Scope commandRateLimitPolicy's per-command counter and the intent-routing
  classifier's counter to (actor, command, repo) instead of
  (actor, command, repo#issueNumber), mirroring the #4021 fix already applied
  to review-nag's cooldown. Opening a fresh issue/PR no longer resets an
  actor's AI-cost-bearing command budget.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.58%. Comparing base (b09f262) to head (27bf794).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/queue/processors.ts 68.75% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6457      +/-   ##
==========================================
- Coverage   95.59%   95.58%   -0.01%     
==========================================
  Files         589      589              
  Lines       47025    47047      +22     
  Branches    14951    14957       +6     
==========================================
+ Hits        44952    44969      +17     
- Misses       1291     1293       +2     
- Partials      782      785       +3     
Flag Coverage Δ
shard-1 44.08% <56.00%> (-0.18%) ⬇️
shard-2 37.14% <64.00%> (+0.50%) ⬆️
shard-3 32.33% <20.00%> (-0.05%) ⬇️
shard-4 34.48% <52.00%> (-0.82%) ⬇️
shard-5 31.43% <8.00%> (+0.41%) ⬆️
shard-6 45.74% <60.00%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/github/pr-actions.ts 100.00% <100.00%> (ø)
src/types.ts 100.00% <ø> (ø)
src/queue/processors.ts 95.54% <68.75%> (-0.15%) ⬇️

@JSONbored JSONbored self-assigned this Jul 16, 2026
@JSONbored
JSONbored merged commit 0bbd3e5 into main Jul 16, 2026
16 of 17 checks passed
@JSONbored
JSONbored deleted the fix/live-gate-slop-and-rate-limit-bugs branch July 16, 2026 09:28
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment