Repository navigation
clens-014-tests-never-leave-a-clens-marker-in-tmp-853cdf: A test run never leaves a .clens marker in a shared parent folder - #22
Merged
silouone merged 1 commit intoOct 30, 2026
Conversation
…run clens-014-tests-never-leave-a-clens-marker-in-tmp-853cdf-publish-1793368494554)
silouone
deleted the
adw/clens-014-tests-never-leave-a-clens-marker-in-tmp-853cdf
branch
October 30, 2026 15:03
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.
clens-014-tests-never-leave-a-clens-marker-in-tmp-853cdf
Ticket: clens/clens-014-tests-never-leave-a-clens-marker-in-tmp-853cdf.md
Risk
How to undo
Revert this PR's commits with
git revert.Build — clens-014
What changed
packages/cli/test/utils.test.ts:resolveProjectRootsuite now uses a per-testmkdtemproot removed inafterEach. The two fallback tests (plus a newprefers .clens over a nearer .git) callresolveProjectRoot(start, fakeExists), with no fs access. Added R2 testignores a .clens in the parent of the project root(parent built inside an mkdtemp dir) and two R1 pins (private root / no parent marker written; earlier roots removed and distinct).packages/cli/test/hook.test.ts:TEST_DIRis a per-testmkdtemproot seeded with its own.clens(nearest marker wins, so a stray parent can't capture it). Added R2 test (ignores a .clens in the parent of the project root) and two R1 pins.packages/cli/src/utils.ts: seamresolveProjectRoot(start, exists = existsSync); behavior-preserving, all existing callers unchanged.Deliberate coverage move (per plan)
Removed hook test
nested cwd falls back to .git root when no .clens exists yet: the hook subprocess cannot take an injected predicate, so against a real fs it is inherently host-dependent. The.gitfallback is pinned at unit level inutils.test.ts. Reviewer: this is a deletion of a test, made by the plan, not to reach green.Verification
falls back to .git…andprefers .clens over a nearer .gitfailed on the 2nd argument being ignored.$TMPDIR/.clenscreated by hand:utils.test.ts+hook.test.ts→ 42 pass, 0 fail; marker removed afterwards.bun run typecheckclean,utils/hook/distilltests: 769 pass.bun testwas not run by me (blocked by an in-stage hook); thegatesnode covers it.Discrepancies
None. Note: the web package biome lint was not run separately (no web changes).
Gates: last pass green in run clens-014-tests-never-leave-a-clens-marker-in-tmp-853cdf-1793364256470.
Gates
(no gates recorded)
Gate suite ran in: 0ms
Repair rounds used: 0
Total duration: 9035ms
Run id: clens-014-tests-never-leave-a-clens-marker-in-tmp-853cdf-publish-1793368494554
Requirement trace
Matrix computed at commit
eecf3bc21bdda8c2329465edcf7164aecfc23b14; links are pinned to it.resolveProjectRootand hook-handler tests create their roots w….clensfolder present in the temp dir's parent, th…Captured sessions
(none captured)
Opened by adw-factory. A human reviews and merges — the factory never merges,
approves, or closes its own pull requests.