Skip to content

fix(config): keep project dotenv loading inside the working directory - #1775

Merged
Shashankss1205 merged 1 commit into
mainfrom
fix/project-env-boundary-1099
Oct 15, 2026
Merged

Shashankss1205 merged 1 commit into
mainfrom
fix/project-env-boundary-1099

Conversation

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Starting CGC in a nested project could load an unrelated parent project's .env and override settings in per-repo mode. Resolve only cwd/.codegraphcontext/.env or cwd/.env, preserving that precedence, context-mode gating and explicit environment overrides. Forced project loading retains the same directory boundary.

Closes #1099.

Validation: 17 focused config tests pass, including parent .env/.codegraphcontext exclusion, cwd precedence, force/ignore flags, environment overrides, existing profile isolation and encoding coverage. Updated the configuration reference to explain the boundary and migration to project-root or global settings. No license changes.

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
code-graph-context-pack Ready Ready Preview Oct 15, 2026 1:45pm UTC

@github-actions

Copy link
Copy Markdown
Contributor

Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Code Graph Analysis

fix(config): keep project dotenv loading inside the working directory (#1775)

📊 Interactive Visualization

View the blast radius graph: PR Reviewer Dashboard

📦 Artifacts

The graph JSON has been uploaded as a build artifact: pr-code-graph-1775


Generated by CodeGraphContext using FalkorDB Lite

@Shashankss1205 Shashankss1205 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge. Project dotenv discovery is now cwd-only, preserving .codegraphcontext/.env precedence, context gating, force/ignore flags and environment overrides. 17 focused tests pass. The documented local fast suite passes 1,810 tests with 8 skips; a preliminary proxy-misconfigured run is not counted as a pass. All current-head CI checks pass, including Python 3.12–3.14, platform E2E, strict four-backend parity and packaging/security. The config reference explains the directory boundary and migration.

@Shashankss1205
Shashankss1205 merged commit 4fe7616 into main Oct 15, 2026
22 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Oct 15, 2026

This branch was successfully deployed

1 active deployment
Preview — 97e12c9b Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Security: Limit Directory Climbing for .env File Resolutions

1 participant