FE-735: Mode shell and fixture driver (M1)#144
Conversation
PR SummaryMedium Risk Overview New elicitation exchange projection derives prompt/response spans from Pi JSONL (assistant, tool results, structured prompts/responses). Fixture capture copies the selected session transcript plus Brunch-owned Workspace session coordinator now persists Reviewed by Cursor Bugbot for commit eca7505. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: This PR delivers M1 “mode shell + fixture driver” support by adding headless transport modes and the first deterministic fixture capture loop. Changes:
Technical notes: The RPC surface is intentionally thin (named method families over projections), and print mode is treated as a transport proof-of-life rather than an agent turn. 🤖 Was this summary useful? React with 👍 or 👎 |
| ): Promise<WorkspaceSessionReadyState["session"]> { | ||
| await ensureWorkspaceDirs(cwd) | ||
| const files = await listSessionFiles(cwd) | ||
| const manager = currentSessionFile |
There was a problem hiding this comment.
currentSessionFile is read from .brunch/state.json, so a stale/tampered path here can throw (breaking print/RPC) and also cause bindSessionToSpec to rewrite an unexpected file. Consider guarding that it exists and is within .brunch/sessions/ (and falling back when invalid) before calling SessionManager.open().
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| } | ||
|
|
||
| function isPromptSideEntry(entry: SessionEntry): boolean { | ||
| if (isCustomTranscriptEntry(entry) && entry.customType.includes("prompt")) { |
There was a problem hiding this comment.
isPromptSideEntry() only treats custom(_message) entries as prompt-side when customType contains "prompt", so other model-visible injected custom_message entries (e.g. brunch/world_update/v1) would be omitted from promptEntryIds/ranges. If those injections are meant to be part of the prompt span between user turns, the current projection will silently drop them.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e32eb02. Configure here.
|
|
||
| const role = roleOf(entry) | ||
| return role === "assistant" || role === "toolResult" | ||
| } |
There was a problem hiding this comment.
Prompt-side classification uses fragile substring match
Medium Severity
isPromptSideEntry uses customType.includes("prompt") as a substring match, while isResponseSideEntry uses an explicit Set (STRUCTURED_RESPONSE_TYPES). This asymmetry means any future custom entry type containing "prompt" anywhere in its name (e.g. brunch.prompt_history, brunch.user_prompt_feedback) would silently be classified as prompt-side, potentially corrupting exchange projections. The response side is already guarded against this with an allowlist pattern.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e32eb02. Configure here.
e32eb02 to
eca7505
Compare
Merge activity
|



FE-735: Add print snapshot transport shell
FE-735: Add named JSON-RPC stdio skeleton
FE-735: Project elicitation exchanges from JSONL
FE-735: Project real Pi JSONL exchanges
FE-735: Scope session exchange RPC to current session
FE-735: Add RPC print snapshot parity smoke
FE-735: Add fixture capture bundle skeleton
FE-735: Seed deterministic fixture briefs
FE-735: Scope capture seam review fixes
FE-735: Stabilize current session capture
FE-735: Reconcile fixture brief format docs
FE-735: Use Pi session entry types for exchange projection
FE-735: Report Brunch-owned fixture metadata version
FE-735: Capture scripted brief runs