Skip to content

feat: warn when share_files doesn't name the submitter - #9625

Merged
koenvanderveen merged 4 commits into
devfrom
atlaie/enclave-share-file-keeps-submitter
Nov 20, 2026
Merged

koenvanderveen merged 4 commits into
devfrom
atlaie/enclave-share-file-keeps-submitter

Conversation

@atlaie

@atlaie atlaie commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • When a DS submits a job with a share_files that names the DS as the reader of no file, we previously gave no hint, and the DS did not get those files. Now submit_python_job warns, on a datasite (syft-rds) and on an enclave. We do not warn when the DS uses the share flags (such as share_outputs_with_owners) instead of share_files.
  • docs/API.md and the syft-enclave README now say that each file goes only to the readers listed for it, so the DS names itself too.

Guidelines

High level

  • 🟢 Split: no need to split.
  • 🟢 Size: warn when a DS's share_files does not name the DS.

Mid level

  • 🟠 User-facing code: for enclave jobs, the warning and the README line describe the intended behaviour. Today the DS still gets all of outputs/ there, a known bug that is tracked separately.
  • 🟢 Error handling
  • 🟢 State versioning
  • 🟢 Function structure
  • 🟢 Tests

Low level

  • 🟢 Naming
  • 🟢 Code style

Security

No change.

Testing

  • syft-enclave: test_share_files_without_submitter_warns, test_submission_naming_submitter_or_using_flags_does_not_warn, and test_output_file_shared_with_owner_and_submitter_reaches_both (the documented way keeps the file with the DS).
  • syft-rds: test_submit_warns_when_share_files_leaves_out_submitter and test_submit_naming_submitter_or_using_flags_does_not_warn.

Asana task

Original description

When a submitter passes share_files, each file goes only to the readers listed for it. A submitter that names only someone else (e.g. share_files={"outputs/count.json": [data_owner]}) doesn't get that file, and isn't told. This is intended (Koen, 13 Nov), but easy to miss, especially in enclaves, where the rest of outputs/ still reaches the submitter. Found while testing #9604's log requests in memory on 13 Nov. Following Koen's suggestion, this PR:

  • warns at submission when share_files names the submitter for no file (not when the share flags are used);
  • adds a test that the documented way (the submitter names itself too) keeps the file with the submitter;
  • adds a line to the enclave README next to "the outputs always reach the DS".

Asana: https://app.asana.com/0/0/1220511574042765/f
In enclave jobs the submitter currently still gets the whole outputs/ folder whatever share_files says; Koen confirmed on 13 Nov that's a bug, tracked separately. Once it's fixed, the warning is exact for that case too, so the enclave call doesn't special-case it.
No rush: after the release.

🤖 Generated with Claude Code

atlaie and others added 2 commits November 13, 2026 16:44
A file named in share_files goes only to the readers listed for it, even
one under outputs/ of an enclave job. The test shares outputs/r.json with
the submitter and do1, as documented: both read it, do2 doesn't. The
enclave README and docs/API.md now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each file in share_files goes only to the readers listed for it, so a
submitter that names only someone else doesn't get the file, and wasn't
told. warn_if_submitter_not_named warns at the two submit entry points,
SyftRDSClient and SyftEnclaveClient, on the share_files the user passed.
It isn't called in the shared syft-job submit path: the enclave job
client builds a share_files from the share flags that may name only the
data owners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@atlaie
atlaie force-pushed the atlaie/enclave-share-file-keeps-submitter branch from 2e39d74 to f2ee037 Compare November 13, 2026 15:53
@atlaie atlaie changed the title enclave: sharing one output file with a data owner keeps it readable by the submitter feat: warn when share_files doesn't name the submitter Nov 13, 2026
Also move the unittest.mock imports in the syft-rds client tests to the top of the file.
@koenvanderveen
koenvanderveen merged commit 1eb3638 into dev Nov 20, 2026
24 checks passed
@koenvanderveen
koenvanderveen deleted the atlaie/enclave-share-file-keeps-submitter branch November 20, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants