Skip to content

ci #1: add coverage reporting, README badges, and issue/PR templates - #2

Merged
JoshuaChi merged 3 commits into
mainfrom
chore/1-codecoverage
Jul 25, 2026
Merged

JoshuaChi merged 3 commits into
mainfrom
chore/1-codecoverage

Conversation

@JoshuaChi

@JoshuaChi JoshuaChi commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

What Does This PR Do?

Adds test coverage reporting to CI and community-contribution scaffolding — the last pieces of repo bootstrap before d-lmdb goes public.

Changes

  • ci.yml: add a coverage step (cargo-llvm-cov + nextest, versions pinned to match the toolchain, matching the version-pinning pattern already used for cargo-deny/cargo-nextest elsewhere in this repo) that uploads to Codecov
  • README.md: add status/CI/coverage/license/DeepWiki badges
  • .github/ISSUE_TEMPLATE/: bug report, doc request, feature request templates, adapted from d-engine but scoped to d-lmdb's own fault-tolerance-not-scaling positioning (see CONTRIBUTING.md)
  • .github/PULL_REQUEST_TEMPLATE.md: same adaptation for PRs

Testing

  • Coverage command (cargo llvm-cov nextest --all-features --lcov ...) run locally end-to-end — produced a real report (80.82% overall) before this was added to CI
  • make pre-release green on this branch

Notes for Reviewer

  • Codecov badge uses the tokenless URL format (no ?token= param) — this repo's org has tokenless upload enabled, confirmed via Codecov's own onboarding page. Coverage data/PR checks won't populate until this lands on main and the coverage job runs there at least once.
  • CODECOV_TOKEN secret is optional (falls back to tokenless upload if unset).

Summary by CodeRabbit

  • Documentation

    • Updated the README with project status, CI, coverage, license, and reference badges.
    • Added structured templates for bug reports, documentation requests, feature requests, and pull requests.
  • Chores

    • Enhanced automated testing workflows with coverage collection and reporting.
    • Added clearer contribution checklists, testing guidance, and project scope prompts.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@JoshuaChi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dd9d046b-a588-4df8-8d35-6a394bf0dc8b

📥 Commits

Reviewing files that changed from the base of the PR and between 01f86c9 and 11c42a8.

📒 Files selected for processing (2)
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

This change adds GitHub issue and pull request templates, updates README badges and project description, and modifies CI to run tests with coverage collection and upload LCOV results to Codecov.

Changes

Repository guidance

