Wake agents from verified workflow mentions - #6965
Open
loganj wants to merge 33 commits into
Open
Conversation
This comment has been minimized.
This comment has been minimized.
loganj
force-pushed
the
larry/workflow-revision-foundation-v4
branch
from
August 28, 2026 16:56
ca2c16c to
e191591
Compare
loganj
force-pushed
the
larry/workflow-auto-mention-wake-v4
branch
from
August 28, 2026 18:33
b681de0 to
afb19c3
Compare
This comment has been minimized.
This comment has been minimized.
loganj
force-pushed
the
larry/workflow-revision-foundation-v4
branch
2 times, most recently
from
August 28, 2026 21:30
8368014 to
bb7de1e
Compare
loganj
force-pushed
the
larry/workflow-auto-mention-wake-v4
branch
from
August 28, 2026 21:42
afb19c3 to
24922e1
Compare
This was referenced Aug 28, 2026
loganj
marked this pull request as ready for review
August 31, 2026 19:10
loganj
force-pushed
the
larry/workflow-revision-foundation-v4
branch
from
September 1, 2026 16:45
bb7de1e to
8a1ec91
Compare
loganj
force-pushed
the
larry/workflow-auto-mention-wake-v4
branch
from
September 1, 2026 17:13
24922e1 to
5c68804
Compare
Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Persist recipient-gated identifier wakes, include them in default ACP mention subscriptions, and preserve safe channel wildcards. Co-authored-by: Larry <larry@buzz.local> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Reject client-authored wakes, authenticate relay signatures before authority lookup, and preserve the storage-level FTS exclusion on brownfield databases. Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Co-authored-by: Brother Darryl <146fb160a3266e6165bfa385f6048c975eda9e21cf65da097a0b5ea7952532a5@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Preserve transient storage failures for bounded ACP recovery. Keep absent and malformed authority terminal. Correct the renamed FTS migration fixture include. Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
…wakes Signed-off-by: Logan Johnson <loganj@squareup.com>
…d storage Signed-off-by: Logan Johnson <loganj@squareup.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
…arch history Signed-off-by: Logan Johnson <loganj@squareup.com>
loganj
force-pushed
the
larry/workflow-auto-mention-wake-v4
branch
from
September 1, 2026 18:25
5c68804 to
15826a9
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.
🤖
I’m Larry.
Summary
Make workflow-authored agent mentions durable without letting trigger-controlled text acquire the workflow owner’s authority. The relay atomically stores the generated message and recipient-specific wake events, then broadcasts them. ACP verifies the signed captured definition, run, message, recipient and current access before applying its ordinary owner/sender policy. A visible mention alone cannot bypass these checks.
Related issue
Stacked on #6960, the exact-revision foundation. #6964 independently adds owner-authorized manual triggering on that same foundation; neither sibling requires the other. This replaces the relevant portion of retired #6963, which is closed and unmerged. No historical revision backfill is planned.
Database redesign and rollout
No wake-specific FTS migration or bootstrap exclusion. The old 0044 whole-history generated-expression rewrite is removed, without replacing it with permanent triggers, separate storage or a query exclusion. Ordinary signed events already provide persistence/replay. Existing unrelated private-kind storage exclusions remain intact.
Search returns candidates, not authorization: HTTP
/queryand WS NIP-50 refetch scoped events, match full filters and apply canonical wake/recipient/current-membership gates. Indexed empty wakes can match NOT-only queries but cannot bypass those checks. Authorized recipients may receive canonical wakes through explicit search just as through replay. Normal message-search kinds exclude wakes. Counts use per-event visibility rather than raw FTS totals; no raw snippets are exposed. Bounded pagination/timing is not a constant-time guarantee. The prior physical-NULL requirement was speculative, not a product contract.NOT VALIDto avoid historical scans under ACCESS EXCLUSIVE while enforcing every subsequent INSERT/UPDATE. Legacy rows stay NULL; no backfill or deferred validation job. Fresh schema checks remain validated.workflow_revision_supersededdistinguishes positively identified replacement from explicit/unknown deletion. Existingdeleted_atcannot express that invariant. No historical inference or heap/index rewrite, but ACCESS EXCLUSIVE parent/partition locks still apply.All three PRs were open/unmerged, with main ending at 0042, when renumbering. Recreate disposable databases that applied the old draft checksums; if a draft was applied elsewhere, reconcile the ledger explicitly before upgrade. Runtime
BUZZ_AUTO_MIGRATEremains opt-in, sets lock/statement timeouts to zero before its advisory lock, and applies each file transactionally. Neither retained migration adds a timeout. Metadata-only is not lock-free: waits/queued blocking remain unbounded. PostgreSQL 17 CI is retained because VISION/architecture/docker-compose already require it, not for the removedSET EXPRESSION. See rollout guide. No live DB operation, merge or deployment.Validation
Current redesign head
15826a98fd03579dd9fc0ce59d453797ca8c26aa, on foundation92f15c04. Earlier readiness is withdrawn pending independent review and exact-head CI.Focused local redesign checks passed: populated revision-table no-rewrite/no-validation-scan and write-enforcement test; fast-default supersession partition/index test; actual HTTP+WS indexed-wake search regression (positive/NOT-only/normal kinds/known-ID/foreign recipient/malformed/removal/public-control cases); all 6 wake lifecycle/storage tests; search library plus 20 PostgreSQL FTS tests; 115 DB unit tests. Final affected-package broader validation is being tracked on this exact candidate.
Retained unchanged-authority evidence: ACP 925 passed with two test threads (default concurrency had two pre-existing timing assertions); prior affected all-target Clippy/fmt; prior sink 32 and DB 115; prior published
5c68804ehad 33 successful checks / 4 skips, including 394 PostgreSQL archive tests. Removed FTS rewrite tests are no longer applicable. Previous independent reviews closed authority/identity/retry findings at53e8b9a6; those reviews do not certify this new database design.Combined sibling proof remains unchanged: real signed manual trigger → executor/sink/storage → outer ACP → four injected authority 503s → real endpoint → ordinary owner admission → one session/one prompt, with a two-second duplicate observation window. Not a general exactly-once or actual-reconnect guarantee. No unnecessary rerun or redesign of unchanged authority paths is claimed.