Repository navigation
fix: run only the exact job the data owner approved - #9536
Merged
Merged
Conversation
…hash even during approval
Pulls the new-receipt work out of JobClient.receive_job() into _claim_receipt(), and the run reporting out of SyftJobRunner._run_approved_job() into _report_result() and _mark_running(). The expected-digest check now lives once, in submission.py: check_expected_digest(), for both approve() paths. Renames _record_pending_job() to _record_received_hash(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Brings in #9515 (Tinfoil deployment, signed job receipts) and #9533 (narrow DS read grant on review/). Conflicts were only in imports: syft_job client.py and job_runner.py keep both the review_grants and the submission imports. Also drops the duplicate module logger in the enclave client that both sides added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pjwerneck
approved these changes
Sep 30, 2026
pjwerneck
left a comment
Collaborator
There was a problem hiding this comment.
Great PR. Left two comments with suggestions, not blockers.
… older pending jobs An OSError while copying a job to its run folder is a problem on the data owner's machine, not a changed submission. The runner now logs a warning, removes the run folder and leaves the job approved, so the next cycle retries it; a hash mismatch or invalid submission still fails the job, and nothing unverified runs. A pending job received before submission hashes existed now gets the same read-only inbox lock as a new job, once, when its received hash is recorded. Addresses review comments on #9536. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Summary
A data owner approves a job after reviewing its code, but the runner read the code from the
data scientist's inbox folder at run time — and the data scientist can keep writing there.
So a data scientist could swap in different code after approval, and it would run against
private data. Now a job is fingerprinted (hashed) when it arrives and when it is approved,
and only a copy that matches the approved fingerprint ever runs.
What changes for users
data owner can tell when every file has arrived.
data scientist changes a job after it arrived, approval is refused; if it changes after
approval, the job fails instead of running the new code.
How it works
run.sh+code/. The data ownerreceives the job only when the files match it, records the hash, and makes that job's inbox
folder read-only for the data scientist.
approved hash (in
staging/…/submission.json, which only the data owner can write).copy against the approved hash, and runs it there. Outputs still land in
review/.Also fixed along the way: job outputs and
.venvare no longer created in the datascientist's readable inbox, and the enclave no longer distributes jobs that are still
arriving or were rejected.
Testing
jobs without an approved hash go back to pending; a job is received only when complete
(with and without a declared hash); symlinks are rejected; the inbox is read-only after receipt.
tests/unitpass (apart from existing macOS path tests).Asana task
🤖 Generated with Claude Code