Fix what the model is told (review, area 1a) - #303
Merged
Merged
Conversation
- A handoff's seeded data now carries the rules and instructions the summary was written under. The chat model reads the same data for every follow-up, and without them answered from the input that once produced "12 significant out of 1280". One function, summary_instruction, now builds them for the endpoint and the seed. - "Every one of them is significant" is said only when it is true. When the count is inexact for another reason, a neutral instruction says the overall count cannot be determined. - A temporary fetch failure at claim time is no longer reported to the model as the result having been deleted. - Summaries choose their model the way the chat does: config.yml's llm block and resolve_temperature. Fixed-temperature models rejected 0.0, failing every summary while the chat worked. Content-block chunks are read, and a stream that yields no text is a failure, not 'summarised'. - Concurrent requests for one summary wait for the first and reuse it; a stored summary is never overwritten; an aggregate fallback reuses a stored aggregate summary. A reader could be served, on reload or in Continue in chat, a summary they were never shown. Co-Authored-By: Claude Opus 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.
This is the third group of fixes from the max-level code review of
src/apiandsrc/handoff.summary_instruction()andDATA_RULESlive insummarise.py. The endpoint and the seed both use them.UNKNOWN_COUNT_INSTRUCTION.config.yml'sllm:block and the temperature rules, so fixed-temperature models failed every summary. Content blocks were dropped, and the stream still reportedsummarised._summary_llm()resolves the model the way the chat does._text()reads content blocks. An empty stream is a failure.Verified
./checks.shpasses.Also removes
new_thread_id, which nothing called.🤖 Generated with Claude Code