Repository navigation
Replay GitHub in-process in readiness and recovery tests - #1521
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 0c06d2030ad4134d0a58191236f49d6446680bfb, 31.7s: 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: No evidence of the 44-second timing measurement — The acceptance criteria ask for the aggregate call time of the six matrices to be measured against the 44-second target. The diff and commit contain no such measurement, so this criterion can't be verified from the change. Smallest fix: add before/after
pytest --durationstotals for the six matrices to the PR description.
Native Claude output is retained in the restricted local review receipt.
|
|
||
| @pytest.mark.parametrize("after", ["pending", "late_success", "head_move", "blocker", "cancelled"]) | ||
| def test_ready_transition_preserves_deadline_and_gates(wt, gh, capsys, monkeypatch, head, after): | ||
| def test_ready_transition_preserves_deadline_and_gates(wt, gh, capsys, monkeypatch, head, after, replay_gh): |
There was a problem hiding this comment.
suggestion: Opt-in style is inconsistent with neighbouring replay tests
Neighbouring tests at test_cli.py:2688 and :2784 opt in with @pytest.mark.usefixtures("replay_gh"). This diff instead adds replay_gh as an unused parameter in three test_cli tests (2739, 2820, 2867). That pushes lines 2739 and 2820 past the 100-character line-length, and at 2867 it puts head, replay_gh, on one line, breaking the one-parameter-per-line layout. Nothing fails because ruff does not select E501 and tests ignore ARG, but the file now has two ways to do the same thing. Smallest fix: use @pytest.mark.usefixtures("replay_gh") on these three tests to match the existing ones. In test_review_recovery.py, the two tests where replay_gh is the last parameter can switch the same way. Keep test_historical_publication_recovery_is_exact_and_legacy_only as it is (see the next finding).
| ]) | ||
| def test_historical_publication_recovery_is_exact_and_legacy_only( | ||
| interrupted_receipt, gh, fake_bin, capsys, metadata, source, shape, | ||
| replay_gh, interrupted_receipt, gh, fake_bin, capsys, metadata, source, shape, |
There was a problem hiding this comment.
suggestion: Replay coverage of the interrupted_receipt setup depends on parameter order
In this test replay_gh has to come before interrupted_receipt. Pytest builds fixtures in parameter order, and interrupted_receipt runs a full review while it is being set up. Because replay_gh comes first, repo's local_transport wraps the replay runner and that setup review is replayed in-process. If someone reorders the parameters, the setup review quietly goes back to the fake gh subprocess and the tests still pass. Smallest fix: make the dependency explicit, either by having interrupted_receipt request replay_gh itself or by adding a short comment explaining why the order matters.
|
The full slotted check passed at 0c06d20, 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 timing across the same 100 cases was 29.51 s before and 5.35 s after, a 24.16 s reduction in call time. The after run rejected any |
|
@Mergifyio queue |
✅ Merged into
|
Closes #1513
The six readiness and recovery matrices use the existing in-process GitHub replay fixture. They keep their current cases, real Git histories, reviewer launches, and response assertions. The separate GitHub CLI contract tests still use the executable.
All 100 focused cases passed with a subprocess guard that rejects any
ghlaunch. Their direct aggregate call time was 5.35 seconds. The size-budget script reports a net change of zero 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
0c06d2030ad4uv 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