mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-14 15:16:35 +03:00
Keep hook discovery within target repository
Stop manifest discovery at the target repository boundary instead of re-adding an outer workspace root, with regression coverage for nested Git targets. AI assistance disclosure: This commit was prepared with Codex under maintainer direction.
This commit is contained in:
@@ -1315,9 +1315,12 @@ const STOP_REVIEW_PROVIDERS = new Set(['claude-code', 'codex', 'agents', 'grok']
|
||||
|
||||
// Harness project settings are discovered by walking up from the resolved
|
||||
// project root. Its hook manifest can live at an enclosing git root, so
|
||||
// checking only projectRoot/repoRoot produces a false
|
||||
// MANUAL_DETECTOR_REQUIRED directive. Starting from projectRoot also prevents
|
||||
// an explicit target from borrowing an unrelated manifest near the caller.
|
||||
// checking only projectRoot produces a false MANUAL_DETECTOR_REQUIRED
|
||||
// directive. Starting from projectRoot also prevents an explicit target from
|
||||
// borrowing an unrelated manifest near the caller. The walk itself is the
|
||||
// authority: do not append repoRoot afterward, because resolveProject can
|
||||
// retain an outer workspace root for a target inside an independent nested
|
||||
// Git repository.
|
||||
function hookManifestSearchRoots(ctx) {
|
||||
const roots = [];
|
||||
const seen = new Set();
|
||||
@@ -1339,8 +1342,6 @@ function hookManifestSearchRoots(ctx) {
|
||||
current = parent;
|
||||
}
|
||||
|
||||
add(ctx.projectRoot);
|
||||
add(ctx.repoRoot);
|
||||
return roots;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user