Skip to content

Consolidate stats and diagnostics formatting into utility module#7

Merged
Zaid-maker merged 3 commits intomainfrom
shared-utils
Mar 29, 2026
Merged

Consolidate stats and diagnostics formatting into utility module#7
Zaid-maker merged 3 commits intomainfrom
shared-utils

Conversation

@Zaid-maker
Copy link
Copy Markdown
Owner

@Zaid-maker Zaid-maker commented Mar 29, 2026

Summary by CodeRabbit

  • Documentation & Release

    • Updated README and project website with kernel version information and current development roadmap milestones.
  • CI/CD & Quality Assurance

    • Configured Codecov bundle analysis with pull request notification thresholds to monitor code quality metrics and bundle size variations.
    • Enhanced kernel build system with comprehensive test coverage and improved diagnostics capabilities.
  • Version Update

    • Kernel version updated to v0.0.20260330.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR introduces a new stats_util kernel module as a centralized utility for formatting diagnostics and statistics output. Existing code in interrupts.c and kernel.c is refactored to use the new formatting helpers instead of local string manipulation. Build rules, tests, version, and documentation are updated to reflect the new module structure.

Changes

Cohort / File(s) Summary
New stats_util module
kernel/src/stats_util.h, kernel/src/stats_util.c, kernel/tests/stats_util_test.c
Introduces new utility functions for formatting label-value pairs (text, decimal, hex 32-bit, hex 64-bit) and line-oriented outputs for vectors and memory-map entries. Tests verify output matches expected formatted strings.
Refactored diagnostics formatting
kernel/src/interrupts.c, kernel/src/kernel.c
Replaces local buffer management and string-append logic with calls to stats_util.h formatting helpers. interrupts.c consolidates exception diagnostic construction; kernel.c refactors heap, PMM, and memmap output formatting.
Build and test infrastructure
kernel/Makefile
Adds src/stats_util.c to kernel source list; extends test target to compile and run stats_util_test.c; extends coverage target to include coverage compilation and execution of the new test.
Version and CI configuration
kernel/VERSION, codecov.yml
Updates kernel version from v0.0.20260329.4 to v0.0.20260330; adds codecov configuration defining CI wait behavior, bundle analysis thresholds, and warning levels.
Documentation
README.md, site/docs.html, site/index.html
Updates kernel documentation to reference stats_util module; adds "Codecov Bundle Analysis (Ready)" section to README; updates homepage release version and roadmap to reflect completion of stats utility consolidation and new next task.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~23 minutes

Possibly related PRs

Poem

🐰 A stats util springs to life,
Formatting helpers end the strife,
Diagnostics now align and gleam,
Shared utilities, a developer's dream!
Version hops from .4 to .30, 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Consolidate stats and diagnostics formatting into utility module' directly and accurately reflects the main objective of the PR, which is to create a dedicated stats_util module for centralized formatting of stats and diagnostics output.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch shared-utils

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-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7bda036) to head (f0df235).

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         2    +1     
  Lines           34        72   +38     
=========================================
+ Hits            34        72   +38     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Zaid-maker Zaid-maker merged commit 9eb4862 into main Mar 29, 2026
3 of 4 checks passed
@Zaid-maker Zaid-maker deleted the shared-utils branch March 29, 2026 19:31
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.

2 participants