fix(advisor): surface nested repo context#3156
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd3a35e13d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const gitStatus = includeGit ? this.#getGitStatus() : null; | ||
| const gitPr = includePr ? this.#lookupPr() : null; | ||
|
|
||
| const activeRepoCache = this.#resolveActiveRepoCache(); |
There was a problem hiding this comment.
Respect disabled git setting before resolving active repo
When git.enabled is false (or when no path/git/PR segment needs repo context), this unconditional call still runs resolveActiveRepoContextSync(), which invokes git.repo.resolveSync and scans the cwd for repositories on every first status-line render. That breaks the existing status-line-settings-cache.test contract that disabled git integration performs no git probes, and it ignores users who turn git integration off to avoid repo filesystem work. Gate this resolution on the visible segments/settings before calling it.
Useful? React with 👍 / 👎.
|
review:p1 Thanks for the patch, @oldschoola. The fix tracks the accepted direction in #3130: detect a single direct-child git repo when cwd is outside git, and thread that effective cwd through the status-line git/PR lookups, advisor watchdog prompt, and main system prompt. Conservative trigger, coherent scope (one new (Inline anchors couldn't be flushed as a batched review — one staged comment hit a line outside the diff hunks and the staging surface here is append-only, so the findings live here instead. Sorry for the noise.) Findings, all should-fix / nit:
Open question for the maintainer: the advisor watchdog prompt and the system-prompt block both resolve |
Summary
Fixes #3130
Verification