fix(process): reject non-positive wait timeouts; log offset=0 reads from line one (salvage #60004) - #83009
Merged
Merged
Conversation
…et=0 from default Two falsy-zero coercions in process_registry (salvaged from PR #60004, credit @isheng-eqi; the EOF half of that PR landed separately in 893792c): - wait(timeout=0): schema says minimum=1 but the handler let 0 fall through '0 or max_timeout' to the DEFAULT wait instead of rejecting. - read_log(offset=0): conflated with the offset-unset default, silently returning the TAIL of the log when the caller asked for the head. Default is now offset=None; explicit 0 paginates from line one.
Contributor
૮ >ﻌ< ა ci reviewrunning on eee57c4 — chore: map contributor email for salvaged commit waiting for jobs to start… |
This was referenced Aug 10, 2026
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.
Summary
Salvage of the surviving half of #60004 by @isheng-eqi (the past-EOF half landed separately in 893792c): two falsy-zero coercions in
process_registrywhere an explicit0was conflated with "unset" and silently did the wrong thing.process(action="wait", timeout=0): schema declaresminimum: 1, but the handler let0fall through0 or max_timeoutto the default wait instead of rejecting — the caller asked for an impossible wait and got a silent 180s one.process(action="log", offset=0): conflated with the offset-unset default, returning the tail of the log when the caller explicitly asked to paginate from the first line. Default is nowoffset=None; explicit0reads from line one.Same bug class, one owner, both sites fixed (the original PR fixed both; the class is falsy-zero-as-default).
Changes
tools/process_registry.py(authored by @isheng-eqi, salvaged from a stale branch): non-positive timeout rejection inwait();offset: int | None = Noneinread_log()+ dispatch passthrough.Validation
tests/tools/test_process_registry.pyrun_tests.sh)Closes #60004 (timeout+offset halves salvaged with authorship; EOF half credited there — @isheng-eqi had it a month before our #82804).
Infographic