Backfill test coverage for 15 existing capability-src crates - #306
Merged
enricopiovesan merged 15 commits intoAug 22, 2026
Conversation
Removed unreachable helper functions (never called from evaluate() or anywhere else: extract_i32, parse_i32, parse_number_millis, write_i32, ascii_lower, eq_ignore_case, normalize_email, trim_ascii, parse_ymd_days, format_score_millis) and added tests for the remaining branches, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removed unreachable helper functions and added tests for the remaining branches (invalid input, id/name/email fallback matching, malformed array elements), per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for quiet-hours (both wrap and non-wrap), snooze, budget, pressure, escalation, and array-scanning branches. Removed the last_activity/no-signal skip path and its approaching_due/days_between date-math dependents: pressure < min_pressure already returns above, so pressure >= min_pressure always holds by the time that code ran, making it genuinely unreachable, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…/96% Removed unreachable helper functions and added tests for the verdict branches (fail vs needs_evidence under low/high pressure), multi-gap array output, and parser edge cases, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for the deny paths (missing input, unknown action, delete own_only/hard-delete), successful edit/reply flows, multi-mention/link output, and the low-level JSON parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for missing config, unknown status, owner_only=false, and missing/empty allowed_transitions branches, plus the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for missing text, empty-sentence skipping, confidence threshold branches (below both, below min only), capitalized-name matching, multi-item comma joining, due-date resolution, and the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for missing fields, empty title, missing due date, owner/due-omitted ok output, malformed duplicate-check array elements, and the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for missing config, default fallback, fallback=creator branches (missing creator_id, active-member match, direct accept without require_active), and the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for missing rules key, default_effect=allow fallback, role/attribute/condition non-match branches, and the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for missing fields, invalid intensity, owner/due-omitted message variants for each intensity level, tone default, and the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for missing config/quantity, discount SKU/tax-code mismatch continue branches, fixed-discount capping, unparseable tax rates, the inclusive-tax branch, and the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…%/97% Added tests for missing config, empty items, closed-status skipping, overloaded owners, top-2 pressure selection with a tie-break, malformed array elements, and the low-level parser helpers, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Added tests for invalid local/domain characters and exercised the max_length input path through handle(), the last uncovered branches, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Exercised the min_length input path through handle(), the last uncovered branch, per registry#301. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
enricopiovesan
enabled auto-merge (squash)
August 22, 2026 04:32
enricopiovesan
deleted the
claude/issue-301-backfill-capability-coverage
branch
August 22, 2026 04:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
capability-src/crates tracked in Backfill test coverage for 15 existing under-tested capability-src crates #301, each now meeting the same bar spec 018 requires of new publishes:functions == 100%,lines >= 95%,regions >= 95%(measured viacargo llvm-cov --summary-only --json).core-notify-stakeholders,core-normalize-participants, andcore-evaluate-completion-qualityalso had genuinely-dead helper functions (never called fromevaluate(), confirmed viacargo test"never used" warnings) removed rather than tested for their own sake.core-select-items-for-followuphad one truly-unreachable branch (thelast_activity/no-signal skip path, provably dead becausepressure < min_pressurealready returns above it) simplified away along with its now-orphanedapproaching_due/days_betweendate-math dependents, rather than adding tests that exercise nothing.evaluate()/process()/authorize()logic is untouched; only#[cfg(test)]test modules gained coverage.Governing Spec
Project Item
Definition of Done
#[test]coveragecargo testpasses cleanly for each (verified individually per crate)cargo llvm-cov --summary-only --json, not assumedValidation
Per-crate
cargo llvm-cov --manifest-path capability-src/<crate>/Cargo.toml --summary-only --jsonresults (all PASS against functions==100%, lines>=95%, regions>=95%):This PR touches only
capability-src/, soscripts/ci/pre_pr_check.sh(thecapabilities//personas/gate) isn't applicable — confirmed no files undercapabilities/orpersonas/changed (git diff main --stat).