run --each reads every test as failed alone on Node 26: the test command's output is no longer TAP

Aperta Adatta ai principianti
#142 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Roshan931 ci sta già lavorando.

Dal 11/11/2026.

  • #180 di @Roshan931 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript
Ambito
testing

Direzione di ricerca

Inizia con il comando test in coherence.config.json e confrontane l’output con il pattern testMatch; src/enforcement/totality.ts mostra come viene valutato l’output. Esegui il comando di test indicato con Node 26.8.1, quindi conferma che stampa il riepilogo TAP atteso dal pattern. Il lavoro è completato quando coherence run --each riconosce come superati i test che passano; l’issue suggerisce inoltre di documentare il blocco della versione del reporter in docs/config.md per chi adotta il progetto.

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

Descrizione

What happens

On Node 26.8.1, coherence run --each in this repository reports every totality oracle as passed batched but fail alone, for tests that pass. The alone confirmation can never go green locally, so steps 1 and 5 of the "witness a refutation" practice cannot be met on that Node. CI runs Node 22.18 and is not affected.

The test command in coherence.config.json sets no reporter, and testMatch is # pass [1-9][0-9]*, which is the TAP summary. With stdout piped, Node 22.18 prints TAP and Node 26.8.1 prints the spec reporter:

$ node --test --test-name-pattern='hooks Coherence 0.x wrote through its launcher' src/lifecycle/install.test.ts | grep -E '^(# |ℹ )(pass|fail)'
v22.18.0:  # pass 1   # fail 0
v26.8.1:   ℹ pass 1   ℹ fail 0     (exit 0)

runTotalityOracle (src/enforcement/totality.ts L99) then grades the run as fail: "exited 0 but its output did not match /# pass [1-9][0-9]*/; no test ran under that name". The batched run and refute are not affected, because they go through testJson and its own reporter.

Fix

Add --test-reporter=tap to the test command. On Node 26.8.1 the same command then prints # pass 1. An adopter whose test command runs node --test with a TAP testMatch meets the same thing, so docs/config.md could say to pin the reporter.

Lingua principale
TypeScript
Stelle
21
Fork
6
Merge medio
8h 31m
PR unite (30g)
55

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 PostHog/coherence

Tutte le issue di PostHog/coherence

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.