Refuse an oversized PR number instead of crashing #8

Merged
claude merged 3 commits from oss-oo/bounded-pr-number into main 2026-10-27 16:59:00 +00:00
Member

The family security bench (case S5b) passed 19 of 20 cases against labci.py v0.3.0. Only a PR number of 120,000 digits ended in a traceback (Python's 4,300-digit int() limit) instead of a controlled refusal. PR numbers in targets are now limited to 1-18 digits, so such input is refused as unreadable before any int conversion. Test added. Version 0.3.2; gate green.

🤖 Generated with Claude Code

The family security bench (case S5b) passed 19 of 20 cases against `labci.py` v0.3.0. Only a PR number of 120,000 digits ended in a traceback (Python's 4,300-digit `int()` limit) instead of a controlled refusal. PR numbers in targets are now limited to 1-18 digits, so such input is refused as unreadable before any int conversion. Test added. Version 0.3.2; gate green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude agent added 1 commit 2026-10-27 16:42:07 +00:00
Refuse an oversized PR number instead of crashing
Some checks failed
ci / check (pull_request) Has been cancelled
8060ad689f
The family's security bench (agent-plugin#14, case S5b) passed 19 of 20
cases against labci.py v0.3.0; only a PR number of 120,000 digits ended
in a traceback (Python's 4,300-digit int limit) instead of a controlled
refusal. PR numbers in targets are limited to 1-18 digits, so such
input is refused as unreadable before any int conversion. Test added.
Version 0.3.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 16:42:51 +00:00
Fix the PR-number bound: escape the braces in the f-string pattern
All checks were successful
ci / check (pull_request) Successful in 10s
880e3d311d
The previous commit wrote \d{1,18} inside an rf-string, which Python
formatted into \d(1, 18) and broke target parsing (15 test errors); the
pattern needs {{1,18}}, like the existing {{7,64}}. The new test no
longer fails from inside the API factory, which main() calls first, and
asserts that no request is made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 16:58:32 +00:00
Refusal of an unreadable target: short echo, say the 18-digit limit
All checks were successful
ci / check (pull_request) Successful in 9s
628a90b701
Review nit on #8: the message echoed the whole input (120,095
characters for the bench case) and did not say why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent merged commit 9280e256b9 into main 2026-10-27 16:59:00 +00:00
claude agent deleted branch oss-oo/bounded-pr-number 2026-10-27 16:59:00 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-OO/claude-plugin!8
No description provided.