ref: Use scope observers for backend attachments - #2089
Merged
Merged
Conversation
Move attachment tracking to scope observers so the redundant attachment callbacks can be removed from the backend API. Observers notify backends after attachments have been accepted and frozen, keeping backend state consistent with the scope. The old backend hooks run before scope insertion, allowing backend state to be updated for attachments the scope later rejects. This can leave orphaned files on disk or stale Crashpad registrations. AI review bots identified concrete consequences of this ordering during the attachment API work: - Deduplication: #1974 (comment) - Validation: #1974 (comment) Register attachment observers during backend startup and remove them during shutdown, including when the backend is reinstalled.
jpnurmi
added this pull request to stack #2092
September 14, 2026 07:07
jpnurmi
requested review from
JoshuaMoelans,
limbonaut,
mujacica and
tustanivsky
September 14, 2026 07:13
tustanivsky
approved these changes
Sep 14, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2089 +/- ##
==========================================
+ Coverage 74.73% 74.75% +0.02%
==========================================
Files 103 103
Lines 27352 27365 +13
Branches 4945 4947 +2
==========================================
+ Hits 20442 20458 +16
+ Misses 5565 5564 -1
+ Partials 1345 1343 -2 🚀 New features to boost your workflow:
|
limbonaut
approved these changes
Sep 14, 2026
mujacica
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move backend attachment tracking to scope observers so the redundant attachment callbacks can be removed from the backend API. Observers notify backends after attachments have been accepted and frozen, keeping backend state consistent with the scope.
The old backend hooks run before scope insertion, allowing backend state to be updated for attachments the scope later rejects. This can leave orphaned files on disk or stale Crashpad registrations.
AI review bots identified concrete consequences of this ordering during the attachment API work:
See also: