Repository navigation
LINBEE-30104 | fix: keep the repo-health cache per LinearB environment - #19
Conversation
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.
✨ PR Review
The PR scopes the repo-health cache key by LINEARB_API_URL for non-prod environments and bumps the plugin version. The logic is sound, but there are minor concerns around the changelog and URL normalization. The PR is unrelated to the linked ticket's scoped-token work.
2 issues detected:
🧹 Maintainability - The changelog has no 1.4.1 entry between 1.4.0 and 1.4.2.
Details: The changelog jumps from 1.4.0 to 1.4.2 with no 1.4.1 entry. The PR says it should merge after #18 (1.4.1), so the 1.4.1 entry is expected to arrive with that PR. If merge order changes, or #18 does not add its own entry, the changelog will have a gap and a possible conflict.
File: plugins/agentic-advisor/CHANGELOG.md (3-7)
🐞 Bug - URL normalization is limited to stripping a trailing slash, so equivalent URLs yield different cache keys. 🛠️
Details: Only a trailing slash is stripped from the API URL before it is compared to the prod default. Case differences in the host, or an http:// prefix, produce a different key for the same environment. The same environment may then be cached under multiple keys, and a prod URL written with different casing gets a non-prod key. This only causes cache misses, never cross-environment reuse.
File: plugins/agentic-advisor/skills/agentic-advisor/SKILL.md (53-53)
🛠️ A suggested code correction is included in the review comments.
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
| root="$(git -C "<cwd>" rev-parse --show-toplevel)"; h="$(printf '%s' "$root" | { if command -v shasum >/dev/null 2>&1; then shasum; else sha1sum; fi; } | cut -c1-12)" | ||
| # repo-hash = first 12 chars of the sha1 (shasum on macOS, sha1sum on Linux) of the repo root, plus the API URL | ||
| # when it isn't the prod default, so grades from different LinearB environments never mix | ||
| root="$(git -C "<cwd>" rev-parse --show-toplevel)"; api="${LINEARB_API_URL:-https://public-api.linearb.io}"; api="${api%/}" |
There was a problem hiding this comment.
🐞 Bug - Incomplete URL Normalization: Lowercase the URL before comparing and hashing, for example api="$(printf '%s' "${api%/}" | tr '[:upper:]' '[:lower:]')".
| root="$(git -C "<cwd>" rev-parse --show-toplevel)"; api="${LINEARB_API_URL:-https://public-api.linearb.io}"; api="${api%/}" | |
| root="$(git -C "<cwd>" rev-parse --show-toplevel)"; api="${LINEARB_API_URL:-https://public-api.linearb.io}"; api="$(printf '%s' "${api%/}" | tr '[:upper:]' '[:lower:]')" |
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
There was a problem hiding this comment.
Skipping: a differently-cased URL only gets its own cache entry, which is the safe direction (an extra fresh grade, never a wrong reuse).
There was a problem hiding this comment.
🟡 Changes recommended
Legacy non-production cache entries can still be reused as production verdicts after upgrading.
1 open finding
What changed in this PR
Scopes the agentic-advisor’s repo-health cache by LinearB environment while preserving the production cache key.
Changes:
- Includes non-default API URLs in cache keys and restricts in-session reuse.
- Documents the fix and bumps the plugin to 1.4.2.
| File | Description |
|---|---|
| plugins/agentic-advisor/skills/agentic-advisor/SKILL.md | Updates cache keys and reuse instructions. |
| plugins/agentic-advisor/CHANGELOG.md | Records the environment-specific cache fix. |
| plugins/agentic-advisor/.claude-plugin/plugin.json | Bumps the version to 1.4.2. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # repo-hash = first 12 chars of the sha1 (shasum on macOS, sha1sum on Linux) of the repo root, plus the API URL | ||
| # when it isn't the prod default, so grades from different LinearB environments never mix | ||
| root="$(git -C "<cwd>" rev-parse --show-toplevel)"; api="${LINEARB_API_URL:-https://public-api.linearb.io}"; api="${api%/}" | ||
| key="$root"; [ "$api" = "https://public-api.linearb.io" ] || key="$root|$api" |
There was a problem hiding this comment.
Accepting this edge: it needs a non-default LINEARB_API_URL used before the upgrade and a switch back to prod within 24h, and the cost is one stale repo-health grade (task and file axes are always fresh). Invalidating every prod cache to close it costs all users a re-grade.

The 24h repo-health cache key now includes
LINEARB_API_URLwhen it is not the prod default, so a grade from one LinearB environment is never reused for another; prod cache entries keep their old key (follow-up to Copilot on lb-claude-plugins#130). Bumps to 1.4.2: merge after #18 (1.4.1).🤖 Generated with Claude Code
✨ PR Description
Purpose: Ensure repo-health cache isolation between different LinearB environments by incorporating the API URL into the cache key.
Main changes:
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