Existing replay suite leaks its fixture directory when Harper setup fails

Aperta
#283 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
69/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js, typescript
Ambito
backend, testing

Direzione di ricerca

Read the after hook in integrationTests/mcp-runtime.test.ts at lines 102–113 and reproduce with a fresh test-install parent and HARPER_INTEGRATION_TEST_INSTALL_SCRIPT pointing to a missing file. Check how the installed @harperfast/integration-testing 0.5.1 teardown handles the partial context after fixture copying. Done means the setup error is preserved, the allocated fixture root is removed, and normal successful teardown still works.

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

Descrizione

bug

The existing replay/refresh suite leaves its fixture directory behind when Harper setup fails after copying the fixture.

The suite at mcp-runtime.test.ts calls teardownHarper(ctx) in its after hook. At that failure point, @harperfast/integration-testing 0.5.1 has recorded ctx.harper.dataRootDir but has not populated the started context. Teardown passes an undefined hostname to releaseLoopbackAddress and throws before removing the directory.

To reproduce, run that suite with a fresh test-install parent and HARPER_INTEGRATION_TEST_INSTALL_SCRIPT pointing to a missing file. Fixture copying succeeds, startup reports the missing executable, and the allocated directory remains. A direct call to the installed teardown helper with that partial context reproduces the hostname TypeError. The Node test runner can suppress the after-hook error when the before hook has already failed, so the original startup error alone does not demonstrate cleanup.

Expected: retain the original setup error and remove the resources actually allocated, including the recorded fixture root. Normal successful teardown must remain intact. An upstream helper correction that supports partial context would cover existing callers; test-local handling is another option.

This is a pre-existing test cleanup defect, identified during review of #282. That PR fixes cleanup in its newly added native suite; this issue tracks the older replay/refresh suite. No production authentication or session defect is demonstrated.

Observed on current main 6ba1ff4, Node 24.13.1 and integration-testing 0.5.1. No release is committed. No open OAuth epic owns test infrastructure.

Review-Deferral: 4ed730a2cda1c1f9 severity=nit category=reliability

Generated by OpenAI Codex; posted via @hdbjeff.

Lingua principale
JavaScript
Stelle
1
Fork
3
Merge medio
6h 48m
PR unite (30g)
25

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 HarperFast/oauth

Tutte le issue di HarperFast/oauth

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.