Skip to content

fix(docs): repair the broken ADR index table and guard it - #191

Merged
bioedca merged 2 commits into
mainfrom
docs/adr-index-render-fix
Jul 20, 2026
Merged

fix(docs): repair the broken ADR index table and guard it#191
bioedca merged 2 commits into
mainfrom
docs/adr-index-render-fix

Conversation

@bioedca

@bioedca bioedca commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

ADRs 0039–0050 render on the published site as a single run-on paragraph of literal | characters, in the middle of the ADR index. A blank line after the 0038 row terminates the Markdown table, and everything after it becomes prose.

Every existing gate was blind to this. Nothing becomes an unresolvable link, so mkdocs build --strict stays green; and test_every_adr_is_indexed passes because it greps for the ](NNNN-title.md) link target, which is present whether the row is a table cell or a paragraph.

Three changes:

  1. Remove the blank line so the second section's table is one contiguous block.
  2. Rewrite every Title cell to that record's own H1. Several cells had grown into full Decision dumps — ADR-0047's ran to roughly 1700 characters — which is not an index. The detail already lives in each record.
  3. Guard both structurally, with no Markdown renderer: every ADR row must be immediately preceded by a table line (a row or the |---| delimiter), and Title cells are bounded at 200 characters. A blank line between the two index sections stays legal, because the row after it is preceded by that section's own delimiter.

python-markdown is not in the base conda-lock.yml (only markdown-it-py, via rich), so a render-based assertion could not run on the 3-OS test matrix. The check is stdlib-only.

Linked tracking

Type of change

  • feat — new capability
  • fix — bug fix
  • docs / chore / ci / build / refactor / test / perf
  • ! / BREAKING CHANGE: — a deliberate schema-version bump

Self-review checklist (PRD §12.4)

  • Schema freeze respected — no schema change; docs and tests only.
  • conda-lock updated if dependencies changed — no dependency change. The new assertions are deliberately stdlib-only precisely to avoid one.
  • Tests added/updated — two new tests in tests/test_adr_index.py, plus the stale >= 49 record floor bumped to >= 50.
  • Provenance stamped — n/a, no analysis path touched.
  • New tunables registered in PRD §11.2 — n/a. _MAX_TITLE_CHARS is a test-local formatting bound on an index table, not an analysis tunable.
  • Scientific/statistical claims carry a citation; SPDX header present — no new files; both modified files keep their existing headers.
  • A resolved PRD decision that changed is reflected in the PRD and/or an ADR — n/a, no decision changed. Every ADR's content is untouched; only the index presentation.

Testing

pytest tests/test_adr_index.py7 passed.

Negative control, as the issue requires: reintroducing the blank line before the 0039 row fails the new guard with [(67, '0039')], and removing it passes again.

Rendered-output verification against mkdocs build --strict (green, 61 pages, zero warnings):

check before after
<table> elements 2 2
<tr> per table 9, 31 9, 43
max literal | in any <p> 62 0
0039 / 0050 inside a <td> no yes

50 records now render as table rows across the two sections (8 + 42), matching the 50 numbered ADRs on disk. Longest remaining Title cell is 161 characters (ADR-0019).

Summary by CodeRabbit

  • Documentation

    • Updated the Architecture Decision Record index with clearer, more concise descriptions.
    • Added a missing ADR entry to the foundational decisions section.
  • Tests

    • Strengthened checks to confirm the index includes all numbered ADRs.
    • Added validation for table formatting and concise decision titles.

A blank line after the 0038 row terminated the Markdown table, so ADRs
0039-0050 rendered on the published site as one run-on paragraph of
literal pipe characters. Every existing gate was blind to it: nothing
became an unresolvable link, so `mkdocs build --strict` stayed green,
and `test_every_adr_is_indexed` passed because it greps for the link
target, which is present whether the row is a table cell or prose.

