Git history: standardise on Conventional Commits; decide on Phase-era cleanup #34
Labels
No labels
area:ci
area:docs
area:input
area:net
area:rendering
area:repo
area:stdlib
area:tooling
area:types
cleanup
dx
priority:high
priority:low
priority:medium
proposal
status:in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: workshopsoft/ludic#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Git history is inconsistent and noisy. Of ~80 commits, ~53 are old
Phase Nx: …/Merge Phase Nx: …pairs from the pre-self-hosting era:while recent history has switched to clean Conventional Commits
(
feat(stdlib): …,refactor(lang): …,ci(docs): …). The mix of amerge-per-phase pattern and squashed conventional commits makes the log hard to
read and
git bisect/git logless useful.Proposal
CONTRIBUTING.md, and (optionally) enforce via a commit-msg hook(
tools/git-hooks/already exists) and/or CI.Phaseera couldbe tidied, but rewriting shared history is disruptive. Options, in order of
safety:
v0baseline tag so the messy prefix is bracketed.re-clones).
Because a rewrite is destructive and non-reversible for anyone who has cloned,
this needs an explicit decision before any
filter-repo/rebase is run — donot rewrite pushed history without sign-off.
Acceptance criteria
Phasecommits.Part of the repository-cleanup / DX pass.
Done in
709465c— and the new commit-lint job went green on the push that added it (conventional-commits✓), so it's live and gating.Decision recorded (now in CONTRIBUTING.md → "Git history"): the pre-self-hosting
Phase Nx:history stays as-is. Afilter-repo/rebase rewrite is destructive and non-reversible for anyone who has cloned, and buys little — so we don't rewrite pushed history. The convention is enforced going forward; both the hook and the CI lint skip merge commits, so the oldMerge Phase …pairs never trip it. The safe, non-destructive version of the issue's "bracket the messy prefix" (Option 2) falls out of the versioning work in #33: its first release tag doubles as a cleanv0baseline, no commit touched.Enforcement, both halves the issue asked for:
tools/git-hooks/commit-msgrejects a non-conforming summary;tools/git-hooks/lib.shholds the single rule (types, optional scope,!for breaking, and merge/revert/autosquash exemptions). One-line enable, per clone:git config core.hooksPath tools/git-hooks(also turns on the fmtpre-commithook)..forgejo/workflows/commit-lint.ymlrunslint-range.shover the new commits on every push and PR, sharing that samelib.shso the two can't drift.Also fixed a latent bug: the existing
pre-commitfmt hook pointed atbuild/ludic-fmt, but the toolchain moved its binaries tobin/a while back — so the hook silently no-op'd (its[ -x "$FMT" ] || exit 0guard). It now findsbin/ludic-fmtand actually runs.Verified: the hook accepts
feat/fix/ci/refactor(!)/merge/revert and rejectsadded regex/Fix bug/WIP;lint-range.shpasses recent history and flags the oldPhase 8b:commit; and CI linted this very change clean.CONTRIBUTING.md now carries the full type/scope table and the enable step.
Acceptance criteria:
Phasecommits (leave as-is; bracket via #33's v0 tag).