Repository navigation
Package preview: tests Codex may also need (hint only) - #30
Merged
Merged
Conversation
… a sufficient package holds For each source file in a package, the preview lists up to three existing test files the package does not include, found by naming convention from folder listings only (no file is opened). Each candidate passes file_rules.screen and the secret-name screen; a named file is never offered again. Exact matches come first, then the others one per source file in turn. Nothing is added by itself, the package id does not change, and the hint (`may_also_need`) stays out of the review ledger. The server instructions now ask Claude to include the covering tests, a caller of each changed public function and the config it reads, since Codex can ask only for files the sent code names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both sides: the secret-name refusal and retry package from #29, and the may_also_need hint. The server instructions now carry both new sentences; at 2,520 bytes they pass the suite's size ceiling, which moves from 2,400 to 2,600 (Claude Code's cut is 4,096). The tests sentence sits after the exclusion sentence, so "one" there still means a named file. The junction test spawns with no_window_kwargs, as the suite requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code before 2.1.296 keeps only the first 2,048 characters of an MCP server's instructions. Every variant ModelQuad sends now fits: proactive on 1,995, proactive off 2,008, standing grant 2,014 (ASCII, so the same in bytes). Repeated sentences are merged (the two "verify" paragraphs; parts the tool descriptions already state), and the pinned wording is kept: paths relative to the working directory, showing the larger package and asking before a completion round, and the tests / one caller / config sentence. The retry_package rule is now the first paragraph: show what was left out, why and what that package sends, and use its package_id only after the user explicitly agrees, even with a standing grant. The template size ceiling is back at 2,400 bytes; the same test now also holds every server-instruction variant, the standing grant with proactive off included, to MAX_INSTRUCTION_CHARS = 2048. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft for the owner's approval. Do not merge before that.
What changes
may_also_needhint (review.package,review.package_lines): for each sent source file, up to 3 existing test files the package does not include, found by name only — Pythonsrc/pkg/foo.py→tests/test_foo.py, thentests/test_foo_*.py; JS/TSdir/foo.ts→dir/foo.test.*,dir/foo.spec.*, thendir/__tests__/foo.*. Exact matches first, then the others one per source file in turn.os.scandir/lstat); no file is opened. Links, junctions and folders reached through them are not listed.file_rules.screen, andnoshell._secret_referencedrops secret-shaped names. A file already named is not offered again.Codex may also need (not added): ….delegatereplies carry it too (_VISIBLE,_review_lines); it is removed before the package is written to the review ledger.retry_packagefrom Say when a file's name stopped a review, and offer the package without it #29 is built bypackage(), so it carries its own hint.Server instructions within 2,048 characters (Claude Code's cut before 2.1.296), with
MAX_INSTRUCTION_CHARS = 2048inserver_instructions.py:retry_packagerule: show the user what was left out, why, and what that package sends; use itspackage_idonly after the user explicitly agrees, even with a standing grant.package_idhand-off, "before your final message") were dropped.files(paths relative to the working directory, at most 32)", showing the larger package and asking before calling again after acompletion_request, and the new sentence — include the tests covering the change, one caller of each changed public function and the config it reads; Codex can ask only for files the sent code names.Length test (
tests/test_r10_checkpoint_instructions.py):SIZE_CEILING_BYTESback to 2,400 for every shipped text; the same test holds every server-instruction variant (proactive on, off, standing grant with proactive on and off) to 2,048 characters. A new test checks the retry rule comes first in every variant.tests/test_adapters.pyand the server check now assert ≤ 2,048 instead of < 4,096.CHANGELOG (Unreleased) and one README sentence.
Tests
tests/test_review_flow.py: hint found withnoshell._read_filerecording onlyapp.py; excluded (.modelquadignore) and secret-named candidates never offered; a named test not offered again; package id unchanged; cap of 3 with exact matches first; JS/TS conventions; a junctionedtestsfolder is not listed; the hint reaches the review reply but not the ledger manifest.Locally:
python scripts/check.py reviewPASS (1,613 passed);python scripts/check.py pythonPASS (3,261 passed, 39 skipped, 2 xfailed).Demo on this repository
review.may_also_need(repo, ["src/modelquad/review.py", "src/modelquad/execution/noshell.py"], same)→tests/test_review_flow.py,tests/test_noshell_workers.py,tests/test_review_ledger.py.supplied_file_secret):noshell.pyholds credential-shaped example text. Itsretry_package(review.py alone) showstests/test_review_flow.py, tests/test_review_ledger.py, tests/test_review_reminder.py.🤖 Generated with Claude Code