Skip to content

test(task): cover task cache restore on windows - #11612

Merged
jdx merged 1 commit into
agent/task-cache-limitsfrom
agent/task-cache-windows-restore
Aug 3, 2026
Merged

jdx merged 1 commit into
agent/task-cache-limitsfrom
agent/task-cache-windows-restore

Conversation

@jdx

@jdx jdx commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a Windows Pester test for task artifact cache restoration
  • verify the first run publishes one manifest/archive pair
  • remove declared outputs and prove the second run restores files, stdout, and stderr without executing again
  • complete the Windows restore coverage tracker item

Validation

  • mise run lint-fix
  • Windows execution is covered by the windows-e2e GitHub Actions job; PowerShell is not available on the local Linux host

AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.


Note

Low Risk
Test-only and tracker doc update; no changes to cache or task runtime behavior.

Overview
Adds Windows end-to-end coverage for experimental task artifact cache restore via a new Pester suite in e2e-win/task_artifact_cache.Tests.ps1.

The test spins up an isolated mise.toml with cache enabled, runs a pwsh build task that writes dist/ and appends to runs.txt, then asserts the first run emits stdout/stderr and creates exactly one manifest (.json) and archive (.tar.zst) under task-artifacts/v2. After deleting dist, a second mise run build must report a cache restore, replay captured output, restore dist/result.txt, and not run the task again (runs.txt still has one line).

Marks “Test restore behavior on Windows” complete in TASK_CACHE_PARITY.md.

Reviewed by Cursor Bugbot for commit d8f0805. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 83e9afb3-97ee-487f-959e-8b801abbf994

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@greptile-apps

greptile-apps Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Windows end-to-end coverage for restoring task artifacts and captured output from cache, then marks the corresponding parity tracker item complete.

  • Adds a Pester test covering cache publication, output deletion, restoration, output replay, and skipped re-execution.
  • Preserves and restores the environment variables overridden by the test.
  • Marks Windows restore coverage complete in the task-cache parity tracker.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported environment leak is fixed by saving and restoring each overridden value.

Important Files Changed

Filename Overview
e2e-win/task_artifact_cache.Tests.ps1 Adds isolated Windows cache-restore coverage and now preserves all environment values overridden during the test.
TASK_CACHE_PARITY.md Marks Windows restore testing complete consistently with the newly added end-to-end coverage.

Reviews (8): Last reviewed commit: "test(task): cover task cache restore on ..." | Re-trigger Greptile

Comment thread e2e-win/task_artifact_cache.Tests.ps1 Resolved
@jdx
jdx force-pushed the agent/task-cache-windows-restore branch 2 times, most recently from c736666 to 26f4577 Compare August 2, 2026 01:26
greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 2, 2026
@jdx
jdx force-pushed the agent/task-cache-windows-restore branch from 26f4577 to bddc11d Compare August 2, 2026 01:33
@greptile-apps
greptile-apps Bot dismissed their stale review August 2, 2026 01:33

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▃▄▂▁▁▂▄▄▄█ 80,074,952 → 80,163,764 +0.11% 17.64 → 17.53ms -0.66%
hook-env ▆▆▁▄▂▂▄▃▅█ 82,190,914 → 82,274,305 +0.10% 18.34 → 18.49ms +0.81%
ls ▅▄▁▁▁▇▆▇▆█ 73,127,800 → 73,174,022 +0.06% 15.71 → 16.16ms +2.84%
registry ▁▁▂▁▂▄▄▅▂█ 49,102,713 → 49,274,741 +0.35% 11.64 → 11.90ms +2.15%
startup ▅▅▁▄▃▂▂▃▄█ 15,784,751 → 15,805,527 +0.13% 9.04 → 9.05ms +0.07%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

d8f0805b47cb vs e5230aa14775 · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/task-cache-windows-restore branch from bddc11d to c63aa73 Compare August 2, 2026 01:58
@greptile-apps
greptile-apps Bot dismissed their stale review August 2, 2026 01:58

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 2, 2026
@jdx
jdx force-pushed the agent/task-cache-windows-restore branch from c63aa73 to f99f3b1 Compare August 2, 2026 02:36
@greptile-apps
greptile-apps Bot dismissed their stale review August 2, 2026 02:36

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 2, 2026
@jdx
jdx force-pushed the agent/task-cache-windows-restore branch from f99f3b1 to c63aa73 Compare August 2, 2026 02:39
@greptile-apps
greptile-apps Bot dismissed their stale review August 2, 2026 02:39

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 2, 2026
@jdx
jdx force-pushed the agent/task-cache-windows-restore branch from c63aa73 to 72782f6 Compare August 2, 2026 13:10
@greptile-apps
greptile-apps Bot dismissed stale reviews from themself August 2, 2026 13:10

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 2, 2026
@jdx
jdx force-pushed the agent/task-cache-windows-restore branch from 72782f6 to d8f0805 Compare August 2, 2026 15:18
@greptile-apps
greptile-apps Bot dismissed their stale review August 2, 2026 15:18

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@jdx
jdx merged commit 3f0e8e6 into main Aug 3, 2026
44 of 55 checks passed
@jdx
jdx deleted the agent/task-cache-windows-restore branch August 3, 2026 03:04
donbeave pushed a commit to donbeave/mise that referenced this pull request Aug 3, 2026
## Summary
- add a Windows Pester test for task artifact cache restoration
- verify the first run publishes one manifest/archive pair
- remove declared outputs and prove the second run restores files,
stdout, and stderr without executing again
- complete the Windows restore coverage tracker item

## Validation
- `mise run lint-fix`
- Windows execution is covered by the `windows-e2e` GitHub Actions job;
PowerShell is not available on the local Linux host

*AI-assisted — Tool: Codex; model: unavailable/unavailable; version:
unavailable.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Test-only and tracker doc update; no changes to cache or task runtime
behavior.
> 
> **Overview**
> Adds **Windows end-to-end coverage** for experimental task artifact
cache restore via a new Pester suite in
`e2e-win/task_artifact_cache.Tests.ps1`.
> 
> The test spins up an isolated `mise.toml` with cache enabled, runs a
`pwsh` `build` task that writes `dist/` and appends to `runs.txt`, then
asserts the first run emits stdout/stderr and creates exactly one
manifest (`.json`) and archive (`.tar.zst`) under `task-artifacts/v2`.
After deleting `dist`, a second `mise run build` must report a cache
restore, replay captured output, restore `dist/result.txt`, and **not**
run the task again (`runs.txt` still has one line).
> 
> Marks **“Test restore behavior on Windows”** complete in
`TASK_CACHE_PARITY.md`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d8f0805. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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