RE: fix brittle byte-window test for diagram render-failure fallback - #116
Merged
Merged
Conversation
test_a_render_failure_degrades_the_answer_not_the_whole_message asserted
"catch" within a fixed byte distance of f.value.mermaid in
_renderEnvelopeMarkdown (index.html) -- widened once already (2026-09-08)
when the success branch grew a perspective note, and drifted past the new
window again after this week's "found by" rename (RULING-WHAT-A-VERDICT-
IS-ABOUT.md), which is unrelated to the guarantee the test exists to pin.
The comment already said the guarantee is ordering, not a specific byte
distance -- the assertion just didn't match it. Brace-match the try{}
immediately after f.value.mermaid and check its own catch{} follows,
which cannot drift as the surrounding success branch grows.
Flagged by a peer session mid-dispatch: this failure blocks the full
suite for every branch touching app.js-adjacent rendering, independent
of PLAN-FINISH-REPOS.md's app.js split.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson
added a commit
that referenced
this pull request
Sep 17, 2026
re/honest-stages branched before #116 merged, so its CI ran against the old byte-window assertion and failed on the same pre-existing bug #116 fixes — not a regression from this branch's own changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.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.
Summary
test_a_render_failure_degrades_the_answer_not_the_whole_messageasserted a fixed 2200-byte window containedcatchafter the mermaid try-block — brittle to any upstream edit shifting byte offsets (this is exactly what broke when re/honest-stages split app.js).try {block immediately followingf.value.mermaid, then checkcatchappears within 200 chars of that block's actual closing brace.Test plan
uv run pytest tests/test_fact_answer_rendering.py -q🤖 Generated with Claude Code