Repository navigation
Closed
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilottask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
Problem
KindDuration validation currently accepts syntactically valid zero and negative durations. Three settings are passed directly to time.NewTicker, which panics for non-positive values:
- daemon.reapInterval — internal/daemon/server.go:580
- daemon.saveInterval — internal/daemon/server.go:582
- http.ssePing — internal/daemon/server.go:1560
Triage evidence
- internal/settings/value.go:499-509 parses KindDuration values but only has a special minimum for protoTasks.maxTTL; there is no positive-interval rule.
- daemon.reapInterval and daemon.saveInterval are declared in internal/settings/registry.go:522-531 with positive defaults.
- http.ssePing is declared in internal/settings/wire.go:61-67 with a positive default.
- daemon/routes_exec.go:117-121 guards artifacts.gcInterval <= 0 by substituting the default; internal/mcpserver/timing.go:85-87 similarly resolves nonpositive transport.sseKeepAlive to its default. Preserve these existing fallback behaviors.
- daemon.idleExit is intentionally zero-capable: internal/settings/wire.go:276-282 says zero means never, and daemon/server.go:661-665 treats <=0 as disabled.
- Other ticker sites in mcpx use fixed or built-in default intervals, not registry settings.
Scope
Make validation reject zero and negative values for the three direct ticker settings above, with an error naming the setting/value. Keep legitimate-zero settings such as daemon.idleExit accepted; do not blanket-reject zero for all KindDuration values. Preserve the guarded fallback semantics for artifacts.gcInterval and transport.sseKeepAlive.
Acceptance
- Tests show 0s and -5s are rejected for daemon.reapInterval, daemon.saveInterval, and http.ssePing.
- A test shows daemon.idleExit=0s remains valid.
- Guarded settings retain their fallback behavior and no validated duration reaches a direct NewTicker with a nonpositive period.
- Existing internal/settings and internal/daemon tests pass.
Acceptance criteria
- Non-positive or non-finite ticker intervals in mcpx settings are rejected at validation time with a clear error naming the setting, before any
NewTickercall can panic. - Valid positive intervals behave exactly as before (existing settings tests unchanged and green).
- A regression test covers zero, negative, and (where representable) NaN interval inputs.
Metadata
Metadata
Assignees
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilottask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
developing-today commentedon Nov 1, 2026
CODE-1327
dezren39 commentedon Nov 1, 2026
🤖 Agent note · state: queued
dezren39 commentedon Nov 1, 2026
🤖 Agent note · state: triage-update
go test ./internal/settingscurrently fails in unrelated baseline tests: TestEveryDocumentHasAChapter (three manifest files), TestNoUndeclaredEnvRead (MCPX_ADAPTER_DECLARATION_SHA256), TestEverySettingHasAnEffectProbeOrAnExemption (11 settings), and TestTheScriptEnvironmentIsWhatTheCodeSets (three undeclared environment setters).go test ./internal/settings -run 'TestProtoTasks'passes. Please verify whether the full-suite baseline has changed before attributing those failures to this fix.dezren39 commentedon Nov 1, 2026
Intake review
Related: filed by a queue lane during triage of the mcpx settings surface (task packet evidence on the issue). No merged PR references this issue as of this run (checked
gh pr list --state merged --search 3467).Notes: the failure mode is a runtime panic from
time.NewTickeron a non-positive duration — a config-validation gap, so the fix belongs at the settings boundary, not at call sites. Risk: low; reject-at-load must not break existing deployed configs that rely on a zero value meaning "disabled" — the worker should check for that convention first and, if it exists, map zero to disabled explicitly instead of erroring.Suggested approach: validate in the settings loader, add the regression tests, run the mcpx package tests via CI.
🤖 Agent note · done
17 remaining items
dezren39 commentedon Nov 2, 2026
Lane E resumed task 5402: PR #4220 head ca87fd4 revalidated — MERGEABLE, latest Codex round on this head has no findings (earlier P1 fixed in the follow-up commit and replied to), verification documented on the PR (new ticker tests 3/3, daemon package ok, 5 settings failures proven pre-existing on clean main). The nix build check remains QUEUED (infra stall, same pattern as run 41392609663). Merging per standing merge authority.
Merge pull request #4220 from developing-today/queue/5402-3467-ticker…
dezren39 commentedon Nov 2, 2026
Done: PR #4220 merged (merge commit c6055bd); issue #3467 closed by the merge. Codex clean on final head; ticker-interval validation tests pass, remaining settings failures pre-existing on main.