fix(acp): retain transiently rejected observer frames for resend (PR27 salvage) - #48
Open
mfethe1 wants to merge 1 commit into
Open
fix(acp): retain transiently rejected observer frames for resend (PR27 salvage)#48mfethe1 wants to merge 1 commit into
mfethe1 wants to merge 1 commit into
Conversation
Signed-off-by: Michael Feth <mfethe1@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Focused salvage of PR #27's ACP rejected-observer-frame retransmit fix only: cherry-pick of commit
84c014c1459a78b83bf85c394bf3722f97574f3f(merge2516efe112carries the identical first-parent delta; its other parent's proactive-resubscribe/recovery changes are out of scope here).The bug: the mid-session
OKhandler ends with an unconditionalstate.acknowledge_observer_frame(&event_id)after theclassify_okmatch. That trailing call retires the in-flight frame on every OK — defeating theRetriablearm, so a transiently refused observer event (e.g.error: database unavailable) is dropped from the resend queue exactly as though it had been stored.The fix: remove the two trailing lines so each
classify_okarm controls its own acknowledgement (Stored/Permanent retire; Retriable stays in flight for resend), and replace the state-only unit test with a real-socket regression test (test_ws_pair+execute_connected_command+handle_ws_message) asserting: a transient refusal retains the frame, the resend publishes identical signed bytes, and a terminal OK retires it.Need verification (done before implementation)
product/main@bcd3e1c96e(includes [lenny] fix(test): deterministic fake_llm steer/cancel assertions #46): trailing unconditional ack still present (relay.rs OK handler); only the weak unit test exists. Needed.4c1d2d17: OK handler identical to trunk — no coverage, no conflict. Needed.110ff873,2f3dd850introduced theOkDispositionmachinery this completes).Regression proof (deterministic)
With the two-line fix reverted and only the new test kept, the test fails exactly as the bug predicts:
With the fix: passes.
Gates (local, hermit cargo 1.95.0)
cargo test -p buzz-acp— 986 passed / 0 failed / 1 ignored (lib) + 9 + 9 (integration) — all greencargo clippy -p buzz-acp --all-targets --locked— 0 warnings, 0 errorscargo fmt --all --check— cleancargo metadata --locked— cleanScope:
crates/buzz-acp/src/relay.rsonly (+93/−28). No migrations, CI, compose, credentials, shell fixtures, or process-reaping changes. Source SHA preserved: PR27 commit84c014c145cherry-picked verbatim with original DCO sign-off; branch headdc85e296810356b9858d96c528189c5c8a982917onproduct/mainbcd3e1c96e.Parent owns independent review and merge.