Skip to content

Test the untested paths; drop two unreachable helpers - #12

Merged
bvdmitri merged 1 commit into
mainfrom
test/coverage
Oct 6, 2026
Merged

bvdmitri merged 1 commit into
mainfrom
test/coverage

Conversation

@bvdmitri

@bvdmitri bvdmitri commented Oct 6, 2026

Copy link
Copy Markdown
Member

Codecov reported 63 lines without coverage on main (96.64%). This adds tests for the reachable ones and removes two helpers nothing can reach. Locally, on Julia 1.13 with CI's variables, line coverage goes to about 98.4%.

Newly tested

  • the in-place marginal API, message_passing_marginalrule!, and its refusal of a rule with no in-place form (it had no test at all);
  • the result card's modes (messages and marginals under the default algorithm; marginals, and both, under another), a log scale computed from the inputs, and the HTML rows of incoming log scales;
  • a node given by a function, and a rule for a node with no declaration (through message_passing_rule);
  • the two-argument forms of NodeSpec, RuleCoverage, DependenciesSpec, TargetDependencies, Drawing, RuleContext and NodeFunctionLogPdf, and the coverage table's labels for parametric algorithms;
  • a RuleNotFoundError for arguments that are not a RuleArgs;
  • annotations with no store and a rule's own annotations; a joint of four members; RuleArgs from its parts;
  • interface_groups, selection_arity, a redefined node's registry entry;
  • the macros' errors for a malformed target or cluster member; undefined log scales from a fallback or a custom cause.

Removed

  • input_labels: no caller.
  • logscale_source(::Nothing): unreachable, since an undeclared log scale is an UndefinedLogScale, never a number.

Left untested, as defensive branches with no realistic input: a few fallbacks in diagnostics.jl (an unmatched type description, a rule input naming no interface, a method lookup that cannot fail) and held for a cluster in rulespec.jl.

No user-visible change, so no CHANGELOG entry.

🤖 Generated with Claude Code

Codecov reported 63 lines without coverage on main (96.64%). Tests now cover:
the in-place marginal API, `message_passing_marginalrule!`, and its refusal of
a rule with no in-place form; the result card's modes (messages and marginals
under the default algorithm, marginals and both under another), its log scale
computed from the inputs and its HTML rows of incoming log scales; a node
given by a function and a rule for a node with no declaration; the two-argument
forms of NodeSpec, RuleCoverage, DependenciesSpec, TargetDependencies,
Drawing, RuleContext and NodeFunctionLogPdf; the coverage table's labels for
parametric algorithms; a RuleNotFoundError for arguments that are not a
RuleArgs; annotations with no store and a rule's annotations; a joint of four
members and RuleArgs from its parts; interface_groups, selection_arity and a
redefined node; the macros' errors for a malformed target or cluster member;
and an undefined log scale from a fallback or a cause of an engine's own.

`input_labels`, which nothing calls, and `logscale_source(::Nothing)`, which
cannot be reached, since an undeclared log scale is never a number, are gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bvdmitri
bvdmitri requested a review from Nimrais October 6, 2026 08:24
@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.25%. Comparing base (6194f45) to head (7df6bd5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   96.64%   99.25%   +2.60%     
==========================================
  Files          25       25              
  Lines        1878     1875       -3     
==========================================
+ Hits         1815     1861      +46     
+ Misses         63       14      -49     

☔ 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.

@bvdmitri
bvdmitri merged commit 119d9bf into main Oct 6, 2026
10 checks passed
bvdmitri added a commit that referenced this pull request Oct 6, 2026
`logscale = improper`, a tutorial on writing a new message passing scheme, a
Makefile and the documentation from the review in #9, and tests for the paths
that had none (#12).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bvdmitri
bvdmitri deleted the test/coverage branch October 6, 2026 09:16
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