fix(viewer): actively cancel superseded PDF.js work on current parent - #445
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Read-only child-head review request for @opencode-agent review |
Rate Limit Exceeded
|
Objective
Reconstruct stale stacked PR #347's unique active PDF.js resource-cancellation delta on the exact current #323 parent without moving #323 or importing obsolete ancestry.
Exact stack identity
75e49391ddc13de378b8572d444bf02d686ef84c;4fd6398fdba14cc72a0103cdcac0bdcd5a9b3d6e;54d77fbc07645a8eee45ad8662700c3c0845ccc9;scripts/test_viewer_pdfjs_resource_cancellation.pyandviewer.js;RED → GREEN contract
The executable Node/unittest regression holds an active
RenderTask.promiseand an unresolvedPDFDocumentLoadingTask.promise. Supersession must callRenderTask.cancel()exactly once andloadingTask.destroy()exactly once when those APIs exist. Production installs a one-shot abort listener, cancels active render work, destroys unresolved loading work, suppresses cancellation errors only when the caller actually aborted, removes the listener infinally, and still destroys a resolvedPDFDocumentProxy.Scope boundary
This child depends on #323's stale-publication suppression. It does not yet provide signed-token lifecycle parity, rapid three-generation/error-state coverage, terminal focus ownership, or a distributed/browser-process cancellation contract. Issue #322 remains open.
Merge gate
Keep Draft while #323 remains unmerged. Child CI/fuzz success is useful review evidence but not protected-main merge evidence. After #323 reaches protected
main, rebuild or retarget this two-file delta onto the new exact protected base and regenerate all main-targeted CI, Security Scan, SAST, fuzz, current-head reviews, and independent approval. No evidence from #347 or predecessor heads transfers.