Skip to content

test: neutralize Windows-local broker and ci-audit fixture assumptions - #1637

Merged
EffortlessSteven merged 1 commit into
mainfrom
fix/1628-windows-local-fixtures
Nov 3, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
fix/1628-windows-local-fixtures

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Fixes the two remaining Windows-local failures tracked in #1628 (after #1630 resolved the three path-spelling failures). Both reproduced and both now pass on a local Windows checkout of current main.

1. proof::broker::tests::accounting_matrix_releases_early_commands_before_required_build

Observed on Windows: every proof command fixture (/bin/sh -c exit 0|7, /bin/sleep) failed to spawn (os error 3), the broker recorded skipped_profile receipts, the required build never executed, and the run ended with timeout: required build executions=1.

Fix: the fixtures now follow the repo's platform-shell idiom (#[cfg(unix)] /bin/sh, #[cfg(windows)] COMSPEC /C), matching lane_packets.rs and github_delivery.rs:

  • exits via exit_fixture_argv(0|7) — exit codes propagate identically (verified: exit code Some(7) discriminating receipt),
  • the timeout case uses a single-process powershell -NoProfile -Command "Start-Sleep -Seconds 10": cmd's timeout builtin refuses redirected consoles, and a nested ping would outlive the runner's direct-child kill() (no tree kill in run_command_to_files_inner),
  • the cancellation case keeps its semantics (successful completion then simulated cancellation) via exit_fixture_argv(0); the nonzero-duration_ms assertion still holds on a real exec.

Validation (Windows local): the test now passes (14.6s, all five cases) where it previously failed deterministically. Linux behavior is byte-identical for unix cfgs (same /bin/sh fixtures as before), exercised by the gate.

2. tests::ci_audit_tests::ci_repair_pagination_uses_raw_page_not_decoded_population

Observed on Windows: intermittent failures under load. The fake API is the only serve_fake_http user hardcoding a 2s deadline and 2s stream timeouts, while the client performs 8 sequential real-curl requests against it; under full-suite parallel load the budget expires mid-conversation.

Fix: use the shared super::FAKE_HTTP_IDLE_DEADLINE (120s idle deadline, reset per accepted request) and super::FAKE_HTTP_STREAM_TIMEOUT (30s) exactly like every sibling fixture in this file. The oracle (pagination via raw page rows, not decoded population) is unchanged.

Validation (Windows local): 3/3 isolated passes after the fix, plus the full serial tests::ci_audit_tests module (45/45). The intermittent is load-triggered, so the gate's Linux run plus these constants (already proven by sibling tests) are the durable evidence.

Scope

Test-only. No production behavior, timeout budgets (#992/#1503), or gate wiring changes.

The accounting matrix executed real Unix shells (/bin/sh, /bin/sleep)
through the production runner, so every case skipped on Windows and the
required build never ran; fixtures now follow the platform shell
spelling (COMSPEC /C exits, a single-process powershell sleeper the
direct-child kill can reap). The ci repair pagination fake API alone
hardcoded a 2s serve deadline and stream timeouts while eight sequential
curl spawns run against it; it now uses the shared idle-deadline and
stream-timeout constants its sibling fixtures already use.
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 151 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 1c95214e-743e-4623-b245-36bf3af1cdf1
Commits

Reviewing files that changed from the base of the PR and between e4bff46 and ef68560.

Files selected for processing: 2
  • src/proof/broker.rs
  • src/tests/ci_audit_tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Source-only review of head ef68560f0fdaa4307e9a5c4f4745296b4e017fed against base e4bff4644f596d0a7ddc8685651a3ac3ea1ce1a9: no actionable source defects found in the two changed test fixtures.

The Windows shell/sleeper selection is consistent with the runner's direct-child termination behavior. The pagination timeout changes match sibling fixtures while preserving the request-count and pagination assertions. The cancellation case still receives nonzero error-duration accounting through the existing minimum 1 ms measurement.

One description correction: Unix behavior is not byte-identical. The cancellation fixture now uses /bin/sh -c "exit 0" instead of /bin/sleep 0.05. Its completion-then-simulated-cancellation semantics remain.

Limits: no candidate execution was performed for this review. Windows execution and raw Windows receipts were not independently verified; the Windows results in the PR description remain author-reported. This review does not establish elimination of the load-triggered flake or CI qualification.

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