mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-21 08:15:23 -04:00
[PR #306] [MERGED] docs(rfc): propose persistent flow queue and completion webhooks #311
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/306
Author: @mason5052
Created: 5/7/2026
Status: ✅ Merged
Merged: 5/23/2026
Merged by: @asdek
Base:
feature/next-release← Head:codex/issue-298-flow-concurrency-rfc📝 Commits (2)
295e7d3docs(rfc): propose persistent flow queue and completion webhooks2d407b9docs(rfc): clarify lifecycle, terminal semantics, and webhook event names📊 Changes
1 file changed (+187 additions, -0 deletions)
View changed files
➕
examples/proposals/flow_concurrency.md(+187 -0)📄 Description
Summary
Adds a design RFC at
examples/proposals/flow_concurrency.mddescribing a possible direction for native flow concurrency control and completion webhooks, as raised in issue #298. The RFC is documentation only; no runtime, schema, GraphQL, REST, or UI behavior changes here.Problem
Issue #298 covers two real pain points for external orchestrators that drive PentAGI from a pipeline:
createFlowaccepts unlimited concurrent calls, so calling it N times immediately spins up N Kali containers and saturates the host.GET /api/v1/flows/{id}.A naive fix can easily slip back into the anti-pattern PR #268 was rejected for: a hidden in-memory queue with no persistence, no UI/API/DB visibility, and no cancelability. PentAGI maintainers have asked, both in PR #268 and in the assistant flow management direction shipped in PR #292, for explicit, inspectable, manageable flow control instead of implicit background lifecycle.
Solution
The RFC follows the maintainer's relocated proposal pattern at
examples/proposals/<topic>.md(commit47de4e4movedbackend/docs/evidence_chain_rfc.mdtoexamples/proposals/evidence_chain.md). It deliberately mirrors the structure ofexamples/proposals/evidence_chain.md(PR #277) and includes:createFlowcontract.finishedmeans for tasks/subtasks/toolcalls.finishedsemantics, and at-least-once delivery.queuedstatus, a singleMAX_CONCURRENT_FLOWSenv var, an explicit promoter, full UI/API visibility (listings, filters, detail, assistant view), and a user-driven cancel path with a documented terminal status.webhookUrlplus a globalFLOW_WEBHOOK_URLfallback, HMAC-SHA256 signed payloads viaX-PentAGI-Signature, stabledelivery_idfor receiver dedup, persistedflow_webhook_deliveriesrows, bounded exponential backoff, and SSRF mitigations (config-time and delivery-time DNS validation, redacted secrets in logs, no retry on most 4xx).createFlowblocking semantics, alignment of the signature scheme with the issue #235 receipt direction, and queued-flow handling for resources/uploads/messages.The RFC explicitly rejects in-memory queues, hidden lifecycle state, and implicit promotion semantics, and references the PR #268 lesson directly.
User Impact
MAX_CONCURRENT_FLOWSknob plus signed completion webhooks) and the staged milestones, so they can plan integration work even before any feature ships.Test Plan
git diff --statshows onlyexamples/proposals/flow_concurrency.mdchanged.examples/proposals/evidence_chain.md(Goals / Non-Goals / Proposed model / Open Questions / Suggested First Milestone) and adds an explicit Safety and Security section.Refs #298
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.