Skip to content

refactor: foundation cleanup - rename, edition fixes, constants, coverage CI#102

Merged
flyq merged 4 commits intomainfrom
liquan/refactor1
Mar 30, 2026
Merged

refactor: foundation cleanup - rename, edition fixes, constants, coverage CI#102
flyq merged 4 commits intomainfrom
liquan/refactor1

Conversation

@flyq
Copy link
Copy Markdown
Member

@flyq flyq commented Mar 23, 2026

Summary

Foundation cleanup that renames the core crate, fixes workspace consistency issues, deduplicates constants, and adds coverage CI infrastructure.

Changes

  • Rename validator-corestateless-core: renamed the crate directory, updated Cargo.toml, all use validator_core:: references across the workspace, docs (README.md, AGENTS.md), CODEOWNERS, and logging filter directives.
  • Fix debug-trace-server workspace fields: set edition.workspace = true and version.workspace = true (was hardcoded to 2021 / 0.1.0).
  • Deduplicate constants: move DEFAULT_METRICS_PORT to stateless-common and re-export from both binaries; remove duplicate SLOW_STAGE_THRESHOLD_MS declaration (was in both data_provider.rs and rpc_service.rs).
  • Add coverage CI: add scripts/coverage_stateless_core.sh and .github/workflows/coverage.yml for coverage reporting via cargo-llvm-cov + Codecov (following mega-evm pattern), plus .github/codecov.yml config targeting the stateless-core package.

Files changed

38 files changed across the workspace (283 insertions, 152 deletions), including the full directory rename from crates/validator-core/ to crates/stateless-core/.

…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
@flyq flyq requested review from Troublor and krabat-l as code owners March 23, 2026 15:05
Comment thread bin/debug-trace-server/Cargo.toml Outdated
@claude
Copy link
Copy Markdown

claude bot commented Mar 24, 2026

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 debug-trace-server and constant deduplication (DEFAULT_METRICS_PORT, SLOW_STAGE_THRESHOLD_MS) are done cleanly.

Coverage CI looks standard: --locked, proper artifact upload, Codecov path fix is the expected pattern for the GitHub Actions runner path.

One stale comment flagged inline. Nothing else to address.

@flyq flyq force-pushed the liquan/refactor1 branch from 5472502 to 6cdb09e Compare March 24, 2026 02:02
Comment thread bin/debug-trace-server/Cargo.toml Outdated
@claude
Copy link
Copy Markdown

claude bot commented Mar 24, 2026

Clean, mechanical rename — the codebase changes are consistent and complete. One minor issue flagged inline.

Coverage CI

  • fail_ci_if_error: false on the Codecov upload step means a missing/expired CODECOV_TOKEN secret will fail silently. Consider flipping this to true once the token is confirmed to be configured, so breakage is visible.
  • The fixes path in codecov.yml is correct for the GitHub Actions runner environment and follows the established pattern.

Everything else (constant deduplication, workspace field alignment, let-chain refactoring in tests) looks good.

@claude
Copy link
Copy Markdown

claude bot commented Mar 24, 2026

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.

Comment thread scripts/coverage_stateless_core.sh Outdated
Comment thread .github/workflows/coverage.yml Outdated
@claude
Copy link
Copy Markdown

claude bot commented Mar 27, 2026

The rename is clean and consistent across the workspace. A few notes:

Behavioral changes not called out in the description

bin/stateless-validator/src/main.rs has two silent behavior changes:

  • Shutdown timeout bumped 1s → 3s.
  • JoinError handling split: cancelled tasks now log at debug (was warn), unexpected terminations at error (was warn). Both are improvements — worth mentioning in the summary so reviewers don't overlook them.

Previous review threads

Both open threads are addressed by this revision:

  • The coverage script uses --no-default-features (not --all-features), which is correct — the only feature is test-bucket-resize, which alters SALT bucket sizing and shouldn't be included.
  • No Foundry install step in the coverage workflow.

Resolved both threads.

@flyq flyq merged commit 257127e into main Mar 30, 2026
20 checks passed
@flyq flyq deleted the liquan/refactor1 branch March 30, 2026 06:19
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