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

lsm / neokai / 25967340249 / 27
83%
dev: 83%

Build:
DEFAULT BRANCH: dev
Ran 16 May 2026 04:45PM UTC
Files 293
Run time 11s
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

16 May 2026 04:42PM UTC coverage: 18.492%. First build
25967340249.27

push

github

web-flow
fix: deterministic MCP guard for Space member sessions before query start (#1926)

* fix: deterministic MCP guard for Space member sessions before query start

Space ad-hoc (member) sessions with `context.spaceId` could lose their
`space-agent-tools` MCP server after cache eviction / DB reload, because
runtime-only MCP attachments are tied to the in-memory AgentSession instance.
When the instance is discarded and recreated from DB, the attachments are lost.

This adds a pre-query invariant check (the member-session counterpart to the
existing space_chat invariant) that:

1. Detects when a space-bound member session is missing `space-agent-tools`
   before QueryRunner.start() creates the SDK query.
2. Calls a self-heal callback wired by SpaceRuntimeService when it first
   attaches the tools, which re-runs attachSpaceToolsToMemberSession().
3. Rebuilds query options after self-heal so the SDK sees the repaired map.
4. Throws a hard error if the server is still missing — never silently start
   a degraded Space member turn.

Changes:
- QueryRunner: add `ensureMemberSpaceMcpInvariant()` with self-heal + rebuild
- QueryRunnerContext: add `onMissingMemberSpaceMcpServers` callback
- AgentSession: add `onMissingMemberSpaceMcpServers` property
- SpaceRuntimeService: set the callback in `attachSpaceToolsToMemberSession()`
- Tests: 5 new regression tests covering self-heal, throw, skip conditions

* fix: skip space_task_agent in member MCP invariant + test still-missing throw

Review feedback:
- Add space_task_agent exclusion to ensureMemberSpaceMcpInvariant, matching
  attachSpaceToolsToMemberSession skip logic. Legacy task-agent sessions must
  not hit the member invariant since they intentionally don't receive the
  generic member space-agent-tools server.
- Add test for the defensive "still missing after self-heal" throw path.

14361 of 77660 relevant lines covered (18.49%)

9.65 hits per line

Source Files on job daemon-online-websocket - 25967340249.27
  • Tree
  • List 293
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25967340249
  • 225cc87a on github
  • Next Job for on dev (#25967464488.12)
  • 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