fix(install): R1 — COLUMNS=200 + untruncated awk parser for hermes skills list — Wave 7.5
Root cause: hermes 0.14 table renderer truncates skill names at column width with unicode '…' suffix. Awk parser stripped '…' but couldn't recover the truncated trailing chars (e.g., 'baoyu-article-illustr…' lost 'ator'). Fix: COLUMNS=200 env prefix forces wide table render → awk sees full names. Affects both F2 (denylist write) and subrepo pre-push hook (drift check). Re-run install.sh to refresh both per-profile config.yaml denylist + .git /hooks/pre-push body. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
57ef5411a4
commit
959b8c8871
@ -123,7 +123,7 @@ elif command -v hermes >/dev/null 2>&1 && command -v yq >/dev/null 2>&1; then
|
|||||||
# Try --json first; fall back to table parse w/ box-draw chars (Wave 5 parser).
|
# Try --json first; fall back to table parse w/ box-draw chars (Wave 5 parser).
|
||||||
ALL_BUILTINS=$(hermes skills list --json 2>/dev/null | jq -r '.[] | select(.source=="builtin") | .name' 2>/dev/null || true)
|
ALL_BUILTINS=$(hermes skills list --json 2>/dev/null | jq -r '.[] | select(.source=="builtin") | .name' 2>/dev/null || true)
|
||||||
if [ -z "$ALL_BUILTINS" ]; then
|
if [ -z "$ALL_BUILTINS" ]; then
|
||||||
ALL_BUILTINS=$(hermes skills list 2>/dev/null | awk -F'│' 'NR>3 && /builtin/ {gsub(/^ +| +$/, "", $2); print $2}' || true)
|
ALL_BUILTINS=$(COLUMNS=200 hermes skills list 2>/dev/null | awk -F'│' 'NR>3 && /builtin/ {name=$2; gsub(/^[[:space:]]+|[[:space:]]+$/, "", name); gsub(/…$/, "", name); print name}' || true)
|
||||||
fi
|
fi
|
||||||
ALLOWLIST_BUILTIN=$(yq -r '.disclosure.skills[] | select(.source=="builtin") | .id' "$REPO/manifest.yaml" 2>/dev/null | sort -u)
|
ALLOWLIST_BUILTIN=$(yq -r '.disclosure.skills[] | select(.source=="builtin") | .id' "$REPO/manifest.yaml" 2>/dev/null | sort -u)
|
||||||
if [ -z "$ALL_BUILTINS" ]; then
|
if [ -z "$ALL_BUILTINS" ]; then
|
||||||
@ -270,7 +270,7 @@ PY
|
|||||||
# 6.a skills drift
|
# 6.a skills drift
|
||||||
if command -v hermes >/dev/null 2>&1; then
|
if command -v hermes >/dev/null 2>&1; then
|
||||||
declared=$(yq -r '.disclosure.skills[].id' "$REPO_ROOT/manifest.yaml" 2>/dev/null | sort -u)
|
declared=$(yq -r '.disclosure.skills[].id' "$REPO_ROOT/manifest.yaml" 2>/dev/null | sort -u)
|
||||||
live=$(hermes -p "$PROFILE_NAME" skills list 2>/dev/null | awk 'NR>3 && /enabled|│ *enabled/ {for (i=1; i<=NF; i++) if ($i != "│" && $i != "enabled") {print $i; break}}' | sort -u || echo "")
|
live=$(COLUMNS=200 hermes -p "$PROFILE_NAME" skills list 2>/dev/null | awk -F'│' 'NF>=6 && $(NF-1) ~ /enabled[[:space:]]*$/ {name=$2; gsub(/^[[:space:]]+|[[:space:]]+$/, "", name); gsub(/…$/, "", name); if (name ~ /^[a-z]/) print name}' | sort -u || echo "")
|
||||||
if [ -n "$live" ]; then
|
if [ -n "$live" ]; then
|
||||||
drift=$(diff <(echo "$declared") <(echo "$live") 2>/dev/null || true)
|
drift=$(diff <(echo "$declared") <(echo "$live") 2>/dev/null || true)
|
||||||
[ -n "$drift" ] && fail "skills drift: $drift"
|
[ -n "$drift" ] && fail "skills drift: $drift"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user