nixbot

builds

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

1build-x86-01: building 92ga3jscmslgvzghdnpii2kk0wvplgx5-spaces-integration-gateway-unit-test.drv2bun test v1.4.4 (38afee6c8)34gateway-core.test.ts:5✓ discoverTools returns the server's tools with inputSchema as parameters [3.60ms]6✓ discoverTools resolves [] when the socket is unreachable [0.83ms]7✓ buildRegistry namespaces tools and precomputes the autoRun verdict [0.55ms]8✓ loadDefinition parses confirmPreview; absent ⇒ empty map [0.11ms]9✓ buildRegistry carries confirmPreview and hides preview tools from the registry [0.18ms]10integrations: cannot read definition for ghost: Error: ENOENT: no such file or directory, open '/build/gateway-core-test-zgIwwt/reg2/ghost.json'11✓ buildRegistry skips disabled integrations and missing definitions [0.16ms]12integrations: cannot read /build/gateway-core-test-zgIwwt/reg3/enabled.json: SyntaxError: JSON Parse error: Expected '}'13✓ buildRegistry yields nothing when enabled.json is unreadable/malformed [0.14ms]14✓ enabledMtimeMs is 0 when absent, positive once the file exists [0.11ms]15✓ refreshRegistry rebuilds only when enabled.json's mtime moves [0.27ms]16✓ integrationNames lists each enabled integration once [0.17ms]17✓ callIntegrationTool: initialize/initialized/tools-call, text concatenated [0.93ms]18✓ callIntegrationTool: server isError surfaces as isError [0.54ms]19✓ callIntegrationTool: connection failure resolves unavailable, never throws [0.18ms]20✓ callIntegrationTool: timeout resolves unavailable [200.61ms]21✓ callIntegrationTool: abort signal resolves unavailable [0.67ms]22✓ mcpExchange runs the step chain and yields the final reply [0.54ms]23✓ mcpExchange resolves a failure result, never rejects [0.17ms]2425mcp-server.test.ts:26✓ advertisedTools maps registry entries to MCP tool descriptors [0.08ms]27✓ initialize advertises the tool-list-changed capability and marks the session [0.19ms]28✓ notifications/initialized owes no reply [0.06ms]29✓ tools/list returns the aggregated advertised tools [0.08ms]30✓ an unknown method resolves a JSON-RPC method-not-found error [0.05ms]31✓ an autoRun tool forwards immediately with no confirm [0.19ms]32✓ a non-autoRun tool confirmed 'once' forwards but does not persist the grant [0.11ms]33✓ a non-autoRun tool confirmed 'session' skips the prompt on later calls [0.06ms]34✓ a session grant is scoped to its own session, not shared [0.06ms]35✓ a denied tool is never forwarded and returns the denial [0.06ms]36✓ an unavailable confirm command blocks the call and says nobody was asked [0.05ms]37✓ an unknown tool errors without confirming or forwarding [0.05ms]38✓ confirmPreview output is fetched and passed as the confirm context [0.07ms]39✓ a failed confirmPreview fails closed: surfaces the error, no prompt, no send [0.07ms]40✓ spaces/session is a notification: it owes no reply [0.10ms]41✓ two sessions sharing one key share a session grant [0.10ms]42✓ distinct keys keep grants isolated [0.08ms]43✓ a bad key (empty / oversized / non-string) does not bind a shared set [0.12ms]44✓ binding sweeps entries idle beyond the TTL [0.09ms]4546confirm.test.ts:47✓ returns the verdict the command writes to the verdict file [3.98ms]48✓ tolerates surrounding whitespace/newlines in the verdict [1.10ms]49✓ passes the request JSON to the command via SPACES_CONFIRM_REQUEST [0.95ms]50integrations: confirm command unavailable: unknown verdict maybe51✓ reports unavailable when the command writes an unknown token [1.16ms]52integrations: confirm command unavailable: no verdict file53✓ reports unavailable when the command writes nothing [0.98ms]54integrations: confirm command unavailable: exit 355✓ reports unavailable on a non-zero exit even if a verdict was written [0.92ms]56integrations: confirm command unavailable: SPACES_INTEGRATION_CONFIRM_CMD is empty57✓ reports unavailable when no confirm command is configured [0.09ms]58integrations: confirm command unavailable: spawn failed: ENOENT: no such file or directory, posix_spawn '/build/no-such-confirm-command'59✓ reports unavailable when the command cannot be spawned [0.44ms]60integrations: confirm command unavailable: no verdict within 200ms61✓ reports unavailable when the command exceeds the timeout [200.98ms]62✓ hands the command the user manager's WAYLAND_DISPLAY when its own env has none [2.83ms]63✓ keeps a display already in the gateway's env [2.32ms]64✓ ignores a quoted or otherwise non-plain user manager value [1.90ms]6566connect.test.ts:67✓ bridges bytes both directions and resolves when the socket closes [2.65ms]68✓ resolves (never hangs) when the socket is unreachable [0.30ms]69✓ bridge declares a spaces/session key as its first socket line [0.66ms]70✓ distinct bridge invocations declare distinct keys [0.48ms]7172notify.test.ts:73✓ broadcast sends one tools/list_changed notification per initialized client [0.07ms]74✓ broadcast skips a client that has not initialized [0.01ms]75✓ broadcast survives a write that throws [0.02ms]76✓ watch reports a change of the file, once per change [0.09ms]77✓ watch reports the file appearing and going away [0.03ms]78✓ a stopped watch schedules no further poll [0.02ms]79✓ watch keeps polling after onChange throws [0.02ms]80✓ the real mtime reader treats a missing file as no file [0.11ms]81✓ an empty path gives an inert watch [0.02ms]8283live-notify.test.ts:84✓ a live session hears about an integration enabled after it connected [63.38ms]8586 62 pass87 0 fail88 136 expect() calls89Ran 62 tests across 6 files. [512.00ms]