Skip to content

fix(hooks): require a CHANGELOG entry at every legal tier (#34) - #83

Merged
atrawog merged 2 commits into
mainfrom
feat/changelog-gate-all-tiers
Jul 12, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/changelog-gate-all-tiers

Conversation

@atrawog

@atrawog atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

#34 (superproject half) — pre-commit-gate: require a CHANGELOG entry at every legal tier

The mechanical half of #34 ("same changelog rules for plugins"). Closes the #35 gap: the pre-commit-gate fired its CHANGELOG check only for the two RUNTIME tiers, so a documentation reviewed commit in a CHANGELOG-tracking repo could skip its history entry (caught by convention, not the gate).

Change

Base

da0cfce (post-#82 — CLAUDE.md "Agents, Workflows & Teams" section; my hooks-bullet edit at :228 sits below #82's mandate paragraph, a different region, so it applies cleanly).

R10 — hook/script change class (gate executed live)

Tier analysed on a live system. gate_test.py 68/68 on the final branch + an old-vs-new differential proving the change: the same documentation reviewed + no-CHANGELOG commit → OLD hook=ALLOW (the #35 gap) vs NEW hook=BLOCK (closed). The new tests genuinely fail without the fix (check-coverage gate satisfied).


https://claude.ai/code/session_017rPy3PE6EuVHWsBbAUvxxL

Assisted-by: Claude (analysed on a live system)

The mechanical half of #34 ("same changelog rules for plugins"). The pre-commit-gate's
assert_changelog fired only for RUNTIME_TIERS, so a `documentation reviewed` commit in a
CHANGELOG-tracking repo could skip its history entry (the gap PR #35 hit, caught by
convention not the gate). Widen the call to fire for any declared tier; the now-dead
RUNTIME_TIERS set is deleted (R5) and needs_diff simplifies to bool(tiers). The
pure-submodule-pointer-bump exemption (only_gitlinks) is unchanged.

- .claude/hooks/pre-commit-gate.sh: the widening + RUNTIME_TIERS deletion.
- .claude/hooks/gate_test.py: +3 cases (docs no-CHANGELOG -> BLOCK, docs + CHANGELOG ->
  ALLOW, pure-docs-submodule-pointer-bump -> ALLOW via new mksubbump helper). 68/68 green.
- CLAUDE.md: the Hooks-doctrine claim swept off "runtime-tier" (R1/R5 claim-key sweep; the
  sibling claim in plugins internals/skills/agents/SKILL.md landed in plugins PR #38).
- plugins gitlink -> f8b7f4ad (plugins main = #37 tag-unify + #38 agents-skill consolidated).

Assisted-by: Claude (analysed on a live system)
Claude-Session: https://claude.ai/code/session_017rPy3PE6EuVHWsBbAUvxxL
@atrawog

atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: hook/workflow (behavioral pre-commit-gate.sh code) + one CLAUDE.md doc line + a docs-only plugins gitlink bump.

I re-derived the verdict independently and trusted no author claim. Key checks I re-ran:

  • Gate executed live: python3 .claude/hooks/gate_test.py → 68 cases, 0 failures, exit 0 on the PR's final code.
  • Old-vs-new differential (reproduced from scratch): extracted da0cfce's gate and ran the docs-tier + docs-change + no-CHANGELOG scenario against both — OLD=ALLOW, NEW=BLOCK. The 3 new cases genuinely fail without the fix (check-coverage gate satisfied).
  • No weakening (T4): read assert_changelog + control flow. Illegal tiers block() before needs_diff, so needs_diff = bool(tiers) is exactly equivalent to the old expression (the fail-closed -C/late-staging paths are unchanged). The only behavioral change is assert_changelog now firing at every legal tier — a strengthening. The is_amend and pure-submodule-pointer-bump (only_gitlinks) exemptions are preserved.
  • R5 sweep (at the PR head rev): RUNTIME_TIERS fully deleted from live code; the only runtime-tier commit stag… occurrence is inside the CHANGELOG history file. Both live surfaces (pre-commit-gate.sh, CLAUDE.md:228) carry the new "legal tier" wording; the sibling claim in the plugins agents skill (at the new gitlink) matches.
  • Gitlink safety: 34a302b → f8b7f4a is forward-only, on plugins origin/main, and is refactor(hooks): simplify commit/push gates to a real backstop; dedup via shared helper; fix -C + inline-staging fail-opens #37 (tag-unify) + refactor(hooks): shared shlex parser + positional flag scan; fix -C-with-space + post-message flags; dedup #38 (agents hooks-doctrine) — an all-documentation bump riding at this PR's runtime tier (correct).
  • Self-consistency: the PR that mandates a CHANGELOG at every tier stages its own CHANGELOG/2026.193.1932.md and passes its own new rule.

Checklist (0–18): all PASS. Security screen T1–T4 clean (the change strengthens the gate, matches intent #34, closes the #35 gap). R1/R2/R3/R5/R7/R10 satisfied; SDD / kernel-boundary / concurrency / ADE all N/A for this class. Tier analysed on a live system is correct and not inflated (the changed runner executed live; a hook has no fresh-rebuild bed). Description is condensed but substantively complete and consistent with the repo's merged norm.

Decision: Approved. Posting charly/claude-validation = success, finalizing the merge-time CalVer (renaming CHANGELOG/2026.193.1932.md → the merge minute + rewriting its H1), squash-merging, and tagging main.

Assisted-by: Claude (analysed on a live system)

Finalize the placeholder CHANGELOG to the merge minute (filename + H1).

Assisted-by: Claude (analysed on a live system)
@atrawog
atrawog merged commit becba99 into main Jul 12, 2026
@atrawog
atrawog deleted the feat/changelog-gate-all-tiers branch July 12, 2026 20:08
@atrawog

atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — merged ✅

Finalized + merged. Merge-time CalVer stamped, --squash, --delete-branch:

  • Merge commit: becba99 on main (da0cfce..becba99)
  • CHANGELOG: placeholder 2026.193.1932.md → CHANGELOG/2026.193.2003.md (filename + H1 rewritten to the merge minute)
  • Tag: v2026.193.2003 (annotated) → becba99, pushed
  • Status: charly/claude-validation = success on the finalized head 784f789
  • Branch: feat/changelog-gate-all-tiers deleted

Assisted-by: Claude (analysed on a live system)

atrawog added a commit that referenced this pull request Jul 12, 2026
…il closed (#35)

The mechanical half of #35 (a follow-up to #34, found while landing it). The pre-commit-gate parsed the attribution tier ONLY from the git commit command string, so an external -F <file> (the #38/#83 form) or a $(...) substitution hid it and all three tier-dependent checks (attribution-absence, docs-only-diff, the #34 CHANGELOG requirement) silently failed OPEN.

- .claude/hooks/pre-commit-gate.sh: scan_commit_args captures -F/--file values + REUSE_OPTS; new read_file_tiers() reads readable -F files (capped, never a device); tier = shared TIER_RE.findall(cmd) + file_tiers (R3); fails CLOSED on $(...)/backtick/piped-or-unreadable -F/editor, exempts --amend/reuse.
- .claude/hooks/gate_test.py: the old -a -F fail-open case flips to fail-closed, +9 new cases. 77/77 green.
- plugins gitlink f8b7f4a -> 6c46690 (the agents-skill hooks-doctrine correction, #35 plugins half, #39).

RDD: a heredoc body is in the command string, so heredoc was never a hole.

Validated by a fresh, independent pr-validator: gate_test.py 77/77 on the final code + a NEW-test-vs-OLD-gate differential proving 7 fail-open holes now BLOCK; the change strengthens the gate and preserves every legitimate commit form.

Assisted-by: Claude (analysed on a live system)
github-actions Bot pushed a commit that referenced this pull request Sep 12, 2026
… rule removal (#596)

* chore(deps): pin plugin-build v0.2026255.1833 — the podman store-size rule removal

charly/go.mod required plugin-build v0.2026250.552, whose box-build drive ran
`podman system df` and printed "warning: podman store is bloated (…)" before
every image build. That is a statement about the local build HOST emitted into
a bed's output, and the org's R10 gate counts un-allowlisted warning lines — so
a bloated store on whatever host ran a bed gated unrelated PRs (pod-immich-ml#5,
distro-cachyos#82/#83, plugin-check#45/#46/#47).

The maintainer's directive removed the rule at source (opencharly/plugin-build#12,
squash 847f6998, tag v2026.255.1833). This bump is the propagation step that puts
the removal into every binary built from this tree: charly compiles plugin-build
in, so charly/go.mod is what a user runs.

Verified: the module tag resolves to 847f6998; the pinned revision ships no
store_bloat.go and no production mention of the probe (it ships
store_size_rule_test.go, which fails on the pre-removal tree); the built binary
has zero occurrences of the format string; and a live box build emits zero
warning lines where the pre-change binary emits the bloat line.

Assisted-by: pi ollama-cloud/deepseek-v4-flash (analysed on a live system)

* docs: address the validator BLOCK — pre-change bed control + named routing

Append-only evidentiary/accounting update to the PR body (no tree change):

- BLOCK 2 (R10 bed coverage): the R10 bed now RAN on the final tree —
  `charly check run check-alpine-repo` (pod, disposable: true), whose
  image-build step is the touched code path, including its `charly update`
  fresh rebuild and both post-rebuild live passes: ok: true, warnings: 0,
  errors: 0. The isolating pre-change control is pasted too: the same bed
  built and run from the unmodified base commit (5018afb) yields
  warnings: 1 — the bloat line, counted exactly as it gated pod-immich-ml#5.

- BLOCK 1 (gate environment / deferred finding): the prescribed
  TMPDIR=/tmp/charly-ci red is root-caused and NAMED, not parked. Bisected to
  a single entry in that path: a foreign .git directory above the fixture root
  changes how loaderkit mounts a namespaced import (flat imports unaffected) —
  proven by a seven-entry single-variable sweep plus two negative probes, and
  identical at both pins / green in CI at the base SHA. Routed to batch
  `loaderkit-namespace-import-ancestor-gitdir` (owner opencharly/sdk,
  loaderkit) with its acceptance criterion, and the consumer pins to batch
  `charly-pin-propagation-consumers`; no in-tree test shim is added, because
  the resolution code lives in the SDK and masking it here would be an R4
  workaround.

Assisted-by: pi ollama-cloud/deepseek-v4-flash (fully tested and validated)

* docs: paste the tracked-surface sweeps the R2/R5 answers rest on

Addresses the second validator BLOCK (B14(d)/B10/B7 — compliance asserted with
described-but-unpasted sweeps). Body-only change; no tree change.

- The version-carrying sweep is pasted: `git grep -nE
  'plugin-build[^[:space:]]*[[:space:]]+v[0-9]'` over the tracked surfaces
  returns exactly ONE plugin-build require site (charly/go.mod:16) plus its
  go.sum lines; the `compiled_plugins:` entry in charly/charly.yml is a NAME
  (no version) and charly/plugins_generated.go is a generated import.
- The old-pin sweep is pasted and READ, and it corrects an over-broad claim:
  `v0.2026250.552` still pins plugin-preempt and plugin-status (different
  modules at the same CalVer minute) and appears in CHANGELOG history — no
  plugin-build line points at it.
- The claim-keyed sweep for the removed behaviour is pasted: `store is
  bloated`, `store_bloat` and `podman system df` are all zero-hit (rc=1) in
  the tracked tree.

Assisted-by: pi ollama-cloud/deepseek-v4-flash (fully tested and validated)

---------

Co-authored-by: atrawog <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Sep 13, 2026
…ports (#599)

* feat(deps): spec v0.2026256.653 — the plugin build lock queues and reports

Bumps `github.com/opencharly/spec` v0.2026254.1930 -> v0.2026256.653 (spec #132,
merged). That release makes every BLOCKING acquire of spec/lock's advisory flock
QUEUE behind a contended lock with a bounded, REPORTED wait — reporting who holds
the lock while it waits, and, if the bound is ever reached, failing with the
holder's pid + command line (resolved from the kernel) and the next step — where
it previously gave up after 2 minutes and named nobody.

Why charly needs it: charly core's own out-of-tree plugin-binary build lock
(`buildPluginBinary`'s `lock.AcquireFileLock(bin+".lock", true)`) is a blocking
acquire of exactly that primitive. Several check beds (or a roster fan-out) can
call it for the SAME plugin at once, and the 2-minute bound turned a peer that is
merely SLOW (a cold `go build` of a plugin binary) into a hard failure of a lane
whose only sin was running concurrently — the same class as the measured
`check-githubrunner-pod` image-build failure (`acquiring build lock for
githubrunner: flock .../image-<sha8>.lock: lock held by another process for >
2m0s`, run 2026.255.2310) that spec #132 fixes.

The call site now documents the semantics it depends on (a slow holder, not a
stuck one) and, if the bound is ever reached, its error names the lock file and
says what to do (the kernel releases the lock when the holder exits, so there is
nothing to clean up).

Does NOT clear #83's measured block: that one is candy/plugin-build's image build
lock, fixed in spec #132 and still needing the plugin-build call-site PR. This
change makes charly core's OWN sibling lock consistent with the class.

* docs(plugin): the pin lives in go.mod, not "below" — and record the live lock proof

R1/R5: the comment claimed the spec pin was "pinned below", but the pin is the
`github.com/opencharly/spec` require in charly/go.mod; the comment now says so.

(Rebuilt via `task build:binary` — `bin/charly version` reports 2026.256.0659.)

* docs(evidence): one tier, and it is the honest one

The review is right: the classification said `fully tested and validated` while the
footer said `analysed on a live system`. The changed branch in this repo is the
FAILURE wrap (`if lockErr != nil`), which needs a >30m contention to execute — the
pasted run shows the acquire QUEUEING and succeeding, not failing. One tier now,
the lower one, consistent with the footer. (Re-trigger commit; no code change.)

---------

Co-authored-by: atrawog <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant