From e14fc884a3f75170a30179f1618085a997053181 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 19 Oct 2026 21:40:41 -0700 Subject: [PATCH] live: heartbeat sync 2026-10-19T21:40:41-07:00 (Refs #11) --- agent/managed-skills/gitea-pr-api-cycle/SKILL.md | 8 +++++--- .../SKILL.md | 16 +++++++++++++++- .../sharpshooter/tmp-1tpw73408x3e/state.json | 2 +- .../state.json | 2 +- .../state.json | 2 +- .../noctalia/.local/state/noctalia/settings.toml | 8 ++++---- 6 files changed, 27 insertions(+), 11 deletions(-) diff --git a/agent/managed-skills/gitea-pr-api-cycle/SKILL.md b/agent/managed-skills/gitea-pr-api-cycle/SKILL.md index da1f5d1..6aa2801 100644 --- a/agent/managed-skills/gitea-pr-api-cycle/SKILL.md +++ b/agent/managed-skills/gitea-pr-api-cycle/SKILL.md @@ -1,6 +1,6 @@ --- name: gitea-pr-api-cycle -description: "\"Open/update/merge PRs and issues on the Dankclaw Gitea API (192.168.0.143:3000) with the token-safe sequence, the form-encoded merge field, the empty-token-returns-404 trap, and post-merge live-checkout fast-forward.\"" +description: "\"Open/update/merge PRs and issues on the Dankclaw Gitea API (192.168.0.143:3000) with the token-safe sequence, the form-encoded merge field, the empty-token-returns-404 trap, and post-merge live-checkout fast-forward plus the plugin-package-name upgrade gotcha.\"" --- # Gitea PR/issue cycle — Dankclaw API @@ -39,13 +39,15 @@ JSON `{"Do":"merge"}` (what this skill used to claim) and header variants all re ## Post-merge landing - Command-center: the checkout IS the deployment — `git -C ~/.omp fetch -q origin && git -C ~/.omp merge --ff-only origin/main`. -- Package repos (`~/Projects/`): same `--ff-only`, then reinstall (`omp plugin upgrade `) and `cmp` the installed `dist/index.js` against the repo `dist/index.js` to prove the live artifact is the merged one. -- **A fast-forward that adds or removes a tracked `node_modules` changes it on disk.** Landing a PR that deleted the tracked symlink wiped the dev checkout's installed deps, and `bun run typecheck` then died with `tsc: command not found` (exit 127); `bun install` restored them. Check `ls -ld node_modules` after landing anything that touched it. +- Package repos (`~/Projects/`): same `--ff-only`, then reinstall (`omp plugin upgrade `) and `cmp` the installed `dist/index.js` against the repo `dist/index.js` to prove the live artifact is the merged one. Check `ls -ld node_modules` after landing anything that touched it. +- **`omp plugin upgrade` takes the npm package name, not the short name.** `omp plugin upgrade dankvoice` fails with `Failed to upgrade dankvoice: dankvoice is not installed` while the plugin is plainly installed; the package is `omp-dankvoice`. Find the truth with `ls ~/.omp/plugins/node_modules` or `find ~/.omp -path '*/dist/index.js' -not -path '*/Projects/*'` — the installed tree is unscoped (`~/.omp/plugins/node_modules/omp-dankvoice/dist/index.js`), not `@dank/dankvoice`. +- **`cmp` exiting 1 BEFORE the upgrade is the expected state** (installed bundle is the pre-merge build, diff reported at some char/line). Do not treat it as a failed deploy and do not "fix" the build; run the upgrade, then `cmp` again for byte identity, and grep the new bundle for a string only the merged code contains (e.g. `grep -c "Heckle instead of summarizing"`) as a second, semantic confirmation. - Prune: `git worktree remove --force ` (force: untracked deps link), `git branch -D`, `git push origin --delete ` (allowed: local Gitea). ## Attribution footer (AGENTS.md) Every issue/PR body ends with `---`, then `cwd: · session: `. Read the real values, never invent an id. - **The session id is the UUID suffix of the LIVE transcript `.jsonl`, not the session directory name.** Transcript dirs are keyed by cwd (e.g. `-.omp-wt-wt-20261019-020309-6d1fc1f`) and ONE cwd can hold several sessions (resume / continuation forks), so `ls -t ~/.omp/agent/sessions/` cannot tell you which is yours and `ls -t ` is equally blind. Pick the file being appended to right now: `ls -l --time-style=+%H:%M:%S /*.jsonl` beside `date +%H:%M:%S` — the mtime that equals the current second is the live session. The id is the part after `_` in `_.jsonl`. +- A `history.db` query for `session_id` filtered by `cwd` usually agrees, but it is not authoritative for WHICH of several sessions in that cwd is live — use the jsonl mtime test. - `local/` does NOT disambiguate: a forked transcript dir carries copies of the same `local://` artifacts, so matching artifact names proves nothing about which session is live. - `cwd` is that session's own working directory (the path the harness states), **not** the build worktree you committed in — when they differ, name the build worktree inside the body and keep `cwd` the session's. - Resolve `local://.md` with `read local://.md` (its header prints the absolute path) instead of guessing the directory. diff --git a/agent/managed-skills/plugin-git-install-committed-artifact/SKILL.md b/agent/managed-skills/plugin-git-install-committed-artifact/SKILL.md index a9b8abf..800ef0a 100644 --- a/agent/managed-skills/plugin-git-install-committed-artifact/SKILL.md +++ b/agent/managed-skills/plugin-git-install-committed-artifact/SKILL.md @@ -1,6 +1,6 @@ --- name: plugin-git-install-committed-artifact -description: "Use when shipping an omp/pi plugin for omp plugin install git: — the installer clone fails validation (missing build artifact) or silently reuses a stale bun git-mirror cache; recipes for committing dist + drift pins + cache purge." +description: "Use when shipping or landing an omp/pi plugin (omp plugin install/upgrade git): install validation fails on a missing build artifact, a stale bun git-mirror cache is reused, the live bundle needs proof it is the merged build, or upgrade says \"not installed\"." --- # Plugin install from git: committed artifact + fresh mirror @@ -42,6 +42,20 @@ GIT_TERMINAL_PROMPT=0 git clone -q /tmp/x && git -C /tmp/x log --oneline - 2. Plain unattended clone contains the entry? If yes, the installer's view is cached → purge mirror. 3. Only then suspect the installer itself (validation code lives in the minified bundle; `grep -oE '.{600}' "$bunfile"` on `readlink -f $(which omp)` shows the exact check). +## Landing a merged PR on the live box + +After the merge and the `--ff-only` on the dev checkout (`ls -ld node_modules` after landing anything that could have touched it): + +- **`omp plugin upgrade ` takes the PACKAGE name, not the install alias.** `omp plugin upgrade dankvoice` fails `dankvoice is not installed` while the live copy sits in `~/.omp/plugins/node_modules/omp-dankvoice/`. Read the directory name (or `package.json` `"name"`) and upgrade that. +- Then close the chain of custody with one command — the deployed bytes are the merged bytes: + ```bash + cmp ~/Projects//dist/index.js ~/.omp/plugins/node_modules//dist/index.js + ``` + If only docs/tests changed, `dist/` is untouched and this should already match; if `src/` changed, the plugin must be upgraded first or this fails with `char ` — which is a real finding (stale live bundle), not a test bug. +- The session that did the merge keeps the OLD bundle in memory: it is still running pre-merge code. Never conclude "the change does not work" from the merging session. + ## After install — proof without a TUI - `omp plugin doctor` → per-plugin ✔ line. - Audible/behavioral chain when TUI input is unusable (update-banner modal freezes pty submits): run `omp --mode=rpc --no-session` with the feature env armed (dankvoice: `DANKVOICE_AUTO=1`, gate is print/json-only) and watch for objective side effects, e.g. PipeWire: `pw-dump | grep -q "say-.wav"` proves synth+playback end-to-end. +- When pty submits DO work (no modal), the strongest instrument is a stub player plus a clip count, not ears or pixels: `DANKVOICE_PLAYER=/tmp/stub.sh` where the stub appends `$1` to a log and exits 0. Launch the DEPLOYED bundle by path (`omp --no-extensions --no-session -e ~/.omp/plugins/node_modules//dist/index.js`) in a neutral cwd with `DANKVOICE_CONFIG` pointed at a scratch file so the operator's settings are untouched. +- **Count clips per narration EVENT, not per turn.** One turn can fire several narrations (dankvoice: `message_end` carries prose+thinking, `agent_end` the settled answer; the dedupe only skips byte-identical text, so thinking-on means both speak). A "too many clips" result is usually correct behaviour — check the harness transcript for the turn count before believing a bug. The player deletes each temp wav, so the log line count is the only surviving evidence: park it in `~/.AGENTTRASH/-/` if it becomes evidence for an issue. diff --git a/agent/memories/sharpshooter/tmp-1tpw73408x3e/state.json b/agent/memories/sharpshooter/tmp-1tpw73408x3e/state.json index 382c078..e8e56cd 100644 --- a/agent/memories/sharpshooter/tmp-1tpw73408x3e/state.json +++ b/agent/memories/sharpshooter/tmp-1tpw73408x3e/state.json @@ -1,4 +1,4 @@ { "v": 1, - "lastConsolidatedAt": 1792439491829 + "lastConsolidatedAt": 1792469747088 } diff --git a/agent/memories/sharpshooter/wt-20261019-020309-6d1fc1f-8knxmfcrfa1k/state.json b/agent/memories/sharpshooter/wt-20261019-020309-6d1fc1f-8knxmfcrfa1k/state.json index f9e05d8..eac2171 100644 --- a/agent/memories/sharpshooter/wt-20261019-020309-6d1fc1f-8knxmfcrfa1k/state.json +++ b/agent/memories/sharpshooter/wt-20261019-020309-6d1fc1f-8knxmfcrfa1k/state.json @@ -1,6 +1,6 @@ { "v": 1, - "lastConsolidatedAt": 1792467234925, + "lastConsolidatedAt": 1792470954931, "lastResult": { "at": 1792433353188, "sessions": 1, diff --git a/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json b/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json index 9df4eb9..e846405 100644 --- a/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json +++ b/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json @@ -1,6 +1,6 @@ { "v": 1, - "lastConsolidatedAt": 1792467340869, + "lastConsolidatedAt": 1792471240899, "lastResult": { "at": 1792452243238, "sessions": 1, diff --git a/dotfiles/noctalia/.local/state/noctalia/settings.toml b/dotfiles/noctalia/.local/state/noctalia/settings.toml index b7b08a5..6ad8e57 100644 --- a/dotfiles/noctalia/.local/state/noctalia/settings.toml +++ b/dotfiles/noctalia/.local/state/noctalia/settings.toml @@ -275,13 +275,13 @@ transition = [ "fade" ] interval_seconds = 1200 [wallpaper.default] - path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_v9w8r5.jpg" + path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_p8rzge.jpg" [wallpaper.last] - path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_v9w8r5.jpg" + path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_p8rzge.jpg" [wallpaper.monitors.DP-1] - path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_v9w8r5.jpg" + path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_p8rzge.jpg" [wallpaper.monitors.DP-2] path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_oxex69.jpg" @@ -290,7 +290,7 @@ transition = [ "fade" ] path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_v9e2w3.jpg" [wallpaper.monitors.eDP-1] - path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_v9w8r5.jpg" + path = "/home/blank/.local/share/noctalia/wallpapers/wallhaven_p8rzge.jpg" [weather] unit = "imperial"