Repository navigation
docs(adr): define control-repository saga journals - #9264
Conversation
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
E2E tests did not runE2E tests run automatically for pull requests authored by users with write access or higher. For other contributors, someone with write access must add the Reason: See E2E testing guide for details. |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can choose which labels appear on a finding, and whether they show icons or text |
PR Summary by QodoDocument control-repository saga journals for durable recovery
AI Description
Merge Risk
|
ascerra
left a comment
There was a problem hiding this comment.
Thanks for writing this up. I finished the artifacts question I raised, and tested it on a GitLab project with Jira trackers (notes).
The problem is real. Twice a run produced a valid result and then failed to publish, and the only way to finish was to run the model again.
You were right about artifacts. They hold the validated result, but they don't say where you are in a process, and nothing reads them back in.
My read of the six failure boundaries:
| Failure boundary | What could cover it |
|---|---|
| Run accepted, id not recorded | Find unfinished work from tracker state (ADR 0098) |
| Two hosts discover the same work | Journal |
| Lease expires, old worker still running | Journal |
| Valid evidence, publish fails | A publish-only retry from the run's output, plus markers on anything a run creates |
| A required child never returns | The same state check, per tracker (#9266) |
| Inputs changed while queued | Bind the result to its inputs and check before acting |
So four of six look coverable without a new store. My suggestion is to land those small pieces first and keep the journal for when we have more than one host dispatching. Three inline comments on that.
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
|
Added reference implementation and integration links to the PR description. eshulman2/fullsend#1, at The CVE workflow control repository pins that implementation and integrates it into assessment, promotion and scheduling. This is a concrete consumer of durable continuation and bounded recovery across jobs. Implementation references remain in the PR description rather than the proposal itself. |
Explain the need for durable work state in evidence-driven workflows with bounded retries. Retain concurrency reservations until scheduler termination is reconciled, including after ownership expiry or result acceptance. Signed-off-by: eshulman2 <ellashulman1@gmail.com>
Site previewPreview: https://ed432f82-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Code review by qodo was updated up to the latest commit 7b5732f |
Separate explicit workflow integration from existing webhook and poll dispatch. Preserve the full recovery contract for journal-admitted work. Signed-off-by: eshulman2 <ellashulman1@gmail.com>
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
|
Shared at @ralphbean's suggestion: an existing option for the stage-progress part of the need this ADR states. The Context says workflows "need durable state to track required work, continue after interruption and retain evidence within bounded retries." Perigee, the state engine in Apogee (which I maintain), already covers the stage-progress part of that. In this runnable example with a 58-second video, @ascerra's draft gate in this thread makes the same kind of check from a receipt on the tracker: one record for one handoff. The engine keeps one ordered record for the whole chain. The same two scripts serve every stage, and the stage order is declared once, in the chain definition. It isn't a journal: it doesn't record or reconcile external operations, so a workflow could use both through the same scripts. Options says, "A mandatory workflow service adds an operated dependency." This one is opt-in and local. Only a harness that names the two scripts uses it, and the demo's wrapper starts and stops it on the host. What I haven't shown yet is carrying its state between jobs. That state is a database file restored on start, and a two-job run is the next thing I'll post. I've read @eshulman2's reply in that thread on what stays on the entity, so my request is about Options only: could it list an opt-in local engine like this alongside the three it has, and give the reason it is or isn't used for stage progress? |
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
|
Charles, the Options section now includes an opt-in local stage engine, in both ADR 0165 and the recovery problem document (c33f550). It can retain accepted outputs and enforce stage ordering without a mandatory shared service. That can complement the journal; this decision still requires cross-host ownership fencing and reconciliation of external actions whose outcome is unknown. Stage progress alone does not replace those requirements, and the ADR leaves workflows free to combine both. This compares the approach you described; I have not independently run the Perigee demo. |
ascerra
left a comment
There was a problem hiding this comment.
Thanks, this has both things I asked for... approving. The Decision now says each participating workflow supplies a trusted host adapter and leaves its implementation open (here), and the problem doc asks whether Fullsend should ship reusable adapters (here).
One note for later. The journal is now written outside the assessment run (here), and telemetry records what happened within a run (here). I don't want those two lines read later as keeping the journal's reads and writes out of our traces. I'd like them to show up there one day, so the work can be scored from start to finish. I think the ADR leaves that open, since correlation is an implementation choice.
Summary
Define a durable saga journal stored as versioned JSON in the Fullsend control repository. Initial storage and execution are in GitLab, independently of GitHub/GitLab/Forgejo source repositories and Jira trackers. Preserve the full recovery scope: admission, target resolution, dispatch, execution, publication and accounting for every required branch.
The journal provides durable state for tracking work, bounded retries and continuation across invocations. This is especially important for workflows such as CVE resolution, where each required target must reach an evidenced outcome or an explicit unresolved state within persistent work bounds. Entity reconciliation is independent work and is not a prerequisite for this proposal.
Related Issue
Split from #9261. Implementation remains tracked in #9253; this documentation PR does not implement or close that issue. Multi-target dispatch and collection remain tracked in #9260.
Decision
GitLab is the initial journal-storage backend. GitHub and Forgejo storage adapters must satisfy the same contract. Source adapters retain their own authorization and enablement requirements.
Reference implementation and integration
eshulman2/fullsend#1 implements the journal and its host integration at commit
c4fa663df77c2be83b6570b8572d707afaf92745:The CVE workflow control repository integrates this implementation for assessment, promotion and scheduling. Its bootstrap pins the same fork commit. Trusted adapters use the journal to continue work, retain bounded attempts and reconcile external effects across separate jobs.
Current-behavior evidence
Inspected baseline:
7455751ecb9446953527dbf73b4e379ea5442cb0.The baseline evidence above describes upstream behavior. The reference implementation supplies the journal operations and integration in the fork. ADR 0165 records the shared architectural contract.
Review clarifications
Additional reference evidence at
c4fa663df77c2be83b6570b8572d707afaf92745:Validation
make lint; applicable staged checks pass.git diff --checkpasses.Checklist
Prepared with coding-agent assistance; the contributor can assess the personal-authorship attestation.