async-cache-single-flight: the selection regex matches `constants.set(` as `s.set(` and the law card's own example text

Aperta
#437 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
53/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing-qa

Direzione di ricerca

Start with the gate regex in async-cache-single-flight.ts:72-77 and the cited matches in ts-model.ts:714 and cache-harness-laws.ts:83-85. Read how audit-engine.ts:278 represents its disk JSON cache, then check the gate against those examples and the in-memory map case. Done means the gate avoids the false matches described in the issue and still selects the intended single-flight cases.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Found in the 8.0.0 self-audit triage: RoC 7.29.1 (npm, 5fc54afe) on a clean clone of develop at 2d2fa9a, with typescript resolvable (verdict compliance, 0 failed / 46 warnings). The bucket method and per-law tables are kept by QA; counts are from that run.

What happens

The gate regex (async-cache-single-flight.ts:72-77) back-references the map name with \1 but has no left boundary, so s.set( matches inside constants.set( (ts-model.ts:714); a law registry file is selected by the card's own example (cache-harness-laws.ts:83-85). The single finding in RoC (audit-engine.ts:278) is a disk JSON cache: a promise cannot be stored there and concurrent callers of a CLI audit are separate processes — a different concurrency model than the in-memory map the law is about.

Suggested direction

Word boundary before the back-reference; skip string contents (M1); recognise disk/JSON caches as outside the in-memory single-flight concern.

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
38m
PR unite (30g)
96

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Rule-Of-Code/RoC

Tutte le issue di Rule-Of-Code/RoC

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.