diff --git a/agent/managed-skills/omp-model-id-rename-cutover/SKILL.md b/agent/managed-skills/omp-model-id-rename-cutover/SKILL.md new file mode 100644 index 0000000..59d840e --- /dev/null +++ b/agent/managed-skills/omp-model-id-rename-cutover/SKILL.md @@ -0,0 +1,62 @@ +--- +name: omp-model-id-rename-cutover +description: Rename an OMP fleet model id in models.yml and prove every reference and endpoint still resolves before commit/push. +--- + +# OMP model id rename cutover + +Renaming a model id in `~/.omp/agent/models.yml` touches three layers: the registry, every +reference in `agent/config.yml`, and the wire contract with the serving endpoint. + +## 1. Find every reference +Provider names are labels; ids are referenced from `config.yml` (`modelRoles.*`, +`task.agentModelOverrides.*`, `compaction.modes`), from other models' `compactionModel`, +and from docs/memory. Grep the tracked set: + +```bash +git ls-files -z | xargs -0 grep -ln 'OLD_ID' +``` + +`agent/memories/**` and `omp-docs/log.md` are historical records: leave them alone. +`agent/models.yml` comments that name the *service* (e.g. `frank-large.env`) stay — the +systemd unit names do not change with the harness id. + +## 2. Prove reference integrity (throwaway, do not commit) +Parse both YAMLs and cross-check. The provider label contains a space and parentheses +(`llamacpp (dankserver)`), so use an explicit pattern; a `split(/\s+/)` yields false +unresolved hits like `(dankclaw)/frank-dragoon`. + +```python +pat = re.compile(r"llamacpp \([^)]+\)/[A-Za-z0-9._-]+") +known = {f"{n}/{m['id']}" for n, pv in models["providers"].items() for m in pv["models"]} +# walk cfg.modelRoles / cfg.task / compactionModel, flag tokens not in known +``` + +Expect: zero unresolved refs, and every `compactionModel` present in `known`. + +## 3. Prove the endpoint accepts the new id +`/v1/models` reports the SERVED name (radiance echoes the request id, halogen and +llama.cpp echo their own). Then send a 4-token completion with the NEW id against each +provider `baseUrl`: + +```bash +curl -s http://HOST:PORT/v1/chat/completions -H 'content-type: application/json' \ + -d '{"model":"NEW_ID","messages":[{"role":"user","content":"say OK"}],"max_tokens":4}' +``` + +200 + `reasoning_content` = the rename is harness-side only. All three engines on the +Dank fleet ignore the request `model` field. + +## 4. Fit check against the served window +Read the served window (`/v1/models` → `context_length` / `meta.n_ctx`) and confirm the +declared `contextWindow + maxTokens` fits the slot/pool the engine admits against. +Compaction fires at `compaction.thresholdPercent` of `contextWindow`; the clamp is +`max_tokens = min(maxTokens, contextWindow − est − 4096)` and the chars/4 estimate +under-runs ~3 % on code. + +## 5. Commit shape +One commit for `models.yml` (ids + windows + sampling), one for `config.yml` (role map, +compaction endpoint). Note in the message which wire names stay unchanged, and record +the rename in `omp-docs/log.md` (newest section first). Run `scripts/kb-lint.sh` before +committing docs. The `.githooks/pre-commit` secret gate runs automatically; never +`--no-verify`. diff --git a/agent/memories/--home-blank-.omp--/learned.md b/agent/memories/--home-blank-.omp--/learned.md index 6d42a16..116cbee 100644 --- a/agent/memories/--home-blank-.omp--/learned.md +++ b/agent/memories/--home-blank-.omp--/learned.md @@ -1,3 +1,5 @@ +- The origin remote of the command-center repo (~/.omp) embeds the Dankclaw Gitea token in plaintext: http://dank:token@192.168.0.143:3000/dank/command-center.git in .git/config. Consequence observed 2026-10-09: git push origin main echoes that URL (the git-lfs "Locking support detected" hint prints the full URL with the token) into stdout, so any transcript/log of a push contains a live credential. Recommended remediation proposed to Frank and NOT yet approved/applied — do not change remote auth unilaterally: git remote set-url origin http://192.168.0.143:3000/dank/command-center.git plus git config credential.helper 'store --file ~/.config/secrets/gitea' (that directory is Frank's existing 600-perm secret convention), and git config lfs.http://192.168.0.143:3000/dank/command-center.git/info/lfs.locksverify true to silence the lock hint. Reuse rule: when a token must be read from this repo, read it from the existing origin URL and reference its location only; never copy it into docs, skills, memory, or commit messages. Repo hooks: core.hooksPath=.githooks → pre-commit secret gate (patterns incl. eyJ… JWT shapes; override ALLOW_SECRETS=1) and pre-push git lfs pre-push, so pushes carry LFS objects. +- Fleet LLM model ids in ~/.omp/agent/models.yml were renamed to the unit-name scheme on 2026-10-08 (committed 0cb021b, pushed 2026-10-09): frank-medium → frank-archon (llamacpp dankserver, 192.168.0.235:7770, ctx 200000 / maxTokens 16384), frank-large → frank-dragoon (dankclaw, 192.168.0.143:7770, 217088 / 45056, text+image), frank-small → frank-zealot (dankclaw-3090, 192.168.0.143:7771, 200704 / 16384). Service/unit/script names are UNCHANGED — /v1/models still advertises frank-primary, frank-large, frank-secondary. LAW (verified live with chat-completion probes on all three): radiance, halogen-flash-server and llama.cpp all accept an arbitrary request model id, so a harness-side id rename needs no endpoint change; the response model field just echoes the served name. Server-side compaction moved from dankserver:7770 to 192.168.0.143:7771 (frank-zealot), thresholdPercent 70 → 85, and every model's compactionModel now points at llamacpp (dankclaw-3090)/frank-zealot so the wire id stays valid at the compaction endpoint. Provider names in models.yml are labels referenced from config.yml (modelRoles, task.agentModelOverrides) and from compactionModel — renaming one requires updating every reference; verify by parsing both YAML files and cross-checking all llamacpp (host)/id tokens (regex must allow the space+parens in the provider label; a naive whitespace split yields false "unresolved" hits). Also: git renders whole-directory renames as mass delete + mass untracked — the 2026-10-09 tree showed 116 D + 73 ?? for the managed-skills consolidation (94 → 25) and the memory-skill re-bucketing (dotfile-git-workflow → ghostty-text-aa + niri-display-rotation + noctalia-theme; handy-service-mgmt → handy-flm-inference; inference-runtime → llama-cpp-parallelism). Nothing was lost: index matched HEAD, so git restore recovers any of it. - Measuring WHICH card is the bottleneck in a llama.cpp layer-split LLM server on a fleet host (frank-medium, Dankserver 192.168.0.235, 2x R9700 asymmetric PCIe: ROCm0=x16 ~31.5GB/s, ROCm1=x1 ~1.97GB/s) — two traps that produced wrong numbers on 2026-09-18: (1) RUN THE TRANSIENT MEASUREMENT SERVER ON AN ISOLATED PORT, not the production port. If it takes over the prod port (7770), live fleet traffic from other agents hits it and interleaves with your timed request — I measured 35:30 at 2.51 t/s on :7770 vs the true 31.5 t/s; on isolated :7790 (prod stopped to free VRAM, fleet hits the down 7770) it read 31.52 t/s. Override LISTEN_PORT in a temp env copy (sed), point curl at the new port. (2) Use AVERAGE rocm-smi --showuse over a LONG request (2k tokens, ~60s), sampled every 0.5s — PEAK util lies for a layer split because both cards are touched every token and both hit ~100% at peak. Average is the bottleneck indicator. FINDING (durable, specific to frank-medium): the x1 card (ROCm1) is the STRUCTURAL bottleneck at 98% avg util in every config — 35:30/36:29, drafter on ROCm1/ROCm0 all gave util0(x16)=41-43% / util1(x1)=98%, decode ~31.5 t/s in all four. It's COMPUTE-bound, not PCIe-bound (only ~5.2 MB activation crosses the x1 link per 512-token ubatch). The per-step cost is the verify phase (both cards run the full target) + the LOGITS, which are pinned to the card holding the last layers; the MTP drafter is a small nextn head so moving it (SPEC_DRAFT_DEVICE=ROCm0) buys nothing. 35:30 is the optimal split (balanced VRAM 1.27/1.85 GiB free); 36:29 buys 2 util points on the x16 card and erodes its VRAM (fit free 0.45 GiB) for no throughput gain. No llama-server flag moves the lm_head off the last-layer card, so the x1 bottleneck is architectural, not a mis-tune. Recorded in scripts/frank-medium.env (committed 6c6464a). - placeholder4 - placeholder3