Remove the blank line, and rewrite each Title cell to that record's own
H1 — several cells had grown into full Decision dumps (ADR-0047 ran to
~1700 characters), which is not an index.

Guard both structurally, with no Markdown renderer: every ADR row must
be preceded by a table line, and Title cells are bounded. python-markdown
is not in the base conda-lock, so a render-based assertion could not run
on the 3-OS test matrix.

Verified: the built page now has two tables of 9 and 43 rows with zero
literal pipes in any paragraph; reintroducing the blank line fails the
new test on ADR 0039.

Refs #156
Repository owner deleted a comment from coderabbitai Bot Jul 20, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 20, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 20, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 20, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 20, 2026
@bioedca

bioedca commented Jul 20, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b049b066-bc24-4951-8532-b70e4d471a29

📥 Commits

Reviewing files that changed from the base of the PR and between 89327b2 and 2823797.

📒 Files selected for processing (1)
  • tests/test_adr_index.py
📝 Walkthrough

Walkthrough

The ADR index descriptions are revised, and tests now enforce a minimum of 50 numbered ADRs, valid table-row rendering, and concise title cells.

Changes

ADR index maintenance

Layer / File(s) Summary
ADR index descriptions
docs/adr/README.md
The 0007 entry and ADR entries 0014–0050 receive revised, condensed descriptions while preserving the index structure.
Index validation tests
tests/test_adr_index.py
The tests require at least 50 numbered ADR files and validate table-row continuity and title length.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

  • bioedca/tether#144 — Also updates the ADR index and extends its shared validation tests.

Suggested labels: type:docs

Poem

A bunny hops through ADR rows,
Trimming titles as it goes.
Fifty records, tables bright,
Blank lines kept from breaking sight.
Tests now guard the index trail—
Hop, hop, ship the tidy tale!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is relevant and concise, but it omits the required FR-ID and is not fully compliant with the repo's commit title template. Change it to fix(docs): repair the ADR index table and guard it (FR-ID) or similar, including the tracking ID required by the template.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description closely follows the required template and fills the key sections with specific, relevant details.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/adr-index-render-fix

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 `@tests/test_adr_index.py`:
- Around line 100-119: Update test_index_titles_are_concise to resolve each
indexed ADR from its row identifier, read that record’s H1, and assert the
extracted Title cell exactly matches the H1. Keep the existing _MAX_TITLE_CHARS
length check as a separate assertion so both identity and concision are
validated.
🪄 Autofix (Beta)

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 127ea283-8360-4466-86fa-2dee8ba6b044

📥 Commits

Reviewing files that changed from the base of the PR and between 1f332d6 and 89327b2.

📒 Files selected for processing (2)
  • docs/adr/README.md
  • tests/test_adr_index.py

Comment thread tests/test_adr_index.py
The title guard checked only length, so a concise but WRONG title passed
while still misrouting the reader — which is most of what an index is
for. Split it in two: one test asserts each Title cell equals that
record's own H1, the other keeps the length bound so an ADR whose heading
grew into a Decision paragraph still fails.

Extract the row-title parse into a helper that joins the middle cells
rather than indexing [2], so a Title containing a pipe cannot shift the
parse; Status and PRD anchor are always the last two.

The H1 reader takes the first line starting "# " rather than line 1,
because several records open with an HTML comment, and accepts em dash,
en dash or hyphen as the number separator.

Verified: rewriting the 0001 cell to a short but incorrect title fails
the new identity test and passes the length test, which is precisely the
gap.

Addresses the review on #191.
@bioedca

bioedca commented Jul 20, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bioedca
bioedca enabled auto-merge (squash) July 20, 2026 15:04
@bioedca
bioedca merged commit dd229d7 into main Jul 20, 2026
15 checks passed
@bioedca
bioedca deleted the docs/adr-index-render-fix branch July 20, 2026 15:08
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.

fix(docs): repair the broken ADR index table and add a dependency-free render regression test

1 participant