Add strict hosted runner execution adapter - #405
Draft
abrichr wants to merge 4 commits into
Draft
Conversation
abrichr
force-pushed
the
codex/hosted-runner-bridge-flow
branch
from
August 26, 2026 21:12
aba8936 to
bf8b0a8
Compare
This was referenced Aug 27, 2026
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.
What changed
This PR completes Flow's hosted-runner boundary for the target-state product. The adapter verifies the seven admitted product releases, the exact workflow admission, the installed Flow, Desktop, and Capture builds, the protected local runner origin, the trusted bundle, and the staged deployment profile before a managed child can start.
Runtime parameters now keep their JSON scalar types from the hosted wire through local resolution, authorization, checkpoints, the private child file, and the retained report. String lookalikes remain strings. Booleans remain Booleans. Finite numbers use the same canonical spelling and digest in Python and JavaScript. Flow refuses objects, arrays, null, non-finite numbers, unsafe integer spellings, and hosted parameter names outside
^[A-Za-z_][A-Za-z0-9_]{0,127}$.Flow signs
openadapt.production-terminal-verification/v2only after it revalidates the product release, workflow admission, retained authorization, delivery permit, acknowledgment, receipt, report, effect evidence, and exact run identity. It writes the full report only inside the owner-private run directory. The callback carries the canonical terminal-v2 envelope and digest, which contain no parameter values or full report.Crash recovery no longer needs the original dispatch or its parameters.
HostedRecoveryBindingretains the exact callback lease state. A lost response, missing receipt, malformed report, or failed terminal proof returnsRECONCILIATION_REQUIRED, and the one-use ledger prevents a blind retry.The adapter also exposes the protected runner origin and the register-only renewal header contract. The current runner token can appear as
x-openadapt-runner-renewal-tokenonly on the exact register request. It doesn't enter any request model, callback, report, or audit payload. A missing token omits the header.This change sets the next Flow release to
1.34.0. The published1.33.0wheel can't be reused because it doesn't contain the hosted adapter.Verification
origin/main.1.34.0wheel and source distribution built from the exact rebased head. The release and source-boundary validator passed both artifacts.1.34.0and importsHostedRunnerAdapter,RUNNER_RENEWAL_HEADER, andregistration_renewal_headers.The uncertain-delivery tests cover a lost backend response, a lost acknowledgment response, an unavailable receipt, and a malformed terminal report. Each case permits one possible actuation, returns
RECONCILIATION_REQUIRED, and refuses a replay.Release order
1.34.0artifacts.openadapt-flow==1.34.0, then release and admit Desktop.This PR stays draft. It doesn't publish Flow, create an admission, apply a migration, deploy a service, or change a secret. A current
VERIFIEDor Production claim still requires the coordinated release and reference campaign.