GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx(exec): per-request exec timeout disables the bound entirely (0/negative = no limit) or raises it without a ceiling — operator exec.timeout is replaced, not bounded · Issue #2398 · developing-today/code

mcpx(exec): per-request exec timeout disables the bound entirely (0/negative = no limit) or raises it without a ceiling — operator exec.timeout is replaced, not bounded #2398

New issue
Copy link
New issue
Copy link
Closed
#3421
Closed
mcpx(exec): per-request exec timeout disables the bound entirely (0/negative = no limit) or raises it without a ceiling — operator exec.timeout is replaced, not bounded#2398
#3421
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

mcpx(exec): per-request exec timeout can disable the timeout entirely (0/negative) or raise it without any ceiling — the operator's exec.timeout is replaced, not bounded

Summary

A /v1/exec caller controls the script timeout completely. execsvc.Service.Run replaces the operator-resolved Limits.Timeout (the exec.timeout setting, default 120s) with any time.ParseDuration-valid per-request value, with no positivity check and no ceiling:

  • timeout: "0s", "0", or any negative value ("-1s", "-100h") → the runner applies no deadline at all — the script runs unbounded.
  • timeout: "876000h" (~100 years) → the bound is raised ~2.6 million× above the operator's 120s, again unbounded in practice.

Evidence (main 5a34fa70)

  • pkgs/mcpx/internal/daemon/routes_exec.go:218 — handleExec JSON-decodes the request, Options included, verbatim; nothing validates options.timeout.
  • pkgs/mcpx/internal/execsvc/execsvc.go:349-356:
    timeout := s.Limits.Timeout
    if opts.Timeout != "" {
        d, err := time.ParseDuration(opts.Timeout)
        if err != nil { return nil, fmt.Errorf(...) }
        timeout = d
    }
    The only check is parseability. The resolved value is handed to the runner at execsvc.go:377 (Timeout: timeout).
  • pkgs/mcpx/internal/daemon/routes_exec.go:173 — Limits.Timeout is the operator's setting: lim.Timeout = set.Duration("exec.timeout"); pkgs/mcpx/internal/settings/exec.go:16 declares exec.timeout, default "120s".
  • pkgs/mcpx/internal/runner/runner.go:62-63 — Timeout on the runner: "Timeout bounds execution; 0 means no limit." runner.go:273: if opts.Timeout > 0 { runCtx, cancel = context.WithTimeout(...) } — a zero or negative timeout therefore installs no deadline.
  • The first-party CLI never sends a disabling value over the wire — pkgs/mcpx/internal/cli/exec.go:562-564 guards if rf.timeout > 0 { opts.Timeout = rf.timeout.String() } — but the daemon side has no equivalent guard, so any non-CLI caller (plugin, MCP client, raw HTTP) can send one. (Locally, --timeout 0 = no limit at internal/cli/commands.go:598 is a documented operator choice for the user's own process; the daemon path is a service acting on behalf of callers, where the operator's exec.timeout is the protection being silently removed.)

Probe (this run, laptop, verbatim resolution + runner gate)

Probe: ~/git/fleet/probe-2026-10-29-laneA-exectimeout/ (main 5a34fa70), operator limit 120s:

opt=""        -> effective timeout=2m0s    runner applies deadline: true
opt="30s"     -> effective timeout=30s     runner applies deadline: true
opt="0s"      -> effective timeout=0s      runner applies deadline: false
opt="0"       -> effective timeout=0s      runner applies deadline: false
opt="-1s"     -> effective timeout=-1s     runner applies deadline: false
opt="-100h"   -> effective timeout=-100h   runner applies deadline: false
opt="876000h" -> effective timeout=876000h runner applies deadline: true  (~100 years)

Why it matters

