Skip to content

Replay GitHub in-process in readiness and recovery tests - #1521

Merged
mergify[bot] merged 1 commit into
mainfrom
lean178/1513-replay-readiness-and-recovery
Nov 26, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
lean178/1513-replay-readiness-and-recovery

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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

Review

  • primary, claude, 0c06d20, approve

Validation

Recorded for 0c06d2030ad4

  • 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:32

@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 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 --durations totals for the six matrices to the PR description.

Native Claude output is retained in the restricted local review receipt.

Comment thread tests/test_cli.py

@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):

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: 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,

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: 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.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

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 gh subprocess launch.

@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 0c53a09 at 06:57 UTC

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

So far

  • ✅ Entered the queue Thu 26 Nov, 06:52 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1566
  • ✅ Merged 06:57 · 0c53a09 · 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 0c53a09 into main Nov 26, 2026
20 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1513-replay-readiness-and-recovery branch November 26, 2026 06:58
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 in-process GitHub replay in readiness and review-recovery matrices

1 participant