forked from bchanot/claude
fix(phase5): final review wave: cc.sh width, design-gate remedy + resolve check, routing test on a fresh clone, doctor fail-closed, dead column
This commit is contained in:
1 parent
fc6e270b7c
commit
04b9b865f8
10 files changed
+84
-36
No files matched your search
@@ -21,6 +21,7 @@ if PATH=/usr/bin:/bin command -v 21st >/dev/null 2>&1 \
|
||||
fi
|
||||
WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT
|
||||
mkdir -p "$WORK/bin" "$WORK/home"; export WORK
|
||||
export DESIGN_GATE_SKILLS_DIR="$WORK/none"
|
||||
printf '#!/usr/bin/env bash\ncat "$WORK/plain.txt"\n' > "$WORK/bin/profile.sh"
|
||||
cat > "$WORK/bin/21st" <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
@@ -49,11 +50,22 @@ expect T1-ready 0 "READY — packs design + gstack-design + ui-ux-pro-max on (we
|
||||
plain off on on local dev; out="$(gate_run in "$WORK/bin")"; rc=$?
|
||||
expect T2-incomplete 10 "INCOMPLETE"; expect T2-remedy-local 10 "bash ~/.claude/lib/profile.sh set web"
|
||||
expect T2-names 10 "off: pack-design"
|
||||
expect T2-enable 10 "profile.sh enable design"
|
||||
plain on off off flag dev; out="$(gate_run in "$WORK/bin")"; rc=$?
|
||||
expect T3-remedy-flag 10 "relaunch this conversation with a design profile: cc <name> web"
|
||||
expect T3-names 10 "off: pack-gstack-design plugin:ui-ux-pro-max@ui-ux-pro-max-skill"
|
||||
plain on on on local web; out="$(gate_run in "")"; rc=$?
|
||||
plain on on off local web; out="$(gate_run in "$WORK/bin")"; rc=$?
|
||||
expect T3a-plugin 10 "enable the plugin in a profile: set web"
|
||||
plain on on on local web
|
||||
mkdir -p "$WORK/repo/skills/pack-design/skills"
|
||||
ln -s /nonexistent "$WORK/repo/skills/pack-design/skills/x"
|
||||
out="$(DESIGN_GATE_SKILLS_DIR="$WORK/repo/skills" gate_run in "$WORK/bin")"
|
||||
rc=$?
|
||||
expect T3b-dangling 10 "not installed: pack-design:x (run make plugin)"
|
||||
rm -r "$WORK/repo"
|
||||
out="$(gate_run in "")"; rc=$?
|
||||
expect T4-no-cli 10 "21st needs the CLI: npm i -g @21st-dev/cli then 21st login"
|
||||
case "$out" in *"profile.sh set web"*) bad T4-no-remedy "pack remedy shown";; *) ok T4-no-remedy;; esac
|
||||
out="$(gate_run out "$WORK/bin")"; rc=$?
|
||||
expect T5-signed-out 12 "SIGN-IN REQUIRED"; expect T5-ask 12 "! 21st login"
|
||||
out="$(gate_run garbage "$WORK/bin")"; rc=$?
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
# check_vendored_skills(): a fixture repo under mktemp with a fake
|
||||
# plugins.lock.json (single-path shape, list shape, dict shape with a
|
||||
# references/ file), a fake link.sh holding a multi-line
|
||||
# EXTERNAL_SKILLS=(...) array and a fake <claude_home>/skills dir. Cases: every file present + linked (ALL_PRESENT), a
|
||||
# EXTERNAL_SKILLS=(...) array and a fake <claude_home>/skills dir.
|
||||
# Cases: every file present + linked (ALL_PRESENT), a
|
||||
# list-shape skill missing its SKILL.md (FILE_MISSING), a dict-shape
|
||||
# skill missing one of two files — only that file is named
|
||||
# (DICT_FILES_COMPLETE), a profile-listed name with no symlink
|
||||
# (DICT_FILES_COMPLETE), a linked name with no symlink
|
||||
# (SYMLINK_MISSING_ACTIVE) or a symlink to the wrong target
|
||||
# (SYMLINK_WRONG_TARGET), an unreadable lock file degrading to a
|
||||
# warn instead of a fail (LOCK_UNREADABLE, rc 0), a lock entry whose
|
||||
|
||||
@@ -159,15 +159,21 @@ while IFS= read -r f; do check_skill "$f"; done < <(
|
||||
cd "$R" && git ls-files 'skills/*/SKILL.md' 'skills-external/*/SKILL.md')
|
||||
|
||||
# ── (b2) every skills row resolves to a skill (short, pack entry, parked) ─
|
||||
ext_named() { # ext_named <k>: <k> is in link.sh EXTERNAL_SKILLS
|
||||
sed -n '/^EXTERNAL_SKILLS=(/,/)/p' "$R/link.sh" | grep -qw -- "$1"
|
||||
}
|
||||
row_resolves() { # row_resolves <key>
|
||||
local k="$1" n
|
||||
local k="$1" n p
|
||||
case "$k" in
|
||||
pack-*:*) n="${k%%:*}"; [ -e "$R/skills/$n/skills/${k#*:}/SKILL.md" ];;
|
||||
*) [ -e "$R/skills/$k/SKILL.md" ] || [ -n "$(skdir "$k")" ] \
|
||||
pack-*:*) n="${k%%:*}"; p="$R/skills/$n/skills/${k#*:}"
|
||||
[ -L "$p" ] || [ -e "$p/SKILL.md" ];;
|
||||
*) [ -e "$R/skills/$k/SKILL.md" ] || ext_named "$k" \
|
||||
|| [ -L "$R/skills/$k" ] || [ -n "$(skdir "$k")" ] \
|
||||
|| [ -e "$R/skills-external/$k/SKILL.md" ];;
|
||||
esac
|
||||
}
|
||||
[ -n "$(skdir seo)" ] && ! row_resolves ghost-skill \
|
||||
[ -L "$R/skills/pack-seo/skills/seo" ] || [ -d "$R/skills/pack-seo/skills/seo" ] \
|
||||
&& ! row_resolves ghost-skill \
|
||||
&& ! row_resolves pack-seo:ghost && ! row_resolves pack-ghost:seo \
|
||||
&& ok || ko "row_resolves: flip-test (ghost rows must fail)"
|
||||
while read -r kind key _; do
|
||||
|
||||
Reference in new issue
Block a user