Skip to content

fix(acp): de-duplicate post-cancel orphan-update warnings#457

Merged
CSRessel merged 1 commit intomainfrom
fix-acp-orphan-update-warning
Apr 30, 2026
Merged

fix(acp): de-duplicate post-cancel orphan-update warnings#457
CSRessel merged 1 commit intomainfrom
fix-acp-orphan-update-warning

Conversation

@nori-sessions
Copy link
Copy Markdown
Contributor

@nori-sessions nori-sessions Bot commented Apr 29, 2026

Summary

🤖 Generated with Nori

  • After a cancel, in-flight session/update events still hit the reducer with no active request and currently produce one "Received request-owned content update while no request is active" yellow warning cell per event — flooding the history.
  • The reducer now tracks an orphan_update_warning_emitted flag on SessionRuntime. The warning fires only on the first orphan update in a burst; subsequent orphans in the same idle window skip the warning. The normalizer still runs on every update, so well-formed session/update events continue to render as tool / message history cells.
  • The flag resets when a new prompt or load begins (start_prompt, reduce_load_submit), so a fresh burst on a future request will warn again.

Test Plan

  • cargo test -p nori-acp (494 tests pass)
  • New unit tests in nori-rs/acp/src/backend/session_reducer/tests.rs:
    • orphan_warning_is_emitted_only_once_per_burst — three orphan ToolCallUpdates produce exactly one warning and three ToolSnapshots.
    • orphan_warning_resets_when_a_new_prompt_starts — burst → new prompt → new burst produces two warnings total.
  • Existing test_out_of_phase_tool_call_update_still_emits_normalized_tool_snapshot still passes (single update still gets the warning + snapshot).
  • just fmt and just fix -p nori-acp -p nori-protocol clean.

Share Nori with your team: https://www.npmjs.com/package/nori-skillsets

After a cancel, in-flight session/update events still arrive at the
reducer with no active request, producing one yellow warning per event.
Track an orphan_update_warning_emitted flag on SessionRuntime so the
"Received request-owned content update while no request is active"
warning fires once per burst; the normalizer still produces tool/message
events so well-formed updates render in history. The flag resets when a
new prompt or load begins, so a future request can warn again.
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
@CSRessel CSRessel merged commit c39887e into main Apr 30, 2026
3 checks passed
@CSRessel CSRessel deleted the fix-acp-orphan-update-warning branch April 30, 2026 18:13
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.

1 participant