Repository navigation
feat(vetted-ops): save large reads to the workspace, and add the pr-management reads - #1570
Merged
Merged
Conversation
…anagement reads `vetted-op-read --save NAME` writes a read operation's output to `<workspace>/saved/NAME` and prints one JSON line, so a sweep's pages reach a deterministic tool without passing through the agent's context. Writes and procedures refuse it. Because `vetted-op-read` runs outside the sandbox and `--config` can name a policy the agent wrote, `--save` only writes into a `<workspace>/saved/` directory that already exists and holds a `.vetted-ops-save` marker — it creates neither, so it never reaches a directory the caller could not already write. The output is written to an exclusive temporary file and renamed into place, so a planted symlink or hard link is replaced rather than written through. New read operations cover what pr-management-triage and pr-management-stats compute on: the open / label / author / review-requested triage sweeps and one PR in a single TriagePR shape (all pages), the triage pre-flight (viewer permission and labels), the recent main-branch failures, the action_required run index, a head's workflow runs and check runs, commits-behind, the committers-team roster, and the stats open / closed reads. Each search is built with `repo:<upstream>` from policy first. Generated-by: Claude Opus 5
potiuk
added this pull request to stack #1573
October 9, 2026 18:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vetted-op-read --save NAMEwrites a read's output to<workspace>/saved/NAMEand prints one JSON line, so large reads (a whole PR sweep) reach a deterministic tool instead of the agent's context.pr-management-triageandpr-management-statscompute on: triage sweeps in oneTriagePRshape (open / label / author / review-requested / one PR, all pages), triage pre-flight, recent main-branch failures, theaction_requiredindex, runs and check runs at a head, commits-behind, team members, and the stats open / closed reads.Security notes
vetted-op-readruns outside the sandbox, and--configcan name a policy the agent wrote, so the policy'sworkspaceproves nothing.--savetherefore:saved/directory that already exists and holds a.vetted-ops-savemarker — it creates neither, so it can never write where the caller could not already write;Every search string is built with
repo:<upstream>from policy first; parameters only narrow it. Tests cover marker absence, symlinked dir / marker / target, hard links, open workspaces, write ops and failed reads.One-time setup per machine:
mkdir -m 700 <workspace>/saved && touch <workspace>/saved/.vetted-ops-save.Type of change
tools/*/withpyproject.toml)Test plan
prek run --all-filespasses (whole tree, at the top of the stack)uv run pytest/ruff check/mypyfortools/vetted-opsRFC-AI-0004 compliance
Was generative AI tooling used to co-author this PR?
Generated-by:.🤖 Generated with Claude Code
https://claude.ai/code/session_01FTTd3HMcMsj7FwkhPPQcSx