Replay line: a printed replay runs no test under a project config (vitest run, no --config)

Aperta
#108 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
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
testing

Direzione di ricerca

Start with packages/oracles/src/oracle-property.ts and trace how the random unit builds its Replay: line, including rerunOf and the project configuration. Compare the printed command with the working pnpm exec vitest --run --config oracle-gaps/vitest.config.mjs gap-report-oracle command. Done means the printed replay command loads and reruns the failing counterexample; the maintainer still needs to choose how projects supply that command.

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

Descrizione

Summary

A failing oracle unit prints a replay line that does not rerun the unit when the oracle runs under a project config. In the gap report's package, the printed command is vitest run -t '...'. A bare vitest run uses the package's default config, which finds no file, so every test is skipped and the replay passes vacuously (0 tests run). The unit can be rerun only with the project's own command: pnpm exec vitest --run --config oracle-gaps/vitest.config.mjs gap-report-oracle -t '...'.

P4 (register): a printed replay must rerun the counterexample. This one does not.

Where

packages/oracles/src/oracle-property.ts, the Replay: line built in the random unit's failure (${oracleEnvName('SEED')}=... vitest run ${rerunOf(replayed)}). It always says vitest run, with no config, file, or project command.

Evidence

  • #102: random seed: generated, seed 333199054, path 1:1:1:1. The printed Replay line (CI run 43688703700): ORACLE_SEED=333199054 ORACLE_PATH=1:1:1:1 ORACLE_PROPERTY='oracle-gaps.report' ORACLE_UNIT='random seed: generated' vitest run -t '...'. Run as printed, it ran no test. With the project command it reproduces.
  • #107: the same defect with random seed: a declaration fault: brokenOwner.

Proposed fix

The oracle's configuration should accept the project's replay command (the command that loads the oracle file, such as the --config and file names), and the Replay: line should print it. Until then, the line should at least name the file. Decision for the maintainer on the configuration shape.

Lingua principale
JavaScript
Stelle
5
Fork
1
Merge medio
8h 31m
PR unite (30g)
60

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.