Repository navigation
fix(audit): keep each AI verdict by its input so an unchanged page keeps its score (00430) - #1919
Merged
Merged
Conversation
…eps its score (00430) Site Audit judged its 13 AI signals again on every audit, with a preview model and no temperature, so an unchanged page's score moved 2-3 points. A failed AI call turned all 13 signals n/a and re-normalised the score without saying so. - Pin the model: the default is google/gemini-3.8-flash, a stable, versioned id, called at temperature 0 with a fixed seed. .env.example and the self-host env reference ask for a pinned id; an alias in AUDIT_LLM_MODEL logs a warning once. - Keep every verdict in site_audit_llm_verdicts (00430, service role only) by the hash of the input its signal reads, the signal, the model and the prompt version. The signals read one of two views of the page: the opening (title and first 2,000 characters) or the text (first 8,000 characters and word count), one call per view to judge. An unchanged page makes no AI call; a changed one is judged again only on the signals whose view changed. Verdicts no audit read for 180 days are pruned by the daily run. - A failed call keeps the verdicts of the page's latest complete audit. With none, the audit is marked partial (site_audits.partial, 00430) and is kept out of the comparisons: the Pages list's score, previous score and trend, the hub trend, the report's change badge, the report snapshot and the Action Center's fix recheck. Its report says the AI checks couldn't run. - Help: "Read a site audit report" gets "Same page, same score". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This was referenced Nov 1, 2026
Merged
# Conflicts: # supabase/schema.sql
Merged
8 of 13 tasks
gkhngyk
pushed a commit
that referenced
this pull request
Nov 5, 2026
…mer priorities item 1) (#2131) Customer priorities plan, item 1, part 2 (part 1: #1919). A Site Audit score now shows its range, such as "64 ± 2". It's worked out from the page's latest 5 complete audits: half the gap between the lowest and highest score, in whole points, rounded up. It shows from 3 audits. Partial audits aren't counted. The rule sits in SCORE_RANGE (web/src/lib/audit/score-range.ts). - Report: the gauge reads "64 ± 2", and a line beside it gives the lowest and highest score. GET /api/audits/:id sends the page's trend up to the audit (pageTrend) from the history it already reads, so there's no new query. findPreviousCompletedAudit and pageTrendUpTo share one walk of that history. - Pages tab: "± 2" after the current score, from the row's trend, with the same sentence on hover and for screen readers. - Pages export: a last column, score_range. - Help: "Read a site audit report" gets "Score range"; the overview article mentions it on the Pages tab and in the export. approved-articles.json refreshed. docs/guides/site-audit.mdx updated. Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9 Co-authored-by: Claude <[email protected]>
Merged
9 of 13 tasks
gkhngyk
pushed a commit
that referenced
this pull request
Nov 6, 2026
… of the score (SA-010) Site Audit spec §6.2, SA-010 (fixes F8): each of the 48 signals now carries an evidence level from the spec's research (§3): Strong evidence, Likely helps, or Hygiene / informational. llms.txt presence is informational: it is still checked and shown, with a short evidence note, but it no longer counts toward the Trust category or the total. The report shows the level in place of the old high / medium / standard tier, and a Formula panel beside Category breakdown publishes the category weights, how a category adds up its signals, what each level means and what is left out of the score. Rubric v1.2. The AI verdicts' prompt version stays "v1.1/2" rather than following the rubric version, so every verdict kept by #1919 is read as before and no page is judged again: only llms.txt's weight moves scores. Help: Read a site audit report (levels, Formula, llms.txt, when the scoring changes); the docs guide; a What's new entry for approval. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
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.
Summary
A Site Audit of an unchanged page could move 2–3 points between runs, enough to flip a signal between pass and fail. The cause: the 13 AI-judged signals were judged again on every audit, by a preview model, at the model's default sampling. This PR keeps each AI verdict by what it was judged from, so an unchanged page keeps its score. Customer priorities plan, P0 item 1.
What changes
AUDIT_LLM_MODELis nowgoogle/gemini-3.8-flash, a versioned, stable model.temperature: 0and a fixed seed.server/.env.exampleanddocs/self-host/env-variables.mdxask for a pinned id.site_audit_llm_verdicts, service role only, RLS on):direct-answerandbluf-answer, and the body (first 8,000 characters + word count) for the other 11.site_audit_llm_verdicts_prune).partial(00430 addssite_audits.partial), and the score leaves those signals out.audit-recheck, wherenaread as "the fix held").approved-articles.jsonrefreshed).Owner decision (2026-11-01): keep the pinned stable model even though it costs more than the preview (input $0.75 / output $3.75 per million tokens, vs $0.50 / $3; it doubles in 2027). The cache removes the call for unchanged pages.
For @gkhngyk (prod)
AUDIT_LLM_MODELon prod to the pinned id, or remove it so the new default applies. Otherwise the preview model stays.temperature: 0. Google recommends leaving Gemini 3 at 1.0 and warns that lower values can loop or hurt quality. If it shows, raise it and bump the prompt version.Next: "A partial audit uses no credit" is stacked on this PR (owner decision 2026-11-01).
Related issue
None. Customer priorities plan, P0 item 1 (score stability).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
llm-verdicts,history, the route,audit-recheckand the report component.Checked in the browser at 1024px, light and dark: the partial note on a report. The user approved the screen.
Checklist
yarn lintpasses (0 errors; 7 old warnings in files this PR doesn't touch)yarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)supabase/schema.sqlrebuiltFull checks on this branch (dc9a9ca): web and server suites,
yarn build, format and lint all pass. Built on bf707cb; it merges cleanly with current main.🤖 Generated with Claude Code