Skip to content

Conversation

@NathanVaughn
Copy link
Owner

@NathanVaughn NathanVaughn commented Nov 13, 2025

Summary by CodeRabbit

  • New Features

    • Added shell-completion for Bash, Zsh, Fish and PowerShell.
    • New CLI options including a completion mode that lists available flags and task labels and exits without running tasks.
  • Documentation

    • Reordered installation steps, updated pre-commit example, added shell-completion snippets, and clarified continue-on-error behavior.
  • Chores

    • Bumped project version to 3.0.1 and CI now includes Python 3.14.
    • Updated pre-commit hook revisions.
  • Bug Fix / Behavior

    • Task summary handling changed to use a fixed summary file in the system temp directory.

@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds Python 3.14 to CI and classifiers, bumps project version and pre-commit hook revisions, updates README with shell-completion and install/order changes, introduces CLI flags and a completion mode in vscode_task_runner/console.py, and changes Azure Pipelines summary output to a fixed TaskSummary.md in vscode_task_runner/printer.py.

Changes

Cohort / File(s) Summary
CI & Metadata
.github/workflows/test.yml, pyproject.toml`
Adds Python 3.14 to the test matrix and supported classifiers; bumps project version 3.0.0 → 3.0.1.
Pre-commit hooks
.pre-commit-config.yaml
Updates hook revisions (e.g., uv-lock 0.9.7 → 0.9.9, ruff-pre-commit v0.14.3 → v0.14.4); other hooks unchanged.
Documentation
README.md
Reorders installation steps (uv before pipx), updates pre-commit example to v3.0.1, adds Bash/Zsh/Fish/PowerShell completion snippets, and refines continue-on-error guidance.
CLI flags & completion
vscode_task_runner/console.py
Adds --complete, --skip-summary, and --continue-on-error flags; implements completion mode that prints available flags and task labels and exits; refactors argv handling and load-error suppression in completion mode.
Summary file handling
vscode_task_runner/printer.py
Replaces unique temp-file creation with a fixed TaskSummary.md path in the system temp directory for Azure Pipelines summary output (removes use of mkstemp/fd management).

Sequence Diagram(s)

sequenceDiagram
  participant User as CLI user
  participant Console as console.py
  participant Loader as Task loader
  participant Executor as Task executor
  participant Printer as printer.py
  Note over Console: New flags: --complete, --skip-summary, --continue-on-error

  User->>Console: invoke CLI with args
  alt contains --complete
    Console->>Console: parse args (local sys_argv)
    Console->>Console: print available flags & task labels
    Console-->>User: exit (no tasks run)
  else normal run
    Console->>Loader: load tasks (suppress completion-only errors)
    Loader-->>Console: tasks
    Console->>Executor: execute tasks (respect --continue-on-error)
    Executor-->>Printer: summary
    alt Azure Pipelines
      Printer->>Printer: write to fixed TaskSummary.md in temp dir
      Printer-->>Console: upload path
    else other platforms
      Printer-->>Console: standard summary path
    end
    Console-->>User: exit with status
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Attention points:
    • vscode_task_runner/console.py: ensure new flags integrate with existing parsing and that local sys_argv handling doesn't omit expected args.
    • vscode_task_runner/printer.py: review fixed TaskSummary.md behavior for concurrent CI jobs and permissions.
    • .pre-commit-config.yaml / pyproject.toml: confirm version bumps and classifiers are intended.

Possibly related PRs

  • Add shell completions #115 — appears to contain the same code-level changes (CLI completion, README updates, Python 3.14 CI, and Azure summary path).

Poem

🐰 I hopped to 3.14 with a cheerful spin,
Flags to complete and new docs to begin.
Hooks got polished, summaries now named,
Tasks show their labels, no runs are maimed.
A tiny rabbit cheers: “Merge — let’s win!” ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'Add shell completions' is vague and does not accurately reflect the comprehensive nature of the changeset, which includes version updates, documentation changes, Python 3.14 support, and internal refactoring beyond just shell completions. Revise the title to better capture the main scope of changes, such as 'Add shell completions, update dependencies, and expand Python 3.14 support' or focus on the primary change if shell completions are indeed the main objective.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c4503a and c540339.

📒 Files selected for processing (2)
  • README.md (4 hunks)
  • vscode_task_runner/console.py (4 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
vscode_task_runner/console.py (1)

57-69: Consider using iterable unpacking for cleaner code.

The completion mode logic is correct, but you can simplify the list concatenation using iterable unpacking as suggested by Ruff.

     if _COMPLETE_FLAG in sys_argv:
         print(
             "\n".join(
-                [
-                    _SKIP_SUMMARY_FLAG,
-                    _CONTINUE_ON_ERROR_FLAG,
-                ]
-                + task_choices
+                [_SKIP_SUMMARY_FLAG, _CONTINUE_ON_ERROR_FLAG, *task_choices]
             )
         )
         sys.exit(0)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50189c5 and 75b2b5f.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • .github/workflows/test.yml (1 hunks)
  • .pre-commit-config.yaml (1 hunks)
  • README.md (4 hunks)
  • pyproject.toml (2 hunks)
  • vscode_task_runner/console.py (4 hunks)
  • vscode_task_runner/printer.py (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
vscode_task_runner/console.py (4)
vscode_task_runner/parser.py (1)
  • load_tasks (57-79)
vscode_task_runner/exceptions.py (1)
  • TasksFileNotFound (25-28)
vscode_task_runner/printer.py (1)
  • error (49-58)
vscode_task_runner/models/task.py (1)
  • is_supported (232-246)
🪛 LanguageTool
README.md

[style] ~262-~262: Consider removing “of” to be more concise
Context: ...matting, test, and build tasks, and see all of the results. ```bash vtr --continue-on-err...

