Recalibrate slow consensus trigger WARN thresholds - #3936
Conversation
The `slow consensus trigger` WARN shared a single 50ms bar across build_value_ms and nominate_ms. Measured over 115h/74k closes, that bar sat below build_value_ms's own p50 (~60ms), so the WARN fired on ~9% of ledgers and tracked transaction volume (r=0.931) rather than slowness. Raise the build_value bar to 250ms (above the ~166ms p99) and give nominate_ms its own independent 50ms bar. The decision is extracted into a unit-testable pure helper `is_slow_consensus_trigger`. The nominate bar is decoupled but deliberately kept at 50ms to preserve the genuine sole-trigger nomination stalls (nominate 51-61ms with build_value 4-7ms) documented in the issue. Refs #3839 Co-authored-by: Claude Code <claude-code@anthropic.com>
🔍 Reviewer: CorrectnessVerdict: APPROVE Summary: Clean, well-tested extraction of the slow-consensus-trigger predicate. The build-value bar is raised 50→250ms and nominate gets its own independent 50ms bar, exactly as the converged plan specifies. Strictly-greater semantics are preserved and boundary-tested. Full reviewCycle 1 — no prior Correctness
test-coverage — the new readability / error-handling — the two threshold constants carry thorough rationale comments with issue references; the helper doc explains why the two arms need independent bars. No error-handling surface touched (pure predicate over already-computed millis). Nothing to flag. No blocking concerns. |
🔍 Reviewer: ParityVerdict: APPROVE Summary: The change touches only WARN-vs-debug log-level selection thresholds in Full reviewCycle 1 — no prior Reviewed strictly against the observable/interop surface defined in
No blocking concerns. |
Review: Bounce-Back Cycle 1Reason: CI failed (unrelated, will rebase) Reviewer A: APPROVE — clean, well-tested predicate extraction; strictly-greater semantics preserved and boundary-tested. Both agent reviewers approve the code. The only blocker is CI: two Quickstart integration jobs failed and the run cannot recover to green:
These are classified unrelated to the diff:
Routing back to |
tomerweller
left a comment
There was a problem hiding this comment.
Addressed the bounce-back. Both agent reviewers already APPROVED; the sole blocker was CI red on the flaky Quickstart/testnet integration combos (test (local, rpc, ...), test (local, core,rpc,horizon, ...), test (testnet, core,horizon, ...)).
The PR branch is already based on the current origin/main (129190c), so a rebase produces no new commit — there is no code change to make. I re-ran the failed jobs on run 33018467064 to get a fresh CI result. All henyey-relevant jobs (Clippy, Format, Test, Doctest, Build, Agent Worktree Contract) are already green. Ready for re-review once the re-run settles.
tomerweller
left a comment
There was a problem hiding this comment.
Addressed the bounce-back. Both agent reviewers already APPROVED; the sole blocker was CI red on flaky Quickstart/testnet integration combos. The PR branch is already on current origin/main (129190c), so a rebase yields no new commit — no code change needed. Re-ran the failed jobs on run 33018467064 for a fresh CI result; all henyey-relevant jobs (Clippy, Format, Test, Doctest, Build) are green. Ready for re-review once the re-run settles.
Review: Bounce-Back Cycle 1Reason: CI failed (unrelated, will rebase) Reviewer A: APPROVE — clean, well-tested extraction of the slow-consensus-trigger predicate; build-value bar 50→250ms, nominate decoupled at its own 50ms bar; strictly-greater semantics preserved and boundary-tested. The two failing checks are both quickstart integration shards that timed out on Friendbot is a separate external account-funding service in the quickstart harness; the PR only changes a herder log-emission threshold ( Routing back to |
Do: Re-reviewBoth agent reviewers already APPROVED this PR (Correctness + Parity). The only blocker was CI: the two The branch head ( |
Review: Cycle Cap Reached / CI StuckBounce count (head-scoped, actual on PR): 2 → this tick makes the 3rd review of an unchanged head Reviewer verdicts (unchanged code, re-affirmed this tick):
Pattern: Both agent reviewers have APPROVED the code on all three reviews. The sole blocker is CI, which is red on two Quickstart integration shards that both fail on the identical This failure is not diff-attributable: the PR changes only a herder WARN-emission threshold ( Why block instead of bounce again: the PR head has not changed across the two prior bounces (pushed once at 22:05:30Z; no new commit at either 23:33Z or 02:48Z). Operator action required: the change itself is merge-ready (triple-would-be-green but for the flake). Please either:
|
Closes #3839
Summary
The
slow consensus triggerWARN intrigger_next_ledgershared a single 50ms literal across bothbuild_value_msandnominate_ms. Measured over 115h/74k closes (see issue), that bar sits belowbuild_value_ms's own p50 (~60ms), so the WARN fires on ~9% of ledgers and tracks transaction volume (r=0.931) rather than slowness. This raises the build-value bar to 250ms (above the ~166ms p99) and givesnominate_msits own independent 50ms bar. The predicate is extracted into a unit-testable pure helperis_slow_consensus_trigger. The nominate bar is decoupled but deliberately kept at 50ms to preserve the genuine sole-trigger nomination stalls (nominate 51-61ms with build_value 4-7ms) documented in the issue.Plan reference
Converged Plan comment
Test plan
New unit coverage for
is_slow_consensus_trigger: typical p50 stays quiet (60,0), build-value outlier warns (251,0), strict boundary (250,0) quiet, nominate sole-trigger warns (4,53), nominate boundary (0,50) quiet, both-healthy (60,22) quiet.Deviations from plan
None.
🤖 Generated with Claude Code