Fix scoped repaired promotion source root#131
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e827b5a26a
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for ancestor in (runs_dir, *runs_dir.parents): | ||
| if ancestor.name == "runs": | ||
| return ancestor.parent |
There was a problem hiding this comment.
Reject repaired paths outside current run scope
When executing a scoped run such as plan.runs_dir = /repo/runs/current, a stale approval path like runs/other/repaired_materialized_candidate_specs/foo.yaml now passes product_candidate_promotion_is_repaired_materialized_path and this returns /repo as the copy root, so Git Service will copy /repo/runs/other/... into the review worktree. The existing source-ref checks constrain approval source artifacts to plan_runs_dir, but they do not constrain promotion_request.paths, so this can promote another run/workspace's repaired file instead of failing closed.
Useful? React with 👍 / 👎.
Summary
runs/<workspace>/repaired_materialized_candidate_specs.Motivation
A real
hosted-operation-canarypromotion review reached worktree preparation but could not find approved repaired files because the wrapper used the workspacerunsdirectory as the source root.Goals
Changes
runs/<workspace>/....runsdirectory.Validation
Commands run:
Results:
Risks / Notes
Checklist