Skip to content

Remove idle waits when parity fixtures stop - #156

Merged
rmcdaniel merged 1 commit into
mainfrom
cli/parity-shutdown
Nov 14, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
cli/parity-shutdown

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

The parity corpus starts 624 mock Servers. Their default half-second serve_forever poll adds about five minutes of idle shutdown waits to every caller validation. The current exact hosted parity step took 6m31s, so this wait is a concrete bottleneck while shared #297 callers are being migrated.

This supplies a 10ms polling interval to the fixture thread. Request/response handling, corpus, comparisons, timeouts, cleanup and job gates remain unchanged. Ten actual health-request/shutdown cycles measured 5.03s before and 0.12s after, with byte-identical responses and all ports closed. Existing focused parity tests pass; the full hosted corpus and main checks will verify the resulting behavior and timing.

No PHP runtime/profile/catalog or release source changes. This addresses the measured CI wait before queuing the next caller migration, as required by the organization guide.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security bounded source and CI-throughput review: PASS for exact 26b002c6d30fec2bdf7ccc5b31c7677fd4fdec88 / tree 66799c9754249cbf72015d0899aca86c516ccf1e.

The complete delta from accepted CLI main 5421757314303952359c6a72ce74924bc699112e is one fixture file and one behavioral setting: MockServer supplies poll_interval=0.01 to the existing daemon serve_forever thread. Request handling, routes, parity cases, result comparison, process deadlines and product/release source are unchanged.

The lifecycle remains bounded: run_all creates at most one per-case mock, invokes reference and candidate inside the existing try, and always calls shutdown() plus server_close() in finally. Reducing the internal shutdown poll changes response latency for the stop request, not request semantics. The smaller interval also remains scoped to this short-lived sequential fixture rather than a product server.

Independent exact-head checks:

  • python3 -m unittest -v test_parity.py: 25 tests PASS;
  • ten real health-request/close cycles: one byte-identical response, 0.129 seconds total, and every bound port refused reconnection after close;
  • git diff --check is clean.

This clears the narrow source change. Keep the draft until the two still-running exact-head jobs finish, especially the complete Rust unit/parity job and dry-run verification against the 2.x CLI. No corpus, PHP profile/catalog, caller admission, package or release verdict is inferred.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 14, 2026 01:11
@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact-head gate update for the prior Security source verdict: all 28/28 current checks are now terminal SUCCESS at 26b002c6d30fec2bdf7ccc5b31c7677fd4fdec88, including the complete Rust unit/parity job and dry-run verification against the 2.x CLI.

This clears the two pending CI conditions named in the earlier review. The verdict remains scoped to the fixture polling optimization; it does not add corpus, profile/catalog, package or release authority.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact 26b002c6d30fec2bdf7ccc5b31c7677fd4fdec88 has all28 checks terminal SUCCESS. Actual Rust job132272453768 preserves the full corpus:919/947 cases match,28 intentional differences, zero unexpected. Both PHP-vector comparisons, all original Rust checks,63 host unit cases, runtime preparation and dry-run verification pass.

Observed hosted parity-step timings with the admitted PHP profile:

Source Run/job Duration
Original3dbda322 43536687894/132267444663 7m12s
Short-poll26b002c 43538238892/132272453768 2m05s

That is5m07s less observed fixture-stage time, with the same947 outcomes. Independent source/timing review 6869107260 and terminal gate 6869123411 pass. Normal merge/main/branch readback follows. No corpus, comparison, timeout, PHP profile/catalog or release source changes.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Hosted timing readback at the reviewed head: the exact Compare against the 2.x CLI step ran from 01:07:53 to 01:09:58 UTC, 2m05s, versus the recorded 6m31s predecessor. That is a 4m26s reduction, about 68%, while the complete comparison and all 28 checks passed. The full Rust unit/parity job completed in 6m04s.

This provides the requested measured CI-bottleneck evidence for the fixture-only change; the source-scope limits in the prior review remain unchanged.

@rmcdaniel
rmcdaniel merged commit 59545f9 into main Nov 14, 2026
28 checks passed
@rmcdaniel
rmcdaniel deleted the cli/parity-shutdown branch November 14, 2026 01:12
@rmcdaniel

Copy link
Copy Markdown
Member Author

Delivered through normal main 59545f90c23a9990b24b97fa5bfdecdc3a58ae70, tree 66799c9754249cbf72015d0899aca86c516ccf1e, exactly equal to reviewed26b002c. Merge-point main equality, remote topic deletion and absence are verified.

All four exact-main workflows are terminal SUCCESS: Build43539150958, CodeQL43539150188, Sonar43539150507, and Public Boundary43539150652.

The reviewed one-file change keeps the same corpus, comparisons, request deadlines and complete cleanup. Fresh hosted proof retains919/947 matches,28 intentional differences and zero unexpected; the comparable active-profile PR stage falls from7m12s to2m05s (exact run/job comparison). The separately noted6m31 predecessor is032's pre-activation PHP setup, a different baseline.

Independent source and terminal gates are 6869107260 and 6869123411. PHP runtime/catalog, package and release authority are unchanged. This removes the measured idle CI wait before the next retained297 caller migration.

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