fix(execute): Phase 7 pins the criteria runner to the working tree, like Phase 4.5
/trekreview passed --cwd and trekexecute Phase 7 did not, so the same criterion could resolve two ways in the two phases (PM checkpoint 2026-09-18, MINOR). It stopped being cosmetic with the refusal list: --cwd is the boundary a write is measured against, so leaving it unset silently moves that boundary to whatever the process cwd happens to be. Both phases now resolve CRITERIA_CWD="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" - one form, with a fallback, so a repo-less checkout falls back instead of passing an empty --cwd. Pinned in tests/lib/doc-consistency.test.mjs. Red first: the new pin failed on both phases before this change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
52b87978cb
commit
e1e7bdfaf1
3 changed files with 29 additions and 2 deletions
|
|
@ -220,8 +220,12 @@ fi
|
|||
# refusal list (writes - push, recursive delete, pipe-to-shell, redirection
|
||||
# outside the working tree) reports REFUSED, and the executor denylist
|
||||
# (catastrophe) reports BLOCKED. Neither is ever run. Foreground only.
|
||||
# The working tree the criteria run in - the same resolution trekexecute
|
||||
# Phase 7 uses, so one criterion cannot resolve two ways in the two phases.
|
||||
CRITERIA_CWD="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
||||
|
||||
node "$VOYAGE_ROOT/lib/verification/criteria-runner.mjs" \
|
||||
--brief "{brief_path}" --evidence --cwd "$(git rev-parse --show-toplevel)"
|
||||
--brief "{brief_path}" --evidence --cwd "$CRITERIA_CWD"
|
||||
```
|
||||
|
||||
Exit 0 means every criterion passed; exit 1 means at least one failed, was
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue