Skip to content

feat(bridge): forward rx4 Prefill/Nudge and stuck-tool recovery - #86

Open
undivisible wants to merge 3 commits into
mainfrom
cursor/rx4-recovery-events-9e81
Open

feat(bridge): forward rx4 Prefill/Nudge and stuck-tool recovery#86
undivisible wants to merge 3 commits into
mainfrom
cursor/rx4-recovery-events-9e81

Conversation

@undivisible

@undivisible undivisible commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

What

Host forwarding for rotary should-fixes (tschk/rotary#184 at 74698cfb8dc4654336f4710fe9d1a9a14a340699).

record_rx4_event now maps the landed Event variants:

Event Trajectory action args / observation
Recovery { action: Prefill, reason } prefill reason
Recovery { action: Nudge, reason } nudge reason
Recovery { action: Retry, reason } retry reason
Recovery { action: Halt, reason } halt reason
ToolSpill { status, locator, original_bytes } spill spilled:N / spill_failed:N + locator
ProcessStart { process_id, program } process_start id / program
ProcessEnd { process_id, exit_code } process_end id / exit code

ToolExecutionEnd records a string-locator spill only when ToolResult.spill is absent, so typed ToolSpill is not doubled.

rx4 pin

Bumped to 74698cfb8dc4654336f4710fe9d1a9a14a340699 (rotary draft PR 184). ToolResult now includes spill: Option<SpillNotice>; bound_tool_output is fail-closed and no longer returns Result.

Tests

  • typed_recovery_spill_and_process_events_become_trajectory_steps
  • rx4_typed_recovery_spill_and_process_events_are_recorded
  • existing recovery / spill / event mapping cases

Validation

  • cargo fmt --all -- --check
  • cargo clippy -p apollo-agent --all-targets --all-features -- -D warnings
  • focused rotary_bridge + rx4_engine mapping tests
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 03:51
Forward empty-turn and stuck-tool RecoveryAction onto the trajectory
without bumping the rx4 pin. Current-pin signals (user MessageEnd
prefill/nudge text, RetryReason stuck_tool, GuardrailStop turn halt)
and forthcoming Event JSON shapes (Prefill, Nudge, StuckTool, Spill,
FailureNotice) share the same mapper.

Co-authored-by: Max Carter 祁明思 <max@tsc.hk>
clippy::redundant_guards rejected the matches! guard on the recovery
MessageEnd arm.

Co-authored-by: Max Carter 祁明思 <max@tsc.hk>
@undivisible
undivisible marked this pull request as ready for review September 7, 2026 04:12
@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b75b72c3-5467-466b-912a-28e2d22f95d1)

@mergify

mergify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Bump rx4 to 74698cf (rotary should-fixes) and forward Event::Recovery
{action, reason}, Event::ToolSpill, and ProcessStart/ProcessEnd onto
the trajectory. ToolResult.spill is now the typed spill path.

Co-authored-by: Max Carter 祁明思 <max@tsc.hk>
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.

2 participants