master CI broken: src/cli/commands/menubar.rs + commands_tests.rs compile mismatch since v0.67.0
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
master CI broken: src/cli/commands/menubar.rs + commands_tests.rs compile mismatch since v0.67.0
Summary
Master is red since v0.67.0 (156ae409250c20f7b3dd530ff282d8367d6d5cd5). The jcode lib test target does not compile, which breaks Build & Test (ubuntu/macos/windows) and Quality Guardrails on every PR against master. A fix has not landed as of 2026-08-04 (master is still at 156ae4092).
This is a pre-existing break on the v0.67.0 base, independent of PR #758 (feat(hooks): support multiple client-scoped commands). PR #758's CI stays red only because of it: its own changed files build and test cleanly (verified: jcode-base hooks 11/11 pass on the PR head, jcode-config-types 14/14 pass). Closing this requires fixing the master-side type mismatch, not touching PR #758.
Reproduction
git checkout 156ae409250c20f7b3dd530ff282d8367d6d5cd5
cargo test -p jcode --no-run
Result: error: could not compile 'jcode' (lib test) due to 7 previous errors.
Exact errors (verified 2026-08-04, rustc 1.96.0)
src/cli/commands/menubar.rs
-
menubar.rs:869:34— E0308 mismatched typesconfidence: Some(95),expected 'ConfidenceState', found integer(arguments to theConfidenceStateenum variant are incorrect). -
menubar.rs:488:9— warning (trips Quality Guardrails clippy-D warnings)unsafe {warning: unnecessary 'unsafe' block.
src/cli/commands_tests.rs
commands_tests.rs:262:9— E0308 mismatched types
expected 'Option<ConfidenceState>', found 'Option<u8>'(bindingconfidence).commands_tests.rs:263:9— E0308 mismatched types
expected 'Option<ConfidenceState>', found 'Option<u8>'(bindingcompletion_confidence).commands_tests.rs:296:36— E0308 mismatched types
todo.confidence_history = vec![0, 100];—expected 'ConfidenceState', found integer.commands_tests.rs:323:44— E0308 mismatched types
todo.confidence_history = vec![70, 80, 90, 100];—expected 'ConfidenceState', found integer.commands_tests.rs:408:13— E0560 structGateObservationhas no field namedscore
Note:score: Some(70),GateObservation(crates/jcode-base/src/todo.rs:138) only haskind,group,state. Thescorefield was migrated tostate(the doc comment explicitly notes legacy numericscoreentries load withstate: None), but the test constructor was not updated.commands_tests.rs:469:13— E0560 structGateObservationhas no field namedscore(same as above).
Impact
- Build & Test (
.github/workflows/ci.yml,ubuntu-latest+macos-latest):cargo test --no-runfails → job red. - Windows Smoke (
.github/workflows/windows-smoke.yml,windows-latest): compiles library and binary tests → same failures → job red. - Quality Guardrails (
.github/workflows/ci.yml): clippy with warnings denied + all-targets check → red. - Every PR based on current master inherits these failures regardless of its own changes.
Suggested fix
Update src/cli/commands/menubar.rs and src/cli/commands_tests.rs to the current types:
confidence/completion_confidence→Option<ConfidenceState>(use the enum variant, e.g.Some(ConfidenceState::...)), andconfidence_historyentries →ConfidenceStatevalues,GateObservation { score: Some(70) }→ use thestatefield (e.g.state: Some(...)).
Verification done
- Master still at
156ae409250c20f7b3dd530ff282d8367d6d5cd5as of 2026-08-04 — no fix landed. - All 7 errors reproduced locally against that exact commit.
- PR #758 head (
3c5751474) shows the same pre-existing failures only; its touched crates pass. No new failures introduced by the PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/cli/commands/menubar.rs and src/cli/commands_tests.rs, then inspect the current ConfidenceState and GateObservation definitions, including crates/jcode-base/src/todo.rs:138. Reproduce the failure with cargo test -p jcode --no-run, align the affected test and menubar values with those types, and confirm the jcode test target and Quality Guardrails checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ci-cd, cli, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100