Skip to content

test: repair three tests broken on main by catalog and context-window changes - #7155

Closed
luochen211 wants to merge 1 commit into
codewhale-hq:mainfrom
luochen211:fix/main-test-drift
Closed

luochen211 wants to merge 1 commit into
codewhale-hq:mainfrom
luochen211:fix/main-test-drift

Conversation

@luochen211

Copy link
Copy Markdown
Contributor

Closes #7154

These three tests fail in Test (ubuntu-latest) on every open PR. This change fixes only the fixtures and the golden file. No production code changes.

  • golden_providers_export_matches_registry: 0e3677b added MiniMax-M3.1-Flash, kimi-k3.1-pro, kimi-k3.1-pro-highspeed and gpt-6.1-terra to the bundled catalog but did not update providers-export.golden.json. Regenerated with WRITE_GOLDEN=1 ... write_golden_providers_export_when_requested -- --ignored. The diff adds only those model rows.
  • status_report_localizes_the_complete_japanese_surface: the fixture set only active_context_window_source. Since da026a2, the source comes from active_context_window. The fixture now installs the window next to its source, the same fix 5e9cefd made to three sibling fixtures.
  • test_update_model_compaction_budget: App::new installs a resolved window for the default model, and effective_budget_route() prefers it, so deepseek-v4-pro and the unknown model were budgeted against the same window. In production, /model refreshes the window (commands/groups/core/core.rs). The test assigns app.model directly, so it now clears active_context_window along with the other pinned inputs.

Verification

  • Before the change, on c96f4edc5: both TUI tests fail (0 passed; 2 failed).
  • cargo test -p codewhale-tui --lib --locked -- config_policy_status_tests compaction_budget context_window: 30 passed; 0 failed
  • cargo test -p codewhale-config --lib --locked route::export: 5 passed; 0 failed; 1 ignored
  • cargo fmt --all -- --check: clean

… changes

- Regenerate providers-export.golden.json. 0e3677b pinned MiniMax-M3.1-Flash,
  kimi-k3.1-pro, kimi-k3.1-pro-highspeed and gpt-6.1-terra in the bundled
  catalog without updating the golden, so
  golden_providers_export_matches_registry failed.
- status_report_localizes_the_complete_japanese_surface set only
  active_context_window_source. Since da026a2 the effective source is read
  from active_context_window, so install the window beside its source, as
  5e9cefd did for three sibling fixtures.
- test_update_model_compaction_budget kept the window App::new resolved for
  the default model, so both models were budgeted against it. Clear it with
  the other pinned inputs so each model resolves its own window.

Verified: both TUI tests fail on c96f4ed; after the change
`cargo test -p codewhale-tui --lib --locked -- config_policy_status_tests
compaction_budget context_window` gives 30 passed, 0 failed, and
`cargo test -p codewhale-config --lib --locked route::export` gives 5 passed,
0 failed. cargo fmt --check is clean.

Closes codewhale-hq#7154

Signed-off-by: luochen211 <cuidong111@gmail.com>
@luochen211
luochen211 requested a review from Hmbown as a code owner October 30, 2026 10:29

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 30, 2026
@luochen211

Copy link
Copy Markdown
Contributor Author

Closing as superseded: 84acb83 fixed the same three tests on main.

@luochen211 luochen211 closed this Oct 31, 2026
@luochen211
luochen211 deleted the fix/main-test-drift branch October 31, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main: three tests fail Test (ubuntu-latest) on every PR (stale providers golden, half-installed context-window fixtures)

1 participant