Skip to content

FOX-120: Apply a byte limit to binary changes proposed by agents - #85

Merged
jamarks merged 2 commits into
mainfrom
agent/fox-120-apply-a-byte-limit-to-binary-changes-pro
Nov 5, 2026
Merged

jamarks merged 2 commits into
mainfrom
agent/fox-120-apply-a-byte-limit-to-binary-changes-pro

Conversation

@jamarks

@jamarks jamarks commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Why: lib/python/foxjob.py:160-163 counts binary entries in git diff --numstat as zero lines; lines 223-246 then approve the proposal on that count and would push it when not dry. A model controlling the changed files can add an arbitrarily large binary artifact while bypassing max_lines, including data copied from files it could access, and the helper's stated size check will not stop publication. In an isolated fake-fx/local-git test I added a 1,000,000-byte payload.bin and called propose_change(max_lines=0, dry=True): it returned dry-run with files=1, lines=0 and reported it would push/open a PR.

Added a 256 KiB limit on total staged binary blob bytes before a job can commit or push, with rejection and small-binary tests.

Try it: Use foxjob.propose_change(); set max_binary_bytes to adjust the default limit.

Verified: python3 -m unittest discover -s lib/python/tests -q passed (12 tests, exit 0); npm test passed (249 tests, exit 0); git diff --check passed (exit 0).

Change: 3 files, 42 lines. Tests pass (npm test), run by the job.

Linear: https://linear.app/fox-cli/issue/FOX-120/apply-a-byte-limit-to-binary-changes-proposed-by-agents

Merging publishes it to release on the job's next run.

Made by a fox job (20261104-180004-829c9a).

Added a 256 KiB limit on total staged binary blob bytes before a job can commit or push, with rejection and small-binary tests.

Linear: https://linear.app/fox-cli/issue/FOX-120/apply-a-byte-limit-to-binary-changes-proposed-by-agents
@jamarks

jamarks commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

🔧 fox review (gpt-6-sol): The binary byte limit works as intended; I added edge-case tests and clarified the documentation.

  • Fixed missing coverage for binary replacements, renames, deletions, and filenames containing newlines.
  • Fixed documentation to clarify that deleted blobs do not count toward the limit.

Fixes pushed to this branch in f584cf1; tests pass (npm test), run by the job.

fox-review: f584cf1

@jamarks
jamarks merged commit a570960 into main Nov 5, 2026
jamarks added a commit that referenced this pull request Nov 5, 2026
jamarks added a commit that referenced this pull request Nov 6, 2026
jamarks added a commit that referenced this pull request Nov 7, 2026
jamarks added a commit that referenced this pull request Nov 8, 2026
jamarks added a commit that referenced this pull request Nov 9, 2026
jamarks added a commit that referenced this pull request Nov 10, 2026
jamarks added a commit that referenced this pull request Nov 11, 2026
jamarks added a commit that referenced this pull request Nov 12, 2026
jamarks added a commit that referenced this pull request Nov 13, 2026
jamarks added a commit that referenced this pull request Nov 14, 2026
jamarks added a commit that referenced this pull request Nov 15, 2026
jamarks added a commit that referenced this pull request Nov 16, 2026
jamarks added a commit that referenced this pull request Nov 17, 2026
jamarks added a commit that referenced this pull request Nov 18, 2026
jamarks added a commit that referenced this pull request Nov 19, 2026
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