Skip to content

Share fixtures and cases across delivery tests - #1680

Merged
mergify[bot] merged 16 commits into
mainfrom
lean178/575-dedupe-delivery-receipts
Nov 26, 2026
Merged

mergify[bot] merged 16 commits into
mainfrom
lean178/575-dedupe-delivery-receipts

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Share fixtures and cases across delivery tests

Context and goal

  • Goal: Remove at least 242 net test lines by sharing fixtures and parameterizing existing scenarios.
  • Problem: Repeated CLI actions, fake clocks, and publication setup require the same maintenance in multiple tests.
  • Context: This completes the test-only size reduction started in Deduplicate delivery test cases and fixtures #1455.

Refs #575

Supersedes #1586 after addressing its checkpoint and fixture findings and preserving new upstream cases.

Acceptance

  • The test size budget reports at least 242 fewer lines.
  • The collected case count and executed source lines and branches match the base.
  • Every edit is under tests/.

Base

main @ b388ed8
Base: b388ed8

Validation

Recorded for d3de405e0208

  • 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

(filled by loopzero check)

Review

(filled by loopzero review)


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Coverage comparison

Slotted pytest --cov=loopzero --cov-branch on prior main b388ed8d7 and PR head d3de405e0:

  • Test budget: 13,841 → 13,599 lines (−242).
  • Both suites: 1,944 cases, 1,935 passed, 9 skipped.
  • Both suites: 4,700/4,980 lines and 1,673/1,870 branch arcs.
  • Every file has identical executed line and branch-arc sets.

@eowca
eowca marked this pull request as ready for review November 26, 2026 08:41

@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 codex on d3de405e02089c688c9931ce2f7340182a378dab, 136.0s: approve (0 critical, 0 important, 2 suggestion)

Same-family fallback: independent reviewers failed: claude: not authenticated. Cross-family review is preferred.

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model gpt-6.2-astra (effort medium); CLI-reported model gpt-6.2-astra (effort medium); configured model gpt-6.2-astra (effort medium)
Raw reviewer output
Native Codex transcript retained in the restricted local review receipt; public evidence is publisher-derived, not backend attestation. Exact raw SHA256: 7884589980188042da84887bf8366399b797014dd1a0bcc21604f129bbb8b737

Comment thread tests/test_cli.py
calls.append(command)
if interrupt and cut == "second stage" and len(calls) == 2:
if interrupt and cut != "final validation" and len(calls) == (5 if changed_inputs else 2):
raise KeyboardInterrupt

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: Trigger the checkpoint interruption by command

The changed-inputs case now interrupts on the fifth dispatch across two check runs. That number encodes both the warm-up plan length and the position of second. Since interrupt already excludes the warm-up, match the intended command directly and keep the final call-list assertion to verify reuse.

Comment thread tests/test_cli.py
arm_approved_ready_pr(gh, head, wt, isDraft=False)
old_conclusion = "cancelled" if replacement == "pending" else "failure"
arm_replacement_workflow(gh, head, old_conclusion)
elapsed = 0.0

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: Reuse the polling clock in the replacement-workflow test

This test still maintains its own elapsed time and patches both monotonic and _sleep beside callers of poll_clock. Pass the replacement check update as after_sleep and use patch_sleep=False for the zero-wait case. That removes the duplicate clock while preserving each scenario’s behavior.

@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 c81807a at 08:50 UTC

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

So far

  • ✅ Entered the queue Thu 26 Nov, 08:45 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1722
  • ✅ Merged 08:50 · c81807a · 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

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit c81807a into main Nov 26, 2026
20 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/575-dedupe-delivery-receipts branch November 26, 2026 08:50
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.

1 participant