intake(lote-A): import upstream PR #1843#7
Open
nsalvacao wants to merge 8 commits intobaseline/develop-sync-2026-02-17from
Open
intake(lote-A): import upstream PR #1843#7nsalvacao wants to merge 8 commits intobaseline/develop-sync-2026-02-17from
nsalvacao wants to merge 8 commits intobaseline/develop-sync-2026-02-17from
Conversation
…e cap, and cwd (AndyMik90#1661) Three root causes addressed: 1. PATH overwrite: pythonEnv.PATH was overwriting the augmented PATH (with npm globals) in spawn env. Now merges PATH entries instead, prepending python-specific paths (pywin32_system32) while preserving all augmented entries. 2. System prompt size: On Windows, SDK passes system_prompt as --system-prompt CLI arg. Large CLAUDE.md files exceed CreateProcessW's 32,768 char limit, causing misleading "Claude Code not found" error. Now caps CLAUDE.md content on Windows to stay under the limit. 3. Cross-drive cwd: Agent processes were spawned with autoBuildSource as cwd. On Windows with cross-drive setups, this caused file access issues. Now uses projectPath as cwd since all script paths are absolute. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ik90#1661) - Extract magic number 24000 into WINDOWS_MAX_SYSTEM_PROMPT_CHARS constant (set to 20000 for more conservative ~12KB CLI headroom) - Extract truncation suffix into WINDOWS_TRUNCATION_MESSAGE constant - Fix double-print when truncation occurs: only print "included in system prompt" when CLAUDE.md was NOT truncated (was_truncated flag) - Fix CI test failures: update subprocess-spawn tests to expect projectPath as cwd instead of autoBuildSource (matches the AndyMik90#1661 CWD change) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Normalize env objects to a single uppercase 'PATH' key before merging to prevent duplicate PATH keys on Windows where process.env has 'Path' and getAugmentedEnv() writes 'PATH'. Without this, Object.keys().find() returns 'Path' first (insertion order), discarding augmented entries, and the final spread produces both 'Path' and 'PATH' keys. Follows the same pattern used in python-env-manager.ts. (AndyMik90#1661) - Subtract WINDOWS_TRUNCATION_MESSAGE length from the truncation budget so the final system prompt stays within WINDOWS_MAX_SYSTEM_PROMPT_CHARS. Addresses PR AndyMik90#1843 review findings NEW-001, NEW-002, NEW-003. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ation budget - Finding 1 (MEDIUM): Prefer 'PATH' key directly when present in env to avoid insertion-order bug where Object.keys().find() returned 'Path' first on Windows - Finding 2 (MEDIUM): Normalization block (delete stale cased key, write 'PATH') already in place from previous commit; Finding 1 fix ensures envPathKey resolves correctly so normalization fires only when truly needed - Finding 3 (LOW): Subtract header template overhead from max_claude_md_chars to prevent ~44-char overshoot in Windows command-line truncation budget (AndyMik90#1661) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When getAugmentedEnv() spreads process.env on Windows, the resulting object contains both 'Path' (from process.env spread) and 'PATH' (explicitly written by getAugmentedEnv). The prior normalization block only removed non-'PATH' keys when 'PATH' was absent, leaving the stale 'Path' key when both coexisted. Add a cleanup loop to delete all case-variant PATH keys that differ from 'PATH' after the main normalization, ensuring the child process inherits a single canonical 'PATH' entry with the fully-augmented value. (AndyMik90#1661) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract normalizeEnvPathKey() and mergePythonEnvPath() into env-utils.ts as shared, exported helpers to eliminate duplicated PATH key case-normalization logic across agent-process.ts and python-env-manager.ts (Finding 3) - Add PATH normalization call in agent-queue.ts spawnIdeationProcess and spawnRoadmapProcess to fix the same Windows PATH duplicate-key issue that was fixed in agent-process.ts (AndyMik90#1661) (Finding 1) - Add comprehensive unit tests for normalizeEnvPathKey() and mergePythonEnvPath() covering Windows-style 'Path' key renaming, duplicate key removal, PATH deduplication across merge, and Unix separator support (Finding 2) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ake/lote-A-pr-1843
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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.
Upstream intake PR for isolated review.
intake/lote-A-pr-1843baseline/develop-sync-2026-02-17Checklist: