fix(acp): safely route verified direct replies - #4892
Conversation
6ac0707 to
1999b2f
Compare
ScaleLeanChris
left a comment
There was a problem hiding this comment.
Tested commit 1999b2f10 on macOS arm64 with the repository Hermit toolchain:
cargo test -p buzz-acp: 671 unit tests and 9 lifecycle integration tests passedcargo fmt --all -- --check: passedcargo clippy -p buzz-acp --all-targets -- -D warnings: passed
I also reviewed the application gate after the relay-side mention filter is widened. Top-level unmentioned chatter avoids the REST lookup, while parent lookup fails closed on lookup errors, missing or malformed parents, ID or signature mismatch, a different author, and a cross-channel parent. The behavior looks sound.
Non-blocking coverage suggestion: add explicit invalid-signature and cross-channel-agent-parent tests. Those are important stated invariants and easy to regress during a future refactor.
Chessing234
left a comment
There was a problem hiding this comment.
is_direct_reply_to_agent runs inline on the harness event loop for every unmatched mentions-mode event with a parent tag, and each miss can sit up to 2s on REST. that stalls next_event and can drop real @mentions under channel traffic that used to never reach the harness.
short-circuit with a local recent-agent-event-id set (or move the parent check off the select loop) before paying REST on replies to everyone else?
|
Good catch. You're right that awaiting the parent REST lookup inline introduces head-of-line blocking in the harness event loop. I'll revise this so recently observed parent events are resolved from a bounded verified cache, while cache misses use bounded background verification rather than blocking |
1999b2f to
882aed3
Compare
Signed-off-by: bgx4k3p <bgx4k3p@gmail.com>
882aed3 to
fb43802
Compare
🔐 Codex Security Review
|
Summary
Safety and liveness
Matched,NoMatch, andFailedClosedso filter failures cannot widen into later rulesTests
cargo test -p buzz-acp: 932 unit + 9 lifecycle tests passedcargo clippy -p buzz-acp --all-targets -- -D warningscargo fmt --all -- --checkgit diff --checkThe production backport remains separately pinned to the deployed relay source; this PR targets current upstream
main.