Repository navigation
LINBEE-30174 | fix: backfill a missed grade at SessionEnd (v1.1.1) - #4
Conversation
…repo yet An interrupted turn never fires Stop, so the grade was lost while SessionEnd still sent its tokens event (seen live on a customer org). SessionEnd now sends any unsent decision, tagged backfill=session_end. vseen is recorded only once the repo resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Multi-repository backfills can report incorrect repository identity and grading-token metadata.
1 open finding
What changed in this PR
Adds SessionEnd recovery for effort decisions missed by interrupted turns and updates the plugin release metadata.
Changes:
- Backfills unsent decisions during SessionEnd.
- Delays
vseenrecording until repository resolution. - Bumps the plugin version to 1.1.1.
| File | Description |
|---|---|
plugins/agentic-advisor/README.md |
Documents SessionEnd backfills. |
plugins/agentic-advisor/hooks/agentic-advisor-report.sh |
Implements decision backfilling. |
plugins/agentic-advisor/.claude-plugin/plugin.json |
Bumps plugin version. |
.claude-plugin/marketplace.json |
Updates marketplace versions. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
✨ PR Review
The hook changes are a focused, well-reasoned fix for the "grade lost on interrupted turn" problem: moving the vseen write to after repo_url resolution and refactoring the decision-reporting loop into a reusable function that also runs on SessionEnd (tagged backfill=session_end) looks correct and consistent with the surrounding dedup logic. The main concern is that the ticket this PR is meant to close specifies a different/additional approach that isn't reflected in the diff.
1 issues detected:
🎯 Scope - The implementation diverges from the ticket's specified technical direction and leaves one of the two required findings (phase-2 correction dedup) unaddressed.
Details: The linked ticket explicitly directs reporting the decision on the first PreToolUse after the verdict (keeping Stop as fallback) to fix the "grade lost mid-response" issue, and separately requires adding a stable session key + per-session sequence number so consumers can dedupe preliminary vs. corrected grades (finding #2). This PR instead implements a SessionEnd-based backfill for the missed-grade case and does not address the session-key/sequence-number requirement for the double-counting issue at all.
File: plugins/agentic-advisor/hooks/agentic-advisor-report.sh (320-366)
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
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 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re gitStream's scope note (vs LINBEE-30174's suggested first-PreToolUse approach): deliberate. Backfilling unsent decisions at SessionEnd recovers the lost grade with no extra hook on every tool call, and it was verified to reproduce and fix the exact customer case (tokens arrived, decision didn't). The ticket's second part — a session key/sequence to dedupe preliminary vs phase-2-corrected grades — is not addressed here and stays open on LINBEE-30174. |

Interrupted turns never fire Stop, so the grade was lost while SessionEnd still sent tokens (seen on a customer org); SessionEnd now backfills unsent decisions (tagged
backfill=session_end) andvseenis recorded only after the repo resolves. Tests: new backfill_test 4/4 (old reporter fails 2), all existing suites green.🤖 Generated with Claude Code
✨ PR Description
Purpose: Update the agentic-advisor plugin to backfill missed grade decisions during the SessionEnd event.
Main changes:
report_decisionsto allow execution during both Stop and SessionEndbackfill: session_endtag to DECISION events triggered during session terminationGenerated 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