Repository navigation
fix(freshness): calibrate prompt by severity so Check Freshness surfaces findings again - #2074
Merged
Merged
Conversation
The 08-25 release (bundled prompt tightening) shifted checkFreshness to 'prefer reporting NOTHING over a speculative one', which suppressed essentially all findings — the LLM returned 0 raw findings even with grounding present, so the admin action appeared to 'return nothing'. Recalibrate PRECISION by severity: keep High/Medium strict (confidence- first, prefer omitting speculative ones) but treat Low as ADVISORY so cosmetic/dated-style staleness surfaces instead of an empty report. All other guardrails (CONTEXT, OUTPUT vs CODE, RESPECT INTENT, SAP CONVENTIONS, SCOPE) are unchanged. DEV A/B (real grounding, claude-4.6-sonnet): tutorials that returned 0 under the tightened prompt now return 1-3 findings (mix of Medium + Low), including a genuinely useful Medium. Updates the prompt-guard unit test to assert the new severity-calibrated intent.
This was referenced Aug 28, 2026
Merged
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.
Problem
The Check Freshness admin action "returns nothing" — pressing it produces a
DONEreport with 0 findings even though the LLM runs and consumes tokens.Root cause (diagnosed on DEV)
The 08-25 release (#2038) bundled a prompt rewrite in
srv/lib/freshness-detector.js(commits8ff849c8+a3f7eb5c) that shifted the system prompt to "prefer reporting NOTHING over a speculative one." This over-suppressed findings.Verified with a controlled A/B on DEV (same tutorial, same grounding, same model/deployment):
cap-self-contained-dev-envRuled out: the action handler, source markdown (
ContentCurrent.sourceContentpopulated), corpus embeddings (ApiDocs 60/60, Samples 311/311), grounding (12 hits), and thestepReffinding-filter (LLM returned 0 before filtering).Fix
Recalibrate PRECISION by severity:
Validation (DEV, real grounding, claude-4.6-sonnet)
The Medium ("JSON_TABLE defines a redundant LOCATION column") is genuinely actionable.
Tests
test/unit/freshness-prompt-guard.test.jsto assert the new severity-calibrated intent.