@smartmemory/compose 0.2.41-beta → 0.2.43-beta
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.
|
@@ -20,6 +20,34 @@ COMPOSE_WORKSPACE_ID="__COMPOSE_WORKSPACE_ID__"
|
|
|
20
20
|
LOG="${COMPOSE_HOOK_LOG:-.compose/data/pre-push.log}"
|
|
21
21
|
mkdir -p "$(dirname "$LOG")" 2>/dev/null || true
|
|
22
22
|
|
|
23
|
+
# ── Docs-only detection ──────────────────────────────────────────────────────
|
|
24
|
+
# Parse the ref updates git feeds on stdin (this MUST run before anything else
|
|
25
|
+
# touches stdin). If every pushed commit touches only docs/** or *.md, the test
|
|
26
|
+
# gate below is skipped — a roadmap/changelog push shouldn't pay for the full
|
|
27
|
+
# suite. Anything we can't positively bound (new branch, unknown remote sha,
|
|
28
|
+
# diff failure, empty stdin) fails CLOSED: the gate runs.
|
|
29
|
+
ZERO_SHA="0000000000000000000000000000000000000000"
|
|
30
|
+
DOCS_ONLY=1
|
|
31
|
+
SAW_RANGE=0
|
|
32
|
+
while read -r _local_ref local_sha _remote_ref remote_sha; do
|
|
33
|
+
[ "$local_sha" = "$ZERO_SHA" ] && continue # ref delete — no content pushed
|
|
34
|
+
if [ "$remote_sha" = "$ZERO_SHA" ]; then
|
|
35
|
+
DOCS_ONLY=0; SAW_RANGE=1; continue # new ref — range unbounded, fail closed
|
|
36
|
+
fi
|
|
37
|
+
SAW_RANGE=1
|
|
38
|
+
CHANGED=$(git diff --name-only "$remote_sha".."$local_sha" 2>/dev/null) || { DOCS_ONLY=0; continue; }
|
|
39
|
+
while IFS= read -r f; do
|
|
40
|
+
[ -z "$f" ] && continue
|
|
41
|
+
case "$f" in
|
|
42
|
+
docs/*|*.md) ;;
|
|
43
|
+
*) DOCS_ONLY=0 ;;
|
|
44
|
+
esac
|
|
45
|
+
done <<EOF
|
|
46
|
+
$CHANGED
|
|
47
|
+
EOF
|
|
48
|
+
done
|
|
49
|
+
[ "$SAW_RANGE" -eq 1 ] || DOCS_ONLY=0
|
|
50
|
+
|
|
23
51
|
# Drift check (ADVISORY — COMP-RESUME follow-up): print findings for visibility,
|
|
24
52
|
# never block. The repo carries pre-existing error-severity drift (much from the
|
|
25
53
|
# COMP-MCP-ENFORCE lifecycle-as-truth projection); hard-blocking on it would make
|
|
@@ -37,8 +65,11 @@ fi
|
|
|
37
65
|
# Block the push if the suite is red. This is the gate whose absence let a broken
|
|
38
66
|
# integration test (and a stale-schema consumer bug) reach main — nothing ran the
|
|
39
67
|
# suite before push. Heavy (full `npm test`) but authoritative. Auto-skips in a
|
|
40
|
-
# repo with no npm `test` script
|
|
41
|
-
|
|
68
|
+
# repo with no npm `test` script, and for docs-only pushes (docs/** + *.md,
|
|
69
|
+
# detected fail-closed above). Emergency bypass (sparingly): git push --no-verify
|
|
70
|
+
if [ "$DOCS_ONLY" -eq 1 ]; then
|
|
71
|
+
echo "pre-push: docs-only push (docs/** and *.md) — skipping test gate." >&2
|
|
72
|
+
elif [ -f package.json ]; then
|
|
42
73
|
# Probe scripts.test: exit 0 = present, 1 = definitively absent, anything else
|
|
43
74
|
# = could not read package.json. Skip ONLY on a definitive "absent" (1); on
|
|
44
75
|
# ambiguity run the suite anyway so a broken/unreadable package.json fails
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartmemory/compose",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.43-beta",
|
|
4
4
|
"description": "Structured AI dev pipeline — goal-to-product orchestration with gates, iteration loops, and feature lifecycle management.",
|
|
5
5
|
"author": "SmartMemory",
|
|
6
6
|
"license": "MIT",
|