Repository navigation
LINBEE-30104 | fix: per-repo verdict gate, stage-2 hold, sandbox-safe verdict cache (v1.5.3) - #28
Merged
Merged
Conversation
… verdict cache Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| OSS Licenses | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
There was a problem hiding this comment.
🟡 Changes recommended
Repository matching can release edits based on another repository’s results, while unsafe cache temporary files allow a local user to cause symlink-based file truncation.
4 open issues
What changed in this PR
This PR updates Agentic Advisor to v1.5.3, improving repository-scoped edit gating, phase-2 reporting, and verdict-cache behavior in sandboxed sessions.
Changes:
- Adds repository-aware verdict matching and bounded phase-2 holds for medium-or-higher grades.
- Displays verdict and phase-2 lines from actual Bash output, preserving apostrophes.
- Documents a sandbox-compatible cache fallback and adds regression coverage.
| File | Description |
|---|---|
tests/agentic-advisor/hooks_test.sh |
Adds multi-repository, phase-2 hold, and printed-output coverage. |
plugins/agentic-advisor/skills/agentic-advisor/SKILL.md |
Updates cache fallback instructions and phase-2 reporting guidance. |
plugins/agentic-advisor/hooks/agentic-advisor-trigger.sh |
Implements repository-aware gating, phase-2 holds, and output-based messages. |
plugins/agentic-advisor/CHANGELOG.md |
Documents the v1.5.3 fixes. |
plugins/agentic-advisor/.claude-plugin/plugin.json |
Bumps the plugin version to 1.5.3. |
Review effort: Balanced
Comment on lines
+87
to
+94
| jq -rs --arg any "$VERDICT_RE" --arg re "$GRADED_RE" --arg names "${1:-}" ' | ||
| [.[] | select(.message.role? == "assistant") | .message.content? // [] | .[]? | ||
| | if .type? == "text" then (.text? // "") | split("\n")[] | ||
| elif (.type? == "tool_use" and .name? == "Bash") then (.input.command? // "") | split("\n")[] | ||
| | select(test("(^|;|&&)\\s*printf\\s")) else empty end] as $t | ||
| | [$names | split("\n")[] | select(length > 0)] as $ns | ||
| | [$t | to_entries[] | select((.value | test($any)) and (.value as $l | ($ns | length) == 0 or any($ns[]; | ||
| . as $n | $l | contains("LinearB: " + $n + " ") or (test("LinearB: [^ ]+/") and contains("/" + $n + " ")))))] as $v |
Comment on lines
+110
to
+112
| [ "$t" = "$(basename "$file_path")" ] || [ -e "$root/$t" ] && return 0 | ||
| while IFS= read -r n; do [ -n "$n" ] && case "$t" in "$n"|"$n"/*) return 0 ;; esac; done <<<"$names" | ||
| [ -n "$(git -C "$root" ls-files -- ":(glob)**/$t" 2>/dev/null | head -n 1)" ] && return 0 |
| f="${XDG_CACHE_HOME:-$HOME/.cache}/agentic-advisor/verdicts/$h.json" # private per-user dir, not shared /tmp | ||
| d="${XDG_CACHE_HOME:-$HOME/.cache}/agentic-advisor/verdicts" # private per-user dir | ||
| # Claude Code's sandbox blocks writes to ~/.cache ("operation not permitted"); its $TMPDIR is per user and writable | ||
| (umask 077; mkdir -p "$d") 2>/dev/null && ( : > "$d/.w.$$" ) 2>/dev/null && rm -f "$d/.w.$$" || d="${TMPDIR:-/tmp}/agentic-advisor/verdicts" |
…ds; per-user /tmp cache fallback Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on't skip stage 2; owner-checked cache fallback Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved repository-identity matching bugs allow one repository’s verdicts or phase-2 findings to incorrectly release or hold edits in another repository with a shared name or filename.
3 open issues
1 resolved since last review
Review effort: Balanced
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.


Verdicts now gate edits only in the repo they name, medium+ grades hold edits (at most twice) for the phase-2 line, and the 24h verdict cache falls back to $TMPDIR when the sandbox blocks ~/.cache.
🤖 Generated with Claude Code