Skip to content

feat(hosted): sign complete terminal outcomes - #412

Draft
abrichr wants to merge 9 commits into
mainfrom
codex/terminal-proof-v2-outcomes
Draft

feat(hosted): sign complete terminal outcomes#412
abrichr wants to merge 9 commits into
mainfrom
codex/terminal-proof-v2-outcomes

Conversation

@abrichr

@abrichr abrichr commented Aug 27, 2026

Copy link
Copy Markdown
Member

What changed

  • Signs the existing terminal v2 proof for VERIFIED, HALTED_BEFORE_EFFECT, and RECONCILIATION_REQUIRED. This doesn't add another schema family.
  • Keeps the prior verified, halted, and ordinary reconciliation vectors byte-identical when the optional managed-loss record is absent.
  • Extends the append-only delivery chain with one optional terminal pending permit. A verified result needs at least one acknowledged permit and no pending permit. A safe halt uses an empty chain. Reconciliation accepts an exact inconclusive acknowledged chain or one unresolved terminal permit.
  • Fences the Cloud delivery authority before local terminal proof work after a runner exception, missing or malformed report, conflicting child proof, or restart recovery. The fence blocks new permits, acknowledgments, retries, and replay. If the fence is unavailable or conflicts with retained state, Flow returns no terminal callback and keeps the run in reconciliation.
  • Binds the child-start marker, retained dispatch, signed closure, managed-loss record, and every acknowledged receipt to the same runner and session identities.
  • Seals the closure request, exact permit chain, Cloud closure, managed-loss evidence, synthetic recovery report, and final terminal envelope with one-use local records. Concurrent terminal processes return the first exact bytes. A late child result can't replace them.
  • Validates the complete callback batch before delivery. A confirmed summary can't accompany an unsigned or reconciling terminal. Callback uncertainty comes from the terminal pending-permit count.
  • Keeps billing fail-closed. Only a proof-backed VERIFIED result is production eligible. Halted and reconciling results are never billable.
  • Adds public cross-language vectors for pending and acknowledged result-loss closures, their exact HTTP results, signed safe halt, and both reconciliation forms.

This draft is stacked on #405. It is ready for the reviewed Flow 1.34 prerequisite composition. It must not merge or release by itself.

Verification

  • 276 passed in the terminal, hosted runner, receipt, and transaction suites.
  • 491 passed in the broader durable-authority, terminal, hosted runner, release-contract, source-policy, and runner-client set. One existing Pydantic deprecation warning remains.
  • Ruff and focused mypy passed.
  • The vector generator reproduced the inventoried fixture byte-for-byte. Its SHA-256 is 2c2af93f1cd5d7b62ede33e59475aa61126cdc9c568949e1a8722b0d899bee3f.
  • The exact wheel and sdist built successfully. The distribution license boundary passed.
  • A fresh independent review of 9ada2eab8043bdc02b12932d0db55d96b445b5c5 found no P0, P1, or P2 defect.

The full repository collection still needs the optional benchmark and openadapt_types modules, an available screen-capture session, and Metal/MLX. It stopped with 27 environment-only collection errors and four skips.

Base automatically changed from codex/hosted-runner-bridge-flow to main August 27, 2026 23:45
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