Skip to content

fix(process): reject non-positive wait timeouts; log offset=0 reads from line one (salvage #60004) - #83009

Merged
teknium1 merged 2 commits into
mainfrom
salvage/60004-process-falsy-zero
Aug 10, 2026
Merged

fix(process): reject non-positive wait timeouts; log offset=0 reads from line one (salvage #60004)#83009
teknium1 merged 2 commits into
mainfrom
salvage/60004-process-falsy-zero

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

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_registry where an explicit 0 was conflated with "unset" and silently did the wrong thing.

  • process(action="wait", timeout=0): schema declares minimum: 1, but the handler let 0 fall through 0 or max_timeout to 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 now offset=None; explicit 0 reads 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 in wait(); offset: int | None = None in read_log() + dispatch passthrough.

Validation

result
tests/tools/test_process_registry.py 75 passed, 0 failed, 2 skipped (run_tests.sh)

Closes #60004 (timeout+offset halves salvaged with authorship; EOF half credited there — @isheng-eqi had it a month before our #82804).

Infographic

process falsy-zero guards

isheng-eqi and others added 2 commits August 10, 2026 00:04
…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.
@github-actions

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

running on eee57c4 — chore: map contributor email for salvaged commit

waiting for jobs to start…

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/tools Tool registry, model_tools, toolsets labels Aug 10, 2026
@teknium1
teknium1 merged commit 0514d67 into main Aug 10, 2026
48 checks passed
@teknium1
teknium1 deleted the salvage/60004-process-falsy-zero branch August 10, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants