Repository navigation
Record the source-list stripper's one measured residual risk - #261
Merged
Merged
Conversation
The website session found that their client-side equivalent truncates mid-stream at a partially typed heading, and recovers only because it recomputes over accumulated text -- once the rest of the heading arrives it stops matching and the answer comes back. Ours cannot recover: it is a state machine, and once it commits to a heading it has already dropped the tokens. That asymmetry leaves one way to lose an answer here that does not exist there: a complete `## Sources` line in the middle of an answer with real prose after it. Measured over six real answers across the reactome and userguide prompts rather than argued about. The heading was `## Sources` every time, last every time, with nothing but list items following. Zero mid-answer occurrences. So the guard is not built. Defending it would mean holding the text after a heading until a list item confirmed the verdict, which is more state than an unobserved failure justifies -- and this file already carries the rule that when in doubt it should not match. What is recorded is the risk, the measurement, and what the fix would be if a mid-answer heading is ever seen. Comment only; no behaviour change, so this needs no deploy. Co-Authored-By: Claude Opus 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.
Comment only, no behaviour change — this needs no deploy.
The website session found that their client-side equivalent truncates mid-stream at a partially typed heading and recovers only because it recomputes over accumulated text: once the rest of the heading arrives it stops matching, so the finished answer is correct and the reader sees at most a flicker on a line that is mid-render anyway.
Ours cannot recover. It is a state machine, and by the time it is wrong it has already dropped the tokens. That asymmetry leaves exactly one way to lose an answer here that does not exist there: a complete
## Sourcesline in the middle of an answer, with real prose after it.Measured rather than argued
Six real answers, spanning the reactome and userguide prompts:
## Sources— six of sixNo mid-answer occurrence at all.
So it is recorded, not built
Defending it would mean holding the text after a heading until a list item confirms the verdict. That is buildable and it is more state than an unobserved failure justifies — and this file already carries the rule that when in doubt it must not match. The comment states the risk, the measurement behind the decision, and what the fix is if a mid-answer heading is ever seen.
🤖 Generated with Claude Code