Skip to content

refactor(core): align filesystem containment helper#277

Open
nicko-ai wants to merge 2 commits into
devfrom
codex/core-filesystem-upstream-align
Open

refactor(core): align filesystem containment helper#277
nicko-ai wants to merge 2 commits into
devfrom
codex/core-filesystem-upstream-align

Conversation

@nicko-ai

Copy link
Copy Markdown
Collaborator

Issue for this PR

N/A - refactor-only fork-minimality cleanup.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Aligns the fork's AppFileSystem.contains helper with upstream's separator-aware containment predicate shape. This removes the older broad startsWith check while preserving path escape rejection.

Adds focused boundary assertions for same directory, child paths, parent escapes, siblings, and names beginning with two dots inside the parent.

How did you verify your code works?

  • npx --yes bun@1.3.13 test test/filesystem/filesystem.test.ts from packages/core
  • npx --yes bun@1.3.13 run typecheck from packages/core
  • npx --yes bun@1.3.13 typecheck from repo root
  • pre-push hook reran root typecheck during push

Screenshots / recordings

N/A - no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- use upstream separator-aware contains predicate shape

- cover boundary path containment cases
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Route overlap checks through the separator-aware containment helper in both core and opencode utilities.

Cover child names beginning with dot-dot plus sibling and parent boundary cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant