Reduce pending input scan interval to one second - #34
Merged
Merged
Conversation
SaladDay
marked this pull request as ready for review
September 22, 2026 16:30
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.
Shorten the Environment-input scan interval from five seconds to one second so a restored Runtime can pick up pending input sooner. Provider lifecycle polling remains at five seconds; 100-candidate paging, four active slots, fairness, Runtime ownership, deadlines and no-replay handling are unchanged.
Three paired real Core + Codex + KVM + Kimi K3 runs used the same cached immutable runtime assets and release binaries. The extra delay after confirmed suspension varied to exercise different request timings. Timing is server-clock request submission to PostgreSQL Turn.started_at, not first token or model completion.
Resume improved by 4.3–4.6 seconds in each pair, but two candidate samples still exceed five seconds. This change does not establish a sub-five-second guarantee, percentile or uncached-image performance. All six runs verified same-Session history/files/configuration, initialization once, idempotent retry, source VM memory release and exact snapshot restoration.
The resource tradeoff was measured separately in six controlled 30-second Worker/mock-daemon + isolated PostgreSQL windows, excluding setup, compilation and warmup. Percentages are of one logical CPU core, not the whole host:
The failure fixture does not launch native processes; its low CPU measurement cannot establish low cost for repeated native startup failures. Four slots limit concurrency, not retry frequency. The contributor guide documents the new cadence and this distinction. No retry-policy redesign is included.
Validation: focused PostgreSQL regressions pass; the updated readiness bound fails on the five-second baseline at 5.52 seconds. Full Linux make check passed, including 74 Web acceptance cases. GitHub core-check and agents-api passed. Fresh independent blind review found no in-scope defects, repeated the Environment worker regressions three times, and checked the first two live pairs and resource methodology. The third live pair is separately qualified; the reviewer did not rerun full make check or real-model qualification.
Document A records the decision, CPU methodology, timing limits, external qualification-fixture correction for the baseline's HTTP 202 contract, and cleanup evidence.