Skip to content

Fix skipped heading levels in r-config and count-regression - #1428

Merged
dem-extra1 merged 3 commits into
mainfrom
claude/project-thread-ykzrw4
Nov 1, 2026
Merged

dem-extra1 merged 3 commits into
mainfrom
claude/project-thread-ykzrw4

Conversation

@dem-extra1

@dem-extra1 dem-extra1 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1427.

rme sections use #, so the shared r-config.qmd include now opens with # Configuring R instead of ###, and the five ### headings in count-regression.qmd that followed a # heading are now ##.

Because Configuring R is now level 1, four headings in three chapters that include it would have nested under it, so they are raised to # too: the Acknowledgements headings in logistic-regression.qmd and binary-outcome-associations.qmd, and the two headings in concept-map.qmd.

Rendered count-regression, concept-map and binary-outcome-associations to HTML. logistic-regression was not rendered (a package is missing here); its change is the same one-character edit. Running the check in Morrison-Lab/gha#1373 over rme's chapters reports no breaks.

The check from the sweep is merged in gha but not yet called from rme's workflows; adopting it here is separate infrastructure work. lint-changed-files fails on older R code in r-config.qmd, which #1430 fixes.

Thread: Fix heading levels in split-out pages (project thread).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FWgYrDiMYAnjPMHWVTPJfZ

The r-config include opened every chapter one level too deep, and
count-regression skipped level 2 under its level 1 sections.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWgYrDiMYAnjPMHWVTPJfZ
@dem-extra1

Copy link
Copy Markdown
Collaborator Author

🤖 Antigravity agent report

Cross-harness review (Gemini 3.8 Flash (Medium) via Antigravity agy 1.3.5, standing in while Argon quota is exhausted, read-only plan mode) at 52a2a48

I gave the model the full diff (two files, 2 KB) and facts that I checked in the files at this head; it then confirmed the reasoning, so this is a check of my own facts, not an independent discovery.
The description says only count-regression.qmd was rendered, and that "rme sections use #".
Nothing was rendered for this read.

The count-regression.qmd change is correct: its # sections now have ## children (## Maximum likelihood estimates for two groups, ## Fitted totals, ## Confidence intervals ..., ## Residuals, ## Models for zero-inflated counts), and the existing ### Example: needle-sharing model extensions sits under ## Negative binomial models, so no skipped level is left in that file.

Findings

  1. # Configuring R nests all of concept-map.qmd under it.
    r-config.qmd reaches 18 chapters through shared-config.qmd, each time before the chapter's first heading, and fifteen of them open with a # heading.
    chapters/concept-map.qmd has only ## headings (## Dependency diagram at line 59 and ## Descendants of each result at line 187) after the include at line 13, so with a level 1 Configuring R before them, the chapter's whole content becomes children of "Configuring R" in the outline, the table of contents and the slides.
    Before the change the level 3 heading did not nest them.
  2. ## Acknowledgements is nested under it in two more chapters.
    chapters/logistic-regression.qmd (line 24) and chapters/binary-outcome-associations.qmd (line 22) begin with ## Acknowledgements {.unnumbered} right after the include, so Acknowledgements now sits under "Configuring R" instead of before the first section.
    The other chapters that open with Acknowledgements (count-regression, causal-inference, predictor-selection) use #, so these two look like mis-leveled headings that the change exposes.
  3. Only one of the 18 includers was rendered.
    Given the first two findings, render or check the outline of every chapter that includes shared-config.qmd, or confirm with the check-heading-levels run in gha#1373.

Possible fixes: change the two ## Acknowledgements headings to #; for concept-map.qmd, either raise its two ## headings to # (if its sections are meant to be top level, as in the other chapters) or leave Configuring R out of that chapter; and render each affected chapter.

Verdict

VERDICT: FINDINGS

Reviewed-Commit: 52a2a48

Posted by Claude Code (AI agent) --- not written by a human.

concept-map had only level 2 headings after the shared-config include, and
logistic-regression and binary-outcome-associations opened with a level 2
Acknowledgements heading. Chapters use level 1 for these.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWgYrDiMYAnjPMHWVTPJfZ

dem-extra1 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

lint-changed-files fails because chapters/r-config.qmd is a changed file and lintr::lint_dir() lints the whole file. The 11 findings are all in R code this PR does not touch: commented code at line 13, line lengths at lines 38, 39 and 63, indentation at lines 51 to 54, a quote style at line 58, and = assignments at lines 64 and 65. The PR changes only the heading on line 5, so I'm leaving them out of this PR. Fixing them would reformat that file's R chunk, which is a separate change from the heading levels. Does anyone want that cleanup in this PR or in its own?

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@dem-extra1

Copy link
Copy Markdown
Collaborator Author

🤖 Antigravity agent report

Cross-harness review (delta-focused, Gemini 3.8 Flash (Medium) via Antigravity agy 1.3.5, standing in while Argon quota is exhausted, read-only plan mode) at 16e5f96

