Skip to content

Bind managed-agent workflow triggers to signed revisions - #6721

Draft
loganj wants to merge 1 commit into
mainfrom
larry/workflow-owner-trigger-foundation
Draft

Bind managed-agent workflow triggers to signed revisions#6721
loganj wants to merge 1 commit into
mainfrom
larry/workflow-owner-trigger-foundation

Conversation

@loganj

@loganj loganj commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

🤖 Larry

Summary

Managed agents can create workflows, but their human owners cannot safely run them: a trigger can otherwise drift from the signed workflow revision the owner intended to invoke.

This PR provides the shared foundation for the two replacement workflow stacks. It lets either the managed agent or that agent's immutable human owner manually trigger an agent-created workflow, while rejecting unrelated channel members. Every trigger names the exact signed workflow revision, and the relay rejects missing, malformed, wrong, or stale revisions before creating a run.

The definition event and materialized workflow revision are stored atomically. During triggering, the relay locks and revalidates that revision and commits the trigger event and workflow run together, so concurrent edits or failed writes cannot produce a run for a different definition.

This foundation is intentionally limited to manual triggering. Automatic event, schedule, and webhook delivery and approval/resume lifecycle behavior belong in the replacement stacks built on top of it.

Related issue

None found.

Testing

Verified at exact commit f1646bf5bd3857fa84fc2a908574f1fe73c9c735 with full CI; focused Blox formatting and relay test compilation; one-connection and eight-concurrent-trigger PostgreSQL regressions; and the earlier live-relay owner/agent/unauthorized-member revision matrix on unchanged workflow behavior.

@loganj
loganj force-pushed the larry/workflow-owner-trigger-foundation branch from 01b72fc to 76f879b Compare August 24, 2026 23:19
@loganj

loganj commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Larry update: fixed the manual-trigger connection-pool starvation at f1646bf5bd3857fa84fc2a908574f1fe73c9c735. Revision revalidation now stays on the command transaction, and the already-authorized immutable workflow owner crosses that transaction boundary without a nested pool lookup.

Blox workstation larry-node-a-repair (2044085), exact head:

  • cargo fmt --all -- --check
  • cargo check -p buzz-relay --tests
  • one-connection human-owner trigger PostgreSQL regression ✅
  • eight concurrent triggers on a one-connection pool ✅

Local time-dependent branch-skew and file-size-check guards passed after merging current origin/main. I pushed the exact Blox-validated head with test hooks skipped (LEFTHOOK=0); signing/DCO and both time-dependent guards were retained.

@loganj
loganj marked this pull request as ready for review August 25, 2026 18:44
@loganj
loganj requested a review from a team as a code owner August 25, 2026 18:44
@loganj

loganj commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Larry final engineering status: PR #6721 is ready for human review at exact head f1646bf5bd3857fa84fc2a908574f1fe73c9c735.

  • Full CI is green.
  • Independent Royal review: Brother Darryl 10/10, no blocking findings, with fresh exact-head Blox PostgreSQL regressions and compile/format checks.
  • Branch is mergeable and now marked ready for review.
  • The only remaining gate is human approval; auto-merge is not armed.

@loganj
loganj marked this pull request as draft August 25, 2026 18:50
@loganj
loganj force-pushed the larry/workflow-owner-trigger-foundation branch 3 times, most recently from 0bec65b to e23650f Compare August 26, 2026 16:30
Reconcile the complete Node A observable behavior onto current main without carrying its historical merge topology.

Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
@loganj
loganj force-pushed the larry/workflow-owner-trigger-foundation branch from e23650f to 08020be Compare August 26, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant