Skip to content

fix(host): pre-flight --timeout floor at MIN_TIMEOUT_MS=100#4

Merged
vrogojin merged 1 commit intomainfrom
fix/min-timeout-alignment
Apr 25, 2026
Merged

fix(host): pre-flight --timeout floor at MIN_TIMEOUT_MS=100#4
vrogojin merged 1 commit intomainfrom
fix/min-timeout-alignment

Conversation

@vrogojin
Copy link
Copy Markdown
Contributor

Summary

Aligns sphere-cli's `sphere host --timeout` floor with agentic-hosting's tenant dispatcher, which now rejects `timeout_ms < 100` with `invalid_params` (introduced in PR #17 of agentic-hosting).

Without this preflight, `--timeout 50` succeeds at CLI parse, succeeds at manager HMCP forward, then fails at the tenant with a confusing two-hop error. Now the CLI fails immediately at the source with a clear message.

Test plan

  • `parseTimeout('99'...)` rejects with /minimum 100ms/
  • `parseTimeout('100'...)` accepts → 100
  • Existing tests (26 total in host-commands.test.ts) all pass
  • Typecheck + lint clean

Cross-repo coordination

This is one of the round-2 steelman fixes; matching tenant-side fix is in agentic-hosting branch `fix/tenant-cmd-round2` (currently in flight).

Aligns with agentic-hosting's tenant-side dispatcher (command-registry.ts)
which rejects timeout_ms < 100 with invalid_params. Without this CLI
preflight, an operator sending --timeout 50 sees a confusing two-hop
error path: CLI accepts → manager forwards → tenant rejects with
invalid_params far from the source.

Now the CLI fails immediately with a clear message:
  Invalid timeout: 50 (minimum 100ms — values below this are
  rejected by the tenant dispatcher)

Tests: +2 (rejects below 100, accepts at/above 100). 26 total in
host-commands.test.ts.
@vrogojin vrogojin merged commit ff04d40 into main Apr 25, 2026
2 checks passed
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