(ALL_OF_THE)

🪛 Ruff (0.14.4)
vscode_task_runner/console.py

62-66: Consider iterable unpacking instead of concatenation

Replace with iterable unpacking

(RUF005)

🔇 Additional comments (7)
pyproject.toml (1)

3-3: LGTM! Version bump and Python 3.14 support.

The version bump to 3.0.1 is appropriate for the new shell completion feature, and adding Python 3.14 to the classifiers aligns with the updated test matrix.

Also applies to: 17-17

vscode_task_runner/console.py (3)

15-17: LGTM! Good use of constants for flags.

Defining flag constants makes the code more maintainable and reduces the risk of typos.


38-48: LGTM! Consistent use of flag constants.

Using the flag constants in the argument parser setup improves maintainability.


109-121: LGTM! Proper error suppression during completion.

Extracting sys_argv once and suppressing error output during completion mode is the correct approach, as users don't need error messages when tab-completing.

.pre-commit-config.yaml (1)

19-19: Verification complete: all hook versions are confirmed stable.

All three versions are legitimate stable releases published recently:

  • uv-pre-commit 0.9.5 — stable, published 2025-10-21
  • ruff-pre-commit v0.14.2 — stable, published 2025-10-23
  • pyright-python v1.1.406 — stable, published 2025-10-02

No issues with the version bumps.

vscode_task_runner/printer.py (1)

135-140: I need to gather more specific information about Azure Pipelines' task execution model and temp directory handling to assess whether the fixed filename race condition is a genuine concern.

Based on my investigation, I've found clear evidence that the review comment misunderstands Azure Pipelines' execution model.

A job is a series of steps that run sequentially as a unit—the smallest unit of work that can be scheduled to run. The agent runs steps sequentially. Before a step starts, all previous steps must finish or be skipped. Additionally, each agent can only run one job at a time.

Agent.TempDirectory is a temporary folder that is cleaned after each pipeline job. This means each job receives an isolated temp directory.

The concern about concurrent runs overwriting each other's file is not applicable in Azure Pipelines. Different pipeline runs/jobs (which is what "concurrent runs" most likely refers to) each have their own isolated temp directory. Within a single job, tasks cannot execute concurrently—they run sequentially. Therefore, using a fixed filename like TaskSummary.md poses no race condition risk in this context.

Likely an incorrect or invalid review comment.

.github/workflows/test.yml (1)

21-21: No action required—Python 3.14 is available in GitHub Actions.

As of November 13, 2025, GitHub's setup-python action supports Python 3.14, so this configuration is valid.

README.md Outdated
Comment on lines 206 to 220
_vscode_task_runnner_completion() {
local IFS=$'\n'
COMPREPLY=($(compgen -W "$(vtr --complete)" -- "${COMP_WORDS[COMP_CWORD]}"))
}
complete -F _vscode_task_runnner_completion vtr
complete -F _vscode_task_runnner_completion vscode-task-runner
# =========================
# Zsh, typically ~/.zshrc
_vscode_task_runnner_completion() {
local -a completions=("${(f)$(vtr --complete)}")
compadd -a -- completions
}
compdef _vscode_task_runnner_completion vtr
compdef _vscode_task_runnner_completion vscode-task-runner
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix typo in shell completion function names.

