fix: migrate CLI test fixtures to semantic states - #785
Merged
Conversation
Greptile SummaryThis PR migrates stale CLI test fixtures to the semantic todo-state model. The main changes are:
Confidence Score: 5/5Safe to merge with minimal risk. The changes are limited to test fixture construction and match the current semantic todo model. Legacy numeric meanings are preserved through existing conversion helpers. No functional or security issues were identified. Files Needing Attention: No files require special attention.
What T-Rex did
|
| Filename | Overview |
|---|---|
| src/cli/commands/menubar.rs | Updates a menubar test fixture to construct TodoItem.confidence with ConfidenceState::from_legacy_score; no issues found. |
| src/cli/commands_tests.rs | Migrates CLI command test fixtures from numeric confidence and gate observation scores to semantic state values; no issues found. |
Sequence Diagram
sequenceDiagram
participant Test as CLI test fixture
participant Converter as from_legacy_score
participant Todo as TodoItem/GateObservation
participant Logic as CLI follow-up logic
Test->>Converter: legacy numeric confidence/score
Converter-->>Test: semantic ConfidenceState or gate state string
Test->>Todo: build fixture with semantic fields
Todo->>Logic: exercise existing CLI behavior
Logic-->>Test: assertions validate migrated fixture semantics
Reviews (1): Last reviewed commit: "fix: migrate CLI test fixtures to semant..." | Re-trigger Greptile
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.
Fixes #768.
Summary
ConfidenceStatescorefield to semanticstatefrom_legacy_scoreRoot cause
The semantic todo-state migration changed
TodoItemconfidence fields and history from numeric scores toConfidenceState, and changedGateObservation::scoretostate. These CLI fixtures retained the old shapes, so compiling all targets failed with five E0308 and two E0560 errors.Tests
cargo test --lib cli::commands::tests::run_auto_poke_followup_challenges_abrupt_confidence_once -- --exactcargo test --lib cli::commands::menubar::tests::session_menu_item_title_loads_persisted_todo_title -- --exactcargo test --lib cli::commands::tests::open_todos_do_not_consume_the_pending_gate_digest -- --exactcargo fmt --all --checkgit diff --check--- — Jcode agent (automated triage), on behalf of @1jehuang