Skip to content

feat: show every data owner's approval of an enclave job to each data owner - #9629

Merged
koenvanderveen merged 5 commits into
devfrom
atlaie/enclave-msg-approval-status
Nov 20, 2026
Merged

koenvanderveen merged 5 commits into
devfrom
atlaie/enclave-msg-approval-status

Conversation

@atlaie

@atlaie atlaie commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • When a data owner (DO) looks at an enclave job, in the job view or with print(job), it previously saw "Approved by you", with the files it approved, and "Approved by all", which always said "needs the approval of every party", also after every DO approved and the job ran. Now it sees two rows with a line per DO:

    • "Job approved": ✓ when that DO approved, ✗ and its reason when it rejected, and "pending" when it has not decided yet.
    • "Output files approved": the files that DO approved, and for whom, or "none".

    print(job) puts the lines of a row on one line, joined with " / ". The enclave's own view shows the same two rows. It previously showed an "Approved by " row per DO, and "Approved by all".

  • When the enclave distributes a job, it previously sent each DO only its own approval file. Now every DO may read every DO's approval file, and the enclave sends them all to every DO. When a DO later approves, rejects or changes its files, the enclave's next sync sends the new file to the other DOs too. The distribution now writes one event message to the enclave's event log instead of one per DO, and still sends one message per DO. After that, each change to an approval file adds one message per other DO, in a sync pass that already runs.

  • A DO's job status still comes from its own approval file only, as before. In the job list, Approval still shows how the job was approved (approval_method), as on dev. An earlier version of this PR showed "every data owner" there for enclave jobs. That is reverted, because for other jobs Approval says manual or auto.

Guidelines

High level

  • 🟢 Split: no need to split. The new rows need the other DOs' approval files.
  • 🟢 Size: show each DO of an enclave job every DO's approval.

Mid level

  • 🟢 User-facing code
  • 🟢 Error handling
  • 🟢 State versioning: no new state. The approval files keep their format; only who may read them changes.
  • 🟢 Function structure
  • 🟢 Tests

Low level

  • 🟢 Naming
  • 🟢 Code style

Security

Each DO of an enclave job can now read the approval file of every other DO of that job: its decision and when it made it, the files it approved and for whom, and its rejection reason. Before, only the enclave and the DO itself could read it. No dataset contents are in the file. Each DO can still write only its own approval file: the enclave drops a change to another DO's file. The DS still cannot read the approval files. The test checks all three.

Testing

  • test_data_owner_sees_every_owner_approval: DO 2 sees DO 1's approval and files. After DO 2 rejects, DO 1 sees ✗ and the reason, on one line, and its own status stays approved. The job view puts each DO on its own line, and print(job) joins them with " / ". Only the DOs may read DO 2's approval file, only DO 2 may write it, and the DS gets no approval file.
  • test_display_on_enclave_shows_every_party and test_display_lists_party_without_file check the new rows on the enclave.
  • just test-unit-fast and the syft-enclave and syft-job tests pass.

Asana task

A data owner sees "every data owner approved; nothing was requested"
instead of "needs the approval of every party" once that is so, and the
approval shows "every data owner" instead of "—": the enclave records its
approval outside the state that the display reads. approval_method is
unchanged, since syft-bg's approve handler reads it.

Messages, display and docstrings only; no behaviour change.
Asana: https://app.asana.com/0/0/1220519960557651/f

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… owner

A data owner's view of an enclave job now has two rows with a line per data
owner: "Job approved" (✓, ✗ or pending) and "Output files approved". The
enclave gives every data owner read access to every approval file, and sends
them all when it distributes the job. A data owner's status still comes from
its own approval file. The Approval field is back to the approval method.
@koenvanderveen koenvanderveen changed the title feat: show that every data owner approved an enclave job feat: show every data owner's approval of an enclave job to each data owner Nov 20, 2026
@koenvanderveen
koenvanderveen marked this pull request as ready for review November 20, 2026 15:19
@koenvanderveen
koenvanderveen merged commit f7b0df1 into dev Nov 20, 2026
22 checks passed
@koenvanderveen
koenvanderveen deleted the atlaie/enclave-msg-approval-status branch November 20, 2026 15:22
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