Skip to content

fix(roadmap): keep angle-bracket text of a code span in refine - #3711

Merged
dan-petty merged 4 commits into
mainfrom
fix/3504-refine-keeps-code-span-angle-text
Nov 6, 2026
Merged

dan-petty merged 4 commits into
mainfrom
fix/3504-refine-keeps-code-span-angle-text

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Refine deleted each <word> as an HTML tag, also in a code span, so a requirement lost its placeholders. Refine now changes the < of a tag outside code into an entity and keeps code as it is. A title keeps its tags, because a title is plain text. A link rewrite builds no tag, and a hostile text takes linear time.

Closes #3504

Change: openspec/changes/archive/2026-11-06-3504-refine-keeps-code-span-angle-text/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 6, 2026
@dan-petty

dan-petty commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner Author

Review findings and decisions

Two reviewers read the first version. I checked each finding against the code and fixed each real one with a test first.

  • Title (rules reviewer, major): fixed. GitHub shows a raw <domain> in a title as text. The page of feat(k8s): devops k8s tunnel keeps the cloudflared forward to k8s.<domain> running #2567 holds k8s.&lt;domain&gt; in its markdown-title element. An entity shows as the text &lt;: the page of zhaofinger/finger-blog#11 holds &amp;lt;script /&amp;gt; for the title &lt;script /&gt; async &amp; defer. The squash commit takes the title as it is, and each entity adds 3 characters to the count of Semantic PR title. The fix is small, so I did not stop. sanitize_text has the keyword escape_tags, and safe_title in stage_change.py uses it for staging_title, delivery_title and the check of the summary. The < of a comment opener is still an entity. The spec delta roadmap-stage holds the new requirement, and test_roadmap_stage_title.py holds four tests.
  • Link rewrite (correctness reviewer, major): fixed, not narrowed. The fix is one more call of _without_raw_html after the rewrite, so I filed no issue. <[b>](https://example.com/a) now gives &lt;b> (https://example.com/a`)`, and the forged record block gives no <!--. The property test has the pieces [b>, [!--, ](https://example.com/a) and backslashes, and two fixed examples. A search of 30,000 texts finds no raw HTML.
  • Test gap (correctness reviewer, major): fixed. I made spans_are_code always true in _escaped_tags: the old input stayed green, so it tested nothing. The input A x <b>see</b> B`` stays raw HTML in that run. It is now the exact-text test and the spec scenario. GitHub shows <b>see</b> as bold text for the raw input and as the text `see` for the result.
  • Time (rules reviewer, minor): fixed. I reproduced it: <a title="`">` 400 times and a last <b> took 3.9 s for 5.6 KB. _escaped_tags now makes at most three passes. Then it changes each tag, also in code, in one re.sub. The same input takes 0.02 s, and 112 KB takes 0.25 s. A text that a person writes needs one pass, or two. The rule against a time bound in tests stops a timing test. The property example with 8 repeats reaches the last step. A text with no tag opener costs no parse, so the sentence in design.md is true now.
  • Backslash (correctness reviewer, minor): fixed. POST /markdown shows \<b>x as the text <b>x and \&lt;b>x as the text &lt;b>x. A < after an odd number of backslashes stays as it is. A < after an even number gets the entity.
  • STE-100 sentences (rules reviewer, minor): fixed in the change documents, the spec delta and the new docstrings.
  • Archive: the change is archived in the last commit. devops openspec archive printed a strict-validation warning: a requirement of roadmap-refine was over 500 characters. I split it into two requirements in the spec and in the archived delta. devops openspec check passes.

Test results

@dan-petty
dan-petty marked this pull request as ready for review November 6, 2026 01:18
…inks safely

A title is plain text, so staging_title and delivery_title keep each tag. The tag step
makes at most three passes, then changes each tag. A look after the link rewrite finds a
tag or an opener that the rewrite builds. A `<` that a backslash escapes stays as it is.
@dan-petty
dan-petty force-pushed the fix/3504-refine-keeps-code-span-angle-text branch from 9ee791a to 68b4f7c Compare November 6, 2026 01:27
@dan-petty
dan-petty merged commit 396962e into main Nov 6, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/3504-refine-keeps-code-span-angle-text branch November 6, 2026 01:44
dan-petty pushed a commit that referenced this pull request Nov 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.64.0](v0.63.2...v0.64.0)
(2026-11-06)


### Features

* **roadmap:** let the step guard allow a recorded test removal
([#3715](#3715))
([f025406](f025406))
* **roadmap:** require the eval replay for a stage check change
([#3716](#3716))
([76e8301](76e8301))
* **roadmap:** restart a suspended job on a comment of a person
([#3699](#3699))
([be8d18a](be8d18a))
* **roadmap:** the verifier reads the repository and repairs a plan
twice ([#3710](#3710))
([c1191e2](c1191e2))
* **service:** chart the Service and filter the CLI dashboard by job
([#3704](#3704))
([fecc6fb](fecc6fb))


### Bug Fixes

* **deps:** upgrade oauthlib to fix GHSA-3jp2-3mrg-2vxc
([#3709](#3709))
([6a88012](6a88012)),
closes [#3705](#3705)
* **k8s:** hold the copy source until the destination ends
([#3712](#3712))
([c7c5556](c7c5556)),
closes [#3695](#3695)
* **k8s:** the gateway stops using the 16 GiB tier
([#3697](#3697))
([842effc](842effc))
* **roadmap:** keep angle-bracket text of a code span in refine
([#3711](#3711))
([396962e](396962e))
* **roadmap:** P1 items pass the planned limit
([#3698](#3698))
([63589f0](63589f0)),
closes [#3692](#3692)
* **roadmap:** refine blocks an item with an open dependency
([#3696](#3696))
([89fbb08](89fbb08))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): refine keeps the angle-bracket text of a code span

1 participant