Repository navigation
test(markdown): pin voice and deploy output for parenthesised links - #15951
Conversation
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm maintainers want the awkward [DESIGN-REVIEWED] e269ad5 Description read[DESCRIPTION-READ] 9b599f75ebf7085061e5b77c588aa6b067542adbe0f0c38d052c48b2728b83a5 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed |
ef30717 to
0aa5c96
Compare
|
Re-pushed to rerun CI, rebased onto main 1338692 with the patch unchanged (main's one new commit touches none of this PR's files). On ef30717, |
0aa5c96 to
c95b8d8
Compare
|
Re-pushed the same patch, rebased onto main |
Two outputs of the parenthesised-URL sweep (kirodotdev#15714) had no test. A link whose destination holds an unbalanced "(" is not a link, so the voice reply leaves its text as written. A web address in it is still replaced by "(link)", but a relative destination is spoken as written. The artifact-deploy page keeps a quote inside a parenthesised URL escaped as " in the link's href, so it cannot end the attribute. Both outputs are pinned now, so a later change to either fails a test.
c95b8d8 to
e269ad5
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approved: PR Readiness green on this head, merges cleanly into current main, no outstanding blocking review.
Problem / Motivation
Goal: A later change to either link output that the approving review of #15714 found untested fails a test.
The approving review of #15714 named two outputs that no test covers:
href, but no test proves it.Why it matters
The deploy page turns an artifact into a standalone web page. If its
hrefre-escape were dropped, a quote in a link's URL would end the attribute and start a new one:see [a](https://example.com/(b"onmouseover="x)) nowwould render<a href="https://example.com/(b"onmouseover="x)">a</a>. On main, that change passes all 1,433 tests in the two test files that call the deploy renderer.The voice output has no guard either. A later fallback that read such a link as its label would pass all 2,523 tests in the ten test files that import
voice_reply, and what the reply speaks would change unnoticed.Not a goal
What changed (motivation → approach → change)
Three new tests pin the outputs below. No production code changes.
see [a](https://example.com/(b) nowsee [a]( (link) nowsee [guide](docs/setup(old) nowsee [guide](docs/setup(old) nowsee [a](https://example.com/(b"onmouseover="x)) now<a href="https://example.com/(b"onmouseover="x)">a</a> nowAn unbalanced
(means the text is not a Markdown link, so the voice reply leaves it as written. Its bare-URL pass then swaps a web address for "(link)". That pass only knows web addresses, so a relative destination is read aloud as written. On the deploy page the link is balanced, and its quote stays"inside thehref, so it cannot end the attribute. Two of the tests are intest/test_voice_reply.pyand one is intest/test_deploy_web_render_scan.py.Backwards compatibility
Compatible: the diff adds tests only.
Tests
test_a_web_address_in_an_unbalanced_link_is_never_spokenlocks in "(link)" in place of the URL.test_a_relative_destination_in_an_unbalanced_link_is_spoken_as_writtenlocks in the spoken text, unchanged.test_a_quote_in_a_parenthesised_link_url_stays_escaped_in_the_hreflocks in"inside thehref, with no rawonmouseover="anywhere on the page.Each new test fails when its output changes. Four mutations in a throwaway worktree each failed the tests they target: dropping the voice bare-URL pass, restoring the old voice pattern that cut at the first
), adding a fallback that reads an unbalanced link as its label, and putting the unescaped URL in thehref.Manual verification
N/A: the outputs are plain string transforms, and the tests assert them directly.
Related Issues
no linked issue: follow-up to the two non-blocking notes in the approving review of #15714.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)