test(quake): cover all three CliVersionCheck variants#155
Open
Kewe63 wants to merge 1 commit into
Open
Conversation
`check_cli_version` distinguishes `SupportsCli` (parseable version
>= v0.5.0, or the literal "latest") from `Assumed` (unparseable
tag or missing tag) and `RequiresConfigToml` (parseable version
< v0.5.0). The boolean wrapper `supports_cli_flags` only
exercises the `RequiresConfigToml` boundary, so the
SupportsCli-vs-Assumed distinction is documented in code but
not in tests.
Add a focused test that pins all three variants down with the
exact tags a real operator would see ("v0.5.0", "latest",
"arc_consensus:v0.6.0", "main", "abc123", None). The test
fails if a future refactor collapses `Assumed` into
`SupportsCli` (or vice versa), which would silently change
how callers observe the tag's confidence level.
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
check_cli_versionreturns one of three variants:SupportsCli— parseable version>= v0.5.0, or the literal"latest"RequiresConfigToml— parseable version< v0.5.0Assumed— unparseable tag, or missing tagThe boolean wrapper
supports_cli_flagsonly exercised theRequiresConfigTomlboundary, leaving theSupportsCli-vs-Assumeddistinction documented in code but untested. A future refactor collapsingAssumedintoSupportsCli(or vice versa) would silently change how callers observe the tag's confidence level.Fix
Added a focused test pinning all three variants with the exact tags a real operator would encounter. The test catches any future refactor that merges or renames variants without updating caller behavior.
Changes
File:
crates/quake/src/(CLI version check tests)check_cli_version_covers_all_variantstest coveringSupportsCli,RequiresConfigToml, andAssumedwith realistic tag inputs.How to Test
Risk & Impact
None. Test-only addition — no production code modified. Locks in the three-variant contract so future refactors surface explicitly rather than silently.
Type: 🧪 Test coverage