Skip to content

Make workspace context discovery ignores configurable#76

Draft
alanzchen wants to merge 3 commits into
Waishnav:mainfrom
alanzchen:codex/skip-readonly-context-scan
Draft

Make workspace context discovery ignores configurable#76
alanzchen wants to merge 3 commits into
Waishnav:mainfrom
alanzchen:codex/skip-readonly-context-scan

Conversation

@alanzchen

@alanzchen alanzchen commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • add DEVSPACE_CONTEXT_IGNORE_PATHS and the persisted contextIgnorePaths configuration field
  • keep the default empty so no additional directories are ignored unless explicitly configured
  • normalize and deduplicate workspace-relative entries while rejecting absolute paths, parent traversal, and invalid values
  • prune exact matching directories before opening them during nested AGENTS.md and CLAUDE.md discovery
  • preserve the setting through devspace init --force and display the resolved list in serve and doctor
  • document matching behavior and the distinction between discovery pruning and filesystem access control

Why

Opening a workspace currently walks every directory while looking for nested instruction files. Large, remote, or FUSE-backed resource trees can make open_workspace slow or block it entirely.

Behavior

The default ignore list is empty. Configured entries are normalized literal paths relative to the opened workspace root, not globs. Matching is exact, so ignoring external-resources does not ignore external-resources-old or nested/external-resources.

The setting affects only nested instruction discovery. Ignored paths remain available to normal workspace file and shell tools and are not treated as a filesystem security boundary.

Validation

  • npm test
  • npm run typecheck
  • npm run build
  • focused configuration and workspace traversal tests
  • verified ignored directories are never opened by the discovery walker
  • verified exact-match siblings remain discoverable and ignored files remain resolvable
  • npm pack --dry-run
  • DEVSPACE_CONTEXT_IGNORE_PATHS=external-resources node dist/cli.js doctor

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 54b91ca8-247c-47cd-bf81-e8cdbbb13c70

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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