[review-low] code-yeongyu/senpi#6726: glob error text for plain and '..' patterns, and UNC prefixes

Open Beginner friendly
#6,734 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
tooling

Research direction

Start in packages/machine-ops/src/files/local-files.ts at splitGlobBase; read the whole function and the tests that exercise it before changing anything. For L2, check how a pattern with no glob syntax is split so the root itself and ../dir/.. produce an error that matches the actual case. For L3, check how path.win32.resolve(sep, ...fixed) treats leading empty segments of a //server/share/* pattern. Done when both cases return correct errors or resolve inside the root, with tests added for the plain, .., and UNC patterns.

Written by the indexing model from the issue text.

Description

Two LOW findings from the review of #6726 at 7d54bb5a64 (receipt code-yeongyu_senpi#6726-7d54bb5a64-1794737883261.md), left open by the LEAD's ruling (L1 was fixed in the PR). Both fail closed: the pattern is refused or searched in a directory inside the root, never outside it.

  • L2, packages/machine-ops/src/files/local-files.ts (splitGlobBase): a pattern with no glob syntax is cut before its last segment. So <root> itself is refused with " is outside the scope root", and .. or dir/.. are refused with "may not use '..' after a wildcard" although they contain no wildcard. The refusal is right; the error text is wrong for the case.
  • L3, same function: resolve(sep, ...fixed) drops the empty leading segments of a Windows UNC pattern, so //server/share/* resolves to the drive-root path \server\share (path.win32.resolve("\\", "", "", "server", "share") gives \server\share). It is refused or searches the wrong directory; it never escapes the root.
Dominant language
TypeScript
Stars
517
Forks
163
Avg merge
23h 31m
Merged PRs (30d)
700

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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 code-yeongyu/senpi

All issues in code-yeongyu/senpi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.