Repository navigation
Reuse a native result in the Codex byte-limit matrix - #1524
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 5601db2a73c37c6333abdf66b633722d52bd9a95, 36.9s: approve (0 critical, 0 important, 3 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Findings without a file location:
- suggestion: The 2.5 s timing check is not shown — The acceptance criteria ask for the combined setup and call time of the 33 cases to be measured against 2.5 seconds. Nothing in the change or the commit records that measurement. Also, the autouse
fake_bwrapfixture (imported from test_runners) still runs per test, so its setup cost remains. Please include thepytest --durationsoutput fortest_raw_leading_utf8_span_at_limit_and_overflowso the timing target can be checked.
Native Claude output is retained in the restricted local review receipt.
| span = separator.join((marker, header, adjudication)) | ||
| padding = 8192 + overflow - len(span.encode("utf-8")) | ||
| padded = marker[:-3] + " " * padding + marker[-3:] | ||
| padded = marker[:-3] + " " * (8192 + overflow - len(span.encode("utf-8"))) + marker[-3:] |
There was a problem hiding this comment.
suggestion: Unrelated inlining of the padding computation makes the line harder to read
The old named padding variable is now folded into one long expression. This has no effect on speed or reuse, so it is unrelated to issue #1514 and only makes the byte arithmetic harder to check. Smallest fix: undo this hunk and keep padding = 8192 + overflow - len(span.encode("utf-8")).
| fake_bwrap = test_runners.fake_bwrap | ||
| gh = test_cli.gh | ||
| APPROVE = test_runners.APPROVE | ||
| BYTE_LIMIT_REVIEW = test_runners._native_codex_result("a" * 40) |
There was a problem hiding this comment.
suggestion: Shared result is built when the module is imported, and its provenance dict can be changed
BYTE_LIMIT_REVIEW is built when the module is collected, so every worker builds it even when these tests are deselected. If the build ever fails, the whole module fails to collect instead of just these 33 cases. The result is also shared across tests, and its provenance dict can be modified (runners.py:1354-1361 writes to provenance dicts during merges). The code paths these tests call today (codex_evidence, _review_body, review_projection, eligible_review) don't write to it, and parse_review is pure, so this is safe for now. For lazy creation and isolation, a module-scoped fixture (or functools.cache on a small factory) would give the same once-per-worker reuse.
|
The full slotted check passed at 5601db2, the primary review approved this head, and both required hosted checks are green. Readiness refuses only the receipt settings fingerprint. I am using the documented owner queue route so Mergify verifies the integration candidate. Slotted setup and call time fell from 4.30 s to 0.07 s across all 33 cases. |
|
@Mergifyio queue |
✅ Merged into
|
Closes #1514
The 33 separator and overflow cases share one synthetic native review result. They retain the publication and eligibility assertions. Tests that exercise actual reviewer launch still use the native fixture.
On the same host and pinned interpreter, the selected matrix fell from 4.51 seconds to 0.08 seconds of setup and call time. All 33 cases passed, with zero net change to test lines. Slotted timing and the full check are pending.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review
Validation
Recorded for
5601db2a73c3uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0