refactor: foundation cleanup - rename, edition fixes, constants, coverage CI#102
refactor: foundation cleanup - rename, edition fixes, constants, coverage CI#102
Conversation
…rage CI - Rename `validator-core` crate to `stateless-core` (directory, Cargo.toml, all `use validator_core::` references across workspace, docs, CODEOWNERS, and logging filter directives) - Fix `debug-trace-server`: set `edition.workspace = true` and `version.workspace = true` (was 2021 / 0.1.0) - Move `DEFAULT_METRICS_PORT` to `stateless-common` and re-export from both binaries; deduplicate `SLOW_STAGE_THRESHOLD_MS` in `debug-trace-server` (was declared in both `data_provider.rs` and `rpc_service.rs`) - Add `scripts/coverage_stateless_core.sh` and `.github/workflows/coverage.yml` for coverage reporting via `cargo-llvm-cov` + Codecov (following mega-evm pattern) - Add `.github/codecov.yml` config targeting `stateless-core` package
bin/debug-trace-server/Cargo.toml
Outdated
| @@ -46,7 +50,7 @@ tracing.workspace = true | |||
|
|
|||
| # Reuse validator-core | |||
There was a problem hiding this comment.
Stale comment — should be updated to match the renamed crate.
| # Reuse validator-core | |
| # stateless-core |
|
The rename is complete and consistent across all 38 files — Cargo manifests, imports, docs, CODEOWNERS, logging filters, and the lock file. Workspace field inheritance for Coverage CI looks standard: One stale comment flagged inline. Nothing else to address. |
|
Clean, mechanical rename — the codebase changes are consistent and complete. One minor issue flagged inline. Coverage CI
Everything else (constant deduplication, workspace field alignment, let-chain refactoring in tests) looks good. |
|
The rename is clean and complete — all references updated consistently across workspace, docs, CODEOWNERS, and logging directives. Workspace field fixes and constant deduplication are good. Two minor issues in the coverage setup worth addressing. |
| cargo llvm-cov \ | ||
| --locked \ | ||
| --package stateless-core \ | ||
| --all-features \ |
There was a problem hiding this comment.
--all-features activates test-bucket-resize, which changes SALT bucket sizing. Coverage numbers will reflect a non-default build configuration, potentially inflating or deflating coverage for production code paths. Consider dropping --all-features and only opting in to features that don't alter runtime behavior.
| components: llvm-tools-preview | ||
|
|
||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 |
There was a problem hiding this comment.
stateless-core unit tests don't use forge or anvil — Foundry is only needed by the debug-trace-server integration tests. This step adds unnecessary CI time and can be dropped.
Summary
Foundation cleanup that renames the core crate, fixes workspace consistency issues, deduplicates constants, and adds coverage CI infrastructure.
Changes
validator-core→stateless-core: renamed the crate directory, updatedCargo.toml, alluse validator_core::references across the workspace, docs (README.md,AGENTS.md),CODEOWNERS, and logging filter directives.debug-trace-serverworkspace fields: setedition.workspace = trueandversion.workspace = true(was hardcoded to 2021 / 0.1.0).DEFAULT_METRICS_PORTtostateless-commonand re-export from both binaries; remove duplicateSLOW_STAGE_THRESHOLD_MSdeclaration (was in bothdata_provider.rsandrpc_service.rs).scripts/coverage_stateless_core.shand.github/workflows/coverage.ymlfor coverage reporting viacargo-llvm-cov+ Codecov (following mega-evm pattern), plus.github/codecov.ymlconfig targeting thestateless-corepackage.Files changed
38 files changed across the workspace (283 insertions, 152 deletions), including the full directory rename from
crates/validator-core/tocrates/stateless-core/.