refactor: update crate-kit workflow and add MCP configuration
Release / release (push) Failing after 1m28s

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.
This commit is contained in:
Eric Coissac committed 2026-12-01 14:38:45 +01:00
1 parent efb963f471
commit a9299f7f6f
9 files changed
+68 -21

No files matched your search

+5 -5
View File
@@ -19,9 +19,10 @@ jobs:
TAG: ${{ github.ref_name }}
SERVER: ${{ github.server_url }}
REPO: ${{ github.repository }}
# Where crate-kit lives on the forge (owner/name), independent of the owner of this repository.
# Override with the repository variable CRATE_KIT_REPO (Settings > Actions > Variables).
CRATE_KIT_REPO: ${{ vars.CRATE_KIT_REPO || 'LLM/crate-kit' }}
# crate-kit has ONE reference: gargoton (public repository, anonymous clone). It is not mirrored on
# this forge. Override only with the repository variable CRATE_KIT_URL (Settings > Actions > Variables).
# FORGETOKEN belongs to this forge and is never sent to another host.
CRATE_KIT_URL: ${{ vars.CRATE_KIT_URL || 'https://gargoton.petite-maison-orange.fr/LLM/crate-kit' }}
steps:
- name: System tools
run: |
@@ -32,8 +33,7 @@ jobs:
run: |
git -c http.extraHeader="Authorization: token $FORGETOKEN" \
clone --depth 1 --branch "$TAG" "$SERVER/$REPO.git" src
git -c http.extraHeader="Authorization: token $FORGETOKEN" \
clone --depth 1 "$SERVER/$CRATE_KIT_REPO.git" crate-kit
git clone --depth 1 "$CRATE_KIT_URL" crate-kit
- name: Kit archive
working-directory: src
-2
View File
@@ -1,3 +1 @@
# Secrets of this workstation: never committed.
/secrets/
/dist/
+1 -3
View File
@@ -12,10 +12,8 @@ run here (`make help`); those of a crate, in the crate.
- `Makefile`: cluster targets (delegated to `crate-kit`), `ci`, `jjrelease`.
- `tools/kit-assemble.sh`, `tools/kit-copy.sh`: set the overlay and call those of `crate-kit`.
- `overlay/kit/org.mk`: registry, forge, token file. `overlay/kit/VERSION`: extension version.
- `overlay/kit/org.mk`: registry, forge (no token: see `secrets/` of the cluster). `overlay/kit/VERSION`: extension version.
- `overlay/templates/`: reserved for crate kinds; none is defined (no plugin kind, no catalog).
- `secrets/`: forge token (`secrets/forge-token`, one line; rights: packages, repository, wiki, releases), gitignored,
mode 0600, never committed. `FORGETOKEN` in the environment overrides it.
- `tests/`: `make test`.
## Release
+21
View File
@@ -0,0 +1,21 @@
# Release Notes for obi-kit (obi extension of crate-kit), version 0.1.1
## Features
- **Initial Release**: Registered `obi` on `forge.metabarcoding.org` with `KIT_LANG=en` under CeCILL-2.1 license.
- **MCP Configuration**: Added `overlay/claude/mcp.json` to define the 'qmd' MCP server (`qmd mcp`), noting that these collections are external.
## Workflow & CI
- **Clone Strategy**: Replaced `CRATE_KIT_REPO` with `CRATE_KIT_URL` in `.gitea/workflows/release.yaml` to support anonymous HTTPS cloning from gargoton using `git clone --depth 1`.
- **Secret Handling**: Removed `FORGE_TOKEN_FILE` from `overlay/kit/org.mk`; clarified that forge tokens reside in `secrets/` next to repositories, with `FORGETOKEN` overriding them in CI.
## Testing
- **Verification**: Updated `tests/overlay.sh` to verify the installation of the 'qmd' MCP configuration by checking `.mcp.json` and `.claude/settings.json`.
## Documentation
- **Pilot Risks**: Updated `docs/pilot-risks.md` to reflect that `crate-kit` resides only on gargoton and is cloned anonymously via HTTPS, removing references to local mirrors on `forge.metaboding.org`.
- **Readme**: Updated `README.md` to reflect the presence of `overlay/kit/org.mk` and `overlay/kit/VERSION`, and removed mentions of `secrets/` for forge tokens.
- **Git Ignore**: Added `/dist/` to `.gitignore` and removed the comment about workstation secrets.
+8 -7
View File
@@ -55,7 +55,8 @@ same version on some setups: use a name and versions that are disposable).
wiki and releases (`write:package`, `write:repository`, `write:organization` may be needed to see the
organization's package registry); token owner must be a member of `obi` with write access.
- Test: a workflow step that prints only `${FORGETOKEN:+set}`; never echo the token.
- Local: `secrets/forge-token` in `obi-kit` (gitignored, mode 0600).
- Local: `secrets/forge.metabarcoding.org.token` in `secrets/` of the cluster `obi` (outside every repository,
mode 0600; see crate-kit README, "Forge tokens").
## 5. Runner
@@ -69,12 +70,12 @@ same version on some setups: use a name and versions that are disposable).
## 6. `crate-kit` location for the extension-kit workflow
- `obi-kit/.gitea/workflows/release.yaml` clones `crate-kit` from `$SERVER/$CRATE_KIT_REPO`, default
`LLM/crate-kit`, on **the same forge as `obi-kit`** (`SERVER` = `forge.metabarcoding.org`).
- Risk: `crate-kit` currently lives on `gargoton.petite-maison-orange.fr`, another forge: `LLM/crate-kit` does
not exist on `forge.metabarcoding.org`, so the obi-kit release workflow fails at its second clone.
- Options to decide: mirror/push `crate-kit` to the `obi` organization and set the repository variable
`CRATE_KIT_REPO=obi/crate-kit`, or change the clone URL. Not decided.
- Decision (2026-12-01): `crate-kit` lives on `gargoton.petite-maison-orange.fr` and nowhere else; it is the
single reference, there is no `obi/crate-kit` mirror on `forge.metabarcoding.org`.
- `obi-kit/.gitea/workflows/release.yaml` clones it from `$CRATE_KIT_URL` (default
`https://gargoton.petite-maison-orange.fr/LLM/crate-kit`; override: repository variable `CRATE_KIT_URL`).
The repository is public: anonymous clone, no token. `FORGETOKEN` is never sent to gargoton.
- Test on the pilot: the runner must reach gargoton over HTTPS (network, certificate) and clone anonymously.
## 7. Other points seen while reading
+12
View File
@@ -0,0 +1,12 @@
{
"_doc": "MCP servers added by the obi extension to the kit's required set (add-only, see crate-kit/claude/mcp.json). qmd: on-device search (BM25 + vectors + rerank) over the markdown collections obikmer-devdoc and obikmer-userdoc (the DevDocMD/ and UserDocMD/ trees of obiskim; the collection names predate the rename). The collections themselves live in ~/.config/qmd/index.yml, outside any repository: repoint them with the qmd CLI, not here.",
"mcpServers": {
"qmd": {
"command": "qmd",
"args": ["mcp"]
}
},
"signatures": {
"qmd": "qmd mcp"
}
}
+1 -1
View File
@@ -1 +1 @@
0.1.0
0.1.1
+2 -3
View File
@@ -3,8 +3,7 @@
REGISTRY ?= obi
FORGE_URL ?= https://forge.metabarcoding.org
REGISTRY_INDEX ?= sparse+$(FORGE_URL)/api/packages/$(REGISTRY)/cargo/
# Forge token of a development workstation: file in obi-kit/secrets/ (gitignored, outside synchronization,
# never committed). FORGETOKEN overrides it.
FORGE_TOKEN_FILE ?= $(abspath $(or $(KIT_SRC),.)/secrets/forge-token)
# No token here: the forge tokens of a workstation are files of the cluster, in secrets/ next to the
# repositories (secrets/forge.metabarcoding.org.token, ...), outside every repository. FORGETOKEN (CI) overrides them.
# Language of the documents an LLM generates (release notes, commit messages, Claude agents' notes).
KIT_LANG ?= en
+18
View File
@@ -11,3 +11,21 @@ printf 'include %s/kit/org.mk\nprint:\n\t@echo $(REGISTRY)\n' "$tmp" >"$tmp/prob
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"