fix(release): markdownFiles skips what is not a file or a folder - #42
Merged
Merged
Conversation
Claude Code's Bash sandbox mounts character devices over names in the working folder (.claude/loop.md, .claude/skills, .mcp.json). readdir still reports the entry underneath as a regular file, so markdownFiles listed .claude/loop.md, and docs-check crashed reading it with EACCES in every sandboxed agent session. It now asks stat, which sees the mount: a file is listed only when stat says file, and a folder is entered only when both say folder, so a link to a folder is still not followed. Checked on cli-tasks inside the sandbox: 0.17.0's cli-dev docs-check crashes, this build prints "docs: ok". The new test uses a FIFO, which fails without the change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Task
cli-dev docs-checkcrashes inside Claude Code's Bash sandbox. Found while setting up cli-tasks.Why
The sandbox mounts character devices over names in the working folder, such as
.claude/loop.md. The directory listing still reports a regular file there, somarkdownFileslists it anddocsProblemscrashes reading it (EACCES). Every repository that uses the defaultdocs-checkwithout--rulesfails in a sandboxed agent session.What
markdownFileschecks each entry withstat, which sees the mount.statsays it is a file.statsay it is a folder. A link to a folder is still not followed.## Unreleased, in the Fixed section.Testing
pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm docs:checkpass (241 tests).loop.mdis not listed, and a symbolic link to a file is. Without the change, the test fails.cli-dev docs-checkcrashes on.claude/loop.md, and this build printsdocs: ok.🤖 Generated with Claude Code