Layer / File(s) Summary
Contributor issue and pull request templates
.github/ISSUE_TEMPLATE/*, .github/PULL_REQUEST_TEMPLATE.md
Adds structured templates for bug reports, documentation requests, feature requests, and pull requests, including project-scope checklists.
README project metadata
README.md
Replaces the experimental status line with project badges and a block-quoted description.

CI coverage collection

Layer / File(s) Summary
Test coverage pipeline
.github/workflows/ci.yml
Adds LLVM tooling, installs pinned test and coverage tools, generates lcov.info, and uploads coverage data to Codecov.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 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 summarizes the main changes: CI coverage reporting, README badges, and issue/PR templates.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/1-codecoverage

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/PULL_REQUEST_TEMPLATE.md (1)

27-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include the canonical make pre-release validation gate.

The PR objectives identify make pre-release as the release validation command, but this checklist only requires make check and make test. Add the canonical target, or document that these commands fully cover it, so contributors do not miss release-only checks.

🤖 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 @.github/PULL_REQUEST_TEMPLATE.md around lines 27 - 30, Update the pull
request checklist to include the canonical make pre-release validation gate
alongside the existing make check and make test items, or explicitly document
that those commands fully cover its release-only checks.
🤖 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 @.github/ISSUE_TEMPLATE/bug_report.md:
- Line 22: Update the bug report template guidance around logs and screenshots
to explicitly ask reporters to redact credentials, tokens, and personal data
before posting. Preserve the existing request for a clear description and
optional diagnostic attachments.

In @.github/workflows/ci.yml:
- Around line 82-88: Update the “Upload coverage to Codecov” step using
codecov/codecov-action@v5 to replace the unsupported file input with the files
input, preserving lcov.info as the report path and leaving the existing token,
flags, and name settings unchanged.

---

Nitpick comments:
In @.github/PULL_REQUEST_TEMPLATE.md:
- Around line 27-30: Update the pull request checklist to include the canonical
make pre-release validation gate alongside the existing make check and make test
items, or explicitly document that those commands fully cover its release-only
checks.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 37e489ea-bc92-4ac9-ad93-453b1ba5c298

📥 Commits

Reviewing files that changed from the base of the PR and between 25c49d7 and 01f86c9.

📒 Files selected for processing (6)
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/doc_request.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/ci.yml
  • README.md

Comment thread .github/ISSUE_TEMPLATE/bug_report.md Outdated
Comment thread .github/workflows/ci.yml
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@JoshuaChi
JoshuaChi merged commit bd4d7e0 into main Jul 25, 2026
5 checks passed
@JoshuaChi
JoshuaChi deleted the chore/1-codecoverage branch July 25, 2026 03:53
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
Pure rename, no content changes (src/, tests/, Cargo.toml, README.md
-> d-lmdb/). First step of splitting into a workspace with a separate
d-lmdb-server crate for the HTTP/Docker layer, keeping the library
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
- New root Cargo.toml: [workspace] members = [d-lmdb, d-lmdb-server]
- d-lmdb-server: placeholder bin, depends on d-lmdb via path+version
- .gitignore: commit Cargo.lock now that workspace has a deployable binary
- d-lmdb/Cargo.toml: fix [[example]] paths (examples/ stayed at workspace root)
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
… path

- get_linearizable/get_lease returned raw LMDB bytes (tag byte included)
  instead of the decoded payload — found via live smoke test
- extract decode_live_value (pure) + decode_and_reap (decode + reap) so
  get/get_linearizable/get_lease share one decode path
- add get_lease: leader-lease read, same guarantee as get_linearizable
- rename get_live→fetch_local, resolve_read→decode_and_reap,
  ttl_filter→decode_for_scan (private helpers, avoid get_-prefix smell)
- 8 new unit tests: ttl/non-ttl, boundary expiry, corrupt tag, truncated header
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
Needed for leader_hint passthrough in the upcoming HTTP error mapping
(d-engine main doesn't have the #425 leader_hint fix yet).
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
- kv.rs: PUT/GET/DELETE /kv/{key}, ?level= consistency dial
  (eventual/linearizable/lease), exhaustively matched enum
- error.rs: d_lmdb::Error → HTTP response per decisions/015
  (400/503/500), plus a response-normalizing middleware so
  extractor rejections and business errors share one JSON shape
- health.rs: /primary, /replica, /status
- main.rs: serve/healthcheck subcommands (clap, CONFIG env fallback)
- config.example.toml: shipped template, real config.toml gitignored
- d-lmdb/lib.rs: re-export ClientApiError/ErrorCode/LeaderHint,
  needed for error.rs to name d-engine's error types
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
- cargo-chef multi-stage build, --bin d-lmdb-server only (workspace's
  own examples/ excluded from the final image)
- docker-entrypoint.sh: root chowns bind-mounted /data to fixed 1000:1000,
  then drops to appuser via gosu — server process never runs as root
- HEALTHCHECK start-period=10s, derived from 5 measured cold starts
  (worst case 863ms) rather than a guessed value
- .dockerignore excludes rust-toolchain.toml — its pinned components
  (rustfmt/clippy) were being installed on every build for no reason,
  the base image is already the exact matching Rust version

Verified: real docker build + docker run, HEALTHCHECK reaches "healthy",
PUT/GET across all three consistency levels, and the error-response
normalization middleware confirmed working against a live container.
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
address was the Raft peer address (e.g. node3:9081), unusable by
HTTP clients. Now swaps in this node's own HTTP port.
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
HAProxy routes writes and strong reads to whoever passes /primary.
smoke-test.sh: client only talks to the LB, verifies leader crash
+ re-election + writes resume, zero client-side changes.
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
Relative paths (./data) crashed in the container — non-root user has
no write permission at that cwd. Verified fix with a real docker run.
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
Moved "what this solves/doesn't solve" here from d-lmdb/README.md —
it's a project-level claim, not library-specific.
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
JoshuaChi added a commit that referenced this pull request Jul 28, 2026
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