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

Merged
David merged 2 commits from chore/GOV-46-inherit-pre-commit into main 2026-08-08 03:58:25 +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 #100 (chore/GOV-45-update-common-submodule), so review that one first. Merge order: common#22, then #100, then this.

Why

Forking pre-commit silently opted this repo out of every change to it. check-tree-ownership landed in common's shared variants and reached only the repos that had not forked the recipe; it had to be hand-ported here in #100. 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 (no compose.dev.yml in this repo) pre_commit_mode := "docker"
builds Tailwind first, on the host, because the cargo steps embed assets/tailwind-built.css via asset!() and the generator is a different container pre_commit_prepare := "build-css"
cargo clippy --all-targets --features server -- -D warnings clippy_args := "--all-targets --features server -- -D warnings"
cargo check --features server instead of cargo build --all-targets compile_step := "check", compile_args := "--features server"
cargo check --target wasm32-unknown-unknown wasm_check := "true" (no extra args needed)
cargo test --features server --bin vervain-app test_args := "--features server --bin vervain-app"

One behavioral change

common's docker mode mounts per-user cargo volumes (dev-vervain-apps-cargo-target-$USER); the fork mounted unsuffixed ones. The first run after this lands is a cold compile.

It is also a latent fix. This repo already inherits common's dev-clean, which only ever removed the suffixed names, so just dev-clean could not remove the volumes the fork actually created. After this change the two agree.

Verification

just pre-commit on this branch runs the identical step list the fork ran, in the same order, and passes: build-css, cargo fmt --check, cargo clippy --all-targets --features server -- -D warnings, cargo check --features server, cargo check --target wasm32-unknown-unknown, cargo test --features server --bin vervain-app (102 passed), 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 #100 (`chore/GOV-45-update-common-submodule`), so review that one first. Merge order: common#22, then #100, then this. ## Why Forking `pre-commit` silently opted this repo out of every change to it. `check-tree-ownership` landed in common's shared variants and reached only the repos that had not forked the recipe; it had to be hand-ported here in #100. 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` (no `compose.dev.yml` in this repo) | `pre_commit_mode := "docker"` | | builds Tailwind first, on the host, because the cargo steps embed `assets/tailwind-built.css` via `asset!()` and the generator is a different container | `pre_commit_prepare := "build-css"` | | `cargo clippy --all-targets --features server -- -D warnings` | `clippy_args := "--all-targets --features server -- -D warnings"` | | `cargo check --features server` instead of `cargo build --all-targets` | `compile_step := "check"`, `compile_args := "--features server"` | | `cargo check --target wasm32-unknown-unknown` | `wasm_check := "true"` (no extra args needed) | | `cargo test --features server --bin vervain-app` | `test_args := "--features server --bin vervain-app"` | ## One behavioral change common's docker mode mounts per-user cargo volumes (`dev-vervain-apps-cargo-target-$USER`); the fork mounted unsuffixed ones. The first run after this lands is a cold compile. It is also a latent fix. This repo already inherits common's `dev-clean`, which only ever removed the suffixed names, so `just dev-clean` could not remove the volumes the fork actually created. After this change the two agree. ## Verification `just pre-commit` on this branch runs the identical step list the fork ran, in the same order, and passes: `build-css`, `cargo fmt --check`, `cargo clippy --all-targets --features server -- -D warnings`, `cargo check --features server`, `cargo check --target wasm32-unknown-unknown`, `cargo test --features server --bin vervain-app` (102 passed), 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 1m10s
bfead69e80
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).

Every divergence the fork encoded is a variable now. `pre_commit_mode := "docker"` because there is no compose.dev.yml here; `pre_commit_prepare := "build-css"` runs Tailwind on the HOST first, which it must, because the cargo steps embed assets/tailwind-built.css via asset!() and the generator is a different container; `clippy_args`, `compile_step := "check"` with `compile_args := "--features server"`, and `test_args` carry the feature gates; `wasm_check := "true"` adds the client-target pass the `server` feature does not cover.

One behavioral change worth calling out: common's docker mode mounts per-user cargo volumes (`dev-vervain-apps-cargo-target-$USER`), where the fork mounted unsuffixed ones. The first run after this lands is a cold compile. It is also a fix: this repo already inherits common's `dev-clean`, which only ever removed the suffixed names, so `just dev-clean` could not remove the volumes the fork actually created.

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.

Verified: `just pre-commit` runs the identical step list the fork ran (build-css, fmt, clippy --all-targets --features server, cargo check --features server, cargo check --target wasm32-unknown-unknown, test --features server --bin vervain-app with 102 passing, 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 1m12s
Create release / Create release from merged PR (pull_request) Has been skipped
64142e88cc
David scheduled this pull request to auto merge when all checks succeed 2026-08-08 03:57:13 +02:00
David merged commit f7fe15ce3d into main 2026-08-08 03:58:25 +02:00
David deleted branch chore/GOV-46-inherit-pre-commit 2026-08-08 03:58:25 +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
psa-systems/vervain-apps!101
No description provided.