Skip to content

LINBEE-30174 | fix: no prompt nudge on auto-fix or after the skill ran (v1.4.1) - #18

Merged
nivSwisa1 merged 5 commits into
mainfrom
LINBEE-30174-autofix-nudge
Oct 15, 2026
Merged

nivSwisa1 merged 5 commits into
mainfrom
LINBEE-30174-autofix-nudge

Conversation

@nivSwisa1

@nivSwisa1 nivSwisa1 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

"turn on auto-fix" tripped the "fix" keyword and nudged a session that was already graded; now auto-fix/autofix is ignored and prompts aren't nudged once the skill ran.

🤖 Generated with Claude Code

✨ PR Description

Purpose: Prevent redundant or false-positive prompt nudges by refining code-task detection and tracking graded repositories.

Main changes:

  • Updated keyword detection to ignore "auto-fix" variations using sed-based filtering in trigger script.
  • Implemented repo-specific marker logic to suppress nudges after a skill verdict is issued.
  • Added test cases for autofix-filtering and repository-scoped status tracking in hooks_test.sh.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:21

@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

@gitstream-cm gitstream-cm 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.

✨ PR Review

The shell fix for the false "auto-fix" nudge and skip-after-skill-ran logic looks correct and minimal. However, the PR's ticket reference points to a sub-task about telemetry decision reporting (PreToolUse reporting + session dedup), which has no relation to this nudge-keyword fix, suggesting a ticket/scope mismatch.

1 issues detected:

🎯 Scope - PR implementation does not address the linked ticket's requirements (verdict reporting on PreToolUse, session dedup).

Details: The PR is tagged with LINBEE-30174, whose linked ticket describes reporting the grade on the first PreToolUse after the verdict and deduplicating preliminary/corrected grades via a session key. The actual diff only fixes a UserPromptSubmit nudge false-positive on "auto-fix" and skips nudging after the skill has run — unrelated functionality to the ticket's stated requirements.

File: plugins/agentic-advisor/hooks/agentic-advisor-trigger.sh (126-140)

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

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

The session-wide skill check incorrectly suppresses grading when switching repositories.

1 open finding
What changed in this PR

Prevents false advisor nudges after auto-fix mentions or prior skill execution.

Changes:

  • Excludes auto-fix/autofix from keyword detection.
  • Suppresses prompts after skill execution.
  • Adds regression tests and bumps version to 1.4.1.
File Description
tests/​agentic-advisor/​hooks_test.sh Adds prompt-trigger regression tests.
plugins/​agentic-advisor/​hooks/​agentic-advisor-trigger.sh Updates nudge suppression logic.
plugins/​agentic-advisor/​CHANGELOG.md Documents the fix.
plugins/​agentic-advisor/​.claude-plugin/​plugin.json Bumps plugin version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread plugins/agentic-advisor/hooks/agentic-advisor-trigger.sh Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:29

@gitstream-cm gitstream-cm 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.

✨ PR Review

The fix narrows the "fix" keyword trigger to avoid matching auto-fix variants and adds an early-exit when the skill already ran, writing a done marker so other repo nudges aren't skipped. The core logic looks reasonable; a couple of readability/maintainability points are worth a second look.

2 issues detected:

🧾 Readability - Combining text normalization and keyword matching in one dense pipeline reduces clarity and maintainability. 🛠️

Details: The Tier 2 keyword check now chains a sed substitution and a grep in a single conditional expression, making the matching logic harder to follow and modify (e.g. extending the auto-fix exclusion list or adding more keyword variants).

File: plugins/agentic-advisor/hooks/agentic-advisor-trigger.sh (136-136)

🛠️ A suggested code correction is included in the review comments.

🧹 Maintainability - Relying on an implicit side-effect variable from set_marker to immediately re-write the same marker file is fragile and unclear.

Details: set_marker "$dir" is called and then the code manually truncates/creates "$marker" immediately after. If set_marker already performs an equivalent write as part of its implementation, this extra line is redundant and could mask double-write assumptions as the code evolves; if it doesn't, the dependency on an externally-defined $marker variable set as a side effect of set_marker is implicit and easy to break.

File: plugins/agentic-advisor/hooks/agentic-advisor-trigger.sh (200-200)

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

