Repository navigation
windows: run blocking notification queries on helper isolates - #5
Conversation
QA לאחר תיקון Dart formatבריצה validate #42476672549 ה־Dart formatting checks עבר על ה־HEAD המעודכן עברו גם Run Dart Analyzer, Windows unit tests, שני builds של Windows, Linux/macOS/Web builds ובדיקות Dart/Web. Android build על Flutter 3.38.1 עבר. שני כישלונות Android (stable build ו-unit tests) קשורים להורדת Gradle wrapper בסביבת ה-runner; אין במסלולי התיקון הזה קוד Android. iOS integration עדיין בביצוע בזמן בדיקה זו. אין כאן טענה שכל |
|
אימות לפני Ready: ב־head 8da0224 עברו Dart format, Analyze, Windows unit tests ושתי בניות Windows (Flutter 3.38.1 ו־stable), לצד Linux/macOS/Web ו־Dart unit tests. הכשל בענף Android הוא Gradle download, ולא Windows plugin; iOS integration רץ בנפרד. הבדיקות מכסות dispose עם query בהמתנה, getActive/getPending/update. PR מוכן לסקירת code/FFI ownership; אין למזג אוטומטית ואין לשנות pin של האפליקציה לפני מיזוג/בדיקה מתואמת. |
…ABI fixture Add 650ms native blocking query and teardown test, malformed pointer fixtures, strict ID parser tests, and sanitizer coverage for invalid callback maps.
…rt callbacks Share a guarded callback pointer across retained activation objects; close the gate before COM revocation and test concurrent late callbacks under ASan/UBSan.
…hints Avoid windows.h max macro conflict in notification ID bounds, retain latency measurements through Zone.current.print without analyzer lints, and normalize package imports.
…review step Copy exact dart format output from Windows validation job; keep permanent slow-FFI responsiveness regression and sanitizer workflows.
Independent QA checkpoint — Windows notification stackReviewed at #5 head Verified green (exact pinned revision):
Measured on the synthetic slow-DLL harness: three concurrent 650 ms calls finished in approximately 670 ms; 176 UI-isolate timer ticks, maximum observed interval 28 ms. This is not a measurement of an intentionally stalled real Windows notification service. Disposition: ready for human code review of the stacked diff. Keep the #4 → #5 base relationship until #4 is approved and merged; app #4516 pins this exact #5 SHA and must separately pass consumer Windows CI. No merge was executed or authorized. |
createPlugin never returns null (new throws) and native init only queues registration and always returns true, so the failed-init cleanup could not run. Also remove the unused NativeNotificationDetails list helpers, the meaningless INT_MAX check, and fix the instance doc comment that referred to a removed callback. The query responsiveness workflow now runs on pushes to the integration branch instead of a temporary personal branch pattern.
…ited future The error surfaced as an unhandled zone error. The callback stays open and calling dispose again retries native teardown.
|
QA לפני מיזוג: נוספו dabfb93 (הסרת נתיבי כשל מתים ב-init, helpers לא בשימוש, בדיקת INT_MAX חסרת משמעות, הערת instance שגויה; טריגרי push של ה-workflows עברו לענף המשולב) ו-7cf234c (בלי rethrow מ-future שלא ממתינים לו ב-dispose). מקומית: flutter analyze נקי, flutter test -j 1 – 24/24. CI מלא על 7cf234c (כולל #4) ירוק בפורק האישי: palmoni5#1 |
6dd532b
into
windows-worker-thread-lazy-library
Scope (stacked on #4)
Base:
palmoni5/fix-windows-notification-memory-integration-20261107@3a30cafe42c917ce8428f4a2667f7dcfbbd92c70. This PR deliberately does not repeat the upstream-compatiblenew[]/delete[]ownership fix in #4.The fork's existing C++
NotificationWorkerremains the only owner of COM/WinRT calls. The Dart root isolate now usesIsolate.runfor the three synchronous FFI waits:getActiveNotificationspendingNotificationRequestsupdateBindings/ nativeupdateNotificationOnly sendable primitives (native plugin address, IDs and binding map) cross Dart isolates. Results are copied back as Dart primitives and native arrays are freed in the helper isolate.
Lifetime and native safety
disposePluginon a helper isolate, as the C++ worker'sjoincan block.NativeCallable.listeneralive until native teardown finishes; bind callbacks to their plugin instance.init.new[]/delete[]allocation matching from [windows] fix notification callback string deallocation and add sanitizer coverage #4.API and ABI compatibility
Public Dart method signatures and the C FFI header
src/ffi_api.hare unchanged. Verified header blob SHA on #4 and #5:b2cfe4d7fc427ae93cb3f9519ffb78115a5677de. Internal native lifetime implementation changes only.QA evidence
windows.hmax-macro fix; the latest full validate remains subject to final verification.Review / merge order
windows-worker-thread-lazy-library.Do not merge any PR without explicit maintainer authorization. The real Windows notification service is not artificially delayed by the fixture; it is covered by the separate native/Windows integration tests rather than the 650 ms synthetic latency benchmark.