Research / Distribution and placement

P30 · full · draft

Attested Deploy and Coordinated Rollback Across Seams, With a Machine-Boundary Refusal

partial full Distribution and placement

State of the work. Attestation chain, coordinated prepare/commit/abort, boundary taxonomy and federation are shipped and tested on main; the SSH leg is tested through shims only and there is no fault-injection evaluation or replicated coordinator.

This is a draft, not peer reviewed. Repository references link to revl at commit 45bec431f.

Planned to be combined with P29 (Hot-Swapping a Composition Whose Components Run on Different Runtimes) into a single paper.

Pitch

An in-process rollback theorem does not cross a process seam, so a deploy tool should re-hash on the receiver, coordinate per-process rollback honestly, and refuse the machine boundary it cannot yet protect.

Abstract

Deployment tools usually apply a change and report success. When the change is a reactive composition split across processes, the guarantee a single process gives (LIFO rollback with a residue proof) does not extend to the whole: a peer's inverses live in the peer. We describe revl deploy, which separates what it guarantees from what it does not. It guarantees the chain: the receiver re-hashes source, IR, capability policy and runtime evidence against its own disk and checks the signature under a key the receiver itself holds (HMAC, so verification is only meaningful inside one trust domain), and a COMMIT receipt re-measures the loaded bytes at load time. It guarantees per-process residue freedom on the abort path, which is modelled and proved in Lean (R4, formal/RevL/Theorems/R4_NoResidue.lean). It does not guarantee cross-process atomicity as one theorem, so the coordinator runs prepare, commit and abort over per-process-atomic units, writes the abort decision durably first, and reports an unreachable peer as unresolved, never rolled back. A boundary taxonomy (process, container, machine) fixes what teardown is worth across each, and a machine boundary is opened only under a pinned SSH host key. Irreversible crossings are held until a durable federation-commit marker exists, and plans that cannot be held are refused. Py and node seams carry sealed correlation envelopes, with replay refusal keyed on mutual-TLS identity. We present the design, the executed suites (83 test functions in tests/test_deploy_118.py, 11 hostile-wire test functions) and the explicit non-goals: no replicated WAL, no quorum coordinator, and symmetric signatures only inside one trust domain.

Problem and claim

Rolling out a composition across processes or hosts fails in a specific way: the coordinator cannot undo what a peer did, and a lying or vanished peer is indistinguishable from a slow one. Tools that report "rolled back" for a peer they cannot reach overclaim.

Claim: an incremental path to cross-host rollback is honest if each step states its ceiling. Admission is evidence re-derived on the receiver, rollback is coordinated over per-process units that each own their inverses, and every boundary the system cannot protect is refused by name. The paper claims this discipline and its mechanisms, not a distributed commit protocol.

Contributions

  1. Attested admission: the receiver re-hashes artifacts and ignores self-declared hashes (SELF_DECLARED_IGNORED); chain links refuse by name (docs/deploy.md:38-95).
  2. A load-measured COMMIT receipt and a hard conductor comparison that closes the PREPARE/COMMIT TOCTOU window (docs/deploy.md:164-208, src/revl/deploy.py:1211, src/revl/deploy.py:1279).
  3. A coordinated protocol over per-process-atomic units: abort written durably first, reverse-ledger-order ABORT messages, outcomes never-committed / applied / rolled-back-clean / rolled-back-with-residue / unresolved (docs/deploy.md:352-388, src/revl/deploy.py:3123).
  4. A boundary taxonomy with a teardown promise per boundary, the machine boundary refused unless a host key is pinned (docs/deploy.md:485-528, src/revl/deploy.py:4085-4140).
  5. Federation: irreversible crossings deferred behind a durable commit marker, a non-deferrable crossing refused at plan time, stranded participants settled by the existing recovery rule or failed closed (docs/deploy.md:389-443, src/revl/deploy.py:3440, src/revl/deploy.py:3615).
  6. Seam hardening: sealed HMAC correlation envelope on py and node bridges, replay freshness keyed on handshake-proved mTLS identity, resource crossings refused, wire kind resolved against declared cases, a hostile-wire TCK (CHANGELOG.md:397-415, CHANGELOG.md:492-495, tests/test_hostile_wire_tck.py).

