Skip to content

feishu: TDZ ReferenceError risk in waitForAbortableDelay #98464

Description

@zhangLei99586

Summary

finish() closure in extensions/feishu/src/async.ts:79 references timer, but timer is declared as const after finish is defined. If finish(false) fires via the abort signal at line 99-100 before const timer on line 103 executes, accessing timer in the temporal dead zone throws ReferenceError.

Reproduction

Source inspection: guaranteed TDZ violation path at lines 79-103. Currently guarded by the outer abortSignal?.aborted check, but fragile.

Expected

Hoist timer as let above finish so it is safely undefined when finish fires early.

Scope

extensions/feishu/src/async.ts:77-107 — 1 file, ~1 LoC change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions