← Back to Pull requests

feat: add opt-in cache_save_post input #649

Closed
unknown closed this pull request without merging on Oct 04, 2026 00:09 UTC
View on GitHub
unknown unknown commented on Oct 03, 2026 22:46 UTC
Author

<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise-action/trails/24
<!-- entire-trail-link-end -->

Summary


Adds cache_save_post (default false). When enabled, the mise cache is saved in a post step instead of right after mise install, so tools installed by later steps (monorepo sub-project configs, task-level tools) are included in the saved cache. Requested in #537.

  • action.yml: new input, plus post: dist/index.js / post-if: success().

  • src/index.ts: with the input on, the main step stores the key in state and the post step saves it. With it off the post step is a no-op, so default behaviour is unchanged.
  • Limits


  • Only applies on a cache miss: GitHub cache entries are immutable, so an exact hit can't be re-saved with more tools.

  • A failed post-step save warns instead of failing the job.

  • Not exercised in a real workflow; typecheck, lint, tests and build pass and dist/ is rebuilt.
  • Refs #537

    🤖 Generated with Claude Code

    <!-- CURSOR_SUMMARY -->
    ---

    [!NOTE]

    Low Risk

    Opt-in cache timing change only; default immediate save is unchanged and post-step save failures do not fail the job.

    > Overview

    Adds an opt-in cache_save_post input (default false) so workflows can defer writing the mise GitHub Actions cache until the action’s post step instead of right after mise install / bootstrap.

    > When enabled on a cache miss, the main step stores the cache key in action state and post: dist/index.js runs with post-if: always() to call saveCache, so tools added by later job steps (e.g. monorepo sub-project configs or task-level tools) can be included. With the flag off, behavior is unchanged (immediate save). A failed post-step save logs a warning and does not fail the job. README documents the new input.

    > <sup>Reviewed by Cursor Bugbot for commit 55a37c4249afe01fade0e14c40097c31448105a6. Bugbot is set up for automated code reviews on this repo. Configure here.</sup>

    <!-- /CURSOR_SUMMARY -->

    Diff: 264 lines (+198 / -66) across 3 files Reviewer: jdx Review duration: 83m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 264 lines diff across 3 files
    0.44
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.334
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #649"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.3% (MEDIUM) · Higher = larger blast radius
    44.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.5% · Safe to merge
    17.5%