fix(host-reporter): compat-map disk reports for storage full#297
Merged
Conversation
j-rafique
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Temporary compatibility patch for the deployed mainnet
v1.12.0chain behavior where audit host requirements can POSTPONE supernodes in the85..90%disk usage band before the audit STORAGE_FULL path can fire.This patch changes only the audit epoch
HostReport.DiskUsagePercentsubmitted by the supernode host reporter. Local REST/status and local disk metrics remain truthful.Behavior:
ACTIVE/STORAGE_FULLwith actual disk usage at or above the audit postpone threshold reports a value just abovesupernode.max_storage_usage_percent, forcing the chain's existing auditSetReportSTORAGE_FULL transition.POSTPONEDwith reasonaudit_host_requirementsor an old empty reason reports exactly the audit threshold for one recovery epoch, allowing deployed chain recovery rules to move it back to ACTIVE. The next epoch then reports the storage-full signal and moves it to STORAGE_FULL.Invariant Table
host_reporter.tick->auditDiskUsagePercent;audit_msg.SubmitEpochReportpreserves caller diskTestAuditDiskUsagePercentCompat, existing tick testsPOSTPONEDwithaudit_host_requirementsor legacy empty reason gets one compliant reportlatestSupernodeState, params overlap check, current state querypostponed host requirements,postponed old no-reason,postponed non-host reasoncasesTestAuditDiskUsagePercentCompatFailsClosedWhenParamsUnavailableTests
go test -count=1 ./supernode/host_reportergo test -count=1 ./supernode/host_reporter ./pkg/lumera/modules/audit_msg ./pkg/lumera/modules/supernodego test -count=1 ./supernode/...git diff --checkRisk / Rollback
Risk is intentionally scoped to audit epoch HostReport disk reporting. Rollback is reverting this PR or shipping the permanent chain fix so the compatibility mapping is no longer needed.