Repository navigation
test(session): pass the long-s case on markdown-it-py 4.3 to lift the cap - #34722
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the test now pins the module's real contract (the closer matches what the parser opened, and the next turn still parses) instead of one parser release's case folding. Notes
[DESIGN-REVIEWED] 21d2813 Description read[DESCRIPTION-READ] 43f7bbbcd6bc3b994f251eb0bf014ab0e3c0dd656bcdff7b32904cad4614508d 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 |
|
@iamwhatever could you review this? It unblocks every open PR. Main's backend shard 4 is red for all of them, because CI now installs markdown-it-py 4.3.0. The change is test-only, one file. We pushed it, so our own approval doesn't count here. AI-assisted, sent by CommunityCrew |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
Approve on f1e3819. Test-only fix for main's backend shard 4: the long-s case now asks the installed markdown-it-py whether <ſcript> opens an html_block and expects </script> only then, and always checks the next turn's heading parses; passes on 4.2.0 and 4.3.0, and both branches catch a broken closer. Decisive lines: test/test_session_markdown.py:420, test/test_session_markdown.py:426, test/test_session_markdown.py:427
Pull request was converted to draft
f1e3819 to
29da60c
Compare
|
[operator: bolichen97] Re-synced this branch onto main (b7b7b6c -> 097a01b) to pick up #34646. The previous head's red Backend Tests (Windows) shards 5, 6 and 7 were the code-channel approval tests that #34646 fixed on main; the same node ids were red on main before it landed. The patch itself is unchanged (one test file, byte-identical). Main is red right now on |
29da60c to
83d0991
Compare
|
Rebased: main moved in src/kiro_crew/dashboard/handlers/updates.py and test/test_update_boot_apply.py since this head's CI ran (097a01b -> d9c01ba); CI re-running. That move is #35625, the fix for this head's red Backend Tests shards 2 and 4 (3.12 and Windows): [operator: bolichen97] |
83d0991 to
fc55826
Compare
|
Rebased: main moved in test/test_cloud_launch_customize.py since this head's CI ran (d9c01ba -> 5e7b587); CI re-running. That move is #35746, the fix for this head's red Backend Tests (Windows) shard 2: [operator: bolichen97] |
markdown-it-py 4.3.0, which CI now installs, no longer case-folds the long s, so '<ſcript>' parses as a paragraph and needs no closer. The test pinned 4.2.0's answer and turned backend shard 4 red on every PR. It now expects a closer only when the parser opened a block, and on both releases checks that the next turn's heading still parses.
fc55826 to
21d2813
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head, the review ran test/test_session_markdown.py against markdown-it-py 4.2.0 and 4.3.0. The file passes on both. main's version of the file fails only the [long-s] case on 4.3.0. A direct token probe confirmed that 4.2 opens an html_block for <ſcript> and 4.3 reads it as a paragraph, which matches the new comment. The test is deterministic, has no side effects, and does not loosen a ratchet.
Done well: the new test checks what the export must guarantee. The closer has to match the block the parser actually opened, and the next turn's heading has to survive. It no longer pins one release's Unicode case folding.
Optional:
- setup.cfg still caps markdown-it-py below 4.3, so CI runs only the 4.2 branch of the new test. A follow-up on #34654 that lifts the cap would make CI run the 4.3 branch.
- #34646 already turned shard 4 green with that cap. The title's "to lift the cap" describes a step this diff does not take. A short reply to the Design note would make that clear.
Problem / Motivation
Goal: Turn main's backend shard 4 green again on markdown-it-py 4.3.0, which CI now installs.
test/test_session_markdown.py::test_a_condition_one_opener_is_closed_as_the_parser_reads_it[long-s]fails on every PR's backend shard 4, on 3.12 and Windows, withAssertionError: assert '' == '</script>'. Seen on #34559 and #34666 today.Why it matters
Every open PR's backend shard 4 is red until this lands, so nothing can show green, including the fix for the other main red (#34666).
Not a goal
session_markdown.py. Its behaviour is correct on both parser releases.setup.cfg.What changed (motivation → approach → change)
_unterminated_blocks("<ſcript>\nvar x = 1;")returns''instead of'</script>'.setup.cfgallowedmarkdown-it-py>=3,<5, so CI'suv pip installpicked 4.3.0; main holds it below 4.3 (fix: clear the two main breaks in backend tests #34646) until this case passes there. On 4.2.0 the parser case-folds the long s (ſ) tosand reads<ſcript>as anhtml_block. On 4.3.0 it reads a plain paragraph. With no block opened, the module correctly asks for no closer. The test pinned 4.2.0's answer.<ſcript>opens anhtml_block, expects</script>only when it does, and on both releases checks that the next turn's heading still parses. That last check is the property the export exists to keep. The other four cases (Unicode whitespace after the tag name) are unchanged and pass on both releases.Backwards compatibility
Compatible: test-only change; no product file is touched.
Removes nothing: the long-s case is still tested, now against whichever parser release is installed.
Tests
test/test_session_markdown.py::test_a_long_s_opener_never_hides_the_next_turn: the closer matches what the parser opened, and the next heading parses.test/test_session_markdown.py: 158 passed with markdown-it-py 4.2.0, and 158 passed with 4.3.0 (scratch venv).Proof: not provable -- test-only change
Manual verification
On origin/main,
test/test_session_markdown.pygives 158 passed with markdown-it-py 4.2.0, and 1 failed ([long-s]) with 4.3.0. With this change, it gives 158 passed on each.Related Issues
Part of #34654
Seen on #34559 and #34666 (backend shard 4, 3.12 and Windows).
Follow-up, not in this PR: the repo has no lock or constraints file. CI's
uv pip install --system -e ".[voice,desktop]" --group devresolvessetup.cfg's ranges fresh on every run, so any upstream release reaches every PR at once. One option is a CI-only constraints file that pins the resolved versions, passed with--constraint, plus a scheduled job that bumps it through a PR. That needs a decision: a CI pin stops testing the newest release users can install, so the bump job would have to run often.Sibling sweep
Swept: git grep -nE "u017f|ſ" -- test/ src/kiro_crew/dashboard/
Sibling: test/test_dashboard_frame.py -- not affected -- uses no markdown-it parse; passes on 4.3.0
Sibling: test/test_member_dashboard_routes.py -- not affected -- uses no markdown-it parse; passes on 4.3.0
Sibling: test/test_publish_sync.py -- not affected -- uses no markdown-it parse; passes on 4.3.0
Pattern harvest
Not generalizable: a single test pinned an upstream parser's case folding, which changed in a minor release
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.