Repository navigation
feat(audit): report a reset audit chain once, at daemon startup (#3772 slice 4a) - #3892
Merged
Merged
Conversation
…slice 4a) The anchor manager now checks, as it starts, whether the chain is behind the anchor file's last checkpoint (database recreated empty or restored from an older copy) and reports it through the same state, readiness entry and log line as a refused tick, with the new-epoch command in the message. The ticks that follow do not repeat it, and the refusal counter still counts only refused publishes. Part of #3772 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Part of #3772 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Part of #3772 (slice 4a; the issue stays open). Independent of #3891: this branch is cut from main.
What
AnchorManagerchecks at start (before the first interval) whether the chain's highest row id is below the anchor file's last checkpoint, which includes a database recreated empty./healthandcontainarium doctorshow it from startup) and the DEGRADED line is logged once, now marked "(found at startup)" and namingcontainarium audit anchor new-epochfor a deliberate reset.doctor's text for this state namesnew-epochtoo.Not in this PR (4b, needs a decision, asked on the issue thread)
doctorwarning when only a local anchor file is configured, and the off-host copy. A readiness entry cannot carry a warning that is not a failure without showingOK: falseon every default install in the cloud probe, so this wants a decision before code.Test evidence
TestAnchorManager_DetectsAResetChainAtStartup,_DetectsAnEmptyChainAtStartup,_StartupCheckLeavesAHealthyChainAlone(nothing anchored / chain at the anchor / chain ahead),_StartRunsTheStartupCheck(an hour-long interval, reported within 2s of Start).run,>=to>, and counting the startup detection as a refusal each fail a test.go test ./internal/audit ./internal/policyreadiness ./internal/gateway ./internal/server— ok. CI: pending, see the checks on this PR.🤖 Generated with Claude Code