Harden workflow approvals and ACP publishing - #5032
Open
nocodedltd wants to merge 4 commits into
Open
Conversation
Signed-off-by: nocodedltd <208452262+nocodedltd@users.noreply.github.com>
nocodedltd
force-pushed
the
agent/workflow-approval-hardening
branch
from
August 6, 2026 09:47
3f19242 to
85d67b9
Compare
nocodedltd
marked this pull request as ready for review
August 6, 2026 10:00
Signed-off-by: nocodedltd <208452262+nocodedltd@users.noreply.github.com>
Signed-off-by: nocodedltd <208452262+nocodedltd@users.noreply.github.com>
Signed-off-by: nocodedltd <208452262+nocodedltd@users.noreply.github.com>
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
#hqueries scoped to every authorised channel instead of incorrectly pushing down one arbitrary channelWhy
The previous gate record did not retain the content being approved. A reviewer could therefore approve an external send without seeing the exact package, and a crash after dispatch but before trace persistence could cause the same post-gate instruction to be emitted twice. Completion replies also needed stricter signer and parent correlation so unrelated agent output could not resume a workflow.
The Desktop requests workflow definitions for all joined channels in one
#hfilter. Treating that OR filter as one exact SQL channel predicate made the signed app show an empty workflow list even though the definitions existed. Multi-value filters now retain the complete authorised channel scope, while single-value filters still use the exact-channel optimisation.Safety properties
(community_id, run_id, step_id)dispatch is claimed once in Postgres(community_id, workflow_id, reply_to_message_id)starts at most one workflow runValidation
cargo fmt --all -- --checkcargo test -p buzz-db(94 passed, 154 Postgres tests ignored)cargo test -p buzz-workflow(172 passed, 11 Postgres tests ignored)cargo test -p buzz-acpplus integration tests (701 passed)cargo clippy -p buzz-db -p buzz-workflow -p buzz-acp -p buzz-relay --all-targets -- -D warningscargo test --manifest-path desktop/src-tauri/Cargo.toml(2,262 passed, 14 ignored)cargo clippy --manifest-path desktop/src-tauri/Cargo.toml --all-targets -- -D warningspnpm testindesktop(full suite)pnpm typecheck,pnpm checkandpnpm buildwf12: all checks passed, including migrations 0029 and 0030, the signed Desktop workflow listing, both authenticated Hermes runtimes, and a clean zero-approval, zero-dispatch stateMigration note
This branch uses migration 0029 for approval package persistence and the dispatch journal, and migration 0030 for the general reply-parent deduplication constraint.