Fix local pre-commit environment and Markdown configuration #605

Closed
opened 2026-10-20 15:25:09 +02:00 by erikinkinen · 0 comments
Owner

Goal

Restore the documented local commit/push checks so contributors can validate changes using the same Markdown implementation and configuration as CI.

Observed defect

During P2-01 (#84), git commit failed with /usr/bin/python3: No module named pre_commit. The installed hook points at the system interpreter. The tracked setup script installs with pip --user, which does not provide an isolated reproducible environment. More importantly, .pre-commit-config.yaml selects the Ruby markdownlint hook and passes .markdownlint.yaml, but the repository contains only .markdownlint.json and CI runs the Node.js markdownlint CLI. The tracked hook therefore cannot validate the repository's actual Markdown configuration.

Steps

  • Configure the local Markdown hook to use the Node.js CLI and the existing .markdownlint.json, pinned to a verified release.
  • Make development setup install hooks from an isolated repository environment, with that environment ignored by Git.
  • Run the setup and all hooks on a clean baseline checkout, then verify commit and push hooks execute successfully; record any baseline violations rather than bypassing checks.

Acceptance

A clean checkout can install and run both hook types without system Python packages or a missing Markdown configuration. Local Markdown lint agrees with the repository CI configuration. No hook is disabled or skipped to achieve a commit.

Found while implementing P2-01. This is a tooling defect, not a scientific protocol change.

## Goal Restore the documented local commit/push checks so contributors can validate changes using the same Markdown implementation and configuration as CI. ## Observed defect During P2-01 (#84), `git commit` failed with `/usr/bin/python3: No module named pre_commit`. The installed hook points at the system interpreter. The tracked setup script installs with `pip --user`, which does not provide an isolated reproducible environment. More importantly, `.pre-commit-config.yaml` selects the Ruby markdownlint hook and passes `.markdownlint.yaml`, but the repository contains only `.markdownlint.json` and CI runs the Node.js markdownlint CLI. The tracked hook therefore cannot validate the repository's actual Markdown configuration. ## Steps - [x] Configure the local Markdown hook to use the Node.js CLI and the existing `.markdownlint.json`, pinned to a verified release. - [x] Make development setup install hooks from an isolated repository environment, with that environment ignored by Git. - [x] Run the setup and all hooks on a clean baseline checkout, then verify commit and push hooks execute successfully; record any baseline violations rather than bypassing checks. ## Acceptance A clean checkout can install and run both hook types without system Python packages or a missing Markdown configuration. Local Markdown lint agrees with the repository CI configuration. No hook is disabled or skipped to achieve a commit. Found while implementing P2-01. This is a tooling defect, not a scientific protocol change.
erikinkinen added this to the Phase 2 milestone 2026-10-20 15:25:09 +02:00
Sign in to join this conversation.
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
erikinkinen/AES#605
No description provided.