• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 24805423536 / 19
82%
dev: 82%

Build:
DEFAULT BRANCH: dev
Ran 22 Apr 2026 10:16PM UTC
Files 277
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Apr 2026 10:13PM UTC coverage: 17.971% (-0.05%) from 18.016%
24805423536.19

push

github

web-flow
fix(daemon): sessions only deleted/archived from UI (Task #85) (#1600)

* fix(daemon): sessions are only deleted/archived from UI (Task #85)

Restrict the two mutating session-resource primitives to UI-originated
paths and add a CI guard so they can't regress.

- SessionLifecycle/SessionManager: split the old `deleteSession` into
  `archiveResources` (keeps DB row + sdk_messages, cleans worktree + SDK)
  and `deleteResources` (full cascade). Lifecycle events can only call
  the new `interruptInMemorySession` which never touches DB or disk.
- session.archive RPC now delegates to `archiveSessionResources`;
  session.delete RPC calls `deleteSessionResources` with a
  `ui_session_delete` trigger. room.delete does the same for each child
  session via `ui_room_delete`.
- TaskAgentManager: `cleanup()` no longer deletes; task archive events
  drive `archiveSessionResources(..., 'ui_task_archive')`, which is the
  only path allowed to remove the space worktree.
- NeoAgentManager: `destroyAndRecreate()` now rehydrates from DB via
  `interruptInMemorySession` instead of recreating the row.
- scripts/check-session-deletion-callers.sh: allow-lists the legitimate
  callers of the UI-only primitives and the `ui_*` trigger identifiers;
  wired into `bun run check`.

Adds/updates unit tests across session-lifecycle, session-manager,
session-handlers, room-handlers, neo-agent-manager, and task-agent-*
suites to assert the preserve-DB invariant on every non-UI cleanup.

* fix(daemon): clear session.worktree + snapshot response fields during archive

- `archiveResources` now passes `worktree: undefined` to `update()` when the
  session had a worktree, so the DB row's worktree_* columns are cleared
  alongside the on-disk worktree removal. Matches the pre-Task-#85
  behaviour and keeps `session.worktree` from pointing at a deleted path.
- `session.archive` RPC snapshots `hadWorktree` + `roomIdForArchive` before
  calling `archiveSessionResources`. The `session` value ret... (continued)

13667 of 76050 relevant lines covered (17.97%)

9.01 hits per line

Source Files on job daemon-online-cross-provider-2 - 24805423536.19
  • Tree
  • List 277
  • Changed 12
  • Source Changed 12
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24805423536
  • 92d9e0aa on github
  • Prev Job for on dev (#24804916750.19)
  • Next Job for on dev (#24805936249.17)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc