You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(agent-memory-sync): reject cron step<=0 to stop scheduler infinite-loop hang (+ coverage) (#61)
* fix(agent-memory-sync): reject cron step<=0 to stop scheduler hang
parsePart validated a step token against the field range via
parseInteger(stepToken, min, max). For fields with min=0
(minute/hour/dayOfWeek) step=0 was accepted, and fillRange(result, min,
max, 0) then looped forever (cursor += 0) — a typo'd operator cron
string like '*/0 * * * *' hung the sync daemon unbounded.
Validate the step independently as an integer >= 1 (new parseStep), with
no upper bound: a step larger than the range simply collapses to the
start value in a single terminating fillRange iteration. Adds tests for
the rejected '*/0', the now-valid range-independent '*/90', and pins the
existing throw for the unsupported lone-value 'a/n' step form.
Refs: agent-memory task 124c89e0
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(memory-router): assert default embed timeout is wired to fetch
The embed-provider suite proved an abort throws but never that the
DEFAULT_TIMEOUT_MS (5000) is the value handed to AbortSignal.timeout and
that its signal reaches fetch. Spy over the real AbortSignal.timeout
(call-through) to pin the 5000ms default and the explicit-override
branch of `opts.timeoutMs ?? DEFAULT_TIMEOUT_MS`.
Refs: agent-memory task 124c89e0
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(memory-digest-cli): exercise the real generate action body
The generate suite replaced the action with a spy, so the real body
(scan → extract → generate → format → write/print + catch→exit) had ~0%
coverage. Add integration tests driving the real registerGenerateCommand
action against today-dated temp-dir fixtures: markdown --output write,
--json --output write (also parsing non-default --days/--max), stdout
print when --output is omitted, and the catch/process.exit(1) branch via
an unwritable --output path. Stubs console.log/error and process.exit
with save/restore. Tightens the tautological description assertion to
the exact string.
Refs: agent-memory task 124c89e0
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Lan Nguyen Si <nguyen-si@publicplan.de>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments