Skip to content

test(task): update zsh completion expectations for usage 3.5 three-column output#10328

Closed
JamBalaya56562 wants to merge 1 commit into
jdx:mainfrom
JamBalaya56562:fix/usage-3.5-zsh-completion-test-expectations
Closed

test(task): update zsh completion expectations for usage 3.5 three-column output#10328
JamBalaya56562 wants to merge 1 commit into
jdx:mainfrom
JamBalaya56562:fix/usage-3.5-zsh-completion-test-expectations

Conversation

@JamBalaya56562

@JamBalaya56562 JamBalaya56562 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Problem

Two task-completion e2e tests have been failing on main:

  • e2e/tasks/test_task_completion (CI e2e-3)
  • e2e/tasks/test_task_completion_global_cd (CI e2e-4)

They assert the output of usage complete-word --shell zsh. usage v3.5.0 (jdx/usage#666, "Zsh Colon Fixes") intentionally changed that output from a two-column value<TAB>insert layout to an unconditional three-column value<TAB>description<TAB>insert. For completions with no description (the file/choice completions these tests exercise), the now-always-present empty middle column produces a double tab — e.g. mise.toml\t\tmise.toml and alpha\t\talpha — where the tests still expected a single tab.

mise already adopted the new format in #10313 (regenerated completions/_mise to the three-column consumer and pinned usage-lib / mise.lock to 3.5.0), but these two e2e expectation strings were not updated. Because the tests install the usage tool with version = "latest", they only went red once the default 24h minimum_release_age window let latest resolve to v3.5.0 (~24h after the v3.5.0 release) — which is why #10313's own CI was still green at merge time.

Change

Update the expected completion lines in both tests to the three-column format (insert the empty description column: value\t\tvalue). Test-only change — no behavior change. The new format is corroborated by the CI's actual output and by usage v3.5.0's own unit test (complete_word_zsh_three_columns_without_descriptions).

The tests keep usage = { version = "latest" }; pinning to a concrete version to avoid tracking future usage format changes is left as a separate maintainer decision.

Refs jdx/usage#666, #10313.

This pull request was prepared with the help of an AI coding assistant.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated end-to-end test assertions for task completion output formatting to reflect adjusted spacing and display of completion candidates.

…lumn output

usage v3.5.0 (jdx/usage#666, "Zsh Colon Fixes") changed `complete-word --shell
zsh` from a two-column `value<TAB>insert` layout to an unconditional
three-column `value<TAB>description<TAB>insert`. When a completion has no
description (file/choice completions) the now-always-present empty middle
column yields `value<TAB><TAB>insert`.

mise already moved to usage 3.5 in jdx#10313 (regenerated completions/_mise to the
three-column consumer; pinned usage-lib and mise.lock to 3.5.0), but these two
e2e tests still asserted the old single-TAB output. They install the usage tool
with version = "latest", so they started failing once the default 24h
release-age window let "latest" resolve to v3.5.0.

Update the expected completion lines to the three-column format (insert the
empty description column). Test-only change; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fab62dbb-4cc8-419b-a4f3-55d72f2ce78c

📥 Commits

Reviewing files that changed from the base of the PR and between 234284e and 028ee4b.

📒 Files selected for processing (2)
  • e2e/tasks/test_task_completion
  • e2e/tasks/test_task_completion_global_cd

📝 Walkthrough

Walkthrough

Two e2e test files update expected output assertion strings to match revised completion and mise exec output formatting, including whitespace and tab layout adjustments around mise.toml, mise.usage.kdl, and completion candidate spacing.

Changes

Task Completion Output Formatting

Layer / File(s) Summary
Completion and exec output formatting assertions
e2e/tasks/test_task_completion, e2e/tasks/test_task_completion_global_cd
Expected output strings in task completion tests are updated to match new formatting: tab/spacing adjustments in mise exec invocation output, and whitespace between completion candidate labels and values across baseline, -C ., tasks run, and orphan-short flag test scenarios.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • jdx/mise#10313: Updates zsh completion and usage-lib integration that likely triggered the completion output formatting changes reflected in these test assertions.
  • jdx/mise#10181: Prior e2e task completion assertion update that also adjusted spacing between completion labels and values in the same test files.

Poem

🐰 The tests now match the new output's dance,
With tabs and spaces perfectly aligned,
From mise exec flow to completion's prance,
The formatting refined, assertions resigned,
All green checkmarks—no more failed test's glance! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test(task): update zsh completion expectations for usage 3.5 three-column output' accurately describes the primary change—updating test expectations for the new three-column output format introduced in usage v3.5.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes two failing e2e tests by updating their expected strings to match the three-column zsh completion output introduced in usage v3.5.0 — every value\tvalue becomes value\t\tvalue (the empty middle column is the now-always-present description field).

  • test_task_completion: updates the two file-completion assertions (mise.toml, mise.usage.kdl).
  • test_task_completion_global_cd: updates all six choice-completion assertions (alpha/beta/gamma) across the baseline, -C flag, tasks run, and orphan-short flag variants.

Confidence Score: 5/5

Safe to merge — purely a test expectation update with no production code touched.

Both files only update hardcoded string literals inside assert calls to reflect the format change already confirmed by usage v3.5.0's own unit tests and CI output. Every affected assertion is updated consistently, and the logic under test is unchanged.

No files require special attention.

Important Files Changed

Filename Overview
e2e/tasks/test_task_completion Updates the expected zsh completion output from single-tab two-column format to double-tab three-column format to match usage v3.5.0
e2e/tasks/test_task_completion_global_cd Updates all six assert expectations to the three-column format (value\t\tvalue), covering baseline, -C flag, tasks run path, and orphan-short flag variants

Reviews (1): Last reviewed commit: "test(task): update zsh completion expect..." | Re-trigger Greptile

@JamBalaya56562 JamBalaya56562 deleted the fix/usage-3.5-zsh-completion-test-expectations branch June 12, 2026 07:12
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.

1 participant