Skip to content

test(session): pass the long-s case on markdown-it-py 4.3 to lift the cap - #34722

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
crew/CommunityCrew/markdown-it-4-3
Nov 18, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
crew/CommunityCrew/markdown-it-4-3

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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, with AssertionError: 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

  • Changing session_markdown.py. Its behaviour is correct on both parser releases.
  • Pinning or capping markdown-it-py in setup.cfg.

What changed (motivation → approach → change)

  • Symptom: _unterminated_blocks("<ſcript>\nvar x = 1;") returns '' instead of '</script>'.
  • Root cause: an upstream parser change, not a product regression. setup.cfg allowed markdown-it-py>=3,<5, so CI's uv pip install picked 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 (ſ) to s and reads <ſcript> as an html_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.
  • Change: the long-s case moves out of the shared parametrized test into its own test. That test asks the parser whether <ſcript> opens an html_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.py gives 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 dev resolves setup.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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 18:14
@bolichen97
bolichen97 requested a review from CrysisDeu November 10, 2026 18:14
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • setup.cfg still pins markdown-it-py>=3,<4.3, so CI only runs the 4.2 branch of the new test and never the paragraph branch. The PR title says "to lift the cap" but the diff doesn't lift it. Lift it in a follow-up, or the 4.3 path stays untested.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@bolichen97

Copy link
Copy Markdown
Contributor Author

@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

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 21d2813

Verdict parsed from the review's SHA-scoped output markers for commit 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 21d2813

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 21d2813e2969a3502d6cf7f3bd5f0e8fe5bab70e false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 10, 2026 18:17
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 10, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bolichen97
bolichen97 marked this pull request as draft November 10, 2026 19:29
auto-merge was automatically disabled November 10, 2026 19:29

Pull request was converted to draft

@bolichen97 bolichen97 changed the title test(session): let the long-s markdown case follow the installed parser test(session): pass the long-s case on markdown-it-py 4.3 to lift the cap Nov 10, 2026
@bolichen97
bolichen97 force-pushed the crew/CommunityCrew/markdown-it-4-3 branch from f1e3819 to 29da60c Compare November 12, 2026 01:30
@bolichen97

Copy link
Copy Markdown
Contributor Author

[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 test/test_updates_handlers_facade.py and test/test_wait_discipline_ratchet.py, with fixes open in #35614 and #35625. If those two show up on this head, they are main's, and this PR waits for those fixes.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 12, 2026
@bolichen97
bolichen97 force-pushed the crew/CommunityCrew/markdown-it-4-3 branch from 29da60c to 83d0991 Compare November 12, 2026 05:05
@bolichen97

Copy link
Copy Markdown
Contributor Author

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): test/test_updates_handlers_facade.py::test_every_name_served_from_outside_the_family_is_visible_to_type_checkers and test/test_wait_discipline_ratchet.py::test_the_scan_matches_known_sites. The same node ids were red on main at ce89396. This PR's patch is unchanged: one test file, byte-identical.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 12, 2026
@bolichen97
bolichen97 force-pushed the crew/CommunityCrew/markdown-it-4-3 branch from 83d0991 to fc55826 Compare November 12, 2026 15:24
@bolichen97

Copy link
Copy Markdown
Contributor Author

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: test/test_cloud_launch_customize.py::TestAmiArchitectureCheck::test_matching_architecture_proceeds_to_deploy. It was a main red tracked in #35745: two changes that each passed alone collided on main, and #35746 landed after this head's base. This PR's patch is unchanged: one test file, byte-identical.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 12, 2026
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.
@iamwhatever
iamwhatever force-pushed the crew/CommunityCrew/markdown-it-4-3 branch from fc55826 to 21d2813 Compare November 17, 2026 23:04
@iamwhatever
iamwhatever marked this pull request as ready for review November 17, 2026 23:04
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 18, 2026
@KiroCrewCaptain
KiroCrewCaptain merged commit 7a0c48f into main Nov 18, 2026
100 of 103 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the crew/CommunityCrew/markdown-it-4-3 branch November 18, 2026 01:31

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants