fix(acp): reconcile hosted agent directory profiles - #5929
Open
LucasMoskun wants to merge 1 commit into
Open
Conversation
Co-authored-by: LucasMoskun <contact@lucasmoskun.com> Signed-off-by: LucasMoskun <contact@lucasmoskun.com>
themiguelamador
suggested changes
Aug 16, 2026
themiguelamador
left a comment
There was a problem hiding this comment.
I found and fixed three issues in the new startup reconciliation path:
- Kind
10100is replaceable, but the new event used the wall-clock second without advancing the observed head. A reconciliation in the same second as the current profile could therefore lose the NIP-16 event-ID tie-break and leave stale authorization/channel data authoritative. - Buzz’s
POST /eventsreturns HTTP 200 for an ingest result even when its JSON saysaccepted:false. The code ignored that field and loggedPublished, so stale/rejected writes could be reported as successful. Publication now requires explicit acceptance. - The operation is documented as non-fatal, but it performs up to three REST calls whose client retry budgets can collectively delay the subscribed main event loop for roughly two minutes during a partial HTTP outage. The whole best-effort reconciliation is now capped at ten seconds.
Fix: Complear/buzz branch review/pr-5929-fix, commit 8a837a5f28a69005c3a7c4db44b61d88b358acb4.
Verification:
cargo test -p buzz-acp: 785 unit tests + 9 lifecycle integration tests passed- focused profile reconciliation tests: 6 passed
cargo clippy -p buzz-acp --all-targets -- -D warningscargo fmt --checkgit diff --check
Requesting changes until the fix is incorporated.
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
buzz-acpidentities into the replaceable kind10100agent directory after startup channel discoveryowner-onlymodechannel_add_policy, or require an explicit first-timeBUZZ_ACP_CHANNEL_ADD_POLICYso startup never guesses or widens policyWhy
Desktop mention authorization now fails closed for remote agents missing current directory authorization. Legacy manually hosted agents can still be relay members and channel bots with valid kind
0profiles, yet remain absent from autocomplete and receive no signedptag. A live headless canary confirmed that a complete profile with the effective owner restores autocomplete, signed-recipient delivery, and harness wake without a Desktop restart.Closes #5928.
Validation
ptag -> relay ->buzz-acpwakecargo test -p buzz-acp(783 passed)cargo clippy -p buzz-acp --all-targets -- -D warningsjust ci(full workspace/desktop/web/mobile gate passed; mobile: 1,399 tests)