Skip to content

Reuse a native result in the Codex byte-limit matrix - #1524

Merged
mergify[bot] merged 1 commit into
mainfrom
lean178/1514-reuse-native-byte-limit-result
Nov 26, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
lean178/1514-reuse-native-byte-limit-result

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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-bot with what you need.

Review

  • primary, claude, 5601db2, approve

Validation

Recorded for 5601db2a73c3

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

Co-Authored-By: Codex <noreply@openai.com>
@eowca
eowca marked this pull request as draft November 26, 2026 03:34

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_bwrap fixture (imported from test_runners) still runs per test, so its setup cost remains. Please include the pytest --durations output for test_raw_leading_utf8_span_at_limit_and_overflow so 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:]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

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.

@eowca
eowca marked this pull request as ready for review November 26, 2026 06:52
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 2bacf9c at 07:01 UTC

9 min in the queue, 3 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 06:53 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1575
  • ✅ Merged 07:01 · 2bacf9c · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@mergify
mergify Bot merged commit 2bacf9c into main Nov 26, 2026
20 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1514-reuse-native-byte-limit-result branch November 26, 2026 07:02
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.

Reuse one native review result for the Codex byte-limit matrix

1 participant