Skip to content

fix: add F3 pending activation status to healthcheck API#6415

Merged
hanabi1224 merged 1 commit intomainfrom
hm/healthcheck-f3-pending-activation
Jan 13, 2026
Merged

fix: add F3 pending activation status to healthcheck API#6415
hanabi1224 merged 1 commit intomainfrom
hm/healthcheck-f3-pending-activation

Conversation

@hanabi1224
Copy link
Copy Markdown
Contributor

@hanabi1224 hanabi1224 commented Jan 13, 2026

Summary of changes

To make healthcheck API work properly before the new calibnet F3 is activated.

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Summary by CodeRabbit

  • Bug Fixes
    • Improved F3 health status reporting to correctly identify when F3 is in pending activation state.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 13, 2026

Walkthrough

A new health check condition was added to check_f3_running to identify F3 as "pending activation" when the sidecar's bootstrap_epoch exceeds the network_head_epoch, evaluated after confirming F3 is running and before the fallback "not running" status.

Changes

Cohort / File(s) Change Summary
F3 Health Check Enhancement
src/health/endpoints.rs
Added condition to treat F3 as "pending activation" when bootstrap_epoch > network_head_epoch, providing new health status between "running" and "not running" states

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • akaladarshi
  • LesnyRumcajs
  • sudo-shashank
🚥 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 accurately describes the main change: adding an F3 pending activation status check to the healthcheck API, which aligns with the file summary showing a new condition in check_f3_running.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a4870b and 7fb4bde.

📒 Files selected for processing (1)
  • src/health/endpoints.rs
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 5930
File: build.rs:64-77
Timestamp: 2025-08-13T09:43:20.301Z
Learning: hanabi1224 prefers hard compile-time errors in build scripts rather than runtime safeguards or collision detection, believing it's better to fail fast and fix root causes of issues like malformed snapshot names.
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 6057
File: src/cli/subcommands/f3_cmd.rs:0-0
Timestamp: 2025-09-09T10:37:17.947Z
Learning: hanabi1224 prefers having default timeouts (like 10m for --no-progress-timeout) to prevent commands from hanging indefinitely, even when the timeout flag isn't explicitly provided by users. This fail-fast approach is preferred over requiring explicit flag usage.
📚 Learning: 2026-01-05T12:54:40.850Z
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 6381
File: src/lotus_json/actors/states/cron_state.rs:8-8
Timestamp: 2026-01-05T12:54:40.850Z
Learning: In Rust code reviews, do not derive Eq for a struct if any field does not implement Eq (e.g., types from external dependencies). If a type like CronStateLotusJson includes fields wrapping external dependencies that lack Eq, derive PartialEq (or implement PartialEq manually) but avoid deriving Eq. This ensures comparisons compile and reflect actual equivalence semantics. When needed, consider implementing custom PartialEq (and possibly Eq) only after ensuring all fields (or wrappers) implement Eq, or keep PartialEq-only if full equality semantics cannot be expressed.

Applied to files:

  • src/health/endpoints.rs
📚 Learning: 2026-01-05T12:56:13.802Z
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 6381
File: src/lotus_json/actors/states/evm_state.rs:41-44
Timestamp: 2026-01-05T12:56:13.802Z
Learning: In Rust codebases (e.g., Forest), do not add #[cfg(test)] to functions already annotated with #[test]. The #[test] attribute ensures the function is compiled only for tests, so a separate #[cfg(test)] is redundant and can be removed if present. Apply this check to all Rust files that contain #[test] functions.

Applied to files:

  • src/health/endpoints.rs
🧬 Code graph analysis (1)
src/health/endpoints.rs (1)
src/f3/mod.rs (1)
  • get_f3_sidecar_params (37-89)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: tests-release
  • GitHub Check: Coverage
  • GitHub Check: Build Ubuntu
  • GitHub Check: rubocop
  • GitHub Check: cargo-publish-dry-run
  • GitHub Check: Build MacOS
  • GitHub Check: All lint checks
🔇 Additional comments (1)
src/health/endpoints.rs (1)

169-173: LGTM! The pending activation logic is correct.

The condition properly handles the case where F3 hasn't been activated yet by checking if bootstrap_epoch > network_head_epoch. This allows the healthcheck to pass during the pre-activation period on calibnet.

Test coverage exists in the integration test suite (scripts/tests/calibnet_other_check.sh and related tests exercise the health endpoints via CLI commands).


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

@hanabi1224 hanabi1224 marked this pull request as ready for review January 13, 2026 11:17
@hanabi1224 hanabi1224 requested a review from a team as a code owner January 13, 2026 11:17
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and sudo-shashank and removed request for a team January 13, 2026 11:17
@hanabi1224 hanabi1224 enabled auto-merge January 13, 2026 11:29
@hanabi1224 hanabi1224 added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit 111c24b Jan 13, 2026
43 of 45 checks passed
@hanabi1224 hanabi1224 deleted the hm/healthcheck-f3-pending-activation branch January 13, 2026 12:39
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