Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Existing replay suite leaks its fixture directory when Harper setup fails

Open
#283 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
69/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
backend, testing

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
JavaScript
Stars
1
Forks
3
Avg merge
7h 4m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HarperFast/oauth

All issues in HarperFast/oauth

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.