Skip to content

Auto-update with cooldown_days "updates" to an older version #2051

@injust

Description

@injust

Summary

After adding this to my prek.toml:

[auto_update]
cooldown_days = 7

I ran prek auto-update:

https://github.com/tombi-toml/tombi-pre-commit
  updating rev `v0.10.2` -> `v0.9.25`

I'm not sure what the best behaviour is in this situation, but I don't think prek should "update" to an older version without a warning or some other messaging.

Willing to submit a PR?

  • Yes — I’m willing to open a PR to fix this.

Platform

macOS 15 x86_64

Version

prek 0.3.12 (Homebrew 2026-05-05)

.pre-commit-config.yaml

[auto_update]
cooldown_days = 7

[[repos]]
repo = "https://github.com/tombi-toml/tombi-pre-commit"
rev = "v0.10.2"
hooks = [
  { id = "tombi-format" },
  { id = "tombi-lint" },
]

Log file

2026-05-05T19:31:43.067869Z DEBUG prek: 0.3.12 (Homebrew 2026-05-05)
2026-05-05T19:31:43.067994Z DEBUG Args: ["prek", "auto-update"]
2026-05-05T19:31:43.068099Z TRACE Searching for global config path=/Users/jsu/.config/prek/prek.toml
2026-05-05T19:31:43.068151Z TRACE Global config not found or inaccessible, skipping path=/Users/jsu/.config/prek/prek.toml
2026-05-05T19:31:43.080440Z TRACE get_root: close time.busy=12.0ms time.idle=13.0µs
2026-05-05T19:31:43.080549Z DEBUG Git root: /Users/jsu/code/python-template
2026-05-05T19:31:43.080576Z DEBUG Found workspace root at `/Users/jsu/code/python-template`
2026-05-05T19:31:43.080618Z DEBUG discover{root="/Users/jsu/code/python-template" config=None refresh=true}: Performing fresh workspace discovery
2026-05-05T19:31:43.080703Z TRACE discover{root="/Users/jsu/code/python-template" config=None refresh=true}:list_submodules{git_root="/Users/jsu/code/python-template"}: close time.busy=4.00µs time.idle=704ns
2026-05-05T19:31:43.083618Z DEBUG Loading project configuration path=prek.toml
2026-05-05T19:31:43.087308Z TRACE discover{root="/Users/jsu/code/python-template" config=None refresh=true}: close time.busy=6.69ms time.idle=2.11µs
2026-05-05T19:31:43.088633Z TRACE Cloning repository `https://github.com/tombi-toml/tombi-pre-commit` to `/var/folders/jj/8r7yjy_522771gyb6zhff4jc0000gn/T/.tmp9REiUy`
2026-05-05T19:31:43.088699Z TRACE Executing `/usr/local/bin/git -c init.defaultObjectFormat= init --template= /var/folders/jj/8r7yjy_522771gyb6zhff4jc0000gn/T/.tmp9REiUy`
2026-05-05T19:31:43.108914Z TRACE Executing `cd /var/folders/jj/8r7yjy_522771gyb6zhff4jc0000gn/T/.tmp9REiUy && /usr/local/bin/git remote add origin https://github.com/tombi-toml/tombi-pre-commit`
2026-05-05T19:31:43.120572Z TRACE Executing `cd /var/folders/jj/8r7yjy_522771gyb6zhff4jc0000gn/T/.tmp9REiUy && /usr/local/bin/git fetch origin HEAD --quiet --filter=blob:none --tags`
2026-05-05T19:31:43.691173Z TRACE Executing `cd /var/folders/jj/8r7yjy_522771gyb6zhff4jc0000gn/T/.tmp9REiUy && /usr/local/bin/git for-each-ref --sort=-creatordate --format=%(refname:lstrip=2)	%(creatordate:unix)	%(objectname)	%(*objectname) refs/tags [...]`
2026-05-05T19:31:43.704711Z DEBUG Using tag `v0.9.25` cutoff timestamp 1777347662
2026-05-05T19:31:43.704758Z DEBUG Using best candidate tag `v0.9.25` for revision `v0.9.25`
2026-05-05T19:31:43.704771Z TRACE Executing `cd /var/folders/jj/8r7yjy_522771gyb6zhff4jc0000gn/T/.tmp9REiUy && /usr/local/bin/git checkout --quiet v0.9.25 -- .pre-commit-hooks.yaml`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions