fix(task): include args in task output prefix and truncate long prefixes#8533
Conversation
When the same task runs multiple times with different arguments (e.g. as dependencies in a test matrix), all output was prefixed with just the task name, making it impossible to distinguish runs. Now args are included in the prefix (e.g. `[test-docker 4.1]`) and long prefixes are truncated to 40 chars. Closes #8531 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the readability and utility of task output by modifying how task prefixes are generated. It ensures that tasks run with different arguments are clearly distinguishable in logs and prevents overly long prefixes from cluttering the terminal display, thereby improving the user experience for complex task workflows. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Greptile SummaryThis PR makes a small, UI-only enhancement to the
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["prefix() called"] --> B["format!('{} {}', display_name, args.join(' '))"]
B --> C["inner.trim()"]
C --> D{"display_width(inner) > 40?"}
D -- "No" --> E["Use inner as-is"]
D -- "Yes" --> F["truncate_str(inner, 40, '…')\n→ 39 chars + '…'"]
E --> G["format!('[{}]', inner)"]
F --> G
G --> H["Return prefix string\n(max 42 display cols)"]
Last reviewed commit: f72a6e7 |
| let max_width = 40; | ||
| let inner = format!("{} {}", self.display_name, self.args.join(" ")); | ||
| let inner = inner.trim(); | ||
| format!("[{}]", console::truncate_str(inner, max_width, "…")) |
There was a problem hiding this comment.
Redundant module path prefix on imported function
truncate_str is already directly imported on line 10 via use console::{Color, measure_text_width, truncate_str};, and the existing usage at line 1290 calls it without the module prefix. Using the full path console::truncate_str is inconsistent with both.
| format!("[{}]", console::truncate_str(inner, max_width, "…")) | |
| format!("[{}]", truncate_str(inner, max_width, "…")) |
There was a problem hiding this comment.
Code Review
This pull request enhances task output by including arguments in the task prefix, making it easier to differentiate between parallel runs of the same task. It also introduces truncation for long prefixes, limiting them to 40 characters to maintain a clean terminal interface. The implementation is clear and correctly handles various cases, such as tasks with no arguments. The changes are well-contained and achieve the intended improvements.
Note: Security Review did not run due to the size of the PR.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 x -- echo |
25.1 ± 1.1 | 22.8 | 31.7 | 1.00 |
mise x -- echo |
25.3 ± 1.1 | 23.1 | 29.6 | 1.01 ± 0.06 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 env |
24.9 ± 0.7 | 22.7 | 27.1 | 1.00 |
mise env |
25.5 ± 1.0 | 23.0 | 37.0 | 1.02 ± 0.05 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 hook-env |
25.5 ± 0.8 | 23.5 | 27.8 | 1.00 |
mise hook-env |
26.1 ± 0.7 | 24.4 | 29.3 | 1.02 ± 0.04 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.3.5 ls |
24.1 ± 1.0 | 22.1 | 26.9 | 1.00 ± 0.07 |
mise ls |
24.1 ± 1.4 | 22.4 | 40.0 | 1.00 |
xtasks/test/perf
| Command | mise-2026.3.5 | mise | Variance |
|---|---|---|---|
| install (cached) | 155ms | 153ms | +1% |
| ls (cached) | 85ms | 84ms | +1% |
| bin-paths (cached) | 88ms | 86ms | +2% |
| task-ls (cached) | 844ms | 826ms | +2% |
### 🐛 Bug Fixes - **(activate)** reorder shims to front of PATH on re-source in fish by @jdx in [#8534](#8534) - **(backend)** strip mise shims from dependency_env PATH to prevent fork bomb by @pose in [#8475](#8475) - **(github)** resolve "latest" version correctly via GitHub API by @jdx in [#8532](#8532) - **(lock)** set env tags and clarify lockfile docs by @jdx in [#8519](#8519) - **(lock)** use separate mise.<env>.lock files instead of env tags by @jdx in [#8523](#8523) - **(task)** include args in task output prefix and truncate long prefixes by @jdx in [#8533](#8533) - **(task)** only include args in task prefix when disambiguating duplicates by @jdx in [#8536](#8536) - **(test)** pin goreleaser version in attestation e2e test by @jdx in [#8518](#8518) - **(windows)** env._.source needs to run bash.exe on Windows (fix #6513) by @pjeby in [#8520](#8520) - handle locked .exe shims on Windows during reshim by @davireis in [#8517](#8517) ### 🚜 Refactor - **(prepare)** remove touch_outputs and update docs to reflect blake3 hashing by @jdx in [#8535](#8535) ### 📚 Documentation - **(docker)** replace jdxcode/mise image with curl install, update to debian:13-slim by @jdx in [#8526](#8526) - fix "gzip: stdin is encrypted" error in shell tricks cookbook by @pjeby in [#8512](#8512) ### 📦 Registry - add tigerbeetle ([github:tigerbeetle/tigerbeetle](https://github.com/tigerbeetle/tigerbeetle)) by @risu729 in [#8514](#8514) ### New Contributors - @pjeby made their first contribution in [#8520](#8520) - @davireis made their first contribution in [#8517](#8517) - @Aurorxa made their first contribution in [#8511](#8511) ## 📦 Aqua Registry Updates #### New Packages (6) - [`betterleaks/betterleaks`](https://github.com/betterleaks/betterleaks) - [`majorcontext/moat`](https://github.com/majorcontext/moat) - [`princjef/gomarkdoc`](https://github.com/princjef/gomarkdoc) - [`remko/age-plugin-se`](https://github.com/remko/age-plugin-se) - [`sudorandom/fauxrpc`](https://github.com/sudorandom/fauxrpc) - [`swanysimon/mdlint`](https://github.com/swanysimon/mdlint) #### Updated Packages (1) - [`moonrepo/moon`](https://github.com/moonrepo/moon)
Summary
[prefix]output so parallel runs of the same task with different args are distinguishable (e.g.[test-docker 4.1]vs[test-docker 3.2])Closes #8531
Test plan
…🤖 Generated with Claude Code
Note
Low Risk
Changes are limited to log/prefix formatting and corresponding test expectations, with no impact on task execution semantics or security-sensitive code.
Overview
Task output prefixes now include the task’s CLI args (e.g.
[build a]) so concurrent/dep runs of the same task are distinguishable, and long prefixes are truncated to 40 characters with an ellipsis.E2E task tests were updated to assert the new prefix format for usage-spec tasks and dependency-invoked tasks with args.
Written by Cursor Bugbot for commit f72a6e7. This will update automatically on new commits. Configure here.