Skip to content

fix: keep pipes and backticks in checked values from breaking the table - #266

Closed
shenxianpeng wants to merge 1 commit into
mainfrom
feat/scope-table-report
Closed

fix: keep pipes and backticks in checked values from breaking the table#266
shenxianpeng wants to merge 1 commit into
mainfrom
feat/scope-table-report

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Aug 12, 2026

Copy link
Copy Markdown
Member

Originally an all-scope table redesignscope narrowed after review: the redesigned table grew with the number of commits in the PR and duplicated the collapsible details block line for line, so the layout stays exactly as it is today. What remains are the two rendering bugs found along the way:

  • A | in a checked value (a commit subject is arbitrary text) ended the table cell and broke the row layout. Pipes are now escaped.
  • A backtick in a checked value ended the single-backtick code span, rendering the rest of the value as markdown. The span delimiter now grows past the longest backtick run in the value, with padding spaces when the value starts or ends with a backtick (CommonMark strips exactly one of each).

Three regression tests cover the pipe, an embedded backtick, and a trailing backtick. No visual or structural change to the report — success, failure and skipped states render as before.

@shenxianpeng
shenxianpeng requested a review from a team as a code owner August 12, 2026 09:22
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Commit Check

All 5 checks passed

Show all 5 checks
Commit message
  ✔ PR title (fix: keep pipes and backticks in checked values from brea...)
  ✔ Commit 1/1 (fix: keep pipes and backticks in checked values from brea...)
Branch
  ✔ Branch (feat/scope-table-report)
Author
  ✔ Author name (Xianpeng Shen)
  ✔ Author email (xianpeng.shen@gmail.com)

commit-check 2.14.0 · Rules reference

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@shenxianpeng, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e29389af-d7ce-4ffa-ba33-b2d6ab9a1602

📥 Commits

Reviewing files that changed from the base of the PR and between ffae6bd and b1614fa.

📒 Files selected for processing (2)
  • main.py
  • main_test.py
📝 Walkthrough

Walkthrough

Reports now render every scope with status, checked value, and rule information. Passing commit rows beyond five are folded. Skipped and partial-skip results receive explicit verdicts. Tests and documentation reflect the new output.

Changes

Report rendering and verdicts

Layer / File(s) Summary
Per-scope table rendering
main.py, main_test.py
Markdown reports now include status-aware rows for all scopes, escaped values, rule details, skipped-state text, and folded passing commit rows.
Verdict and integration coverage
main.py, main_test.py
Report verdicts distinguish all-skipped, partial-skip, passing, and failing results. Tests validate golden output, grouping, PR comments, job summaries, and skipped reports.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: enhancement

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the checked-value escaping fix, which is a concrete part of the broader report-table changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/scope-table-report

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@main.py`:
- Around line 568-573: Update main.py lines 568-573 in _table_cell_escape to
choose a code-span delimiter longer than the longest backtick run in the escaped
text, while preserving pipe escaping; update main.py lines 635-638 to format
value_display with this safe code-span helper; add the regression case in
main_test.py lines 831-834 for a value such as “fix: `quoted`”.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 15a8c96e-4bc0-496a-b288-a7096634232a

📥 Commits

Reviewing files that changed from the base of the PR and between 2f0a330 and ffae6bd.

📒 Files selected for processing (2)
  • main.py
  • main_test.py

Comment thread main.py Outdated
@shenxianpeng
shenxianpeng force-pushed the feat/scope-table-report branch from 3127748 to 7e9c578 Compare August 12, 2026 10:15
@shenxianpeng shenxianpeng changed the title feat: put every scope in the report table, with its verdict in front fix: keep pipes and backticks in checked values from breaking the table Aug 12, 2026
A commit subject is arbitrary text: a | inside a table cell ended the
cell, and a backtick ended the single-backtick code span and rendered
the rest of the row as markdown. The value cell now escapes pipes and
grows the span delimiter past the longest backtick run in the value,
with padding spaces when it starts or ends with one.
@shenxianpeng
shenxianpeng force-pushed the feat/scope-table-report branch from 7e9c578 to b1614fa Compare August 12, 2026 19:53
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.52%. Comparing base (dc04ee4) to head (b1614fa).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #266      +/-   ##
==========================================
+ Coverage   92.38%   92.52%   +0.14%     
==========================================
  Files           1        1              
  Lines         420      428       +8     
==========================================
+ Hits          388      396       +8     
  Misses         32       32              
Flag Coverage Δ
unittests 92.52% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shenxianpeng
shenxianpeng deleted the feat/scope-table-report branch August 12, 2026 19:56
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.

1 participant