This supersedes my read of 52a2a48 and covers the compare 52a2a48...16e5f96 (three files, four one-line hunks), with my findings in the prompt.
The two ## Acknowledgements {.unnumbered} headings in logistic-regression.qmd and binary-outcome-associations.qmd and the two ## headings in concept-map.qmd (Dependency diagram and Descendants of each result) are now #, so none of them nests under # Configuring R.
The model reported that the four edits change only the heading level and leave the wording, attributes and ids alone; it found nothing.
I also checked the files at this head: concept-map.qmd has exactly those two headings, {#sec-descendants-table} is unchanged and is not referenced anywhere else in the organisation, the other fifteen chapters that include shared-config.qmd already open with #, and binary-outcome-associations.qmd now has only # sections.
The author says logistic-regression was not rendered (a package is missing), so I did not see a render of it and did not render anything myself; the edit there is the same one-character change.

Verdict

VERDICT: CLEAN

Reviewed-Commit: 16e5f96

Posted by Claude Code (AI agent) --- not written by a human.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-11-01 16:29 UTC

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Claude finished review — View run


The most recent prior review verdict is at #1428 (comment) (posted 2026-10-30T21:58:10Z, commit 16e5f96).

Review of #1428 — update for commit 01bf47b

What changed since the last round: git log --oneline 16e5f96c..01bf47b7 shows two merge commits bringing main into this branch, carrying in PR #1430 ("Fix lint findings in the R chunks of r-config.qmd"), which has since merged into main (confirmed live: mergedAt: 2026-11-01T09:56:22Z). Checked git diff origin/main...HEAD --stat: the PR's actual net diff against main is still exactly the same five one-line heading bumps already reviewed (binary-outcome-associations.qmd, concept-map.qmd ×2, count-regression.qmd ×5, logistic-regression.qmd, r-config.qmd) — no new substantive content. The lint fixes from #1430 are now part of main itself and no longer show up as part of this PR's diff.

Confirming prior review: the prior verdict (linked above) stands — all 18 chapters transitively including r-config.qmd still open with a #-level heading after the shared-config include, and count-regression.qmd's outline is unchanged and correctly nested. No new heading-nesting defects.

Both non-blocking items from the prior round are now resolved:

  1. PR description softened, as recommended. It now reads "The check from the sweep is merged in gha but not yet called from rme's workflows; adopting it here is separate infrastructure work," replacing the earlier overclaim that heading-level regressions "cannot recur." This accurately reflects that Morrison-Lab/gha#1373's check-heading-levels workflow still has no caller in this repo's .github/workflows/ (re-confirmed: grep -ril heading .github/workflows/ finds nothing) and no tracking issue exists yet (gh issue list --search "check-heading-levels" / "heading-levels in rme" both return no match). Not blocking — correctly scoped out of this PR per this repo's CLAUDE.md CI-isolation rule — but still worth a maintainer filing that follow-up at some point.
  2. lint-changed-files is now passing. Live statusCheckRollup on Fix skipped heading levels in r-config and count-regression #1428 shows lint-changed-files: SUCCESS, consistent with Fix lint findings in the R chunks of r-config.qmd #1430's lint fixes now being in main. The previously-flagged red check is gone.

No other CI failures of note; the only non-SUCCESS entries are check-dois, build, and review/claude-review still IN_PROGRESS (this review's own job), which isn't a defect.

No math/LaTeX changed in this diff, so the macro-simplification/new-macro checks don't apply. No fabricated APIs, citations, or paths found in the current diff.

Verdict

Ready for merge — the heading-level fix remains correct and fully verified; both non-blocking items from the prior review round are now resolved (PR description softened, and the previously-failing lint check now passes since #1430 merged into main). No blocking findings.

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "01bf47b7ec3fec594bf57a5c6d181af8ba470703",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The net diff against main in chapters/r-config.qmd, count-regression.qmd, concept-map.qmd, binary-outcome-associations.qmd, and logistic-regression.qmd is unchanged from the prior reviewed commit, so no new heading-nesting defect was introduced by the intervening merge commits.",
  "holistic_assessment": "Both prior non-blocking concerns are now resolved: the PR description no longer overstates CI recurrence protection, and the previously failing lint-changed-files check now passes because PR 1430 merged into main."
}

Reviewed commit: a894906

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

💰 Cost: $0.4452 (review) — run

@dem-extra1

Copy link
Copy Markdown
Collaborator Author

🤖 Antigravity agent report

Cross-harness review (delta-focused; the earlier reads used Gemini 3.8 Flash (Medium) via Antigravity agy 1.3.5, standing in while Argon quota is exhausted) at a894906

The read of 16e5f96 was CLEAN (comment).
This head is 16e5f96 with main merged in after rme#1430 merged.

I did not run the model again, because there is nothing new for it to read.
I compared the PR's five files by git blob sha between the two heads: four are byte-identical (binary-outcome-associations.qmd, concept-map.qmd, count-regression.qmd, logistic-regression.qmd).
The fifth, chapters/r-config.qmd, differs only by the lint cleanup that rme#1430 merged, and I read that cleanup (the delta 16e5f96...a894906 for the file is the same set of hunks as rme#1430's diff, which I reviewed CLEAN at 1604b81 in this comment); against the new main, this PR's change to the file is the single line ### Configuring R {.unnumbered} becoming # Configuring R {.unnumbered}.

So the earlier read applies unchanged to this head.
This is a content read, not a CI verdict.

Verdict

VERDICT: CLEAN

Reviewed-Commit: a894906

Posted by Claude Code (AI agent) --- not written by a human.

@dem-extra1
dem-extra1 merged commit da95d7e into main Nov 1, 2026
32 of 33 checks passed
@dem-extra1
dem-extra1 deleted the claude/project-thread-ykzrw4 branch November 1, 2026 15:55
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 skipped heading levels in r-config and count-regression

2 participants