Files
Eric Coissac a9299f7f6f
Release / release (push) Failing after 1m28s
refactor: update crate-kit workflow and add MCP configuration
Replace the `CRATE_KIT_REPO` variable with `CRATE_KIT_URL` in the release
workflow to support anonymous HTTPS cloning from gargoton. Add a new
MCP configuration for the 'qmd' server and update documentation to
reflect changes in secret handling and repository structure.

- Replace `CRATE_KIT_REPO` with `CRATE_KIT_URL` in
  `.gitea/workflows/release.yaml`, updating the clone step to use
  `git clone --depth 1` with the new URL variable.
- Update `docs/pilot-risks.md` to document that `crate-kit` resides
  only on gargoton and is cloned anonymously via HTTPS, removing
  references to local mirrors on forge.metaboding.org.
- Add `overlay/claude/mcp.json` to define the 'qmd' MCP server with
  the command `qmd mcp`, noting that these collections are external.
- Update `tests/overlay.sh` to verify the installation of the 'qmd'
  MCP configuration by checking `.mcp.json` and `.claude/settings.json`.
- Remove `FORGE_TOKEN_FILE` definition from `overlay/kit/org.mk` and
  add comments clarifying that forge tokens are in `secrets/` next to
  repositories, with `FORGETOKEN` overriding them in CI.
- Update `README.md` to reflect the presence of `overlay/kit/org.mk`
  and `overlay/kit/VERSION`, and remove mentions of `secrets/` for
  forge tokens.
- Add `/dist/` to `.gitignore` and remove the comment about workstation
  secrets.
- Bump version in `overlay/kit/VERSION` from 0.1.0 to 0.1.1.
2026-12-01 14:38:45 +01:00

32 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# Basic test of the extension kit: the overlay assembles with crate-kit and sets a registry.
set -euo pipefail
root="$(cd "$(dirname "$0")/.." && pwd)"
tmp=$(mktemp -d "${TMPDIR:-/tmp}/obi-kit-test.XXXXXX")
[ -n "$tmp" ] && [ -d "$tmp" ] || { echo "✗ temporary directory not created" >&2; exit 1; }
trap 'rm -r -- "$tmp"' EXIT
"$root/tools/kit-assemble.sh" "$tmp/kit"
[ -f "$tmp/kit/org.mk" ] || { echo "✗ org.mk missing from the assembled kit" >&2; exit 1; }
printf 'include %s/kit/org.mk\nprint:\n\t@echo $(REGISTRY)\n' "$tmp" >"$tmp/probe.mk"
reg=$(make -s -f "$tmp/probe.mk" print)
[ -n "$reg" ] || { echo "✗ REGISTRY empty in org.mk" >&2; exit 1; }
echo "✓ obi-kit overlay: registry $reg"
# MCP: the overlay adds qmd to the kit's required servers (fictitious cluster, nothing written elsewhere).
crate_kit="${CRATE_KIT:-$root/../crate-kit}"
mkdir -p "$tmp/cluster"
python3 -I "$crate_kit/claude/mcp-config.py" install --root "$tmp/cluster" \
--kit "$crate_kit/claude" --overlay "$root/overlay/claude" >/dev/null
python3 -I - "$tmp/cluster" <<'PY'
import json, sys
root = sys.argv[1]
servers = json.load(open(f"{root}/.mcp.json"))["mcpServers"]
need = {"backlog", "codebase-memory-mcp", "serena", "context7", "qmd"}
missing = need - set(servers)
assert not missing, f"servers missing from .mcp.json: {sorted(missing)}"
assert servers["qmd"]["args"] == ["mcp"], servers["qmd"]
enabled = json.load(open(f"{root}/.claude/settings.json"))["enabledMcpjsonServers"]
assert "qmd" in enabled, enabled
PY
echo "✓ obi-kit overlay: MCP qmd declared and installed"