Skip to content

feat: add ResourceDeleted annotation#1010

Open
alan-lee-12 wants to merge 3 commits into
mainfrom
fde-296-resource-deleted-annotation
Open

feat: add ResourceDeleted annotation#1010
alan-lee-12 wants to merge 3 commits into
mainfrom
fde-296-resource-deleted-annotation

Conversation

@alan-lee-12

@alan-lee-12 alan-lee-12 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What

Adds a ResourceDeleted annotation a connector can attach to a Grant or Revoke response when the operation deleted a resource in the downstream system as a side effect.

Canonical case: revoking a principal's last role causes the app to delete the underlying account. Today C1 only learns of the deletion at the next full sync (~1h), which blocks an immediate re-grant. With this annotation the connector reports the deletion inline so C1 can mark the account deleted right away — no sync wait. Mirrors the existing GrantReplaced annotation mechanics.

Changes

  • proto/c1/connector/v2/annotation_resource_deleted.protoResourceDeleted { ResourceId resource_id = 1 } (required), doc comment modeled on annotation_grant_replaced.proto
  • Generated pb/c1/connector/v2/annotation_resource_deleted{.pb,.pb.validate,_protoopaque.pb}.go via buf generate
  • pkg/types/resource/deleted.goNewResourceDeleted / AppendResourceDeleted, mirroring pkg/types/grant/replaced.go

Consumers

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jul 15, 2026

Copy link
Copy Markdown

FDE-296

Comment thread pkg/types/resource/deleted.go
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

General PR Review: feat: add ResourceDeleted annotation

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 00a4b95fc8ff.
Review mode: full
View review run

Review Summary

Scanned the full PR diff for security and correctness. This is a purely additive change: a new ResourceDeleted proto message (resource_id field 1, required), matching regenerated Go for both protoopaque and non-opaque build tags, and NewResourceDeleted/AppendResourceDeleted helpers that mirror the accepted GrantReplaced pattern. Generated code matches the proto source, annotations are packed via anypb so no central registration is required, no existing exported APIs or interfaces change, and tests cover construction, annotation round-trip, and required-field validation. No new issues found.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No blocking issues found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No blocking issues found.

alan-lee-12 and others added 3 commits July 23, 2026 10:04
Add a ResourceDeleted annotation that a connector can attach to a Grant or
Revoke response when the operation deleted a resource downstream as a side
effect (e.g. revoking a user's last role deletes the user account). This lets
ConductorOne mark the account deleted immediately instead of waiting for the
next full sync.

- proto/c1/connector/v2/annotation_resource_deleted.proto (+ generated pb)
- pkg/types/resource/deleted.go: NewResourceDeleted / AppendResourceDeleted

Refs FDE-296

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alan-lee-12
alan-lee-12 force-pushed the fde-296-resource-deleted-annotation branch from eeea4ad to d98fde6 Compare July 23, 2026 17:04
@alan-lee-12
alan-lee-12 marked this pull request as ready for review July 23, 2026 17:05
@alan-lee-12
alan-lee-12 requested a review from a team July 23, 2026 17:05

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No blocking issues found.

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.

2 participants