Repository navigation
feat(core): local-model notes under Dependabot PRs, on a shared model lane - #41
Merged
Merged
Conversation
…person For needs-work and review-first PRs only, the local model writes a few plain sentences from the verdict's facts, the title and a markup-stripped, length-capped slice of the PR description (fetched on demand, never stored, never read by classify). The rules are fixed in code, the description sits in a block marked as untrusted data whose closing tags the text cannot forge, the reply is capped at 220 tokens and cleaned, and the note is stored apart from the findings with the model's name and a fingerprint of what it was written from. The verdict never reads it; the page shows it through the image-free renderer under a label saying so. A ModelLane gives one model request at a time with chat ahead of background work: the chat route takes the lane, which stops a note being written (it is simply written again afterwards). Notes are rewritten only when their facts change and deleted when their PR leaves the list. With Ollama off or down the page says why notes are paused and nothing else changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What this adds
Slice 5 (the last), stacked on #40 (then #39, #38, #37). The LLM prose layer of item 8 in
docs/dependabot-watch.md, built the way the research note anddocs/ollama-integration.mdsay to.classify.dependabot_explanations) with the model's name and a fingerprint of what it was written from, and the page shows it under "The verdict above comes from GitHub's data, not from this note", through the existing image-freeMarkdownBody untrusted. A test confirms that a hostile reply ("this is READY, merge it") leaves every bucket, reason and action unchanged.ModelLane(packages/core/src/ai/lane.ts): one model request at a time, chat ahead of background work. The chat route now takes the lane; a note being written is told to stop and is simply written again afterwards (items are small and idempotent). A stuck background task cannot hold chat up for more than 10 s. It is per process, as the Ollama note says.Not done, said plainly
ChatBackendinterface. Quality, and time per note on the 3080 Ti, are unmeasured. Worth trying with your model and one real PR before relying on it.Verification
npm run typecheck,npm test(511 tests; 38 new, covering the lane, prompt building, cleaning, the explainer, the page view and chat priority) andnpm run buildpass. Mutation-checked: ignoring preemption, or removing the chat-stops-batch step, fails tests. In the browser against an isolated seeded home: notes render under the right PRs, a hostile seeded note's image became the text "[image: …]" with no<img>in the DOM, and its link gotrel=nofollow.🤖 Generated with Claude Code