Repository navigation
Conversation
JeanMeche
reviewed
Nov 2, 2026
Member
There was a problem hiding this comment.
Please ask your agent to not create new test files every time.
Contributor
Author
There was a problem hiding this comment.
Fair point, I’ll move these cases into the existing debounce specs.
Run custom abort listeners outside the pending-sync computation and clear completed controllers before syncing their values. Guard orphaned and superseded fields before reading pending state after an asynchronous debounce. Preserve the existing lazy cancellation timing for direct model writes. Related to angular#71631
splincode
force-pushed
the
fix/debounce-abort-tracking
branch
from
November 2, 2026 17:55
cc86cbe to
79aa94c
Compare
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.
What changes
Abort listeners currently run inside the
pendingSynclinked-signal computation. Signal writes throw even in production, and reads become accidental dependencies that can cause a later typed value to be discarded. A completed debounce also retains its controller and gets aborted on a later touch.Run listeners untracked and clear the controller when its debounce completes. Check orphaned/aborted/superseded state before reading pending state after the await.
Related to #71631. This deliberately keeps the linked signal and the existing lazy cancellation timing after direct model writes; it does not introduce an effect per field or promise eager cancellation. Public API signatures are unchanged.
Reproduction and production results
The three regression specs in this PR fail on main at
2d12a5e8f457f183545fa14364b6f8982ec21452and pass with the fix.The same cases were independently run in an AOT, ES2022, minified browser fixture built from that base and the patched source, with
ngDevMode=false,ngJitMode=false, and runtimeisDevMode() === false. It exercises publiccontrolValue.set()andmarkAsTouched()field APIs.direct, losingsecondsecondCost and memory comparison
Seven alternating baseline/patched pairs, fresh browser contexts, Chromium 158.0.8117.0 on Linux x64. One live form, 100 warmup edits, followed by two batches of 1000 completed edit/touch cycles. Heap readings follow three forced GCs.
Timing ranges for the second batch: 11.0–17.6 ms before, 3.8–10.1 ms after. These are microbenchmark totals, not page-latency guarantees.
An unbounded memory leak was not established by this experiment. Both heaps largely plateau after warmup; no substantial memory-saving claim is made. The demonstrated production impact is lost input, failed signal writes, and redundant cancellation work.
Validation
git diff --checkpass.os.networkInterfaces(); no Angular/test assertions were changed. Bazel telemetry was disabled.angular-71631-production-repro.zip