From 4cd252c797101e3a035c17cb626408c13d9896a7 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 8 Nov 2026 18:55:36 -0700 Subject: [PATCH] fix(code-review): document the save directory and make its recovery repeatable code-review saves its reads with vetted-op-read --save but never said what to do when --save refuses for a missing .vetted-ops-save marker. The documented recovery used a plain mkdir, which fails when saved/ exists and only the marker is gone, so the touch never ran. Use mkdir -p, and note that a symlinked saved stays unusable. Generated-by: Claude Opus 5 --- .../magpie-pr-management/skills/code-review/SKILL.md | 2 +- .../skills/code-review/prerequisites.md | 11 +++++++++++ .../skills/pr-triage/prerequisites.md | 4 +++- plugins/magpie-vetted-ops/tools/vetted-ops/README.md | 2 +- tools/vetted-ops/README.md | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/plugins/magpie-pr-management/skills/code-review/SKILL.md b/plugins/magpie-pr-management/skills/code-review/SKILL.md index 866b27520..efd6aec9d 100644 --- a/plugins/magpie-pr-management/skills/code-review/SKILL.md +++ b/plugins/magpie-pr-management/skills/code-review/SKILL.md @@ -22,7 +22,7 @@ when_to_use: | produced reviewable PRs; skip when triage has not engaged the PR. argument-hint: "[pr:N] [area:LBL] [collab:true|false] [team:NAME] [ready] [dry-run]" capability: capability:review -surface_hash: sha256:97ef701d93960492 +surface_hash: sha256:871da2459ce53192 license: Apache-2.0 measured_tokens: 4119 --- diff --git a/plugins/magpie-pr-management/skills/code-review/prerequisites.md b/plugins/magpie-pr-management/skills/code-review/prerequisites.md index 0978a50c5..c1b0d05d9 100644 --- a/plugins/magpie-pr-management/skills/code-review/prerequisites.md +++ b/plugins/magpie-pr-management/skills/code-review/prerequisites.md @@ -44,6 +44,17 @@ this check says so. If `gh auth status` fails entirely, surface it and ask the maintainer to run `gh auth login`. Do not proceed. +### A save directory for the reads + +Every saved read goes through `vetted-op-read --save`, which writes only into a `saved/` directory under the vetted-ops workspace that holds a `.vetted-ops-save` marker. It creates neither. +If a save refuses with *"holds no .vetted-ops-save file"* or *"is unusable"*, at any point in the run, ask the maintainer to create them (the workspace path is in the refusal): + +```bash +mkdir -p -m 700 /saved && touch /saved/.vetted-ops-save +``` + +A `saved` that is a symlink stays unusable: `--save` refuses it, so replace it with a real directory first. + --- ## 2. Resolve adversarial-reviewer configuration (DEGRADES) diff --git a/plugins/magpie-pr-management/skills/pr-triage/prerequisites.md b/plugins/magpie-pr-management/skills/pr-triage/prerequisites.md index b7a8fe2f1..dc3fe2dd2 100644 --- a/plugins/magpie-pr-management/skills/pr-triage/prerequisites.md +++ b/plugins/magpie-pr-management/skills/pr-triage/prerequisites.md @@ -85,9 +85,11 @@ Every read in this skill is saved with `vetted-op-read --save`, which writes onl If the first save refuses with *"holds no .vetted-ops-save file"* or *"is unusable"*, ask the maintainer to create it once (the workspace path is in the refusal): ```bash -mkdir -m 700 /saved && touch /saved/.vetted-ops-save +mkdir -p -m 700 /saved && touch /saved/.vetted-ops-save ``` +A `saved` that is a symlink stays unusable: `--save` refuses it, so replace it with a real directory first. + --- ## 2–3. Viewer permission and the triage labels diff --git a/plugins/magpie-vetted-ops/tools/vetted-ops/README.md b/plugins/magpie-vetted-ops/tools/vetted-ops/README.md index 16e5fd2fd..284b1e6e4 100644 --- a/plugins/magpie-vetted-ops/tools/vetted-ops/README.md +++ b/plugins/magpie-vetted-ops/tools/vetted-ops/README.md @@ -430,7 +430,7 @@ kilobytes — which a deterministic tool then reads from the file. inside its own writable roots, could already write there. Create them once: ```bash - mkdir -m 700 /saved && touch /saved/.vetted-ops-save + mkdir -p -m 700 /saved && touch /saved/.vetted-ops-save ``` - The workspace passes the same ownership and mode checks as for body files; diff --git a/tools/vetted-ops/README.md b/tools/vetted-ops/README.md index f39edfc44..afd5cca1b 100644 --- a/tools/vetted-ops/README.md +++ b/tools/vetted-ops/README.md @@ -430,7 +430,7 @@ kilobytes — which a deterministic tool then reads from the file. inside its own writable roots, could already write there. Create them once: ```bash - mkdir -m 700 /saved && touch /saved/.vetted-ops-save + mkdir -p -m 700 /saved && touch /saved/.vetted-ops-save ``` - The workspace passes the same ownership and mode checks as for body files;