Skip to content

chore(image): remove the pre-commit compat shim (one-cycle deprecation ends) - #899

Merged
c-vigo merged 3 commits into
devfrom
feature/897-remove-precommit-shim
Jul 7, 2026
Merged

c-vigo merged 3 commits into
devfrom
feature/897-remove-precommit-shim

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Removes the one-release-cycle pre-commit -> prek compat shim from the image, ending the deprecation window opened by #881. The 0.4.1 release (with the shim) is frozen on release/0.4.1; dev is the 0.5 line, so the scheduled removal lands here.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

Changelog Entry

Removed

  • pre-commit compat shim removed from the image (#897)
    • The one-release-cycle pre-commit → prek shim shipped in 0.4.x (#881) is gone; pre-commit invocations now fail with exit 127.
    • Consumers had the 0.4.x cycle to rename invocations; the upgrade-time scan still warns with file:line on preserved surfaces — see docs/MIGRATION.md for the rename checklist (justfile recipes, repo-owned .githooks/, CI configs → prek).

Testing

  • Tests pass locally (just test-image scope relevant to the change)
  • Manual testing performed (describe below)

Manual Testing Details

TDD RED/GREEN against locally built images (just build, ~46 s warm store each):

  • RED (shim-bearing image at origin/dev): flipped test_pre_commit_installed fails — command -v pre-commit resolves to /bin/pre-commit (the shim).
  • GREEN (shim-free rebuild): tests/test_image.py::TestDevelopmentTools + ::TestPythonEnvironment — 27 passed in 16.82 s.
  • Full hook suite green: just precommit (prek run --all-files) — all hooks Passed, 0 Failed.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Closes #897

c-vigo added 3 commits July 7, 2026 15:04
RED for #897: the one-cycle #881 compat shim window ended with the 0.4.1
freeze, so test_pre_commit_installed re-asserts 'command -v pre-commit'
fails (the #778 form the shim displaced) and the shim-specific
test_pre_commit_compat_shim is dropped.

Refs: #897
The one-release-cycle pre-commit -> prek shim (#881) was scheduled for
removal in 0.5; 0.4.1 is frozen, so drop the writeShellScriptBin block
from imageTools. Consumers still invoking pre-commit now get exit 127;
the upgrade-time scan (#881) keeps warning with file:line and
docs/MIGRATION.md carries the rename checklist.

Refs: #897
…elog

MIGRATION.md step 3 now states 0.5 images carry no pre-commit binary
(the #881 bridge is over, invocations fail with 127) while keeping the
rename checklist and the upgrade-time scan guidance; CHANGELOG gains
the Removed entry (workspace mirror synced via sync-manifest).

Refs: #897
@c-vigo
c-vigo merged commit 38cfec1 into dev Jul 7, 2026
15 checks passed
@c-vigo
c-vigo deleted the feature/897-remove-precommit-shim branch July 7, 2026 13:19
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