fix: address coderabbit doc and ordering feedback

This commit is contained in:
Tom Boucher
2026-05-15 10:14:37 -04:00
parent 0a2787d00b
commit 13ff4a625b
3 changed files with 3 additions and 3 deletions

View File

@@ -2,4 +2,4 @@
type: Changed
pr: 3554
---
**Project-Root Resolution Module unifies CJS and SDK `findProjectRoot` callers** — the previously-duplicated 67-line CJS and 94-line SDK implementations at `bin/lib/core.cjs:74-140` and `sdk/src/query/helpers.ts:497-590` are replaced by a single shared Module (`sdk/src/project-root/index.ts`) emitted to a CJS mirror via the existing generator pattern. The four-heuristic resolution logic (own `.planning/` guard #1362, parent `sub_repos`, legacy `multiRepo: true`, `.git` ancestor fallback) is byte-identical across runtimes, enforced by a CI freshness check. Two pre-existing CJS↔SDK drift deltas canonicalized to the SDK behavior: walk-up is now bounded by `FIND_PROJECT_ROOT_MAX_DEPTH = 10` (previously unbounded on CJS), and `.planning/config.json` is read via raw `readFileSync` (previously `platformReadSync` on CJS — functionally equivalent since the surrounding `try/catch` swallowed both fail-modes). Closes #3553.
**Project-Root Resolution Module unifies CJS and SDK `findProjectRoot` callers** — the previously-duplicated 67-line CJS and 94-line SDK implementations at `bin/lib/core.cjs:74-140` and `sdk/src/query/helpers.ts:497-590` are replaced by a single shared Module (`sdk/src/project-root/index.ts`) emitted to a CJS mirror via the existing generator pattern. The four-heuristic resolution logic (own `.planning/` guard #1362, parent `sub_repos`, legacy `multiRepo: true`, `.git` ancestor fallback) is byte-identical across runtimes, enforced by a CI freshness check. Two pre-existing CJS↔SDK drift deltas canonicalized to the SDK behavior: walk-up is now bounded by `FIND_PROJECT_ROOT_MAX_DEPTH = 10` (previously unbounded on CJS), and `.planning/config.json` is read via raw `readFileSync` (previously `platformReadSync` on CJS — functionally equivalent since the surrounding `try/catch` swallowed both fail-modes). Closes #3553. (`#3554`)