feat(sharing): persist recipient policy intent#1341
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0a7f1b953
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f0a7f1b to
b32edb8
Compare
15e3d06 to
38d91a1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b32edb8b80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b32edb8 to
d8bdaaf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8bdaaf1e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
38d91a1 to
8ed7b45
Compare
d8bdaaf to
3f34fc5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f34fc5a69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3f34fc5 to
477bd88
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 477bd88232
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
477bd88 to
fe6ae9c
Compare
8ed7b45 to
623fcf8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe6ae9cb0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| !projection.identityCandidates.some((candidate) => candidate.identityId === identityId) | ||
| ) | ||
| return "review_decision_input_stale"; | ||
| plan.rows.push( |
There was a problem hiding this comment.
Preserve existing devices when attaching an Identity
When an unassigned-device review is resolved with attach_device_to_identity for an Identity that already has assigned devices in the same legacy scope, this branch only queues the newly attached device plus the project recipient. Unlike the apply/choose paths it never projects the Identity's existing assigned device edges, so the migrated intent graph gives the Project to that Identity but only knows about the formerly unassigned device; a later recipient-policy cutover would drop the Identity's already-working devices for that Project.
Useful? React with 👍 / 👎.
Merge activity
|
fe6ae9c to
80e2618
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80e26181a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "reject_suggestion", | ||
| "keep_project_local", | ||
| "keep_identities_separate", | ||
| "remove_stale_device", |
There was a problem hiding this comment.
Preserve assigned access when removing stale devices
Including remove_stale_device in the no-op set loses intent for projects that have both a stale unassigned device and still-valid assigned devices but no accepted exact share operation. In that case the review resolution is considered applicable, this branch adds no project_recipients or identity_devices, and migration can report unchanged with no error while the review is hidden, leaving a later policy cutover with no durable recipients for the assigned devices that should remain.
Useful? React with 👍 / 👎.

Description
Persist the non-authoritative recipient-policy intent graph while existing scopes remain the sole authorization boundary.
would_migrateresultsNo scope memberships, mappings, replication state, memories, peers, or share operations are modified.
Type of Change
Testing
pnpm run tsc,pnpm run lint,pnpm run test)Additional validation:
Checklist
pnpm run lintpasses for touched files)