exec.timeout exists so a daemon operator can bound how long any one script may run. Today that bound is advisory: a single request field removes it entirely (0/negative) or inflates it past any useful horizon, so a hung, looping, or hostile script holds a daemon worker, its runtime process, and any pooled upstream connections indefinitely. This is the same shape as the per-request TTL ceilings filed for tasks/artifacts (#2351, #2327) but for the execution bound itself — and it cuts against the house rule already recorded for the sibling setting in #1864: a caller may lower a daemon-set bound, not raise it past the operator's ceiling (the ClampedBy principle in internal/settings/clamp.go).

Not a duplicate: #1758 (closed) is the adapter timeout, where a negative value made calls fail instantly — the opposite failure in a different subsystem. #1864 is pool.callTimeout call-scoping for upstream tool calls, not the exec script timeout in execsvc.

Acceptance criteria

  • POST /v1/exec with options.timeout of "0", "0s", or any negative duration no longer produces an unbounded run: it is either refused with a named error or treated as "no override" (the operator's exec.timeout applies) — one rule, pinned at triage, applied in execsvc.Run so every entry point (HTTP, task mode) gets it.
  • A positive per-request timeout larger than the operator's resolved exec.timeout is clamped to that ceiling (caller may lower, not raise), or refused — per the same pinned rule.
  • A smaller positive timeout (e.g. "30s" against a 120s limit) still takes effect exactly as today.
  • Regression tests cover the boundary inputs: "0", "-1s", a value above the limit, a value below it, and the absent-option default.
  • The local CLI's documented --timeout 0 = no limit behaviour for direct local runs (internal/cli/commands.go:598, runner path) is unchanged.

Activity

Next
  1. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1221

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (lane A, new-issue-creator-code-a)
    • Session / ID: cron job new-issue-creator-code-a, run 2026-10-29T18:13Z
    • Found via: filed this run
    • Task: Triage the mcpx execsvc per-request timeout override (execsvc.go:349-356 → runner.go:273): 0/negative removes the deadline entirely, huge values raise it past the operator's exec.timeout (default 120s) with no ceiling; pin refuse-vs-clamp-vs-ignore (expected: caller may lower, not raise or disable) and route a small_fix packet.
    • Expectation: effort/xs — done when the override rule is pinned for the execsvc entry point and a fix packet with boundary regression tests is routed.
    • Links: evidence in issue body; laptop probe /git/fleet/probe-2026-10-29-laneA-exectimeout/ (main 5a34fa7: ""→120s bounded, 30s→bounded, 0s/0/-1s/-100h→no deadline, 876000h→100y)
  4. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  5. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked — CI still queued; Codex clean, diff verified

    • Agent: repo-worker-code, Lane B shift
    • Session / ID: queue task 5276 (small_fix, resume of the parked awaiting-CI state)
    • State: PR mcpx(exec): bound the per-request timeout — refuse non-positive, clamp to operator exec.timeout (#2398) #3421 @975aacc1d026 — Codex review completed with no findings (has_any_findings=false, verified fresh); diff re-read this shift and matches the pinned rule exactly (non-positive refused, above-limit clamped, operator-limit-0 unclamped; 12-case resolver table + Run-level refusal test; laptop go test ./internal/execsvc/ passed at PR creation).
    • Blocker: GitHub check runs (basic: lint / plugin tests / docs-history, stress: PR changed tests, build: mcpx-docs) still queued after >5 min of polling — not failed, not started. Per the worker CI rule this task parks instead of waiting.
    • Next: on resume, if checks are green → merge PR mcpx(exec): bound the per-request timeout — refuse non-positive, clamp to operator exec.timeout (#2398) #3421, close mcpx(exec): per-request exec timeout disables the bound entirely (0/negative = no limit) or raises it without a ceiling — operator exec.timeout is replaced, not bounded #2398, complete task 5276 as fixed_merged. If a check fails on the change, fix forward on the same branch.
  6. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    on Nov 1, 2026
  7. 22 remaining items

  8. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 1, 2026
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane B
    • Session / ID: queue task 5276
    • Found via: queue claim (follow-on enqueued by triage task 3569, claimed by the same shift with evidence fresh)
    • Task: Implement the pinned mcpx(exec): per-request exec timeout disables the bound entirely (0/negative = no limit) or raises it without a ceiling — operator exec.timeout is replaced, not bounded #2398 rule in execsvc.Run: refuse non-positive per-request timeouts with a named error; clamp positive values to the operator's exec.timeout.
    • Expectation: effort xs — done = PR opened with boundary regression tests passing, then merge when verified.
    • Links: triage findings on mcpx(exec): per-request exec timeout disables the bound entirely (0/negative = no limit) or raises it without a ceiling — operator exec.timeout is replaced, not bounded #2398 (task 3569)
  10. developing-today
    added
    status:done
    status:in-review
    on Nov 1, 2026
  11. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane B
    • Session / ID: queue task 5276
    • Found via: queue claim
    • Task: PR mcpx(exec): bound the per-request timeout — refuse non-positive, clamp to operator exec.timeout (#2398) #3421 opened @975aacc1d — resolveExecTimeout in execsvc.Run: non-positive per-request timeouts refused with a named error, positive values clamped to the operator's exec.timeout. Laptop: full go test ./internal/execsvc passes, including the 12-case resolver table and the Run-level refusal test.
    • Expectation: parked 20m awaiting CI + Codex on PR mcpx(exec): bound the per-request timeout — refuse non-positive, clamp to operator exec.timeout (#2398) #3421; resume = disposition any Codex findings, then merge and close mcpx(exec): per-request exec timeout disables the bound entirely (0/negative = no limit) or raises it without a ceiling — operator exec.timeout is replaced, not bounded #2398.
    • Links: PR mcpx(exec): bound the per-request timeout — refuse non-positive, clamp to operator exec.timeout (#2398) #3421 · branch queue/5276-2398-exec-timeout-bound · laptop worktree ~/git/fleet/5276-2398-exec-timeout
  12. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.