# Tier 1: Jira ticket (primary).
msg="This looks like the start of a repo-scoped code task (Jira ticket ${ticket} referenced). ${guidance}"
elif printf '%s' "$prompt" | grep -qiE '\b(fix|fixes|fixing|fixed|implement|implementing|refactor|refactoring|hotfix|bug ?fix|debug|patch|endpoint|migration)\b'; then
elif printf '%s' "$prompt" | sed -E 's/[Aa][Uu][Tt][Oo][- ]?[Ff][Ii][Xx]//g' | grep -qiE '\b(fix|fixes|fixing|fixed|implement|implementing|refactor|refactoring|hotfix|bug ?fix|debug|patch|endpoint|migration)\b'; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧾 Readability - Complex Inline Pipeline: Extract the sed-stripped prompt into an intermediate variable before running the grep check, improving readability and making future keyword additions easier to review.

Suggested change
elif printf '%s' "$prompt" | sed -E 's/[Aa][Uu][Tt][Oo][- ]?[Ff][Ii][Xx]//g' | grep -qiE '\b(fix|fixes|fixing|fixed|implement|implementing|refactor|refactoring|hotfix|bug ?fix|debug|patch|endpoint|migration)\b'; then
elif stripped_prompt=$(printf '%s' "$prompt" | sed -E 's/[Aa][Uu][Tt][Oo][- ]?[Ff][Ii][Xx]//g') && printf '%s' "$stripped_prompt" | grep -qiE '\b(fix|fixes|fixing|fixed|implement|implementing|refactor|refactoring|hotfix|bug ?fix|debug|patch|endpoint|migration)\b'; then
Is this review accurate? Use 👍 or 👎 to rate it

If you want to tell us more, use /gs feedback e.g. /gs feedback this review doesn't make sense, I disagree, and it keeps repeating over and over

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Skipping: style only, and the pipeline is a one-liner that matches the surrounding code.

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

The session-wide skill check can incorrectly mark an ungraded second repository as handled.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread plugins/agentic-advisor/hooks/agentic-advisor-trigger.sh Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:37

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 and raw transcript scanning can incorrectly suppress or repeat nudges.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread plugins/agentic-advisor/hooks/agentic-advisor-trigger.sh Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:44
@gitstream-cm

gitstream-cm Bot commented Oct 14, 2026

Copy link
Copy Markdown

🚦 Automatic AI Review skipped

This pull request has used all 3 of its automatic AI Reviews.

✨ Comment /gs review to run one now.
No arguments needed. It uses the same settings as your automatic reviews: gitStream Settings in Managed Mode, your CM files in Self-Managed.

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

Cross-repository edits can bypass grading, and unstructured transcript matching can falsely mark repositories handled.

0 open findings

1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Unconditional exit bypasses per-repository grade hold

plugins/​agentic-advisor/​hooks/​agentic-advisor-trigger.sh:208

This exit 0 is reached after any advisor Skill call in the session, even when neither candidate name matched a verdict. As a result, after grading repo A, the first source edit in repo B is allowed instead of hitting the per-repo grade-before-work hold; the new other-repo test checks only the later prompt and misses this bypass. Exit only on a matching verdict and otherwise fall through to the existing .held logic.

This issue also appears on line 205 of the same file.

🧠 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.

LGTM

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 09:52
@nivSwisa1
nivSwisa1 merged commit 6064739 into main Oct 15, 2026
18 checks passed
@nivSwisa1
nivSwisa1 deleted the LINBEE-30174-autofix-nudge branch October 15, 2026 09:54

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

Raw transcript matching can mistake documentation examples for completed grades and suppress nudges in ungraded repositories.

1 open finding

🧠 Review effort: Balanced

# The verdict uses the repo's name: check the remote's name and the folder's (clones and worktrees can differ).
url="$(git -C "$dir" config --get remote.origin.url 2>/dev/null)"; url="${url%.git}"
for name in "${url##*[/:]}" "$(basename "$(git -C "$dir" rev-parse --show-toplevel 2>/dev/null)")"; do
[ -n "$name" ] && grep -qF "LinearB: $name " "$transcript" 2>/dev/null && { : > "$marker" 2>/dev/null || true; break; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants