feat(sharing): reconcile recipient policy access#1344
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6dd2e4e9c7
ℹ️ 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".
6d44616 to
f904594
Compare
6dd2e4e to
6b3847c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b3847ce6d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b3847ce6d
ℹ️ 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".
f904594 to
287f691
Compare
6b3847c to
038dc07
Compare
038dc07 to
65b4dab
Compare
287f691 to
20d70c6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65b4dab058
ℹ️ 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".
65b4dab to
a44f1ec
Compare
20d70c6 to
12809f0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a44f1ec90d
ℹ️ 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".
a44f1ec to
68a3767
Compare
12809f0 to
1498df3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68a37675b0
ℹ️ 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".
| deviceId, | ||
| }); | ||
| const membership = await dependencies.grantMembership({ | ||
| effectId, |
There was a problem hiding this comment.
Use operation-scoped effect IDs for share grants
When a later share operation grants the same managed Project scope to the same device after the previous membership was revoked, this now sends the persisted space_grant effect ID to the coordinator. Those IDs are created from the boundary/device/epoch only in packages/core/src/share-operation.ts:123, so the coordinator's new global effect receipt table replays the old active grant receipt instead of mutating the currently revoked membership; provisioning can then continue while the recipient still has no access. Include the share operation (or another grant-instance nonce) in the coordinator effect ID while keeping retries for the same step stable.
Useful? React with 👍 / 👎.
Merge activity
|
1498df3 to
40c8009
Compare
68a3767 to
2d1f551
Compare
40c8009 to
0137d0d
Compare
2d1f551 to
2f7db5e
Compare
2f7db5e to
8d8c306
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d8c306d3d
ℹ️ 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".
| actorId: opts.actorId ?? null, | ||
| }); | ||
| try { | ||
| return await store.grantScopeMembership({ |
There was a problem hiding this comment.
Restore active-group validation for local grants
When this action uses the local coordinator store (for example the CLI with --db-path or no remoteUrl), it now calls store.grantScopeMembership directly instead of localScopeForGroup, so archived or missing groups are no longer rejected before mutating membership; the store only checks that the scope is active and the device is enrolled. Fresh evidence beyond the earlier API concern is that the HTTP API path now calls findAdminScope, but this local action path still bypasses requireLocalActiveGroup, allowing codemem coordinator grant-scope-member to grant access inside an archived group.
Useful? React with 👍 / 👎.

Description
Promotes recipient policy to per-Project desired-state authority through persisted, idempotent, fail-closed reconciliation.
Type of Change
Testing
pnpm run tsc,pnpm run lint,pnpm run test)Additional validation:
Checklist
pnpm run lintpasses for touched files)