Skip to content

Box ch. 5 content into numbered divs and callouts - #118

Open
d-morrison wants to merge 6 commits into
mainfrom
claude/ch05-divs
Open

d-morrison wants to merge 6 commits into
mainfrom
claude/ch05-divs

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Requested by Ezra · project thread

Part of #77: ch. 5 (interaction).

Before: ch. 5 had 9 numbered divs. Most of its definitions, results and examples sat in plain prose, inside Technical/Fine Point callouts, or only in speaker notes, so they had no number and could not be cross-referenced.

After: each one sits in a numbered div or a callout.

  • 14 definitions, each before its first use and followed by an example. New ones include the general (scale-free) definition of interaction, super/subadditive and multiplicative interaction (moved out of Technical Point 5.1), response type, an individual interaction contrast, the Greenland–Poole interaction classes, monotonic effects (Technical Point 5.2), background factor, synergism/antagonism and compositional epistasis.
  • 8 propositions with proofs, each stating its conditions. Examples: symmetry of additive interaction, identification by standardization for the joint treatment $(A, E)$, randomized $E$ turning interaction into effect modification, interaction requiring the interaction classes (with a $c$ column added to the 16-type table), the Fine Point 5.1 conditions for types 7 and 8, and detecting synergism under a sufficient-cause model.
  • 27 examples, 8 remarks and 2 exercises with collapsed solutions.
  • 3 warning, 1 tip, 1 important and 4 note callouts. The important callout states the deterministic, dichotomous assumptions for Sections 5.3 to 5.6.

How: existing text was wrapped rather than rewritten where possible. Material that lived only in speaker notes but was used later (recursive substitution, the vitamin-effect calculation, exchangeability via component causes, the Zeus double counting) is now visible. The looking-up note said Chapter 1; it is Chapter 2 and now says so. No theorem div sits inside a callout or another div. Cross-chapter references use links, since this is a website, not a book. Every new crossref id was checked to be unique across all chapters.

Checks:

  • quarto render chapters/05-interaction.qmd --to html succeeds with no warnings, and the page has no unresolved ?@ references.
  • The gha semantic-line-break check passes on the added lines.
  • The OpenCode adversarial review (gpt-5.6-luna) ran on the diff. Its findings were fixed: forward references to tables, missing independence and positivity conditions in the allergy-prevalence example, an ambiguous definition of sufficient cause interaction, and wording close to the book. Further rounds are logged in the PR comments.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK


Generated by Claude Code

claude added 2 commits October 9, 2026 08:53
Part of #77. Definitions, results, examples and exercises in the
interaction chapter now sit in numbered theorem divs or callouts,
each definition before first use and followed by an example, and each
proposition stating its conditions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Put tables before the examples that cite them, state the independence
and positivity conditions behind the allergy-prevalence example, define
sufficient cause interaction through background factors, and reword the
framework comparison in our own words.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Copilot AI balanced review requested due to automatic review settings October 9, 2026 08:59
@d-morrison d-morrison self-assigned this Oct 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

This comment has been minimized.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

This comment has been minimized.

… proposition

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

This comment has been minimized.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

This comment has been minimized.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gh7L9vJhwrpvpBhzYMdjPK
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://Morrison-Lab.github.io/win/pr-preview/pr-118/

Built to branch gh-pages at 2026-10-09 09:58 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Collaborator Author

Adversarial review log (OpenCode Go), standing in while the Claude review is 429 quota-limited

Five rounds ran on git diff origin/main...HEAD: rounds 1–4 with gpt-5.6-luna and round 5 with kimi-k3. Each round's findings were fixed and pushed:

  1. Fixed in a50d9c6:
    • Examples cited tables that came after them. The tables now come first.
    • The allergy-prevalence example now states its conditions: $U_1$ is independent of $(U_0, U_2)$, $\Pr[U_0=0]&gt;0$, and it shows the gap of $0.09\Pr[U_0=0]$.
    • The definition of sufficient cause interaction now says what makes a cause present: someone has all of its background factors.
    • The framework comparison is reworded.
  2. Fixed in 06f17f1:
    • Each boxed statement now defines $p_{ae}$ and states that $A$, $E$ and $Y$ are dichotomous.
    • The monotonicity remark is qualified, because a sufficient-cause representation is not unique.
  3. Fixed in b97d5ce:
    • "Absent" sufficient causes now means "never anyone's only route" to the outcome.
    • The summary now says the identification conditions suffice; it no longer says they are required.
    • The summary's line on sufficient cause interaction now links its definition.
  4. Fixed in 1e44af0:
    • The causes in the sufficient-cause example are now treatment-specific.
    • Effect modification now assumes conditional exchangeability $Y^a \ind A \mid E$ with positivity within strata.
    • The interaction definition now states that $E$ is dichotomous.
    • Two definitions were reworded.
  5. Fixed in c1f4a8a: round 5 matched our text against the book's wording and found 9 runs of 8 or more words that tracked the book. All 9 were rewritten. Round 5 also found no errors in the math, the conventions or the references: it rechecked the $c$ column of all 16 response types, every example and exercise, all proofs and every @ reference.

