buzz-acp: run independent threads concurrently - #4135
Open
ChinaDairy wants to merge 2 commits into
Open
Conversation
ChinaDairy
force-pushed
the
agent/thread-scoped-acp-20260801
branch
from
August 1, 2026 15:32
00afb4c to
f9dda8c
Compare
Signed-off-by: ChinaDairy <81678063+ChinaDairy@users.noreply.github.com>
…p dedup Successor to a49e561 (v12), which is permanently ineligible for release. Carries the v13 repairs plus three defects found and fixed in this pass. LaneKey::resolve collected required root/reply tags into HashSets, so two IDENTICAL `root` (or `reply`) tags collapsed to a single entry and the `len() > 1` conflict check could never fire - a duplicated required marker resolved a lane instead of failing closed. Unrecognised fourth-field markers hit `continue` and were silently skipped, so an event whose only thread tag carried an unknown marker derived a TOP-LEVEL lane and ran in the wrong lane entirely. Both now fail closed: duplicates are counted in a Vec, and an unknown marker returns MalformedRequiredTag. `mention` stays explicitly non-authoritative rather than becoming an error, and NIP-10 deprecated positional compatibility is unchanged. setup_mode's `nudged_event_ids` was an insert-only HashSet with no eviction: one entry per mentioned event, retained for the lifetime of the process, and the events are supplied by other participants. That contradicts the bounded persistent-state invariant. Replaced with NudgeDedup, reusing the relay's existing TwoGenDedup two-generation rotation rather than inventing a second scheme, so recent history is still deduplicated for reconnect replay while residency is capped. PoolEvent::Respawn now boxes RespawnResult (clippy::large_enum_variant). The accompanying collapsible_match cannot be satisfied: install_respawn_result consumes its argument and a match guard only borrows, so lifting the `if` into a guard is E0507. That single allow carries the reason inline. Gates on this tree: cargo fmt --check rc=0; clippy -p buzz-acp --all-targets -D warnings rc=0; buzz-acp lib 761 passed 0 failed; buzz-agent 468 passed 0 failed across five targets; cargo deny advisories/bans/licenses/sources ok; Windows x86_64-pc-windows-gnu cross-check 0 warnings; git diff --check rc=0. Signed-off-by: ChinaDairy <81678063+ChinaDairy@users.noreply.github.com>
ChinaDairy
force-pushed
the
agent/thread-scoped-acp-20260801
branch
from
August 10, 2026 03:13
e1b8829 to
900a83f
Compare
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
(channel, NIP-10 thread root)threadRootIdthrough ACP observer Activity frames and exact control/task completion pathsVerification
cargo fmt --all -- --checkcargo check -p buzz-acpcargo test -p buzz-acp queue::tests --no-fail-fast(113 passed)cargo test -p buzz-acp observer_chunk_coalescer_tests --no-fail-fast(2 passed)cargo test -p buzz-acp owner_control_command_tests --no-fail-fast -- --test-threads=1(4 passed)cargo test -p buzz-acp pool::tests --no-fail-fast -- --test-threads=1(108 passed)The full package suite has pre-existing Windows
/bin/bashand inert-agent subprocess failures; focused pure/state tests above pass.