Skip to content

chore(ci): codecov ratchet to 75% + per-component floors (#207)#225

Merged
Cadacious merged 2 commits into
mainfrom
chore/codecov-ratchet-207
May 7, 2026
Merged

chore(ci): codecov ratchet to 75% + per-component floors (#207)#225
Cadacious merged 2 commits into
mainfrom
chore/codecov-ratchet-207

Conversation

@BangRocket
Copy link
Copy Markdown
Contributor

@BangRocket BangRocket commented May 6, 2026

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.

  • bump project target from auto75%
  • add 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)
  • per-component project floors:
  • stays informational: true so the gate doesn't flip red mid-burndown

Why 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

  • Codecov picks up the new config on next push
  • Per-component floors render in the PR comment

Related

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Set a fixed default project coverage target of 75% for coverage gating.
    • Expanded coverage ignore rules to exclude additional binary entry points and fixture sources from reporting.
    • Reorganized component coverage config with explicit per-component targets (and informational checks), while leaving one component on automatic targeting with a minimal threshold.

- 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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

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

Changes

Codecov Configuration Update

Layer / File(s) Summary
Coverage Target
codecov.yml (lines 16–18)
Default project coverage target changed from auto to 75% with threshold: 1% and informational: true.
Ignore Rules Expansion
codecov.yml (lines 55–65)
Added ignore patterns for binary entry points and specific Rust fixture/server source files under crates/services (e.g., crates/services/src/base/*, crates/services/src/minigame/server.rs).
Component Management Restructure
codecov.yml (lines 66–155)
Reworked component_management to include default_rules.statuses plus individual_components; added explicit per-component project.target percentages and informational: true flags for components (mercury 92%, services 62%, content-engine 82%, entity 88%, game 80%, defs 84%, common 98%, commands 92%), and updated admin-api to include threshold: 1% while keeping target: auto.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Poem

🐰 With targets now clear and components named,
Codecov's config is no longer the same,
Seventy-five percent shall be our goal,
Each component measured to reach its role,
Hopping toward coverage, we've found the way!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: updating Codecov configuration to set a 75% project coverage target and establishing per-component coverage floors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/codecov-ratchet-207

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 auto to 75%.
  • 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-api component.

Comment thread codecov.yml
- "crates/supervisor/src/main.rs"
- "crates/upk-objects/src/bin/**"
- "crates/upk/src/bin/**"
# Deferred per issue #205 (fixture cost exceeds value-per-line)
Copy link
Copy Markdown
Contributor

@Cadacious Cadacious left a comment

Choose a reason for hiding this comment

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

PR #225chore(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-api component 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%." With target: 50% and informational: true the gate won't flip red, but the per-component PR comment will display admin-api 0% (target 50%) on every PR until tests land — that's noise. Either drop the component until #207 Tier 1 starts landing, or set target: auto with a TODO comment in the YAML pointing at #207 Tier 1.
  • default_rules.statuses is target: auto, but every component overrides. The default_rules block is unreachable for the nine listed components. If a future crate is added to paths without a statuses: override, it falls back to auto — which is fine, but means there's no "default floor." Worth a one-line YAML comment so the next contributor knows: "components without an explicit statuses: override use target: 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.

Copy link
Copy Markdown
Contributor

@Cadacious Cadacious left a comment

Choose a reason for hiding this comment

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

PR #225chore(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-api component 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%." With target: 50% and informational: true the gate won't flip red, but the per-component PR comment will display admin-api 0% (target 50%) on every PR until tests land — that's noise. Either drop the component until #207 Tier 1 starts landing, or set target: auto with a TODO comment in the YAML pointing at #207 Tier 1.
  • default_rules.statuses is target: auto, but every component overrides. The default_rules block is unreachable for the nine listed components. If a future crate is added to paths without a statuses: override, it falls back to auto — which is fine, but means there's no "default floor." Worth a one-line YAML comment so the next contributor knows: "components without an explicit statuses: override use target: 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.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8baae71 and 3a17fa3.

📒 Files selected for processing (1)
  • codecov.yml

Comment thread codecov.yml
Comment on lines +84 to +143
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

# First, let's read the full codecov.yml file to understand the structure
git ls-files codecov.yml

Repository: SandboxServers/Cimmeria

Length of output: 79


🏁 Script executed:

# Read the codecov.yml file to see the full context
cat -n codecov.yml

Repository: 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:


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.

Suggested change
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).

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