test: add bootstrap flood regression test for PR #280#317
Merged
jalehman merged 1 commit intoApr 7, 2026
Merged
Conversation
Regression test covering both fixes from PR Martian-Engineering#280: 1. maintain() updates checkpoint after rewriteTranscriptEntries() — prevents stale checkpoint on restart 2. Import cap blocks mass re-imports when checkpoint is stale (>max(existingDbCount*0.2, 50)) Tests: - Round-trip: create conv → maintain() → bootstrap() → assert 0 re-imports - Import cap: corrupt checkpoint → append flood messages → assert cap blocks - Defense-in-depth: both fixes working together
Contributor
|
Thank you! |
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.
Adds regression test covering both fixes from PR #280 (bootstrap flood prevention):
Checkpoint update after maintain() — verifies that
maintain()updates the bootstrap checkpoint afterrewriteTranscriptEntries(), so the nextbootstrap()doesn't re-import everything due to stale mtime/size.Import cap — verifies that when the checkpoint IS stale, the import cap (
>max(existingDbCount*0.2, 50)) blocks mass re-imports instead of flooding the DB.Defense-in-depth — both fixes working together in a round-trip scenario with repeated message patterns (the kind that confuse content-based anchoring).
All 3 tests pass. 598/598 total on upstream/main.
Related: #276, #280