Skip to content

LINBEE-30104 | fix: per-repo verdict gate, stage-2 hold, sandbox-safe verdict cache (v1.5.3) - #28

Merged
nivSwisa1 merged 3 commits into
mainfrom
LINBEE-30104-stage2-verdict
Nov 26, 2026
Merged

nivSwisa1 merged 3 commits into
mainfrom
LINBEE-30104-stage2-verdict

Conversation

@nivSwisa1

@nivSwisa1 nivSwisa1 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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

… verdict cache

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 08:16

@orca-security-us orca-security-us Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed OSS Licenses high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The hook can release edits based on another repository’s verdict or phase-2 result and unnecessarily blocks low-effort edits with supported legacy LOW verdicts.

4 open issues

Review effort: Balanced

@MishaKav MishaKav left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

…on't skip stage 2; owner-checked cache fallback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 08:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@nivSwisa1
nivSwisa1 merged commit 36996dd into main Nov 26, 2026
15 of 16 checks passed
@nivSwisa1
nivSwisa1 deleted the LINBEE-30104-stage2-verdict branch November 26, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants