Repository navigation
Expand file tree
/
Copy pathcheck-blockers.sh
More file actions
133 lines (119 loc) · 5.25 KB
/
Copy pathcheck-blockers.sh
File metadata and controls
133 lines (119 loc) · 5.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!/usr/bin/env bash
# check-blockers.sh
#
# Pings the upstream sources for every BLOCKED dependency / security item
# tracked in docs/backlog.md and reports whether anything has changed.
#
# Run from the repo root:
# make check-blockers
# or directly:
# bash scripts/check-blockers.sh
#
# Exit code 0 even when blockers stay blocked. Non-zero only on
# tooling errors (missing curl / npm / network).
set -u
# Colour helpers (no-op when not a TTY)
if [ -t 1 ]; then
RED=$'\033[0;31m'
GRN=$'\033[0;32m'
YEL=$'\033[0;33m'
BLU=$'\033[0;34m'
RST=$'\033[0m'
else
RED=""; GRN=""; YEL=""; BLU=""; RST=""
fi
blocked=0
unblocked=0
manual=0
print_header() {
printf "%s\n" ""
printf "%s===%s %s %s===%s\n" "$BLU" "$RST" "$1" "$BLU" "$RST"
}
mark_blocked() {
blocked=$((blocked + 1))
printf " %s[BLOCKED]%s %s\n" "$RED" "$RST" "$1"
}
mark_unblocked() {
unblocked=$((unblocked + 1))
printf " %s[UNBLOCKED]%s %s\n" "$GRN" "$RST" "$1"
}
mark_manual() {
manual=$((manual + 1))
printf " %s[MANUAL]%s %s\n" "$YEL" "$RST" "$1"
}
require() {
if ! command -v "$1" >/dev/null 2>&1; then
printf "%sERROR%s: required tool '%s' not on PATH\n" "$RED" "$RST" "$1" >&2
exit 2
fi
}
require npm
require curl
# -----------------------------------------------------------------------------
# DEP-02: TipTap 2 -> 3 migration
# Hard blocker: @sereneinserenade/tiptap-search-and-replace v0.2.0 not on npm.
# -----------------------------------------------------------------------------
print_header "DEP-02 TipTap 3 (search-and-replace npm publish)"
ts_versions=$(npm view @sereneinserenade/tiptap-search-and-replace versions --json 2>/dev/null || echo "[]")
printf " Published versions: %s\n" "$ts_versions"
if printf "%s" "$ts_versions" | grep -q '"0\.2\.'; then
mark_unblocked "tiptap-search-and-replace v0.2.x is on npm. Path A (normal migration) is open."
else
mark_blocked "tiptap-search-and-replace v0.2.x not on npm yet. Path B (prosemirror-search adapter) requires user go-ahead."
fi
# DEP-09 (Vite 7 -> 8) + SEC-01 (vite-plugin-pwa CVE chain) shipped on
# 2026-05-06 in commit 93a5ed3 once vite-plugin-pwa@1.3.0 added Vite 8
# to its peer-dep range. Both are archived in
# docs/roadmap-archive/2026-05.md and no longer tracked here.
# -----------------------------------------------------------------------------
# DEP-05: elevenlabs SDK 0.2 -> 2.x
# Not strictly version-blocked (the bump is available); blocker is paid-API
# verification. Surface the version delta so the operator can schedule.
# -----------------------------------------------------------------------------
print_header "DEP-05 elevenlabs SDK 0.2 -> 2.x (paid-API verification)"
el_pinned=$(grep -E '^elevenlabs\s*=' backend/pyproject.toml 2>/dev/null | head -1 | sed -E 's/.*"\^?([0-9.]+)".*/\1/')
el_latest=$(curl -fsSL "https://pypi.org/pypi/elevenlabs/json" 2>/dev/null | python3 -c "import json,sys; print(json.load(sys.stdin)['info']['version'])" 2>/dev/null || echo "?")
printf " Pinned: %s\n" "${el_pinned:-?}"
printf " Latest on PyPI: %s\n" "$el_latest"
mark_manual "Bump available (${el_pinned:-?} -> ${el_latest}). Manual unblock = schedule a real audiobook test session with a live ElevenLabs key."
# -----------------------------------------------------------------------------
# AR-03+: validation log
# AR-02 architecture decision is already done (Option B, see
# docs/ROADMAP.md:140). The remaining gate is AR-01 validation entries
# driving the AR-03+ platform-API commitment per ROADMAP:199.
# Not network-checkable; counts ## headings in the journal.
# -----------------------------------------------------------------------------
print_header "AR-03+ platform APIs (cross-posting validation log)"
ar_log="docs/journal/article-workflow-observations.md"
if [ -f "$ar_log" ]; then
# Count real entries only: numeric-prefixed `## N. Title (YYYY-MM-DD)`
# headings inside the "Observation log" section. The earlier heuristic
# of counting every `^## ` line over-counted: section markers
# (Entry template / Observation log / Monthly review) and the template
# fixture inside a code fence (`## {N}. {Article title} ...`) all
# matched, producing a false UNBLOCKED reading.
ar_entries=$(awk '
/^## Observation log/ { in_log=1; next }
/^## Monthly review/ { in_log=0 }
in_log && /^## [0-9]+\. .* \([0-9]{4}-[0-9]{2}-[0-9]{2}\)/ { count++ }
END { print count+0 }
' "$ar_log")
printf " Real article entries (numeric-prefixed in Observation log): %s\n" "$ar_entries"
if [ "$ar_entries" -ge 3 ]; then
mark_unblocked "AR-01 log has $ar_entries entries (>= 3 needed). AR-03+ platform-API commitment can proceed."
else
mark_manual "AR-01 log has $ar_entries entries. Target 3-5 entries before AR-03+ commitment."
fi
else
printf " Log file not present yet.\n"
mark_manual "AR-01 log file does not exist. Create on first cross-post."
fi
# -----------------------------------------------------------------------------
# Summary
# -----------------------------------------------------------------------------
printf "\n%s---%s\n" "$BLU" "$RST"
printf "%sSummary%s: %d blocked, %d unblocked, %d manual\n" "$BLU" "$RST" "$blocked" "$unblocked" "$manual"
if [ "$unblocked" -gt 0 ]; then
printf "%sAction%s: at least one upstream item moved. Update docs/backlog.md and ROADMAP.md.\n" "$GRN" "$RST"
fi
exit 0