Skip to content

feat(sharing): persist recipient policy intent#1341

Merged
kunickiaj merged 1 commit into
mainfrom
07-21-feat_sharing_persist_recipient_policy_intent
Jul 22, 2026
Merged

feat(sharing): persist recipient policy intent#1341
kunickiaj merged 1 commit into
mainfrom
07-21-feat_sharing_persist_recipient_policy_intent

Conversation

@kunickiaj

@kunickiaj kunickiaj commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Description

Persist the non-authoritative recipient-policy intent graph while existing scopes remain the sole authorization boundary.

  • add schema v12 records for policy Teams, Team memberships, Identity devices, and canonical Project recipients
  • migrate exact Project operations and fingerprint-matched review decisions idempotently, transactionally per Project, and fail closed
  • expose strict intent and migration APIs without scope, coordinator, key, address, fingerprint, filter, cursor, or payload data
  • support read-only dry runs with explicit would_migrate results

No scope memberships, mappings, replication state, memories, peers, or share operations are modified.

Type of Change

  • 🚀 Feature (new functionality)
  • 🐛 Bug fix (fixes an issue)
  • 📚 Documentation (docs-only change)
  • 🔧 Maintenance (refactor, chore, CI, etc.)
  • 🧪 Testing (test-only changes)

Testing

  • Relevant checks pass locally (pnpm run tsc, pnpm run lint, pnpm run test)
  • Added/updated tests for changes
  • Manually verified changes work as expected

Additional validation:

  • targeted schema, migration, contract, and viewer-server tests
  • independent correctness/security review and follow-up review
  • Snyk Code high-severity scan found no issues in the changed paths

Checklist

  • Code follows project style (pnpm run lint passes for touched files)
  • Self-review completed
  • Documentation updated (existing design and ADR already specify this slice)
  • No new warnings introduced

@kunickiaj
kunickiaj marked this pull request as ready for review July 21, 2026 19:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-migration.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-migration.ts Outdated
Comment thread packages/core/src/recipient-policy-migration.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from b32edb8 to d8bdaaf Compare July 22, 2026 18:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-migration.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_actionable_migration_review branch from 38d91a1 to 8ed7b45 Compare July 22, 2026 19:37
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from d8bdaaf to 3f34fc5 Compare July 22, 2026 19:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-migration.ts
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from 3f34fc5 to 477bd88 Compare July 22, 2026 19:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-migration.ts
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from 477bd88 to fe6ae9c Compare July 22, 2026 21:17
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_actionable_migration_review branch from 8ed7b45 to 623fcf8 Compare July 22, 2026 21:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

kunickiaj commented Jul 22, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jul 22, 9:25 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 22, 9:39 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 22, 9:41 PM UTC: @kunickiaj merged this pull request with Graphite.

@kunickiaj
kunickiaj changed the base branch from 07-21-feat_sharing_add_actionable_migration_review to graphite-base/1341 July 22, 2026 21:31
@kunickiaj
kunickiaj changed the base branch from graphite-base/1341 to main July 22, 2026 21:37
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from fe6ae9c to 80e2618 Compare July 22, 2026 21:38
@kunickiaj
kunickiaj merged commit 817b0fe into main Jul 22, 2026
11 checks passed
@kunickiaj
kunickiaj deleted the 07-21-feat_sharing_persist_recipient_policy_intent branch July 22, 2026 21:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant