Skip to content

fix(roadmap): find a job block below an HTML block - #6839

Merged
dan-petty merged 7 commits into
mainfrom
fix/6791-job-block-below-html-block
Nov 23, 2026
Merged

dan-petty merged 7 commits into
mainfrom
fix/6791-job-block-below-html-block

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

CommonMark ends an HTML block such as <details>, </details> or <div> only at a blank line. A person can remove that blank line above a job block marker or the record. The HTML block then holds that line, so the readers find no job block and no record. The next write adds a second block or a second record, and the item loses the old record keys.

Now a marker line can end such a top-level HTML block for a read. The line must start the job blocks at the end of the body. No text may follow these blocks, and the cut must leave no block open. Each reader uses this rule, and a write puts a blank line before the marker. Each other marker that a person writes in an HTML block stays their text, so a write keeps that block as it is. split_record reads a record line in such a block, and the next write puts a blank line before the record.

Closes #6791

Change: openspec/changes/archive/2026-11-23-6791-job-block-below-html-block/

Plan #6791: a job block marker line or the record line in an HTML
block that only a blank line ends ends that block for a read.
A job block marker line or the record line directly below an HTML
block that only a blank line ends (#6791). The tests fail on the base.
A job block marker line or the record line in a top-level HTML block
that only a blank line ends now ends that block for a read (#6791).
The writers put the blank line back.
A marker that a person writes in an HTML block that only a blank line
ends stays their text (#6791). The tests fail on 926baff4d. The record
property gets an example with <div> directly above the record.
A marker line ends an HTML block that only a blank line ends only
when it starts the job blocks at the end of the body, and the cut
leaves no block open (#6791). Each other marker that a person writes
in such a block stays their text, so a write keeps the block.
@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 23, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Review of the fix for #6791 (second round)

Recommendation: ready. One nit stays. You can fix it before you open the pull request, or after.

The new rule finds the job blocks and the record in each case of the issue. Each body of a person in the cases of the first round now reads and writes as on the base.

First round and its fixes

The first round reviewed 926baff4d and found four problems:

  1. Major: the rule ended an HTML block at its first marker line, also in a block of a person. Writers removed text of the person or changed how GitHub showed it. Fix: the rule now uses the job blocks at the end of the body (_are_job_blocks). No text can follow the last marker line, and the cut can open no block. Guard tests now cover these bodies.
  2. Minor: the design and the pull request body said that the text of the person kept its render. Fix: both texts are now correct.
  3. Nit: the extended property test passed on the base. Fix: an @example puts <div> directly above the record. The test now fails on the base.
  4. Nit: some new sentences had more than 25 words. Fix: the builder split them. I found no new sentence of more than 25 words.

Finding (nit): a scenario says more than its test proves

Where: the scenario "A marker in an HTML block of a person" of roadmap-refine/writes, in the base spec and in the archived delta.

Problem: The THEN line says "no write changes the body". A refine write changes the body, because it replaces its section. The test proves a smaller fact. The close step of a write (close_blocks_before_markers, closed_body) keeps the body, and the render does not change.

Evidence: A simulated refine write on a body with a start marker in a <details> block of a person changes the body. It keeps the lines of the person.

Fix: Write "and no write changes the text of the person".

Proof for this round

  • Cases of a person. I ran the 33 first-round probe bodies again on the base and on the head. 19 bodies give the same result on the head as on the base, and each case of a person is one of them. The other 14 bodies are cases of the issue, which the head now reads. After three rounds of each writer, each body of a person is the same as on the base.
  • GitHub render. For the two GitHub render inputs, closed_body on the head gives the input. The GitHub Markdown API renders each input the same before and after. For the issue body, the head write makes ## Proposed design render as a heading again.
  • Issue cases. The head finds each issue case: </details>, a <details> part, <div>x</div>, an <img> tag, nested HTML, CRLF and two job blocks. It also reads the record directly below an HTML line or directly below an end marker. Each writer leaves one job block and one record, keeps the old record keys, and settles after the first write.
  • The bounds above the HTML block. The head gives the bounds above the HTML block to _are_job_blocks. My first-round prototype did not. Two cases show the difference:
    • A real refine block above, then a <div> of a person at the end with a marker pair. The prototype adds a blank line in the <div>, so the render of the person changes. The head keeps the body, as the base does.
    • A section whose end marker is directly below an HTML line. The head finds the section. The prototype and the base find none.
  • Trade-off. A job block that text of a person follows stays unread, as on the base. The design says that 3 of 783 open bodies with a refine section have text after the job blocks (feat(roadmap): run the reconcile sweep on a cluster schedule #4574, feat(roadmap): run intake and scoped intake in their own pods #4567, feat(roadmap): PR, review and check events start a scoped sweep #4413). My count gives the same 3 issues. With <div>x</div> put above each of the 783 sections, the head finds 780 and the base finds 0.
  • Accepted limit. A marker pair at the end of the body, in an HTML block of a person, with no text after it, reads as a job block. The body cannot tell this from the case of the issue. The rule of fix(roadmap): every job block reader uses one marker rule #6736 for an open block has the same limit.
  • Live bodies. For all 833 open bodies, the base and the head give the same records, bounds, closed bodies, outside text and body hashes.
  • Cost. split_record over 833 open bodies took 850 ms on the base and 858 ms on the head (least time of 7 runs, host load 7). Only a docstring of store.py changed in this round.

Checks

  • devops ci fail-to-pass --base origin/main: 20 tests fail on the base and pass on the head. These are the 19 tests of the first round and the property test with its new example. The 8 new guard tests pass on the base. They fail on 926baff4d, as the test commit says.
  • Tests of the brief and the repair tests: 1593 passed.
  • devops ci --check with lint, format, docs, constructs, openspec, test-settings, test-tree, startup-imports and swallowed-failures: all pass. No check changed a file.
  • OpenSpec: the change is archived. The three modified requirements have 487, 496 and 499 characters, and their text agrees with the code.
  • Commits: six subjects in project form. The test commits come before their fix commits.
  • Pull request body: each claim is true. It has "Closes fix(roadmap): find a job block below an HTML block #6791", and the Change line is last.

After the second review

  • The coordinator fixed the one new nit. The scenario "A marker in an HTML block of a person" now says that no write changes the text of the person.
  • The branch is rebased onto the newest main with no conflict. The rebase brought no change to the files of this branch.

@dan-petty
dan-petty marked this pull request as ready for review November 23, 2026 04:00
@dan-petty
dan-petty merged commit 49fa7cb into main Nov 23, 2026
29 checks passed
@dan-petty
dan-petty deleted the fix/6791-job-block-below-html-block branch November 23, 2026 04:00
dan-petty pushed a commit that referenced this pull request Nov 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.198.1](v0.198.0...v0.198.1)
(2026-11-23)


### Bug Fixes

* **roadmap:** find a job block below an HTML block
([#6839](#6839))
([49fa7cb](49fa7cb))

---
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): find a job block below an HTML block

1 participant