chore(hooks): inherit common's pre-commit instead of redefining it #150

Merged
David merged 2 commits from chore/GOV-46-inherit-pre-commit into main 2026-08-08 03:58:16 +02:00
Owner

Deletes this repo's local pre-commit recipe and configures common's instead. Tracked in GOV-46.

Depends on psa-systems/common PR #22 and is stacked on this repo's PR #149 (chore/GOV-45-update-common-submodule), so review that one first. Merge order: common#22, then #149, then this.

Why

Forking pre-commit silently opted this repo out of every change to it. check-tree-ownership landed in both of common's shared variants and reached only the repos that had not forked the recipe; it had to be hand-ported here in #149. The same applies to anything common adds next.

What the fork encoded, and where it lives now

fork behavior replacement
runs in dev_image via docker run, not a compose app service this repo does not have pre_commit_mode := "docker" (already supported; the fork predated it)
cargo clippy --all-targets -- -D warnings, matching check.yml byte for byte clippy_args := "--all-targets -- -D warnings"
cargo test --all-targets test_args := "--all-targets"
cargo build --all-targets common's default compile_step / compile_args
per-user named cargo volumes dev-youtrack-cli-cargo-{target,registry,git}-$USER identical in common's docker mode, so no cache is orphaned and dev-clean needs no change

Docs

CLAUDE.md's CI-parity section is rewritten: a new check.yml step now becomes a common pre-commit variable in the same PR, not a line in a local recipe, and it states explicitly that a local pre-commit must not be reintroduced.

Verification

just pre-commit on this branch runs the identical step list the fork ran, in the same order, and passes: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo build --all-targets, cargo test --all-targets (255 + 216 + 53 + the smaller suites, all green), then check-tree-ownership reporting the working tree fully owned by the host user. grep -cE '^pre-commit' justfile returns 0.

#GOV-46

Deletes this repo's local `pre-commit` recipe and configures common's instead. Tracked in GOV-46. **Depends on** `psa-systems/common` PR #22 and is stacked on this repo's PR #149 (`chore/GOV-45-update-common-submodule`), so review that one first. Merge order: common#22, then #149, then this. ## Why Forking `pre-commit` silently opted this repo out of every change to it. `check-tree-ownership` landed in both of common's shared variants and reached only the repos that had not forked the recipe; it had to be hand-ported here in #149. The same applies to anything common adds next. ## What the fork encoded, and where it lives now | fork behavior | replacement | | --- | --- | | runs in `dev_image` via `docker run`, not a compose `app` service this repo does not have | `pre_commit_mode := "docker"` (already supported; the fork predated it) | | `cargo clippy --all-targets -- -D warnings`, matching check.yml byte for byte | `clippy_args := "--all-targets -- -D warnings"` | | `cargo test --all-targets` | `test_args := "--all-targets"` | | `cargo build --all-targets` | common's default `compile_step` / `compile_args` | | per-user named cargo volumes `dev-youtrack-cli-cargo-{target,registry,git}-$USER` | identical in common's docker mode, so no cache is orphaned and `dev-clean` needs no change | ## Docs CLAUDE.md's CI-parity section is rewritten: a new `check.yml` step now becomes a common pre-commit variable in the same PR, not a line in a local recipe, and it states explicitly that a local `pre-commit` must not be reintroduced. ## Verification `just pre-commit` on this branch runs the identical step list the fork ran, in the same order, and passes: `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, `cargo build --all-targets`, `cargo test --all-targets` (255 + 216 + 53 + the smaller suites, all green), then `check-tree-ownership` reporting the working tree fully owned by the host user. `grep -cE '^pre-commit' justfile` returns 0. #GOV-46
chore(hooks): inherit common's pre-commit instead of redefining it
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 55s
d100ccc6e7
Deletes the local `pre-commit` recipe and configures common's instead, and moves the gitlink onto the common commit that makes that possible (psa-systems/common PR #22, GOV-46).

The fork existed so the checks ran in dev_image rather than a compose `app` service this repo does not have, and so the clippy and test arguments matched check.yml byte for byte. All three are variables now: `pre_commit_mode := "docker"`, `clippy_args := "--all-targets -- -D warnings"`, `test_args := "--all-targets"`. The compile step is common's default `cargo build --all-targets`, which check.yml also runs, and the per-user cargo volume names common's docker mode uses are the same ones the fork mounted, so no cache is orphaned and `dev-clean` needs no change.

Keeping the fork meant this repo silently stopped receiving changes to `pre-commit`: `check-tree-ownership` had to be hand-ported here rather than arriving with the gitlink. CLAUDE.md's CI-parity section is rewritten to say a new check.yml step becomes a common variable, not a local recipe.

Verified: `just pre-commit` runs the identical step list the fork ran (fmt, clippy --all-targets -- -D warnings, build --all-targets, test --all-targets, check-tree-ownership) and passes.

#GOV-46
Merge branch 'main' into chore/GOV-46-inherit-pre-commit
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 46s
Create release / Create release from merged PR (pull_request) Has been skipped
e3fef49a37
David scheduled this pull request to auto merge when all checks succeed 2026-08-08 03:57:33 +02:00
David merged commit 4dd01d3995 into main 2026-08-08 03:58:16 +02:00
David deleted branch chore/GOV-46-inherit-pre-commit 2026-08-08 03:58:16 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/youtrack-cli!150
No description provided.