Skip to content

fix(workspace): scaffold upgrade replaces .pre-commit-config.yaml, silently clobbering repo-specific hook config #878

Closed

Description

@c-vigo

Description

Found during 0.4.0 consumer field-validation (EXOMA/hyrr feature/519-devcontainer-rc4-validation, adoption commit 1812b74).

The scaffold upgrade replaced the consumer's .pre-commit-config.yaml wholesale (166 lines changed), silently dropping repo-specific configuration:

  • the global exclude: block (physics data tables data/stopping/, *.dat, generated Tauri schemas, logo SVGs, jupytext notebook pairs, scratch docs) — after the upgrade, prek run --all-files in the 0.4.0 image "fixed" ~45 files it must never touch, including binary-adjacent .dat data tables;
  • per-hook excludes, e.g. detect-private-key exclusion for worker/src/index.ts (PEM marker literals used as pattern strings) — post-upgrade the suite reports a false-positive private key.

A config replaced on upgrade must either be managed (and then repos can't customize it) or preserved/merged — replacing a customized file without warning is the worst of both. Same class as the justfile.project recipe-stranding issue (filed separately); together they made the consumer's hook suite unusable after the upgrade until hand-repaired.

Possible Solution

Preserve-on-upgrade with a diff hint, or a merge step that retains exclude: blocks and per-hook exclude: keys, or at minimum a loud upgrade-time warning + MIGRATION.md entry listing what will be replaced.

Changelog Category

Fixed

Activity

  1. added
    bug
    priority:high
    area:workspace
    semver:patch
    on Jul 6, 2026
  2. added this to the 0.4.1 milestone on Jul 7, 2026
  3. added
    effort:small
    on Jul 7, 2026
  4. added 6 commits that reference this issue on Jul 7, 2026
    adb1634
    6d559ae
    2355daf
    6e1d7a2
    4ce18b8
    b731506
  5. c-vigo commented on Jul 8, 2026

    @c-vigo
    ContributorAuthor

    Implemented in 0.4.1 (released 2026-07-08) — see the ## [0.4.1] CHANGELOG entry. Closing as completed.

  6. added a commit that references this issue on Jul 8, 2026
  7. 5 remaining items

  8. added a commit that references this issue on Jul 15, 2026
  9. added a commit that references this issue on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspacebugeffort:smallpriority:highsemver:patch

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions