chore(ci): codecov ratchet to 75% + per-component floors (#207)#225
Conversation
- bump project target from auto to 75% (issue #207) - ignore binary entry points + #205-deferred files so coverage % is honest - add per-component project floors: mercury 92, services 62, content-engine 82, entity 88, game 80, defs 84, common 98, commands 92, admin-api 50 - stays informational: true so the test-adding PRs that follow can show their delta without the gate flipping red mid-burndown Closes #207's codecov.yml acceptance bullet. Tier 1-3 coverage tasks land in followup PRs (149, 166, 167, 190-191, 205). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughCodecov configuration is updated to establish a 75% default project coverage target, expand ignore rules for binaries and fixtures, and restructure component-level coverage configuration with explicit per-component targets and informational flags for nine components. ChangesCodecov Configuration Update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR tightens the repository’s Codecov configuration so coverage drift is measured against explicit workspace and per-crate baselines instead of the previous fully automatic project target. It fits into the broader testing burndown by making later test PRs report against stable, intentional floors.
Changes:
- Raises the overall project coverage target from
autoto75%. - Expands
ignore:rules to exclude binary entry points and several explicitly deferred high-fixture-cost files. - Adds explicit per-component coverage targets, including a new
admin-apicomponent.
| - "crates/supervisor/src/main.rs" | ||
| - "crates/upk-objects/src/bin/**" | ||
| - "crates/upk/src/bin/**" | ||
| # Deferred per issue #205 (fixture cost exceeds value-per-line) |
Cadacious
left a comment
There was a problem hiding this comment.
PR #225 — chore(ci): codecov ratchet to 75% + per-component floors
Top-level review comment
The ratchet shape looks right and matches issue #207's acceptance line ("Land the codecov.yml ratchet first … before adding tests"). Two small things to consider before merge.
admin-apicomponent is added before any tests exist. The crate is currently 0% per #207, and #207's own acceptance bullet says "add it as a component once it has any tests, with an initial floor of 50%." Withtarget: 50%andinformational: truethe gate won't flip red, but the per-component PR comment will displayadmin-api 0% (target 50%)on every PR until tests land — that's noise. Either drop the component until #207 Tier 1 starts landing, or settarget: autowith a TODO comment in the YAML pointing at #207 Tier 1.default_rules.statusesistarget: auto, but every component overrides. Thedefault_rulesblock is unreachable for the nine listed components. If a future crate is added topathswithout astatuses:override, it falls back toauto— which is fine, but means there's no "default floor." Worth a one-line YAML comment so the next contributor knows: "components without an explicitstatuses:override usetarget: auto."
No test-policy implication here — this PR is config-only.
Inline note: codecov.yml:65
The deferred files (base/connect_loop.rs, cooked_data.rs, dispatch.rs, minigame/server.rs) are in ignore: — good. Worth cross-linking to the deferral rationale: the same list lives in #205's "Deferred for fixture-cost reasons" bucket. A YAML comment like # Deferred per #205; see issue body for fixture-cost rationale makes the link maintainable when the file list shifts.
Cadacious
left a comment
There was a problem hiding this comment.
PR #225 — chore(ci): codecov ratchet to 75% + per-component floors
Top-level review comment
The ratchet shape looks right and matches issue #207's acceptance line ("Land the codecov.yml ratchet first … before adding tests"). Two small things to consider before merge.
admin-apicomponent is added before any tests exist. The crate is currently 0% per #207, and #207's own acceptance bullet says "add it as a component once it has any tests, with an initial floor of 50%." Withtarget: 50%andinformational: truethe gate won't flip red, but the per-component PR comment will displayadmin-api 0% (target 50%)on every PR until tests land — that's noise. Either drop the component until #207 Tier 1 starts landing, or settarget: autowith a TODO comment in the YAML pointing at #207 Tier 1.default_rules.statusesistarget: auto, but every component overrides. Thedefault_rulesblock is unreachable for the nine listed components. If a future crate is added topathswithout astatuses:override, it falls back toauto— which is fine, but means there's no "default floor." Worth a one-line YAML comment so the next contributor knows: "components without an explicitstatuses:override usetarget: auto."
No test-policy implication here — this PR is config-only.
Inline note: codecov.yml:65
The deferred files (base/connect_loop.rs, cooked_data.rs, dispatch.rs, minigame/server.rs) are in ignore: — good. Worth cross-linking to the deferral rationale: the same list lives in #205's "Deferred for fixture-cost reasons" bucket. A YAML comment like # Deferred per #205; see issue body for fixture-cost rationale makes the link maintainable when the file list shifts.
- admin-api has no tests yet, so a 50% floor displays "0% (target 50%)" on every PR; switch to target: auto until tier-1 admin tests land. - Document that default_rules is the fallback for future components without an explicit statuses override.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@codecov.yml`:
- Around line 84-143: Each per-component statuses block (for component_id values
mercury, services, content-engine, entity, game, defs, common, and commands) is
missing the explicit "threshold: 1%" setting and therefore overrides
default_rules.statuses; update each component's statuses entry to include
threshold: 1% alongside the existing type/project and informational fields so
they inherit the intended 1% drift tolerance (follow the admin-api component as
the model).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2ddb9b50-a4a4-439b-ada1-e4454cc64821
📒 Files selected for processing (1)
codecov.yml
| statuses: | ||
| - type: project | ||
| target: 92% | ||
| informational: true | ||
| - component_id: services | ||
| name: services | ||
| paths: | ||
| - "crates/services/**" | ||
| statuses: | ||
| - type: project | ||
| target: 62% | ||
| informational: true | ||
| - component_id: content-engine | ||
| name: content-engine | ||
| paths: | ||
| - "crates/content-engine/**" | ||
| statuses: | ||
| - type: project | ||
| target: 82% | ||
| informational: true | ||
| - component_id: entity | ||
| name: entity | ||
| paths: | ||
| - "crates/entity/**" | ||
| statuses: | ||
| - type: project | ||
| target: 88% | ||
| informational: true | ||
| - component_id: game | ||
| name: game | ||
| paths: | ||
| - "crates/game/**" | ||
| statuses: | ||
| - type: project | ||
| target: 80% | ||
| informational: true | ||
| - component_id: defs | ||
| name: defs | ||
| paths: | ||
| - "crates/defs/**" | ||
| statuses: | ||
| - type: project | ||
| target: 84% | ||
| informational: true | ||
| - component_id: common | ||
| name: common | ||
| paths: | ||
| - "crates/common/**" | ||
| statuses: | ||
| - type: project | ||
| target: 98% | ||
| informational: true | ||
| - component_id: commands | ||
| name: commands | ||
| paths: | ||
| - "crates/commands/**" | ||
| statuses: | ||
| - type: project | ||
| target: 92% | ||
| informational: true |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's read the full codecov.yml file to understand the structure
git ls-files codecov.ymlRepository: SandboxServers/Cimmeria
Length of output: 79
🏁 Script executed:
# Read the codecov.yml file to see the full context
cat -n codecov.ymlRepository: SandboxServers/Cimmeria
Length of output: 6069
🌐 Web query:
Codecov component_management statuses threshold inheritance deep merge
💡 Result:
In Codecov's codecov.yml configuration, the component_management section defines components for grouping coverage data by paths or flags, with support for statuses (including thresholds) that control commit status checks [1][2]. The default_rules under component_management provide rules (paths, flag_regexes, statuses) inherited by all components that do not define those fields themselves [1][2]. Individual components in individual_components inherit from default_rules but can override specific fields like statuses; if a component omits statuses, it uses those from default_rules [2]. Statuses are lists of status definitions (e.g., type: project, target: auto, threshold: 1%) similar to flag_management statuses but without 'flags' [1]. If an individual component defines its own statuses list, it replaces the default_rules statuses entirely rather than merging; no explicit deep merge for statuses lists is documented, following standard YAML override behavior where presence overrides inheritance [2]. Thresholds are set within status objects (e.g., threshold: 5%) [3]. Examples show components without statuses inheriting project status from default_rules, while others define custom lists [2].
Citations:
- 1: https://docs.codecov.com/v5.0/docs/codecovyml-reference
- 2: https://docs.codecov.com/docs/components
- 3: https://docs.codecov.com/docs/commit-status
Add threshold: 1% to all per-component status checks
Individual components override default_rules.statuses entirely rather than merging with them. Each of the 8 components defined in individual_components (mercury, services, content-engine, entity, game, defs, common, commands) omits the threshold: 1% field, which means those components won't inherit the stated 1% drift tolerance from default_rules. This results in stricter checks that increase PR noise and contradict the intent documented at the top of the file. The admin-api component correctly includes explicit threshold: 1% and serves as the model.
Required changes
- component_id: mercury
name: mercury
paths:
- "crates/mercury/**"
statuses:
- type: project
target: 92%
+ threshold: 1%
informational: true
- component_id: services
name: services
paths:
- "crates/services/**"
statuses:
- type: project
target: 62%
+ threshold: 1%
informational: true
- component_id: content-engine
name: content-engine
paths:
- "crates/content-engine/**"
statuses:
- type: project
target: 82%
+ threshold: 1%
informational: true
- component_id: entity
name: entity
paths:
- "crates/entity/**"
statuses:
- type: project
target: 88%
+ threshold: 1%
informational: true
- component_id: game
name: game
paths:
- "crates/game/**"
statuses:
- type: project
target: 80%
+ threshold: 1%
informational: true
- component_id: defs
name: defs
paths:
- "crates/defs/**"
statuses:
- type: project
target: 84%
+ threshold: 1%
informational: true
- component_id: common
name: common
paths:
- "crates/common/**"
statuses:
- type: project
target: 98%
+ threshold: 1%
informational: true
- component_id: commands
name: commands
paths:
- "crates/commands/**"
statuses:
- type: project
target: 92%
+ threshold: 1%
informational: true📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| statuses: | |
| - type: project | |
| target: 92% | |
| informational: true | |
| - component_id: services | |
| name: services | |
| paths: | |
| - "crates/services/**" | |
| statuses: | |
| - type: project | |
| target: 62% | |
| informational: true | |
| - component_id: content-engine | |
| name: content-engine | |
| paths: | |
| - "crates/content-engine/**" | |
| statuses: | |
| - type: project | |
| target: 82% | |
| informational: true | |
| - component_id: entity | |
| name: entity | |
| paths: | |
| - "crates/entity/**" | |
| statuses: | |
| - type: project | |
| target: 88% | |
| informational: true | |
| - component_id: game | |
| name: game | |
| paths: | |
| - "crates/game/**" | |
| statuses: | |
| - type: project | |
| target: 80% | |
| informational: true | |
| - component_id: defs | |
| name: defs | |
| paths: | |
| - "crates/defs/**" | |
| statuses: | |
| - type: project | |
| target: 84% | |
| informational: true | |
| - component_id: common | |
| name: common | |
| paths: | |
| - "crates/common/**" | |
| statuses: | |
| - type: project | |
| target: 98% | |
| informational: true | |
| - component_id: commands | |
| name: commands | |
| paths: | |
| - "crates/commands/**" | |
| statuses: | |
| - type: project | |
| target: 92% | |
| informational: true | |
| statuses: | |
| - type: project | |
| target: 92% | |
| threshold: 1% | |
| informational: true | |
| - component_id: services | |
| name: services | |
| paths: | |
| - "crates/services/**" | |
| statuses: | |
| - type: project | |
| target: 62% | |
| threshold: 1% | |
| informational: true | |
| - component_id: content-engine | |
| name: content-engine | |
| paths: | |
| - "crates/content-engine/**" | |
| statuses: | |
| - type: project | |
| target: 82% | |
| threshold: 1% | |
| informational: true | |
| - component_id: entity | |
| name: entity | |
| paths: | |
| - "crates/entity/**" | |
| statuses: | |
| - type: project | |
| target: 88% | |
| threshold: 1% | |
| informational: true | |
| - component_id: game | |
| name: game | |
| paths: | |
| - "crates/game/**" | |
| statuses: | |
| - type: project | |
| target: 80% | |
| threshold: 1% | |
| informational: true | |
| - component_id: defs | |
| name: defs | |
| paths: | |
| - "crates/defs/**" | |
| statuses: | |
| - type: project | |
| target: 84% | |
| threshold: 1% | |
| informational: true | |
| - component_id: common | |
| name: common | |
| paths: | |
| - "crates/common/**" | |
| statuses: | |
| - type: project | |
| target: 98% | |
| threshold: 1% | |
| informational: true | |
| - component_id: commands | |
| name: commands | |
| paths: | |
| - "crates/commands/**" | |
| statuses: | |
| - type: project | |
| target: 92% | |
| threshold: 1% | |
| informational: true |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@codecov.yml` around lines 84 - 143, Each per-component statuses block (for
component_id values mercury, services, content-engine, entity, game, defs,
common, and commands) is missing the explicit "threshold: 1%" setting and
therefore overrides default_rules.statuses; update each component's statuses
entry to include threshold: 1% alongside the existing type/project and
informational fields so they inherit the intended 1% drift tolerance (follow the
admin-api component as the model).
Summary
Closes the codecov.yml acceptance bullet from #207 — lands first so the test-adding PRs that follow (#149, #166, #167, #190-191, #205) can show their per-component delta against this baseline.
auto→75%ignore:entries for binary entry points (server/main.rs,supervisor/main.rs,upk*/bin/**) and Test coverage residuals from #123 (Group A leftovers) #205-deferred files (base/connect_loop.rs,base/cooked_data.rs,base/dispatch.rs,minigame/server.rs)mercury92%,entity88%,content-engine82%,commands92%,common98%,defs84%services62% (near-term, ratchet to 75% as Test coverage residuals from #123 (Group A leftovers) #205 lands)game80%,admin-api50% (added as a component)informational: trueso the gate doesn't flip red mid-burndownWhy this lands first
Per #207's body: "Land the `codecov.yml` ratchet first (excludes + per-component floors) before adding tests, so the new tests' deltas are visible against a stable baseline."
Test plan
Related
🤖 Generated with Claude Code
Summary by CodeRabbit