Repository navigation
doc-health report: a skipped family that carries findings renders its rows and tally beneath the Skipped line (#902) - #905
Conversation
… the Skipped line (#902) Since #766 (PR #871) a family may answer with a `Skip` that CARRIES the findings its repositories had established before its question stopped being askable, and `runner.run_suite` extends `result.findings` with them while still recording the skip. Those findings reach the headline counts, the ranked plan and the previous-report diff — and reached nothing under the family's own `### <family>` heading, because `render`'s Findings-By-Family loop branched on the skip FIRST and made the `Skipped:` line the whole of the section. A reader who opened that section to see what the counts were counting found the family named and its findings not, which is the inverse of the headline's own promise that a skipped family is "never silently omitted". The row loop is now unconditional and the two verdict lines keep their existing conditions, so a family with no findings runs it zero times. The per-class tally (`families.FAMILY_SUMMARIES`) turns on the FINDINGS instead of on the skip: an EMPTY skip still has none, because zeros beside that line would claim a measurement nobody took, and a CARRYING skip has one, because its findings are a measurement somebody took. An EMPTY skip is byte-identical. Proved empirically as well as by test: `doc-health.py --single-repo .` over this repository (5 skipped families, none carrying) writes the same 349-line report before and after, md5 34effd6b92f454fd70c0880704c50e9f both ways, stderr identical. Consumers checked and unchanged: the three lane inserts (`insert_readiness_section`, `insert_derive_possibles_section`, `insert_neutrality_section`) locate `FINDINGS_BY_FAMILY_HEADING` and splice BEFORE it, reading no character past the heading; `parse_previous` / `unparsed_plan_rows` judge a line by `PLAN_ROW_PREFIX` (`- severity=`) and a per-family row begins `- [`; `dashboard_refresh_lane.append_report_section` appends at the end. Nothing reads a skipped section as exactly one line. Refs #766, #871. Lane: openxfactory-1 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…identity, and the section's consumers (#902) `test_suite.py`, beneath the #766 group whose reader's half this is: - a carrying skip's section asserted by EQUALITY, not by three `in` checks — what was wrong was the SHAPE of the section, so the reason first, the rows beneath it, and `No findings.` absent are one assertion. Driven through `run_suite` over the real carrying shape (`rtp._PartialSkip`), so the `(findings, skips)` pair rendered is the one the suite really produces. - an empty skip's section asserted against a literal captured from the renderer as this branch's base leaves it, which is the only form of that assertion that can catch the new branch leaking a line into the state it must not touch. - the consumers, checked rather than assumed: the ranked-plan grammar reads exactly one row per finding and no per-family row claims to be one, the key set is the carried findings' own, and `insert_readiness_section` returns the family's section byte-identical with the skip's rows intact behind it. A carried `error` is in the set on purpose — without one the key set is empty and that assertion would pass over a renderer that dropped every row. `test_modified_block_currency_reporting.py`: the tally's third state, beside the two skip tests that already pinned the first two. Those two are untouched and still right about what they test; their docstrings now say which state that is, since "skipped" stopped being one state. The renderer is exercised directly here because no family in the estate today both has a `FAMILY_SUMMARIES` entry and can produce a carrying skip — this family's two skip shapes are plain `Skip`s and the one carrying shape belongs to a family with no tally — and the docstring says so rather than leaving the reader to discover it. Refs #766, #871. Lane: openxfactory-1 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 8 hours and 8 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
|
Lane: openxfactory-1 (openXfactory-1) |
Reviewer's GuideUpdates the documentation-health renderer so skipped families that carry previously established findings show their tally and rows beneath the skip reason, while empty skips retain their prior byte-identical output; focused tests cover rendering, suite integration, and downstream report consumers. Sequence diagram for carrying skipped family report renderingsequenceDiagram
participant Runner as runner.run_suite
participant Renderer as report.render
participant Report as Family section
Runner->>Renderer: findings and skips
Renderer->>Renderer: group findings by family
Renderer->>Report: render Skipped reason
Renderer->>Report: render FAMILY_SUMMARIES from fam_findings
Renderer->>Report: render carried finding rows
Note over Report: Empty skips render only the reason
Flow diagram for rendering skipped family findingsflowchart TD
A[Family result] --> B{Skipped?}
B -->|No| C{Findings present?}
B -->|Yes| D{Findings carried?}
D -->|No| E[Render Skipped reason]
D -->|Yes| F[Render Skipped reason]
F --> G[Render family tally]
G --> H[Render finding rows]
C -->|Yes| I[Render tally and finding rows]
C -->|No| J[Render No findings]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to rendering logic, preserves empty-skip output, and is comprehensively pinned by targeted tests for both renderer behavior and known consumers.
Pull request overview
This PR fixes a doc-health report rendering gap where a family section would stop at the Skipped: line even when that skip carries findings (findings that already appear in headline counts / ranked plan / previous-report diffs). It updates the renderer to display carried findings (and per-family tally where applicable) beneath the skip reason, while preserving byte-identical output for empty skips, and adds regression tests to pin both behaviors and downstream consumers.
Changes:
- Update
report.renderto render carried findings beneath a skipped family’s reason line and to compute per-family tallies based on presence of findings (not merely “skipped”). - Add suite-level tests covering: carrying-skip section shape, empty-skip byte identity, and consumer behaviors (ranked plan parsing and lane insert insertion points).
- Add renderer-focused tests ensuring a tally block is rendered when a skip is present but findings exist, while empty skips still render no tally.
File summaries
| File | Description |
|---|---|
| scripts/doc_health/report.py | Render carried findings (and tallies) under skipped family headings while preserving empty-skip output. |
| tests/doc-health/test_suite.py | Add regression tests for carrying-skip section rendering, empty-skip byte identity, and downstream consumers. |
| tests/doc-health/test_modified_block_currency_reporting.py | Add renderer tests for tally behavior under empty skip vs carried-findings skip scenarios. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…e two assertions it always was (#902) SonarCloud `python:S9073` on this PR, taken. `assert result.findings and not result.skips` fails for two unrelated reasons — a fixture tree that produced nothing, and a tree that skipped on its own — and reports neither, which is the whole value of a precondition assertion. Two assertions with their own messages instead. No behaviour changes and no other assertion in the file moves. `python3 -m pytest tests/doc-health -q` -> 1684 passed. Lane: openxfactory-1 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The renderer change is small, behavior-preserving for empty skips, and is pinned by precise regression tests covering both the new carrying-skip state and key downstream consumers.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
|
Lane: openxfactory-1 (openXfactory-1) FREEZE — 2026-09-10T16:58Z. Head sha Review outcomesCodex — ABSENCE, refused on a usage limit. Verbatim, its whole reply to the single review request:
One request was made and one refusal came back; the connector was not re-triggered. Recorded as ABSENCE, not as a clean bill. Copilot — reviewed twice, both heads, no comments. Verbatim, on head
And on head Sourcery — ABSENCE, refused on a budget limit. Verbatim:
(It still posted an unsolicited Reviewer's Guide; that carries no findings. Its check reports SKIPPED.) SonarCloud — one finding, TAKEN. Checks on
|
| check | state |
|---|---|
| SonarCloud Code Analysis | SUCCESS |
| clearing-dispatch-gate | SUCCESS |
| lane-line | SUCCESS |
| merge-master-approval | SUCCESS |
| openreposhape-pin | SUCCESS |
| openspec-cli-pin | SUCCESS |
| release-tag-gate | SUCCESS |
| signed-execution-chain-gate | SUCCESS |
| wallet-validation | SUCCESS |
| Sourcery review | SKIPPED (budget refusal above) |
| pytest-suite | IN_PROGRESS at freeze — not yet decided, stated rather than assumed |
pytest-suite was still running when the bounded bench window closed. Locally on this exact tree: python3 -m pytest tests/doc-health -q → 1684 passed, 7 warnings, exit 0 (baseline before this change was 1681; the three added tests are the difference), and python3 scripts/doc-health.py --single-repo . exits 0 with the report written and no error.
Byte-identity, measured
doc-health.py --single-repo . --as-of 2026-09-10 run on the branch base b4270224 and on this branch writes the same 349-line report, md5 34effd6b92f454fd70c0880704c50e9f both ways, with identical stderr. That run carries five skipped families, none of them carrying findings — which is the state every report in health/reports/ is in today.
Landing is the orchestrator's act; this lane has posted no LANDING and merged nothing.
|
Lane: openxfactory-1 (openXfactory-1) LANDING PROVENANCE 2026-09-10T17:04:17Z — head |



Lane: openxfactory-1 (openXfactory-1)
Renderer-only, plus its tests. Since #766 (PR #871
9c0e2cda) a family may answer with aSkipthat CARRIES the findings its repositories had established before its question stopped being askable, andrunner.run_suiteextendsresult.findingswith them while still recording the skip. Those findings reach the headline counts, the ranked plan and the previous-report diff — and reached nothing under the family's own### <family>heading, becausereport.render's Findings-By-Family loop branched on the skip FIRST and made theSkipped:line the whole of the section.Before / after — a carrying skip
Before (the whole section):
After:
The rows are the ones already in that report's ranked plan and headline counts. The section a reader opens to see what those counts are counting now carries them, which is what "Skipped families (never silently omitted)" promised: the family was named, its findings were not.
The tally
The per-class tally (
families.FAMILY_SUMMARIES) turns on the FINDINGS rather than on the skip. An EMPTY skip still has none — zeros beside that line would claim a measurement nobody took, which is canon's skip rule ("cannot run", not "found nothing"). A CARRYING skip has one, because its findings ARE a measurement somebody took. No family in the estate today both has aFAMILY_SUMMARIESentry and can produce a carrying skip, so this arm changes no report written today; it is pinned so the first family that reaches that state renders correctly rather than silently.Byte-identity for an empty skip
Two independent proofs, because the claim is the load-bearing one:
test_suite.py::test_an_empty_skip_renders_the_reason_alone_exactly_as_it_always_didasserts the family's whole section by EQUALITY against a literal captured from the renderer as this branch's base leaves it (b4270224), not re-derived from the code under test — the only form of that assertion that can catch the new branch leaking a line into the state it must not touch.python3 scripts/doc-health.py --single-repo . --as-of 2026-09-10run onb4270224and on this branch writes the same 349-line report,md5 34effd6b92f454fd70c0880704c50e9fboth ways, with identical stderr. That run has five skipped families, none carrying.Consumers of the section, checked (issue's item 2)
No consumer reads a skipped section as exactly one line, so nothing needed fixing — and the check is now a test rather than a claim (
test_the_rows_beneath_a_skip_line_are_not_ranked_plan_rows):insert_readiness_section,insert_derive_possibles_section,insert_neutrality_section— locateFINDINGS_BY_FAMILY_HEADINGwithreport_text.index(...)and splice BEFORE it; not one reads a character past the heading. The test asserts the family's section comes back byte-identical throughinsert_readiness_section;parse_previous/unparsed_plan_rowsjudge a line byPLAN_ROW_PREFIX(- severity=) and a per-family row begins- [, so a carried finding cannot become two ranked-plan rows or one unreadable one. Asserted with a carriederrorin the set on purpose: without one the key set is empty and that assertion would pass over a renderer that dropped every row;ideation_dashboard.dashboard_refresh_lane.append_report_sectionappends at the end of the report.Evidence
python3 -m pytest tests/doc-health -q→ 1684 passed, 7 warnings (exit 0). Baseline before this change was 1681; the three added tests are the difference.python3 scripts/doc-health.py --single-repo .→ exit 0, report written, no error.Out-of-surface residue (disclosed, not taken)
Two comments elsewhere state the old one-state skip rule in passing and are now imprecise about a carrying skip. Both are prose, nothing depends on them, and both are outside this PR's declared surface (
scripts/doc_health/report.py+tests/doc-health/):scripts/doc_health/__init__.py:215(theRunResult.notescomment) — "a skipped family still has a basis to state and has no tally to state";specs/022-modified-block-currency-reporting/contracts/report-section.md§§ 2 and 4 — the state table and the render contract say a skipped family's subtotal is NOT rendered. Still accurate for every state the modified-block-currency family can actually reach today (both its skip shapes are plainSkips); the third state is unreachable for it.Closes #902
refs #766, refs #871
🤖 Generated with Claude Code
Summary by Sourcery
Show carried findings in skipped-family sections while preserving empty-skip output and validating downstream report consumers.
New Features:
Skipped:line when the skip carries findings.Bug Fixes:
Enhancements:
Tests: