tools/release.sh builds -p lucisv_mcp for the host and every cross triple, stages lucisv-mcp[.exe] beside the two binaries (three per platform package, fifteen in the all-platforms one; the universal package still carries none), smoke-tests it (editors/vscode/mcp_smoke.js: initialize, tools/list ≥ 26, project_overview) loose and unzipped from the host and all-platforms packages; tools/audit_artifacts.sh audits the third name and rejects any other; prune_release_assets.sh unchanged (seven vsix names). editors/vscode/mcp.js: the three-rung binary ladder (lucisv.mcp.path → bundled → PATH), one McpStdioServerDefinition per workspace folder — the constructor is POSITIONAL (label, command, args, env, version) with cwd set afterwards; the plan's object form was wrong and is corrected — with `--root <folder> --index-cache <storage>`, refreshed on folder and setting changes, guarded so VS Code < 1.101 registers nothing but the command; a missing binary refused at resolve time with one output-channel line; the `lucisv.mcp.copyConfig` command puts the Claude Code / Cursor / VS Code snippet on the clipboard. package.json: contributes.mcpServerDefinitionProviders, lucisv.mcp.enabled/path, the command; engine stays ^1.82.0 (vsce 4 accepts). ci.yml runs node --test over the extension's unit tests. Docs: docs/site guides/agents.md with the tool table generated from the binary (site rebuilt), README paragraph, RELEASING.md, extension README/CHANGELOG (Unreleased), manual-acceptance rows 18–25 for the live-VS Code checks. QA (Opus): API signature confirmed against VS Code 1.138's vscode.d.ts; 8 mutation checks caught by mcp_test.js; release.sh run end to end, vsix contents listed (three binaries, mcp.js, no test files), SHA256SUMS verified, the embedded binary smoke-tested, the vsix installed into an isolated profile. Gates: node --test 6/6, fmt clean. Co-Authored-By: Claude Fable 5.1 <[email protected]>
122 lines
4.1 KiB
Bash
Executable File
122 lines
4.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Audit the cross-built release artifacts in a dist directory.
|
|
#
|
|
# Usage: tools/audit_artifacts.sh [dist-dir]
|
|
#
|
|
# There is no Linux or Windows machine in the release loop, so the
|
|
# non-macOS artifacts are never executed; this automates the audit
|
|
# tools/RELEASING.md documented as manual, and the release fails if any
|
|
# check does. Every binary is one of three -- lucisv, lucisv-server and
|
|
# lucisv-mcp (docs/features/mcp-packaging) -- and all three get the same
|
|
# audit per triple:
|
|
# *-linux-musl ELF (x86-64 / aarch64), statically linked
|
|
# *-linux-gnu ELF x86-64, glibc symbol ceiling <= 2.28 (RHEL 8)
|
|
# *-windows-gnu.exe PE32+ x86-64
|
|
# *-apple-darwin Mach-O 64-bit (arm64 / x86_64 per triple)
|
|
#
|
|
# The .vsix packages (platform-specific ones included) are skipped here:
|
|
# tools/release.sh asserts their contents as it builds them
|
|
# (docs/features/editor-platform-vsix).
|
|
#
|
|
# Needs the messense x86_64-unknown-linux-gnu toolchain's objdump for the
|
|
# ELF checks (the same toolchain the linux-gnu build itself needs).
|
|
|
|
set -eu
|
|
|
|
dist=${1:-dist}
|
|
objdump=x86_64-unknown-linux-gnu-objdump
|
|
glibc_max=2.28
|
|
|
|
command -v "$objdump" >/dev/null || { echo "no $objdump on PATH" >&2; exit 2; }
|
|
[ -d "$dist" ] || { echo "no dist directory at $dist" >&2; exit 2; }
|
|
|
|
status=0
|
|
fail() { echo "FAIL: $*" >&2; status=1; }
|
|
checked=0
|
|
|
|
for f in "$dist"/lucisv-*; do
|
|
[ -f "$f" ] || continue
|
|
name=$(basename "$f")
|
|
case $name in
|
|
*.vsix | SHA256SUMS | RELEASE_NOTES.md) continue ;;
|
|
esac
|
|
case $name in
|
|
lucisv-[0-9]* | lucisv-server-[0-9]* | lucisv-mcp-[0-9]*) ;;
|
|
*)
|
|
fail "$name: not lucisv, lucisv-server or lucisv-mcp — teach this script about it"
|
|
continue
|
|
;;
|
|
esac
|
|
kind=$(file -b "$f")
|
|
case $name in
|
|
*x86_64-unknown-linux-musl)
|
|
case $kind in
|
|
*ELF*x86-64*) ;;
|
|
*) fail "$name: not an x86-64 ELF: $kind" ;;
|
|
esac
|
|
if "$objdump" -p "$f" | grep -q NEEDED; then
|
|
fail "$name: musl build has dynamic dependencies (must be static)"
|
|
fi
|
|
;;
|
|
*aarch64-unknown-linux-musl)
|
|
# Two independent opinions, because the objdump here is a binutils
|
|
# configured for x86-64: it does parse aarch64 ELFs (verified on this
|
|
# machine -- "file format elf64-little", program headers and all), but
|
|
# the dynamic-section read is the one thing that would fail quietly if a
|
|
# future binutils stopped doing so. `file` reporting "statically linked"
|
|
# is the honest cross-check, and it also names the architecture, which
|
|
# objdump's generic elf64-little does not.
|
|
case $kind in
|
|
*ELF*aarch64*) ;;
|
|
*) fail "$name: not an aarch64 ELF: $kind" ;;
|
|
esac
|
|
case $kind in
|
|
*"statically linked"*) ;;
|
|
*) fail "$name: musl build is not statically linked: $kind" ;;
|
|
esac
|
|
if "$objdump" -p "$f" | grep -q NEEDED; then
|
|
fail "$name: musl build has dynamic dependencies (must be static)"
|
|
fi
|
|
;;
|
|
*x86_64-unknown-linux-gnu)
|
|
case $kind in
|
|
*ELF*x86-64*) ;;
|
|
*) fail "$name: not an x86-64 ELF: $kind" ;;
|
|
esac
|
|
top=$("$objdump" -T "$f" | grep -o 'GLIBC_[0-9.]*' | sort -Vu | tail -1)
|
|
top=${top#GLIBC_}
|
|
highest=$(printf '%s\n%s\n' "$top" "$glibc_max" | sort -V | tail -1)
|
|
if [ "$highest" != "$glibc_max" ]; then
|
|
fail "$name: glibc ceiling $top exceeds $glibc_max (breaks RHEL 8)"
|
|
fi
|
|
;;
|
|
*x86_64-pc-windows-gnu.exe)
|
|
case $kind in
|
|
*PE32+*x86-64*) ;;
|
|
*) fail "$name: not a PE32+ x86-64 executable: $kind" ;;
|
|
esac
|
|
;;
|
|
*aarch64-apple-darwin)
|
|
case $kind in
|
|
*Mach-O*arm64*) ;;
|
|
*) fail "$name: not a Mach-O arm64 binary: $kind" ;;
|
|
esac
|
|
;;
|
|
*x86_64-apple-darwin)
|
|
case $kind in
|
|
*Mach-O*x86_64*) ;;
|
|
*) fail "$name: not a Mach-O x86_64 binary: $kind" ;;
|
|
esac
|
|
;;
|
|
*)
|
|
fail "$name: unrecognized artifact name — teach this script about it"
|
|
;;
|
|
esac
|
|
checked=$((checked + 1))
|
|
echo "ok: $name"
|
|
done
|
|
|
|
[ "$checked" -gt 0 ] || { echo "no binaries found under $dist" >&2; exit 2; }
|
|
echo "audited $checked binaries"
|
|
exit $status
|