FE-735: Mode shell and fixture driver (M1)#144
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryMedium Risk Overview Adds elicitation exchange projection from transcript entries (prompt/response spans, open-prompt detection), fixture brief loading (JSON under Golden fixtures: three curated briefs and Reviewed by Cursor Bugbot for commit e32eb02. 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.
| ) | ||
| workspace.session.manager.appendMessage({ role: "user", content: "Runbook response" }) | ||
| await coordinator.bindCurrentSpecToSession(workspace.session.manager) | ||
| NODE |
There was a problem hiding this comment.
Runbook setup failure silently skipped without error check
Low Severity
The workspace setup block (the node heredoc that creates a temp workspace, appends entries, and binds the spec) runs outside run_check and without set -e. If this step fails, the exit code is silently ignored and subsequent run_check blocks (print-mode smoke, RPC smoke) run against a broken or empty workspace, producing misleading failure messages instead of attributing the root cause.
Reviewed by Cursor Bugbot for commit e32eb02. Configure here.



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