Skip to content

chore(deps): add 7-day cooldown across cargo, bun, mise, dependabot, and CI#431

Merged
avihut merged 4 commits intomasterfrom
deps/use-cooleddown-packages
May 1, 2026
Merged

chore(deps): add 7-day cooldown across cargo, bun, mise, dependabot, and CI#431
avihut merged 4 commits intomasterfrom
deps/use-cooleddown-packages

Conversation

@avihut
Copy link
Copy Markdown
Owner

@avihut avihut commented May 1, 2026

Summary

Adds a layered supply-chain age gate so freshly-published package versions
don't enter the dep graph without intent. Security-only updates still flow
through (Dependabot bypasses cooldown for security PRs).

Cooldown layers

  • mise toolsmise.toml [settings] minimum_release_age = "7d"
  • Bun installsbunfig.toml + docs/bunfig.toml minimumReleaseAge = 604800
  • Dependabot version PRscooldown.default-days: 7 across cargo, bun, github-actions
    • Also switches the existing /docs entry from npmbun (the docs site
      is bun-managed; the npm ecosystem doesn't read bun.lock)
    • Adds a new bun entry for / (prettier dev dep, previously uncovered)
  • cargo-cooldown registered via mise + cooldown.toml — local cargo build guard
  • CI lockfile-age checkscripts/check-lockfile-age.sh + new dep-age-check
    job in test.yml. Diffs Cargo.lock and bun.lock against the PR base ref,
    queries crates.io / npm for pubtime, fails PRs that introduce <7-day-old entries

Bypass paths

  • Per-package, persistent: .dep-age-allowlist, bunfig.toml
    minimumReleaseAgeExcludes, or cooldown.toml [[allow.exact]]
  • Emergency CI override: ALLOW_FRESH_DEPS=1
  • Dependabot security PRs bypass automatically

Also bundled (related supporting work)

  • New .github/workflows/mise-tool-updates.yml — daily mise upgrade cron
    that opens a PR when anything moves (matches the Dependabot schedule). Fills
    the gap that Dependabot has no mise ecosystem support.
  • Extended mise.toml [hooks] enter to also hash mise.toml/mise.lock and
    run mise install when they change — so cd-ing into a worktree with stale
    pinned tool versions auto-syncs them.
  • CLAUDE.md Dependency Cooldown section documenting the gate and how to add
    packages under it.

Test plan

  • Bun gate: bun add @aws-sdk/client-s3@3.1040.0 (1d old) blocked with
    minimum-release-age error; @3.700.0 (Nov 2024) installed cleanly
  • mise gate: mise install cargo:cargo-cooldown selected 0.2.0 instead
    of 0.3.0 (5d old at the time)
  • Lockfile-age script: against c8b0bd37 (parent of edtui bump), correctly
    flagged cargo:edtui@0.11.3 (1d old). Allowlist entry suppressed it.
    ALLOW_FRESH_DEPS=1 env-var bypass also verified.
  • mise run fmt, mise run clippy, mise run test:unit all pass
  • actionlint clean on all new/modified workflow files
  • CI green on this PR
  • First scheduled run of mise-tool-updates.yml produces a no-op or a
    reasonable PR (will validate after merge)

avihut and others added 4 commits May 1, 2026 12:04
…ot, and CI

Add a layered supply-chain age gate so freshly-published package versions
don't enter the dep graph without intent. Security-only updates still
flow through (Dependabot bypasses cooldown for security PRs).

Layers:
- mise.toml [settings] minimum_release_age = "7d" — gates dev tools
- bunfig.toml + docs/bunfig.toml minimumReleaseAge = 604800 — gates Bun installs
- .github/dependabot.yml cooldown.default-days: 7 across cargo, bun, gh-actions
- cargo-cooldown registered via mise + cooldown.toml — local cargo build guard
- scripts/check-lockfile-age.sh + dep-age-check CI job — diffs Cargo.lock and
  bun.lock against the PR base ref and queries crates.io / npm for pubtime,
  failing PRs that introduce <7-day-old entries

Bypass paths: .dep-age-allowlist, bunfig minimumReleaseAgeExcludes,
cooldown.toml [[allow.exact]], or ALLOW_FRESH_DEPS=1 for emergency CI overrides.

Switches the existing /docs Dependabot entry from npm to bun (the docs site is
bun-managed) and adds a new bun entry for /, which previously had no coverage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the need for Renovate-style automation just for mise tools. Runs
`mise upgrade` on a weekly cron and opens a PR if anything changed. The
7-day minimum_release_age in mise.toml ensures only aged-in versions are
ever picked.

Constraint bumps (mise upgrade --bump) remain manual — flagged in the PR
body so reviewers know to escalate when needed.

Note: PRs opened with the default GITHUB_TOKEN don't trigger downstream
workflows, so CI requires an empty-commit nudge or close+reopen. Documented
in the workflow body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Weekly was overcautious — most runs are no-ops anyway (peter-evans/create-pull-request
diffs and skips when nothing changed), and daily lines up with the dependabot
schedule already in dependabot.yml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends the existing [hooks] enter hash gate to include mise.toml and
mise.lock alongside package.json/bun.lock. When you cd into a worktree
whose mise files have moved (e.g. after pulling master, after an
auto-upgrade PR merges, when switching to a worktree on a different
branch), the hook now also runs `mise install` to materialize the pinned
versions. Cost is the md5 of four small files when nothing changed.

Doesn't cover the case where you `git pull` and stay in the same shell
without cd'ing — for that, cd-out-and-back-in or run mise install
manually.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avihut avihut self-assigned this May 1, 2026
@avihut avihut added this to the Public Launch milestone May 1, 2026
@avihut avihut added chore Maintenance tasks ci CI/CD changes labels May 1, 2026
@avihut avihut merged commit e444bce into master May 1, 2026
11 checks passed
@avihut avihut deleted the deps/use-cooleddown-packages branch May 1, 2026 09:22
This was referenced May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance tasks ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant