Skip to content

Fix report header breaks and table-cell checks - #231

Merged
savvides merged 5 commits into
mainfrom
cursor/report-citation-ste-fixes-e0c2
Nov 24, 2026
Merged

savvides merged 5 commits into
mainfrom
cursor/report-citation-ste-fixes-e0c2

Conversation

@savvides

@savvides savvides commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

init exits 2 when --title, --project, --mode, --skill, --run-id, --reserve or project_name contains a line break, and the report stays as it was. A line break in those fields was written into the file and became a new heading. A project_name that is not text (for example a number) is Untitled course. Before, init raised AttributeError and exited 1.

A citation group with two tiers reports that problem only. Extra text in the cell still gets the other message.

An escaped pipe (\|) stays in the table cell. idstack-ste-check then counts the words in that cell, so a long sentence fails the 25-word limit. A pipe inside `code` is a new column, as in GitHub Markdown: POST /markdown (mode=gfm) renders | A-1 | Run a|b now | lost | as two cells and drops lost. check refuses that row and tells you to write the pipe as \|.

A ### Finding block is not a table. GitHub shows the backslash inside `a\|b`. append writes | in What we saw, the recommendation, and the justification. The table row keeps \|.

A bullet inside a numbered list uses the 25-word limit. A numbered step inside a div, p, li or an inline element (span, a, em) uses the 20-word limit. A block element such as section still ends the step.

Review follow-ups: b6511c3 splits cells as GitHub does (only \| stays in the cell) and skips inline tags in nearest_list. 07e53a4 unescapes \| in the generated Finding block.

#229 stays open: a step inside section or article still uses the 25-word limit. #230 is the same GitHub column break, including a pipe inside double backticks, so it is not a separate defect. This run cannot close issues, so #230 is still open.

Tests

Re-run on 07e53a4:

$ python3 test/test-report-section.py
................................................................
----------------------------------------------------------------------
Ran 64 tests in 6.955s

OK

$ python3 test/test-ste-check.py
..........................................
----------------------------------------------------------------------
Ran 42 tests in 3.162s

OK

$ python3 test/test-citation-tiers.py
.........
----------------------------------------------------------------------
Ran 9 tests in 0.159s

OK
Open in Web Open in Cursor 

Note

Low Risk
Changes are confined to report validation, STE checking, and citation messaging with expanded unit tests; no auth, manifest merge, or LMS token paths are modified.

Reviewed by Cursor Bugbot for commit 47c11b5. Bugbot is set up for automated code reviews on this repo. Configure here.

cursoragent and others added 2 commits November 23, 2026 20:52
A line break in the course name became a heading, and a non-text
project_name raised AttributeError. A pipe in inline code or an
escaped pipe split a cell, so check counted the wrong columns and
the writing check missed a long sentence or read the code. Two tiers
on one citation also said the cell was not citations. A bullet inside
a numbered list used the 20-word limit, and a step in a div used 25.

Co-authored-by: Philippos Savvides <savvides@users.noreply.github.com>
…does (#231 review)

GitHub Markdown starts a new cell at a pipe inside `code` and drops the
extra cell, so check must not accept it. Only \| stays in the cell. Remove
scripts/lib/table_cells.py; the old regex split is enough. The cell-count
problem now says to write each pipe as \|.

nearest_list skips inline elements, so a span around a step with a <br>
keeps the 20-word step limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@savvides

savvides commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner Author

Review (Claude Code), fixes pushed in b6511c3 and 07e53a4:

  1. Pipe inside `code` (reverted). GitHub Markdown starts a new cell at an unescaped pipe even inside code, and drops the extra cell (checked with gh api /markdown: | A-1 | Run a|b now | x | renders Run a/b now and loses x). The PR made check accept that row, so a report could render with a lost column. check and idstack-ste-check now split as GitHub does: only \| stays in the cell. The cell-count problem now says to write each pipe as \|, also in code. scripts/lib/table_cells.py is gone; the existing regex was enough. This also means A pipe inside double-backtick code still splits a table cell #230 is not a bug.
  2. nearest_list regression. An open inline element (span, a, em) ended the walk, so <ol><li><span>22 words<br>…</span></li></ol> passed as 25-word text. It now skips non-block tags. New test.
  3. Stray backslash in ### Finding blocks (07e53a4). finding_blocks() copied \| into paragraphs outside any table, where GFM shows the backslash (inside a code span the escape has no effect). It now writes | in What we saw, Recommendation and Justification. New test; it fails without the fix.

Kept as written: the line-break refusal in init, the project_name type check, the two-tier citation message, \| handling in idstack-ste-check, the bullet/div step rules.

Local: smoke 695/695, integration 81/81, test-report-section 64 (CLAUDE.md count updated), test-ste-check 42, test-citation-tiers OK. No mutation anchor quotes the changed lines.

savvides and others added 3 commits November 23, 2026 16:55
…view)

The blocks are not in a table, and GitHub Markdown does not unescape \|
inside a code span, so the report showed a stray backslash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 47c11b5. Configure here.

self.assertEqual(result.returncode, 0, result.stderr)
self.assertNotIn('Traceback', result.stderr)
self.assertIn('Untitled course', self.read(REPORT))
self.assertNotIn('101', self.read(REPORT))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Flaky assertion on random run id

Low Severity

The new test forbids the substring 101 anywhere in the generated report. init writes a six-character hex run id when --run-id is omitted, so a value such as 101abc makes this assertion fail even though project_name was correctly replaced with Untitled course.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 47c11b5. Configure here.

@savvides
savvides merged commit 48c3011 into main Nov 24, 2026
10 checks passed
@savvides
savvides deleted the cursor/report-citation-ste-fixes-e0c2 branch November 24, 2026 03:22
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.

2 participants