Skip to content

ref: Use scope observers for backend attachments - #2089

Merged
jpnurmi merged 1 commit into
masterfrom
jpnurmi/ref/observe-attachments
Sep 14, 2026
Merged

jpnurmi merged 1 commit into
masterfrom
jpnurmi/ref/observe-attachments

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

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:

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
jpnurmi added this pull request to stack #2092 September 14, 2026 07:07
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.00000% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.75%. Comparing base (1059205) to head (8566170).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi merged commit addb577 into master Sep 14, 2026
68 of 72 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/ref/observe-attachments branch September 14, 2026 08:57
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.

4 participants