oracle-gaps: mutant copies resolve bare imports from --package, not from the original file (288 setup-errors)

Aperta
#68 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
40/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript

Direzione di ricerca

Start at check.mjs near line 1007, where mutant copies are said to resolve imports like the original file, and at the wrapper plugin's resolveId and load hooks that serve those copies. Reproduce by running oracle-gaps against the tests/realtime-oracles oracle file, which should fail with 'Cannot find package fast-check'. Done means copies resolve bare imports from the original file's directory or baseline refuses early, and setup errors are excluded from the gap count and get their own directive.

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

Descrizione

Reported from an adopter's first session, at c58b0c2. Not yet reproduced here.

Problem. 288 of 388 mutants were setup-error: "Cannot find package 'fast-check' imported from tests/realtime-oracles/src/.oracle-gaps-5482-10-ordered-live-results.oracle.test.ts". The baseline loads the same import from tests/realtime-oracles/node_modules/fast-check. The comment at check.mjs:1007 says copies are placed beside the file "so that its imports resolve as the file's do". But the copy is virtual: the wrapper plugin serves it through resolveId and load. So its bare imports seem to resolve from --package, the repo root, which has no fast-check.

Two more problems follow from that:

  • setup errors count toward the headline gap count, which came out as 307 gaps;
  • they get the directive "Run an owner test that loads this module", which doesn't apply.

Proposal.

  • Resolve a copy's imports from the original file's directory. Alternatively, refuse at baseline when the oracle file's imports don't resolve from --package.
  • Either way, keep setup errors out of the gap count. A harness failure stops the run and is never charged to a mutant (decision LA-v20-1, cleanup plan Phase 2 A2). Give them their own directive.

This issue was written by Isaac.

Lingua principale
JavaScript
Stelle
5
Fork
1
Merge medio
6h
PR unite (30g)
56

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 TanStack/oracles

Tutte le issue di TanStack/oracles

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.