nixbot

builds

succeeded spaces-integration-gateway-unit-test checks.x86_64-linux.spaces-integration-gateway-unit · build #173 · raw

1bun test v1.4.2 (744846f84)23gateway-core.test.ts:4✓ discoverTools returns the server's tools with inputSchema as parameters [5.43ms]5✓ discoverTools resolves [] when the socket is unreachable [0.90ms]6✓ buildRegistry namespaces tools and precomputes the autoRun verdict [0.67ms]7✓ loadDefinition parses confirmPreview; absent ⇒ empty map [0.17ms]8✓ buildRegistry carries confirmPreview and hides preview tools from the registry [0.23ms]9integrations: cannot read definition for ghost: Error: ENOENT: no such file or directory, open '/build/gateway-core-test-G9KzUu/reg2/ghost.json'10✓ buildRegistry skips disabled integrations and missing definitions [0.31ms]11integrations: cannot read /build/gateway-core-test-G9KzUu/reg3/enabled.json: SyntaxError: JSON Parse error: Expected '}'12✓ buildRegistry yields nothing when enabled.json is unreadable/malformed [0.23ms]13✓ enabledMtimeMs is 0 when absent, positive once the file exists [0.24ms]14✓ refreshRegistry rebuilds only when enabled.json's mtime moves [0.40ms]15✓ integrationNames lists each enabled integration once [0.24ms]16✓ callIntegrationTool: initialize/initialized/tools-call, text concatenated [0.98ms]17✓ callIntegrationTool: server isError surfaces as isError [0.50ms]18✓ callIntegrationTool: connection failure resolves unavailable, never throws [0.20ms]19✓ callIntegrationTool: timeout resolves unavailable [200.61ms]20✓ callIntegrationTool: abort signal resolves unavailable [0.92ms]21✓ mcpExchange runs the step chain and yields the final reply [0.66ms]22✓ mcpExchange resolves a failure result, never rejects [0.17ms]2324mcp-server.test.ts:25✓ advertisedTools maps registry entries to MCP tool descriptors [0.09ms]26✓ initialize advertises the tool-list-changed capability and marks the session [0.18ms]27✓ notifications/initialized owes no reply [0.05ms]28✓ tools/list returns the aggregated advertised tools [0.07ms]29✓ an unknown method resolves a JSON-RPC method-not-found error [0.04ms]30✓ an autoRun tool forwards immediately with no confirm [0.19ms]31✓ a non-autoRun tool confirmed 'once' forwards but does not persist the grant [0.10ms]32✓ a non-autoRun tool confirmed 'session' skips the prompt on later calls [0.08ms]33✓ a session grant is scoped to its own session, not shared [0.05ms]34✓ a denied tool is never forwarded and returns the denial [0.05ms]35✓ an unavailable confirm command blocks the call and says nobody was asked [0.05ms]36✓ an unknown tool errors without confirming or forwarding [0.04ms]37✓ confirmPreview output is fetched and passed as the confirm context [0.07ms]38✓ a failed confirmPreview fails closed: surfaces the error, no prompt, no send [0.07ms]39✓ spaces/session is a notification: it owes no reply [0.08ms]40✓ two sessions sharing one key share a session grant [0.10ms]41✓ distinct keys keep grants isolated [0.10ms]42✓ a bad key (empty / oversized / non-string) does not bind a shared set [0.12ms]43✓ binding sweeps entries idle beyond the TTL [0.09ms]4445confirm.test.ts:46✓ returns the verdict the command writes to the verdict file [4.38ms]47✓ tolerates surrounding whitespace/newlines in the verdict [1.02ms]48✓ passes the request JSON to the command via SPACES_CONFIRM_REQUEST [1.06ms]49integrations: confirm command unavailable: unknown verdict maybe50✓ reports unavailable when the command writes an unknown token [0.99ms]51integrations: confirm command unavailable: no verdict file52✓ reports unavailable when the command writes nothing [0.85ms]53integrations: confirm command unavailable: exit 354✓ reports unavailable on a non-zero exit even if a verdict was written [0.94ms]55integrations: confirm command unavailable: SPACES_INTEGRATION_CONFIRM_CMD is empty56✓ reports unavailable when no confirm command is configured [0.08ms]57integrations: confirm command unavailable: spawn failed: ENOENT: no such file or directory, posix_spawn '/build/no-such-confirm-command'58✓ reports unavailable when the command cannot be spawned [0.74ms]59integrations: confirm command unavailable: no verdict within 200ms60✓ reports unavailable when the command exceeds the timeout [201.42ms]61✓ hands the command the user manager's WAYLAND_DISPLAY when its own env has none [3.54ms]62✓ keeps a display already in the gateway's env [2.32ms]63✓ ignores a quoted or otherwise non-plain user manager value [2.17ms]6465connect.test.ts:66✓ bridges bytes both directions and resolves when the socket closes [3.12ms]67✓ resolves (never hangs) when the socket is unreachable [0.20ms]68✓ bridge declares a spaces/session key as its first socket line [0.52ms]69✓ distinct bridge invocations declare distinct keys [0.51ms]7071notify.test.ts:72✓ broadcast sends one tools/list_changed notification per initialized client [0.06ms]73✓ broadcast skips a client that has not initialized [0.01ms]74✓ broadcast survives a write that throws [0.04ms]75✓ watch reports a change of the file, once per change [0.09ms]76✓ watch reports the file appearing and going away [0.02ms]77✓ a stopped watch schedules no further poll [0.02ms]78✓ watch keeps polling after onChange throws [0.03ms]79✓ the real mtime reader treats a missing file as no file [0.18ms]80✓ an empty path gives an inert watch [0.03ms]8182live-notify.test.ts:83✓ a live session hears about an integration enabled after it connected [63.67ms]8485 62 pass86 0 fail87 136 expect() calls88Ran 62 tests across 6 files. [519.00ms]