PR: #34 (feat/09-health-scanner)
File: crates/charon-scanner/src/scanner.rs, classify() method
Depends on: issue #98 (binary health factor in Venus adapter)
Problem: Venus adapter (PR #33) returns HF=0 for position with shortfall>0, HF=2e18 for liquidity>0. Default thresholds: liquidatable=1.0e18, near_liq=1.05e18.
With those values: HF=0 < 1.0e18 → Liquidatable; HF=2e18 >= 1.05e18 → Healthy. NearLiquidation band [1.0e18, 1.05e18) unreachable until #98 ships real ratio.
scanner.rs contains no compile-time note, no debug_assert, no TODO referencing dependency. PR merges silently with a bucket that never populates in production, making "3-bucket" claim in PR title misleading. Downstream consumers (pre-signed tx layer) keying on near_liquidation() receive empty vec every block with no signal that feature is non-functional.
Fix: Add prominent doc comment on classify() and debug_assert or tracing::warn! at startup if adapter's known HF sentinel values (0 and 2e18) detected, indicating binary-HF dependency unresolved. Block merge until #98 closed, or mark this PR as skeleton pending #98.
PR: #34 (feat/09-health-scanner)
File: crates/charon-scanner/src/scanner.rs,
classify()methodDepends on: issue #98 (binary health factor in Venus adapter)
Problem: Venus adapter (PR #33) returns HF=0 for position with shortfall>0, HF=2e18 for liquidity>0. Default thresholds: liquidatable=1.0e18, near_liq=1.05e18.
With those values: HF=0 < 1.0e18 → Liquidatable; HF=2e18 >= 1.05e18 → Healthy. NearLiquidation band [1.0e18, 1.05e18) unreachable until #98 ships real ratio.
scanner.rs contains no compile-time note, no debug_assert, no TODO referencing dependency. PR merges silently with a bucket that never populates in production, making "3-bucket" claim in PR title misleading. Downstream consumers (pre-signed tx layer) keying on
near_liquidation()receive empty vec every block with no signal that feature is non-functional.Fix: Add prominent doc comment on
classify()anddebug_assertortracing::warn!at startup if adapter's known HF sentinel values (0 and 2e18) detected, indicating binary-HF dependency unresolved. Block merge until #98 closed, or mark this PR as skeleton pending #98.