claudemd-cli 0.49.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,27 @@ All notable changes to the `claudemd` plugin. This changelog tracks plugin artif
8
8
  - **Canonical spec version source**: `spec/CLAUDE.md` top-line title (`# AI-CODING-SPEC vX.Y.Z — Core`) + `spec/CLAUDE-changelog.md` top `##` entry.
9
9
  - **Plugin semver vs spec semver** are independent: plugin patch (0.2.0 → 0.2.1) may ship when spec is unchanged (this release); plugin minor (0.1.9 → 0.2.0) ships when spec minor updates (v0.2.0 shipped spec v6.10.0).
10
10
 
11
+ ## [0.50.0] - 2026-07-15
12
+
13
+ Two deferred items from the 2026-07-15 four-dimension audit (recorded in `tasks/audit-2026-07-15-deferred.md`). No spec change (spec stays **v6.20.0**). Minor bump: one additive user-visible behavior — a new SessionStart notice.
14
+
15
+ **What changes for users**: when a background `install.js` upgrade fails (non-zero exit or 10s timeout), the NEXT session now shows a one-line `[claudemd] background upgrade failed …` notice instead of failing silently into `~/.claude/logs/claudemd-bootstrap.log` only. No action needed on upgrade; opt out with `export DISABLE_BOOTSTRAP_FAIL_BANNER=1`.
16
+
17
+ - **feat: in-session banner for background install failures.** Both background `install.js` runners (SessionStart bootstrap + UserPromptSubmit piggy-back) now record failures to a sentinel (`~/.claude/.claudemd-state/bootstrap-failed.json`); the next SessionStart banners it once (sentinel consumed via rename; a repeat failure re-arms it) and retries. A versions-match session clears a stale sentinel silently — no banner over healthy state. Emitted on the mismatch / no-manifest paths only, where the hook writes no other stdout object, so the single-JSON-object contract holds. New rule-hits event `bootstrap-fail-banner` (registered in `docs/RULE-HITS-SCHEMA.md`).
18
+ - **refactor: single-source the background install spawn.** The two hand-copied detached-spawn blocks (session-start-check.sh / version-sync.sh) — the same duplicated-seam class as the 0.49.1 findings — consolidated into `hook_spawn_install` in `hooks/lib/hook-common.sh` (10s ceiling, detached, log-append, sentinel write/clear).
19
+ - **ci: tag pushes now run the full test matrix.** `ci.yml` previously triggered only on push-to-main + PR, so the marketplace channel (which serves the git tag/release directly) had no tag-time check — only the npm channel was gated (`npm-publish.yml`, Linux-only). Tags matching `v*.*.*` now run the full ubuntu+macos matrix; the atomic ship's main-push + tag-push duplicate run on the same commit is the accepted cost for channel parity.
20
+ - **Tests**: session-start.test.sh 18 → 22 cases (failure-sentinel write, single-object banner emit + consume, match-path stale-sentinel cleanup, `DISABLE_BOOTSTRAP_FAIL_BANNER=1` suppression); version-sync.test.sh 8 → 9 (piggy-back failure writes sentinel). Failure injection via a PATH-prepended fake `node` shim.
21
+
22
+ ## [0.49.1] - 2026-07-15
23
+
24
+ Audit follow-up (2026-07-15 four-dimension review): three duplicated seams consolidated to a single source with a parity gate. No spec change (spec stays **v6.20.0**); all `fix:`/refactor, no user-facing feature.
25
+
26
+ - **fix(§8): curl-to-shell gate reached parity with the rm/npx gates.** `pre-bash-safety-check.sh`'s curl-sh detector never learned the transparent-exec-wrapper set the rm/npx gates strip, and its per-segment grep is line-based, so `curl … | env bash`, `curl … | command sh`, `curl … | nice bash` (and chains like `| sudo env bash`) plus a pipe-then-newline continuation (`curl … |⏎bash`) all ALLOWED — ordinary install one-liners running unknown-origin code. Both false-negatives reproduced against the live hook. Fix: a shared wrapper alternation on both the pipe and process-substitution sinks + an awk pass that joins a single-pipe line continuation before segmenting (`||` OR-lists are NOT joined, so `curl … || bash` stays correctly out of the gate). FN-direction change → verified through the full corpus, not just the FP set. Residual (documented, same as the rm gate): `env FOO=x bash` / `FOO=x bash` assignment args and path-prefixed wrappers; `[allow-curl-sh]` is the escape.
27
+ - **fix: `lesson-bypass-audit.js` project-cwd encoder diverged from the hooks' encoder.** It used `/[/._]/g` while every production hook locates transcript/project dirs via `hook_encode_project` (`tr -c 'a-zA-Z0-9-' '-'`); a project path with a space/`+`/`@` encoded differently → the script pointed at a non-existent dir and silently computed cite-recall over an empty set. The five hand-copied JS encoders (lesson-bypass, sampling-audit, memory-maintenance, spec-coherence, doctor) are now one exported `encodeProjectCwd` in `scripts/lib/paths.js`.
28
+ - **test: §10-V dual-engine parity gate.** `banned-vocab.patterns` is consumed by two regex engines (`grep -iE` in the commit hook, `RegExp` in `lint.js`/the CLI) with no test proving they agree. New `banned-vocab-engine-parity.test.js` asserts identical verdicts across all patterns × a probe corpus + a coverage gate (every pattern exercised by ≥1 probe).
29
+ - **Corpus + regression tests**: 6 new curl-sh deny rows + 2 FP-guards (`bash-safety/corpus.tsv` → 365/365); encoder divergence stressor added to `lesson-bypass-audit.test.js`.
30
+ - **Tests**: full `npm test` green (686 script tests + all hook/integration suites); `node scripts/version-cascade-check.js` exit 0 (plugin semver 0.49.1 across 4 sites; spec v6.20 unchanged; Sizing within ±20B).
31
+
11
32
  ## [0.49.0] - 2026-07-15
12
33
 
13
34
  Spec **v6.20.0** — §2.1 Model tiering rule removed (spec-only; no hook/script change).
package/README.md CHANGED
@@ -204,6 +204,12 @@ export DISABLE_COMPACT_REREAD_REMINDER=1 # v0.27.0+ — only the post-compacti
204
204
  # source=="compact"); compact events still
205
205
  # skip bootstrap/upgrade-banner either way.
206
206
 
207
+ export DISABLE_BOOTSTRAP_FAIL_BANNER=1 # v0.50.0+ — only the SessionStart banner
208
+ # reporting that a PRIOR session's background
209
+ # install.js upgrade failed; the failure
210
+ # sentinel + bootstrap.log trail keep being
211
+ # written so the state stays diagnosable.
212
+
207
213
  export DISABLE_BATCH_CADENCE_ADVISORY=1 # v0.19.2+ — only the §13.2 batch-review
208
214
  # cadence advisory inside session-end-check;
209
215
  # mid-SPINE warn-on-unvalidated-mutation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemd-cli",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "description": "Standalone CLI for §10-V banned-vocab + transcript scanning. Companion to the claudemd Claude Code plugin (github.com/sdsrss/claudemd) for use in git pre-commit hooks, GitHub Actions, and other agents.",
5
5
  "type": "module",
6
6
  "bin": {