install pql 1.4.26 changelog-mode hooks
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m3s

Replaces the legacy pql-plan.json export hooks with the new
changelog-aware set: pre-commit now stages incremental changelog
deltas via 'pql plan export --stage'; post-merge replays new
changelog files into pql.db; post-checkout / post-rewrite rebuild
pql.db when branch state changes. Companion shims under .githooks/
keep core.hooksPath = .githooks the single activation point.

Hook bodies are de-baked — pql 1.4.26 ships them with absolute
paths to the local pql binary, which doesn't survive cross-machine
tracking. Restored 'pql' on PATH form so the tracked copy stays
portable. Filed back-channel for pql to keep portable form.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-10 01:31:06 +02:00
co-authored by Claude Opus 4.7
parent 01a99edd52
commit d162ba205e
10 changed files with 1226 additions and 16 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# --- pql plan rebuild (post-checkout) ---
# Auto-installed by pql init. On branch checkout (third arg == 1),
# rebuild pql.db from the changelog so the local cache reflects the
# new branch's planning state. File-level checkouts ($3 == 0) are
# skipped.
if [ "$3" = "1" ]; then
echo "pql: rebuilding planning database from changelog..." >&2
pql plan rebuild >/dev/null 2>&1 || true
fi
# --- end pql ---
+7 -8
View File
@@ -1,11 +1,10 @@
#!/bin/sh
# --- pql plan import ---
# Auto-installed by pql init. Imports planning state when the
# snapshot file changes on pull/merge. Safe no-op if pql is absent.
if command -v pql >/dev/null 2>&1; then
changed=$(git diff-tree -r --name-only ORIG_HEAD HEAD -- .pql/pql-plan.json 2>/dev/null)
if [ -n "$changed" ]; then
pql plan import 2>/dev/null
fi
fi
# Auto-installed by pql init. Replays new changelog files into
# pql.db, then re-syncs decisions from decisions/*.md so the
# markdown-sourced half stays in step with whatever the merge
# brought in. Both ops are idempotent — a no-op merge is a no-op
# hook (D-8, D-16).
pql plan import 2>/dev/null || true
pql decisions sync 2>/dev/null || true
# --- end pql ---
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
# --- pql plan rebuild (post-rewrite) ---
# Auto-installed by pql init. Fires after rebase / amend, both of
# which can rewrite the local view of the changelog. Rebuild is
# safe and deterministic; incremental replay would miss removals.
echo "pql: rebuilding planning database after rewrite..." >&2
pql plan rebuild >/dev/null 2>&1 || true
# --- end pql ---
+5 -8
View File
@@ -1,11 +1,8 @@
#!/bin/sh
# --- pql plan export ---
# Auto-installed by pql init. Exports planning state so it's
# committed alongside code changes. Safe no-op if pql is absent.
if command -v pql >/dev/null 2>&1; then
pql plan export 2>/dev/null
if ! git diff --quiet -- .pql/pql-plan.json 2>/dev/null; then
git add .pql/pql-plan.json
fi
fi
# Auto-installed by pql init. Exports planning state and stages the
# snapshot so it lands in the same commit as the change that produced
# it. The absolute pql path is baked in at install time — re-run
# 'pql init' if the binary moves.
pql plan export --stage 2>/dev/null || true
# --- end pql ---