Conversation
Contributor
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 40 files ± 0 40 suites ±0 14h 38m 56s ⏱️ - 17m 39s For more details on these failures and errors, see this check. Results for commit 2e49df7. ± Comparison against base commit dc182bd. ♻️ This comment has been updated with latest results. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This PR was written autonomously by an AI agent and has not been reviewed
by a human yet. Maintainers should ignore it until the human author has reviewed,
understood, and approved everything that the AI agent wrote.
Related to #8876 (the client-side submission stage), building on #8877.
A client can spend longer than the scheduler's idle timeout preparing a graph before
update_graphreaches the scheduler. This experimental draft implements a finite pre-submission permit and an explicit protected compute/persist path. The scheduler acknowledges the permit before preparation starts. The client prepares the graph locally, rechecks the connection and deadline before sending, and exposes its newly-created Futures only after admission.The path is opt-in:
protected_computeandprotected_persistlive in a private module, support one collection per operation, and require manual scheduler-extension registration. Ordinary calls retain their existing path. The caller supplies lease duration, network timeout, clock-rate bound and margin; no production defaults or automatic coverage are proposed.The protocol uses server-issued connection epochs, monotonic submission sequences, globally bounded pending permits, bounded retained outcomes per client, and a compacted deadline heap. Pending permits prevent idle shutdown and transfer into the existing active-update guard without an await gap. Expired, aborted, stale and reused submissions are rejected before graph work. The client releases only its operation-owned Future objects on rejection, preserving other Futures that share a key. Once dispatch is attempted, the outcome may be indeterminate: the client never aborts or resends that graph.
Initial implementation validation on Python 3.12 / macOS arm64 (historical; current follow-up below):
pre-commit run --all-files: Ruff 0.15.16 lint/format, codespell, and Mypy 1.20.2. The initial run did not use the Pixi launcher; the September 23 follow-up below uses the repository Pixi environment.Local measurements exposed an expiry scan that grew with every connected client. The bounded heap reduced the fixed-clock, 1,000-client status microbenchmark from about 108–132 microseconds to about 1.0–1.1 microseconds. Record-count bounds were checked separately from timing and tracemalloc observations. These are bookkeeping measurements, not network-capacity claims.
Sequential loopback measurements also make the API tradeoff visible: for the tiny graph case, median ordinary/protected API return was 0.43/11.13ms, while completion was 14.05/14.46ms (30 pairs). The protected return includes admission; the ordinary return only queues work. Larger graphs and a 4MiB payload were measured too, without claiming a speedup or a deployment-wide regression guarantee.
This remains a design prototype. The API shape, deployment clock assumptions, defaults and whether an opt-in surface belongs upstream need review. It does not automatically protect unchanged calls, define safe graph retransmission, or replace existing accepted-graph error semantics.
pixi run lintSeptember 23 validation follow-up
Added focused tests for acquisition ownership and failure boundaries: unsupported duration and reused operations, duplicate admission waiters, capability replacement while waiting for the acquisition lock, non-finite clocks before RPC, missing/duplicate graph capture, and continuing owned-Future cleanup after one release fails. The production protocol is unchanged.
git diff --check: passed.ba7364f1reached hosted patch coverage of 95.12%, below the configured 100% target. Fresh hosted coverage for this update is pending; no aggregate-pass claim is made.The remaining local misses include defensive cleanup exception paths. No threshold, exclusion or production behavior was changed to make coverage pass. This remains a draft requiring human review.
September 26 validation and CI triage
Current head:
2e49df7b04e70ca3843a9c9f98f2a9ca6cb51f47. The latest commits add tests; the production protocol is unchanged. Recorded validation of all five permit test files is 111 passed, with 615/615 locally measured changed executable statements covered. Hosted coverage is separate and is not claimed here.The hosted matrix is not fully green. The nightly SciPy sparse deprecation failures also occur on base
dc182bdain scheduled upstream runs and are tracked by #9353. One Windows Py311 job passed its tests and then failed while downloading a dependency for post-processing. Other timeout, worker-start and cleanup failures still need platform-specific attribution; being outside the new permit test files does not prove they are unrelated.A controlled local comparison ran
test_retire_workers,test_close_connectionsandtest_stress_scatter_deathtwice on both the base and PR head, using the same macOS arm64 / Python 3.14 environment and resource-leak checks. Each run reported 3 passed and the same one-FD leak intest_close_connections. This is baseline evidence for that local leak, not a claim that the Linux minimum-dependency or Windows CI failures are resolved. No test threshold, leak suppression or production behavior was changed during this triage.