Tags: EwanJasper/SessionRelay
Tags
fix: memory-safety for daemon log path (readLogTail + hourly rotation) Memory evaluation of 0.4.2 found: status/doctor read the whole log file into heap to show 3 lines (5MB log = 5MB spike), and rotation only ran at daemon start so an up-for-days daemon grew unbounded (~60KB/h measured). - readLogTail: seek-read tail only, heap O(bytes) — 5MB log now costs 0.01MB per status call (S12 regression test asserts <1MB delta) - rotateWatchLog hourly via unref'd interval in the foreground daemon path - local e2e: log growth measured 35KB/0.6h; rotation 5MB -> tail only
feat: daemon log to disk with rotation + status/doctor visibility (0.… …4.2) User feedback on 0.4.1: silencing the boot window also silenced failures. Fix: all three platforms redirect service output to .sessionrelay/watch.log (cmd >> 2>&1 / launchd StandardOut-ErrorPath / systemd append:), rotate at 1MB keeping tail 100KB on daemon start, srelay watch --status shows the log tail, doctor flags 'service registered but daemon dead + errors in log' as suspected crash. E2E verified locally: silent vbs boot -> watch.log written -> status shows tail.
fix: service entry resolution + silent boot (user-reported broken cmd… … at login) Root cause chain: buildWatchArgs prod branch used import.meta.url as the CLI entry — after bundling that is a hash-named chunk; the service script pinned it; dist rebuilds (clean-first since 0.3.1) removed the old chunk -> boot cmd failed with MODULE_NOT_FOUND. The 0.2.x behavior of never cleaning dist kept this landmine dormant; the package-size fix detonated it. - resolveWatchEntry/resolveWatchEntryFrom: stable dist/srelay.js entry, prod branch parameterized and unit-tested (dev形态测不到 prod 的盲区) - install-time entry existence precheck with actionable message - registry Run key now points to a wscript .vbs silent launcher (hidden window) — login no longer flashes a cmd box at all - local machine reinstalled and boot path verified end-to-end (vbs -> cmd -> node dist/srelay.js -> daemon heartbeat); 203 tests green
feat: daemon service registration on all three platforms + artifact a… …ssertions (release 0.4.0) - service.ts: macOS launchd LaunchAgent + Linux systemd user unit (with best-effort linger), aligned with Windows registry run key semantics (login autostart, no crash-restart); uninstall/status symmetric - CI verification: macOS runner does a real install->status->uninstall cycle (launchd is the macOS init); Linux content assertions only (runner user-systemd unreliable, documented) - check-artifacts.mjs (npm run check:artifacts, wired into CI test job and prepublishOnly): MCP tool names fully covered in docs, no stale tool-count wording, CHANGELOG top version matches package.json — hardening from the two release-audit incidents - watch.ts slimmed to daemon entry; windows implementation unchanged - tests: 6 service cases (content assertions all platforms, live launchd cycle darwin-only); 200 green + 1 platform-skipped
chore: release 0.3.0 (semantic search) + pre-release audit fixes Audit fixes (P1): digest body concat bounded in SQLite (30 msgs x 200 chars, was full concat of 200 msgs); per-target embed failure skip with poison-pill self-heal (retry after restart); enable backfill loop exits after two idle rounds. README test count 125 -> 185. Benchmarks at 5000 sessions: full cosine scan 2.6ms/query, vector load 15ms, ~10MB external memory, 9.8MB on disk.
PreviousNext