[Bug] PR security check blocked by size limit despite passing local review
Bug Description
Title: Large PRs can't pass the required security check, and a passing local security review never reaches the PR
What happened
- On PRs with a big diff, the PR-side insider-security-ai check stops at the size limit and posts: "PR diff is 1438 KB after filtering (limit: 390 KB). Manual security review required." The required check never passes and the PR stays blocked.
- /security-reviewer:review runs locally on the same branch and approves with 0 findings, but nothing changes on the PR. The skill says it does not write a verdict (skills/review/SKILL.md:13), so its approval is never sent to verdict-service.
- Only the pre-push flow (pre-push-review) and the workflow in push/branch mode send approved file hashes to verdict-service. It's unclear whether the PR-side Lambda reads those hashes before it applies the 390 KB limit. If it applies the limit first, the hash skip can never help a large PR.
Expected
One of these:
1. The PR-side Lambda checks verdict-service first. If every file in the PR has an approved hash, it marks the check as passed without applying the size limit.
2. The manual /security-reviewer:review also writes approved hashes, either by default or behind a flag like --publish. A developer could then approve a large PR locally and re-run the check.
3. The "Manual review required" comment names the unblock path: which command to run locally, and who can approve manually.
Repro
1. Open a PR whose filtered diff is larger than 390 KB.
2. Run /security-reviewer:review locally. It approves with no findings.
3. Push, or re-run the check. The bot still posts "Manual review required" and the required check stays failing.
Evidence
- Repo: analytics-fe, branch feature/PA-40251, PR #759 (mostly test/spec changes)
- security-reviewer plugin 2.4.1
- Bot comment: "PR diff is 1438 KB after filtering (limit: 390 KB)"
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.280
- Feedback ID: 61a850ac-2240-4929-9846-ac8039d2d2e6
Errors
[]