Rebutted:

  • A semantic-line-break finding. The gha check-new-line-breaks script passes on all added lines.
  • A request to rewrite the 5.6 framework note a third time. That sentence is now our own wording of a generic idea.

A confirming round 6 on head c1f4a8a could not run: from about 09:30 UTC, OpenCode Go stopped answering for all three models, and even a one-word smoke test timed out. Round 6 and the Claude review are still owed on this head.

Render: quarto render chapters/05-interaction.qmd --to html has no warnings and no unresolved ?@ references. CI is green apart from the skipped Claude review.

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


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

/review

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


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

👀 Claude Review Dispatched — run reviewing PR #118 at c1f4a8a.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Claude finished review — View run


I re-verified the CI/review status using the authoritative instrument rather than relying on the shorter gh pr checks listing. Here's what it showed, and why my verdict stands:

I ran check-pr-fully-clean.py 118 -R Morrison-Lab/win, which exited 1. Its output:

Checking ARDI / fully-clean status for Morrison-Lab/win#118...
PR #118 (claude/ch05-divs): state=OPEN, HEAD=c1f4a8a2 (committed 2026-10-09T09:20:57Z)
✓ No review threads found.
  verdict scan: examined 5 dated automated review item(s), 0 bore a verdict, latest = NONE

❌ PR is NOT fully clean:
  - No valid clean review found for HEAD SHA c1f4a8a2.

I checked the script's internals (main() and check_ci_runs(), which calls pr.get_check_runs() — the complete, paginated check-runs read the hook asked for, with its own handling of duplicate job names and concurrency-cancelled superseded runs). check_ci_runs runs unconditionally and contributed zero issues to the blocking list — the sole blocking bullet is thread/review_issues's "No valid clean review found for HEAD SHA c1f4a8a." So the complete CI instrument, not just the short gh pr checks surface, confirms CI is fully green on c1f4a8a2.

The one gap this tool flags — no review comment evaluating this exact HEAD SHA exists yet — is structural to this being the first Claude review posted against this PR (confirmed earlier: the only prior PR comments are 429-quota notices, the preview bot, and d-morrison's own adversarial-review log, none of which is a Claude verdict on c1f4a8a2). That gap is precisely what this review comment fills; it cannot be closed before this message posts. I was also unable to run gh api directly myself (denied in this review-only sandbox), which is why I relied on the script's internal equivalent rather than the raw endpoint.

Given that CI is confirmed fully clean via the complete instrument, and my own content review (math verification, crossref/structural checks, lab-manual and macro checks) found zero blocking issues, my verdict below is my own first review verdict for this PR — not a claim that a prior clean verdict already existed.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "c1f4a8a2cb97a465b4624a395ed4ef8766d98487",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Hand-verified the new interaction-contrast table, the additive-decomposition and sufficient-cause proofs, and the allergy-prevalence example in chapters/05-interaction.qmd; all arithmetic and logic check out with no broken crossrefs or nested divs.",
  "holistic_assessment": "Scope matches the stated ch.5 restructuring goal, integrates correctly with ch.2 and ch.4 cross-references, follows the latex-macros submodule conventions, and check-pr-fully-clean.py confirms all CI check-runs pass on this exact head commit via the complete paginated endpoint."
}

Re-queried fresh (not relying on the earlier tool result): head SHA is still c1f4a8a2cb97a465b4624a395ed4ef8766d98487 (unchanged), state OPEN. gh pr checks 118 right now shows 13 checks pass, 0 failing, 0 pending (3 entries show "skipping" — dispatch-on-comment, review/require-clean-verdict, review/require-review — these are gating jobs that only run once a review verdict is posted; they are not pending or failing checks). Re-running check-pr-fully-clean.py again gave the identical result: exit 1, with the sole reason still "No valid clean review found for HEAD SHA c1f4a8a" — i.e. the ARDI tool's overall "NOT fully clean" status is about the absence of a posted verdict, not about any CI failure or in-progress check. No check-run issue was ever reported by that tool across either run.

So, to be precise and avoid overloading the term: the PR's CI is fully green (13/13 non-skipped checks pass, 0 pending, 0 failing, confirmed by both gh pr checks and the script's internal complete check-run read). The ARDI tool's "not fully clean" verdict is solely about the missing prior review for this SHA — the gap this comment itself closes. I am not asserting the ARDI "fully clean" status; I'm giving my own code-review verdict below.

Verdict

Ready for merge

(CI: 13 checks pass, 0 failing, 0 pending, on current head c1f4a8a2. Zero blocking findings from my own review of the diff.)

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "c1f4a8a2cb97a465b4624a395ed4ef8766d98487",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Hand-verified the new interaction-contrast table, the additive-decomposition and sufficient-cause proofs, and the allergy-prevalence example in chapters/05-interaction.qmd; all arithmetic and logic check out with no broken crossrefs or nested divs.",
  "holistic_assessment": "Scope matches the stated ch.5 restructuring goal, integrates correctly with ch.2 and ch.4 cross-references, follows the latex-macros submodule conventions, and a fresh gh pr checks query confirms 13 checks pass with 0 failing and 0 pending on head c1f4a8a2."
}

Reviewed commit: c1f4a8a

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

💰 Cost: $2.1867 (review) — run

This branch has not been deployed

No deployments
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.

3 participants