The function names have an extra 'n': _vscode_task_runnner_completion should be _vscode_task_runner_completion (matching the package name with two n's, not three).

Apply this correction to the Bash example:

-_vscode_task_runnner_completion() {
+_vscode_task_runner_completion() {
     local IFS=$'\n'
     COMPREPLY=($(compgen -W "$(vtr --complete)" -- "${COMP_WORDS[COMP_CWORD]}"))
 }
-complete -F _vscode_task_runnner_completion vtr
-complete -F _vscode_task_runnner_completion vscode-task-runner
+complete -F _vscode_task_runner_completion vtr
+complete -F _vscode_task_runner_completion vscode-task-runner

And to the Zsh example:

-_vscode_task_runnner_completion() {
+_vscode_task_runner_completion() {
     local -a completions=("${(f)$(vtr --complete)}")
     compadd -a -- completions
 }
-compdef _vscode_task_runnner_completion vtr
-compdef _vscode_task_runnner_completion vscode-task-runner
+compdef _vscode_task_runner_completion vtr
+compdef _vscode_task_runner_completion vscode-task-runner
🤖 Prompt for AI Agents
In README.md around lines 206 to 220 the shell completion function and its
registrations are misspelled as _vscode_task_runnner_completion (three n's);
rename the function to _vscode_task_runner_completion (two n's) in both the Bash
section (function definition and both complete -F lines) and the Zsh section
(function definition and both compdef lines) so the function name matches the
package name and is consistent across examples.

@NathanVaughn NathanVaughn merged commit bf43bea into main Nov 13, 2025
6 checks passed
@NathanVaughn NathanVaughn deleted the feature/shell-complete branch November 13, 2025 02:59
NathanVaughn added a commit that referenced this pull request Nov 13, 2025
* Update pre-commit hooks (#97)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update parser.py (#98)

* Add unicode tests

* Support .code-workspace files (#101)

* Add docs for code workspace

* Reorganize lines slightly

* Improve error

* Typo

* Simplify lookup

* Add tests

* Use uv build backend

* Update pre-commit hooks

* Update pre-commit hooks (#103)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update pre-commit hooks (#104)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Version 2.2.0 (#106)

* Add build summary feature

* Add tests and branch coverage

* Remove group if there is only one task

* Improve coverage

* Add uv version

* Update README

* Support parallel task execution (#108)

* Support parallel task execution

* Fix tests

* Fix subprocess output

* Test bandaid

* Add parallel check

* Fix task execution levels

* Formatting [ci skip]

* Replace platform constants with Enum

* Add rainbow colors to parallel task output

* Bump version

* Update CI steps (#111)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update pre-commit hooks (#110)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update pre-commit hooks (#113)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update CI steps (#114)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add shell completions (#115)

* Update deps

* Add shell completions #112

* Remove extra space

* README updates and predicatble name for ADO summary

* Formatting

* Use newline for splitting options

* Add scripts for zsh and fish

* Condense

* Better handle errors

* Update pre-commit config

* Update docs

* Simplify

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: VisualPlugin <[email protected]>
NathanVaughn added a commit that referenced this pull request Nov 13, 2025
* Update pre-commit hooks (#97)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update parser.py (#98)

* Add unicode tests

* Support .code-workspace files (#101)

* Add docs for code workspace

* Reorganize lines slightly

* Improve error

* Typo

* Simplify lookup

* Add tests

* Use uv build backend

* Update pre-commit hooks

* Update pre-commit hooks (#103)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update pre-commit hooks (#104)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Version 2.2.0 (#106)

* Add build summary feature

* Add tests and branch coverage

* Remove group if there is only one task

* Improve coverage

* Add uv version

* Update README

* Support parallel task execution (#108)

* Support parallel task execution

* Fix tests

* Fix subprocess output

* Test bandaid

* Add parallel check

* Fix task execution levels

* Formatting [ci skip]

* Replace platform constants with Enum

* Add rainbow colors to parallel task output

* Bump version

* Update CI steps (#111)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update pre-commit hooks (#110)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update pre-commit hooks (#113)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update CI steps (#114)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add shell completions (#115)

* Update deps

* Add shell completions #112

* Remove extra space

* README updates and predicatble name for ADO summary

* Formatting

* Use newline for splitting options

* Add scripts for zsh and fish

* Condense

* Better handle errors

* Update pre-commit config

* Update docs

* Simplify

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: VisualPlugin <[email protected]>
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.

2 participants