Skip to content

feat(recipe): live grove recipe run launches a session (#276)#478

Open
windoliver wants to merge 23 commits into
mainfrom
worktree-wild-inventing-hejlsberg
Open

feat(recipe): live grove recipe run launches a session (#276)#478
windoliver wants to merge 23 commits into
mainfrom
worktree-wild-inventing-hejlsberg

Conversation

@windoliver

Copy link
Copy Markdown
Owner

Summary

Implements live grove recipe run (issue #276 follow-up to the dry-run phase). grove recipe run <path> [--param k=v] [--goal "..."] [--repo <ref>] (without --dry-run) now materializes a recipe into a persistent, launched session whose record carries the recipe digest for reproducibility, with declared stdio: MCP extensions wired into every spawned agent.

  • Shared launcher — extracted the session-launch core out of grove session start into src/cli/utils/launch-session.ts (launchGoalSession). Both session start and recipe run use it; session start behavior (incl. --preset) is preserved byte-for-byte.
  • Live recipe run — rendered instructions become the goal (--goal overrides), topology comes from the materialized contract, and the run launches via the shared launcher (src/cli/commands/recipe.ts). Dry-run output is unchanged.
  • stdio MCP extensionsresolveRecipeMcpServers maps stdio: extensions to MCP server configs (required non-stdio → error, optional → warn+skip); the orchestrator appends them after the built-in grove server (SessionConfig.extraMcpServers).
  • Recipe provenanceSession/CreateSessionInput gain recipeProvenance, persisted across SQLite (additive recipe_provenance_json column + v17 column-safe migration), Nexus, and InMemory stores; surfaced in grove session status.
  • Misc — configurable orchestrator idleGracePeriodMs; spec GROVE-RECIPES.md updated with a Live Run section.

Out of scope (record-only, per the issue): sub-recipe spawning and non-stdio extension wiring.

Design: docs/superpowers/specs/2026-06-08-grove-recipe-run-live-design.md · Plan: docs/superpowers/plans/2026-06-08-grove-recipe-run-live.md

Test Plan

  • Unit/integration: extension mapper, orchestrator extraMcpServers, store round-trips (SQLite/Nexus/InMemory), launcher provenance, recipe-run wiring (injected fake launcher) — added across the changed files
  • grove session start regression suite green (faithful extraction)
  • Full suite: 8516 pass / 0 fail; tsc --noEmit clean; biome clean on changed files
  • Real-process E2E (tests/e2e/recipe-run-tmux.ts): grove up managed stack + real codex↔claude review-loop → asserts run digest == recipe validate digest, both roles spawn, the stdio: MCP extension launches inside an agent, the Nexus session record carries recipeProvenance.recipeDigest, and the loop produced 3 contributions (status=completed) — PASS

Follow-ups (non-blocking): hoist resolveSessionNexusZoneId/terminalSessionStatus to a neutral util (drop the util→command import + duplication); named LaunchGoalSession type; InMemory provenance round-trip test; recipe run JSON per-agent sessionId parity with session start.

Closes #276

windoliver added 23 commits June 8, 2026 13:00
Write a focused integration test that proves a launched session persists
recipeProvenance to SQLite. Uses a _testRuntime shim (QuickIdleRuntime) to
avoid spawning real agent processes; the runtime marks all sessions idle
immediately so the orchestrator stops after the 30-second grace period.

Also adds _testRuntime?: AgentRuntime to LaunchGoalSessionInput — a minimal
test-only escape hatch that bypasses selectRuntime/isAvailable and injects
a runtime directly, enabling in-process testing without real CLI agents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(spec): Grove Recipes — shareable YAML workflows above GROVE.md sessions

1 participant