Skip to content

Share fixtures and cases across delivery tests - #1586

Closed
eowca wants to merge 11 commits into
mainfrom
lean178/575-dedupe-delivery-final
Closed

eowca wants to merge 11 commits into
mainfrom
lean178/575-dedupe-delivery-final

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #1680 after addressing the checkpoint and fixture findings and resolving upstream test conflicts.

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 #1555 after resolving overlapping upstream GitHub replay and Codex fixture changes.

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 @ 89be895
Base: 89be895

Validation

Recorded for 442323ba59b9

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

  • primary, codex, 442323b, request_changes

Coverage comparison

Slotted pytest --cov=loopzero --cov-branch on main base 89be8950080e06ce44b7ea94514ddabaa5daa3bc and PR head 442323ba59b914dd31ec5a7eb4db341191fee160:

  • Test budget: 13,730 → 13,487 lines (−243).
  • Both suites: 1,923 cases, 1,914 passed, 9 skipped.
  • Both suites: 4,581/4,853 source lines and 1,648/1,842 branch arcs.
  • The added and removed sets of executed source lines and branch arcs are empty for every file.

@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 442323ba59b914dd31ec5a7eb4db341191fee160, 123.6s: request_changes (0 critical, 1 important, 1 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: 19ba232f6d767d08b09bef01aa702101210cc7151a6b03fe49739a7660392790

Comment thread tests/test_cli.py
elif condition == "empty":
report["results"] = []
elif condition == "checkpoint":
report["results"].append(asdict(CheckResult("<checks incomplete>", 1, 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.

important: Preserve the partially completed checkpoint case

The base test supplied the first of two configured stages followed by <checks incomplete>. Appending the marker to the fixture’s full result list now models an interruption after both stages finished. A regression that recognizes checkpoints only after every configured stage has a result would pass, leaving mid-run interruptions without the tested recovery diagnostic. Replace report["results"][1:] with the single checkpoint marker to restore the original case.

for overflow in (0, 1, 2)),
pytest.param("\n", 1, True, id="adjudication-counts-toward-tightened-budget"),
])
def test_raw_leading_utf8_span_at_limit_and_overflow(native, separator, overflow, tightened, monkeypatch):

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: Avoid building a Git repository for all 33 byte-boundary cases

Pytest resolves native before the test body, so every separator and overflow combination now creates a repository, commits a 40 KB file, reads its diff, and installs a fake Codex executable. Only the tightened-budget case uses the fixture result. Keep that case separate or request native lazily for that parameter alone.

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