Repository navigation
fix: two environment-sensitive test failures blocking CI - #925
Merged
will-lamerton merged 2 commits intoAug 30, 2026
Merged
Conversation
Follow-up to Nano-Collective#923. With CI now reaching the test step, this is the last red check on main. The assertion compares a rendered Ink line against a bare path string with only .trim() applied, so it passes whenever colour is off and fails whenever it is on — the styled path carries SGR escapes that trim() does not touch. The failure output is characteristically baffling, two visually identical strings: Difference (- actual, + expected): - '/test/project' + '/test/project' CI sets FORCE_COLOR=1, so this has been broken there all along. It was invisible only because the coverage job used to die at `pnpm build` or at AVA startup long before it reached this test. strip-ansi is already a devDependency and is the convention used by the other render-comparing specs (see user-input.spec.tsx). Full suite under CI conditions (FORCE_COLOR=1, CI=true): 6565 passed, 0 failed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01J7jWv6TLZ5UCr5BVfE2FP7
bigattichouse
requested review from
Avtrkrb,
akramcodez and
will-lamerton
as code owners
August 23, 2026 20:24
The after.always hook already passed recursive+force, but addPrompt
persists on a debounced timer, so a write can land while rmSync is
walking the tree and leave it deleting a directory that just became
non-empty again:
ENOTEMPTY: directory not empty, rmdir '/tmp/nanocoder-test-...'
1 hook failed
11 tests skipped
Node exposes maxRetries/retryDelay on fs.rm precisely for this class of
error (ENOTEMPTY, EBUSY, EPERM, ...), so the teardown now backs off
rather than failing the run.
Seen intermittently in CI - it passed on two other runs of the same
suite, which is what makes it worth pinning down rather than re-running.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J7jWv6TLZ5UCr5BVfE2FP7
Contributor
Author
|
Green across all 11 checks — this is the first fully green run the repo has had since the TypeScript 7 and AVA 8 bumps, now that #923 has landed and CI actually reaches the test step. Flagging that this unblocks #920: that branch is rebased onto current Both fixes are test-only, no source changes:
Happy to split these into two PRs if you'd prefer them reviewed separately. |
Member
|
Thanks for this @bigattichouse :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #923. With CI now getting as far as the test step, two long-hidden test failures are the last red checks. Both are test-only; no source changes.
1.
location-stepcompares a styled line against a bare stringLocationStep shows the resolved project path next to the optioncompares a rendered Ink line against a bare path with only.trim()applied. The styled path carries SGR escapes thattrim()doesn't touch, so the test passes whenever colour is off and fails whenever it's on — with characteristically baffling output, two visually identical strings:CI sets
FORCE_COLOR=1, so this has been broken there all along.strip-ansiis already a devDependency and is the convention the other render-comparing specs use (seeuser-input.spec.tsx).2.
prompt-historyteardown races its own debounced writeThe
after.alwayshook already passedrecursive/force, butaddPromptpersists on a debounced timer, so a write can land whilermSyncis walking the tree:Node exposes
maxRetries/retryDelayonfs.rmprecisely for this class of error, so the teardown now backs off instead of failing the run. This one is intermittent — it passed on two other runs of the same suite, which is what makes it worth pinning down rather than just re-running.Type of Change
Changeset
Testing
Full suite under CI conditions (
FORCE_COLOR=1 CI=true NODE_ENV=test): 6565 passed, 0 failed.location-step.spec.tsxnow passes withFORCE_COLOR=1andFORCE_COLOR=0, where previously only the latter passed.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01J7jWv6TLZ5UCr5BVfE2FP7