fix: enforce governed Desktop egress boundaries - #116
Merged
Conversation
The experimental runner lane mapped FlowBridge exit code 0 straight to a `confirmed` terminal outcome. Exit code zero proves only that the local process returned; it does not prove the governed effect. This lane does not yet consume Flow's shared qualification-v2 verifier, so it cannot bind an exact signed VERIFIED result to the run, authorization, policy, identity, effect, and event sequence. Until it can, a run that completes without a Flow halt terminates as `halted-needs-attention` with the constant reason COMPLETION_PROOF_REQUIRED_REASON. The reason crosses the ack boundary and the local journal verbatim, and the run is mirrored into the operator's local needs-attention list (kind `completion_proof_missing`) so it cannot pass silently. `confirmed` never leaves this path. - A real Flow halt keeps its own structural halt event and reason path. - A non-zero exit stays `failed`. - No halt evidence event is fabricated for the completion-proof case. Tests: the happy-path, signed-URL staging, and admin-toggle tests now assert the fail-closed contract; a new TestCompletionProof class covers the status, reason, journal, local mirror, PHI-free constant, halt precedence, and failed-exit paths. This is a temporary fail-closed boundary, not the final path: the lane still has to move to the Flow Connector contract and the frozen signed terminal-v2 result. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The governed-push section ended a sentence with a dangling article ("now
refuses every upload. The") immediately before the next sentence. Close the
sentence and start the release-gating statement as its own paragraph.
No behaviour change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
abrichr
marked this pull request as ready for review
August 19, 2026 21:47
abrichr
added a commit
that referenced
this pull request
Aug 19, 2026
The two private-permission assertions added in #116 compare `stat.S_IMODE(...) == 0o600` unconditionally. Windows does not expose POSIX owner/group bits: `os.chmod` there only toggles the read-only flag, and `st_mode` reports 0o666 for a writable file. Both tests therefore failed on `windows-latest` for Python 3.11 and 3.12 and turned `main` red. Pull-request CI runs the Linux lane only, so the exact-head PR checks could not see it. Apply the convention this repository already uses in `tests/test_engine/test_private_flow_config.py`: keep the exact 0o600 assertion on POSIX and assert the file exists on Windows, with a comment naming why the mode bits are unavailable there. The POSIX assertion is not weakened and no test is skipped. Tests: tests/test_engine/test_push_result_contract.py and tests/test_engine/test_runner_loop.py -- 65 passed. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Outcome
This draft closes reproduced Desktop raw-egress, credential, policy-cache, hosted-handoff, and experimental Runner safety defects.
openadapt.push-result/v1result. It retains review, accepted-ingest, and uncertain-delivery handoffs with exact server and artifact bindings.confirmedfrom process exit code zero. Exit code zero proves only that the local process returned, not the governed effect. Until this lane consumes Flow's shared qualification-v2 verifier and binds an exact signedVERIFIEDresult to the run, authorization, policy, identity, effect, and event sequence, a completed run terminateshalted-needs-attentionwith a constant completion-proof reason and lands in the operator's local needs-attention list.Reproduced failures
Focused tests first reproduced these four queue defects:
The new tests also cover lease-renewal expiry, ZIP traversal and symlinks, invalid digest paths, remote clear-text staging URLs, signed-query error redaction, and free-text halt suppression.
Exact-head validation
Head:
b8d8648f9f78e008f1e60f513c76cf9e89221a84COMPLETED_UNVERIFIED, correctly not production-eligiblesha256:09e5092a6f84cbad0b588a9aec65cc7d26492dced2ddce26ca288a3ff81992c9Draft release dependency
Do not merge or release this PR with the current Flow pin. The published Flow 1.31.0 wheel is immutable and does not contain
schemas/push-result-v1.json. This branch still freezes Flow 1.27.1.The required order is:
The PR remains a draft until this sequence and the independent exact-head security review pass.