Evidence on main

claimpath:line or teststatusnote
attestation chain, admission re-hashdocs/deploy.md:38-95; tests/test_deploy_118.py (83 test functions)shipped
receipts signeddocs/deploy.md:139-163shipped, HMAC-SHA256the signature is symmetric and cross-domain use is refused until an Ed25519 upgrade (docs/deploy.md:139-146); HMAC-SHA256 is named at docs/deploy.md:150
load-measured COMMIT receipttests/test_deploy_commit_receipt_118.py, tests/test_deploy_commit_runner_118.pyshipped
coordinated PREPARE/COMMIT/ABORTdocs/deploy.md:352-388; src/revl/deploy.py:3123 (run_deploy)shipped
runner as a real processtests/test_deploy_runner_process_118.py (12 tests)shippedstdio, local child
via = ssh leg with pinned host keysrc/revl/deploy.py:4116-4127, scp staging and known_hosts pin at src/revl/deploy.py:2455-2513; tests/test_deploy_ssh_command_118.py, tests/test_deploy_ssh_transport_118.pyshipped against shims, status contestedtests use a fake ssh and scp shim on one disk, no live remote. docs/deploy.md:550-560 still lists the SSH seam as "not landed", while the code and the MCP docstring call it landed
machine boundary refused without pinned keysrc/revl/deploy.py:4121-4140; docs/deploy.md:485-528shipped
container boundary participantdocs/deploy.md:529-548shippeda seam-carrying container target is still refused (docs/deploy.md:556-558)
federation commit, stranded settledocs/deploy.md:389-443; src/revl/deploy.py:3440, src/revl/deploy.py:3615shippedtests/test_deploy_118.py and tests/test_deploy_map_118.py reference federation_admission and settle_stranded; those tests were not read line by line
MCP revl_deploysrc/revl/mcp/deploy.py:1-30; tests/test_mcp_deploy_476.py; src/revl/mcp/operator.py:134-149shippedrehearsal default verified (apply absent or false mutates nothing). The approval gate is injected as a callable and was not traced; no quorum or drift check on this verb was found, only the operator grant
distributability auditdocs/interop-bridge.md:346-360; src/revl/distribute.py; tests/test_distribute.pyshipped
seam deadlinesdocs/seam-deadlines.md:113-131; src/revl/placement.py:94-98, src/revl/placement.py:1173partialthe doc lists the py runner wiring, a TCK clause and the fault-sweep mode as not built
hostile-wire TCKtests/test_hostile_wire_tck.py (11 tests)shipped
replicated WAL, quorum coordinatordocs/deploy.md:560-568not builtstated by the doc
hardware attestationdocs/deploy.md:568not builtout of scope

Numbers that exist

Paper outline

  1. Introduction: the rollback theorem stops at the process.
  2. What the deploy guarantees and does not (the three-way split).
  3. The attestation chain and receiver re-hash; the load-measured receipt.
  4. Coordinated protocol and outcome algebra.
  5. Boundaries and their teardown promises; refusing the machine boundary.
  6. Federation and deferred irreversible crossings.
  7. Seam hardening and the hostile-wire TCK.
  8. Evaluation (to be built).
  9. Related work, limits.

Threats to validity and limits

Fact-check

Claims in this draft were checked against revl main at commit 45bec431f: 60 checked, 6 corrected.

Cite this draft

@misc{revlp30,
  author       = {Thomas Moussajee},
  title        = {Attested Deploy and Coordinated Rollback Across Seams, With a Machine-Boundary Refusal},
  year         = {2026},
  howpublished = {\url{https://inso1337.github.io/revl/research/P30.html}},
  note         = {Research draft, not peer reviewed. Written against revl commit 45bec431f. Licensed CC BY 4.0.}
}

Text licensed CC BY 4.0, author Thomas Moussajee.

← All research drafts