diff --git a/plugins/fusion-plugin-grok-runtime/src/__tests__/runtime-adapter.test.ts b/plugins/fusion-plugin-grok-runtime/src/__tests__/runtime-adapter.test.ts index e6f12b4c9e..d5e063b1f5 100644 --- a/plugins/fusion-plugin-grok-runtime/src/__tests__/runtime-adapter.test.ts +++ b/plugins/fusion-plugin-grok-runtime/src/__tests__/runtime-adapter.test.ts @@ -9,8 +9,17 @@ describe("GrokRuntimeAdapter", () => { expect(result.session.systemPrompt).toBe("sys"); }); - it("promptWithFallback resolves without throwing", async () => { + // FN-7715: promptWithFallback is an INTENTIONAL no-op — Grok streaming + // flows through the pi/xAI OpenAI-compatible path registered by FN-7711, + // not through this plugin runtime adapter (which is only reached via + // runtimeConfig.runtimeHint === "grok", which nothing in the product + // sets). This module imports no process-spawning seam (compare + // process-manager.ts's `runGrokCommand`), so this asserts the intentional + // no-op contract at the only observable boundary: it resolves without + // throwing and returns no value, taking no action. + it("promptWithFallback is an intentional no-op: resolves without throwing, returns undefined", async () => { const adapter = new GrokRuntimeAdapter(); + await expect(adapter.promptWithFallback()).resolves.toBeUndefined(); }); diff --git a/plugins/fusion-plugin-grok-runtime/src/runtime-adapter.ts b/plugins/fusion-plugin-grok-runtime/src/runtime-adapter.ts index 0033a41edc..1bc56e7fe6 100644 --- a/plugins/fusion-plugin-grok-runtime/src/runtime-adapter.ts +++ b/plugins/fusion-plugin-grok-runtime/src/runtime-adapter.ts @@ -13,9 +13,23 @@ export class GrokRuntimeAdapter { }; } + /* + FNXC:GrokCli 2026-07-09-00:00: + FN-7715: this is an INTENTIONAL no-op, not unfinished work. FN-7711 already + routes `grok-cli/*` model selections through the standard pi/openai-completions + streaming path against https://api.x.ai/v1 — that is the real, exercised Grok + streaming path. The `grok` binary (see provider.ts / process-manager.ts) is + wired for discovery/probe only (`grok models`, `grok --version`); there is no + documented non-interactive prompt/stream subcommand to invoke here, and + inventing one would violate the external-integration-evidence policy. This + adapter's `promptWithFallback` is only reached when an agent's + `runtimeConfig.runtimeHint === "grok"`, which nothing in the product sets + today. Mirrors the identical intentional stub in the sibling Cursor plugin + (`fusion-plugin-cursor-runtime/src/runtime-adapter.ts`, TODO(FN-3396)). If a + stable non-interactive `grok` CLI streaming contract is confirmed upstream in + the future, a follow-up task can revisit this. + */ async promptWithFallback(): Promise { - // TODO(FN-7705): Implement Grok CLI prompt streaming once a stable - // invocation contract beyond probe/discovery commands is confirmed. return; }