Repository navigation
Conversation
…d stop hanging tests
…orker shutdown logs
…egistry stats and audit backoff
… default continue rule
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.
The weekly mutation run listed 229 missed mutants in Issue #192. This PR adds tests for the real gaps and rewrites code where a mutant cannot change behavior.
Closes #192
Work in progress: the common crate is done. A fresh run on the current code checks which of the other rows still apply, because many rows name code that has changed since the weekly run.
How each finding is handled
v.is_finite()guard →truecrates/common/src/env.rsInfinitylogs "Ignoring invalid numeric value", not "must be an integer". It runs in a child process to read the log.||→&&,>→>=crates/common/src/secrets.rsis_symlink()check:symlink_metadataalready reports a symlink as not a file. New tests: a directory is rejected, and a 4096-byte file is accepted.|→^crates/common/src/security.rsabagainstba, where the byte differences cancel out under^.16 * 1024→16 + 1024crates/common/src/security.rs-→+,/→%inRouteRateLimiter::checkcrates/common/src/security.rsRetry-Afterusesu64::div_ceilinstead of a float. New test: a window that starts at 600 ms denies at 1000 and 1599 ms withRetry-After: 1, and opens again at 1600 ms.is_triggered→false,||→&&crates/common/src/shutdown.rssleepno longer checksis_triggeredfirst:waitalready returns at once after a trigger. The test now checksis_triggered()after the trigger.All changes
crates/common/src/env.rs: a test for theInfinitywarning.crates/common/src/secrets.rs: one file-type check instead of two; directory and 4096-byte tests.crates/common/src/security.rs:RouteRateLimiter::checkcomputes the window age once and roundsRetry-Afterwith integers; tests for the bearer check, the body limit and a window that does not start at 0.crates/common/src/shutdown.rs: one early return insleep; the test checksis_triggered.Done when
cargo fmt --check,cargo clippy -p timba-common --all-targets -D warningsandcargo test -p timba-common(35 pass) on f85da76.cargo test --workspacepasses.Review
Pending.