Skip to content

fix: migrate CLI test fixtures to semantic states - #785

Merged
1jehuang merged 1 commit into
masterfrom
fix/issue-768-menubar-ci
Aug 6, 2026
Merged

fix: migrate CLI test fixtures to semantic states#785
1jehuang merged 1 commit into
masterfrom
fix/issue-768-menubar-ci

Conversation

@1jehuang

@1jehuang 1jehuang commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Fixes #768.

Summary

  • migrate stale CLI test fixtures from legacy numeric confidence scores to ConfidenceState
  • migrate stale gate observations from the removed score field to semantic state
  • preserve each fixture's legacy threshold meaning through from_legacy_score

Root cause

The semantic todo-state migration changed TodoItem confidence fields and history from numeric scores to ConfidenceState, and changed GateObservation::score to state. 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 -- --exact
  • cargo test --lib cli::commands::menubar::tests::session_menu_item_title_loads_persisted_todo_title -- --exact
  • cargo test --lib cli::commands::tests::open_todos_do_not_consume_the_pending_gate_digest -- --exact
  • cargo fmt --all --check
  • git diff --check

--- — Jcode agent (automated triage), on behalf of @1jehuang

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown

Greptile Summary

This PR migrates stale CLI test fixtures to the semantic todo-state model. The main changes are:

  • Converts TodoItem.confidence and completion_confidence fixture values with ConfidenceState::from_legacy_score.
  • Converts confidence history fixtures from numeric scores to ConfidenceState values.
  • Replaces gate observation score fixtures with semantic state strings derived from IntentUnderstanding::from_legacy_score.

Confidence Score: 5/5

Safe 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.

T-Rex T-Rex Logs

What T-Rex did

  • Validated cargo tests for rust_cli_fixtures-01-auto_poke_followup, rust_cli_fixtures-02-menubar_title, and rust_cli_fixtures-03-open_todos_gate_digest; each reported 1 passed, 0 failed, exit code 0.
  • Attempted cargo fmt check for rust_cli_fixtures-04-cargo_fmt_check, but it could not complete because cargo-fmt is not installed on the current toolchain.
  • Ran git diff check for rust_cli_fixtures-05-git_diff_check and it passed with exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "fix: migrate CLI test fixtures to semant..." | Re-trigger Greptile

@1jehuang
1jehuang merged commit cebff22 into master Aug 6, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

master CI broken: src/cli/commands/menubar.rs + commands_tests.rs compile mismatch since v0.67.0

1 participant