41 lines
2.7 KiB
Markdown
41 lines
2.7 KiB
Markdown
# albok-nemi — hourly Nemi walk on nh3-dev
|
|
|
|
**Nemi** is albok's ingest walker (vh/albok, `packages/albok-nemi`, owned by **albok-dev**). Each run walks the
|
|
three-wing manifest into albok-service on nh3-docker (`stacks/albok-service/`):
|
|
- `fleet/memory`: every repo's persistent memory;
|
|
- `fleet/stash`;
|
|
- `personal/agent-feedback`: Claude Code auto-memory, a restricted wing.
|
|
|
|
The unit and timer here belong to infra-ops. Installed 2026-10-03 at albok-dev's request (thread
|
|
`01M40JGV4BEVXC9NQVTPX82BV8`), after albok-dev measured the steady state.
|
|
|
|
| | |
|
|
|---|---|
|
|
| Units | `~/.config/systemd/user/albok-nemi.{service,timer}` (lkraven user manager, linger on), copies of this dir |
|
|
| Failure hook | `albok-nemi.service.d/10-onfailure-althing.conf`, which mails the infra-ops inbox (`services/althing-notify-failure`) |
|
|
| Runs | `uv run nemi run` in `/home/lkraven/development/albok` (albok-dev's working tree), `NEMI_CONFIG=~/.config/albok/nemi.yaml` (0600; holds `albok/token-nemi` + LiteLLM key `albok-nemi`) |
|
|
| Schedule | hourly, `RandomizedDelaySec=5min`, `Persistent=true`; `TimeoutStartSec=2h`; Nice 10, I/O priority 7 |
|
|
| Exit codes | 0 ok; **1** a wing failed (cause in the report); **2** albok-service unreachable, nothing walked. Both 1 and 2 trip OnFailure |
|
|
| Reports | `nemi status` prints the last one; files in `~/.local/state/albok-nemi/reports/` |
|
|
|
|
**Cost (albok-dev, fleet instance, n=3):** steady-state walk 658 / 594 / 573 s, median 594 s (about 10 min, a
|
|
sixth of the interval). An unchanged object costs 0.042 s to submit, in batches of 200. The first full ingest
|
|
(11,404 objects, about 1 h 48 m plus tagging) was run by hand before the timer existed.
|
|
|
|
## ⚠ Two walks must never overlap on one wing
|
|
|
|
Each run is its own ingest run id, and a full walk tombstones whatever the other run did not send. The timer
|
|
gives this for free: it never starts a oneshot that is still active. **For a manual walk, use
|
|
`systemctl --user start albok-nemi.service`**, which joins or waits on the running one. Since 2026-10-03 0600 nemi
|
|
also takes a non-blocking `flock` on `<state_dir>/run.lock` for the whole run, so a second run exits 1 and names the
|
|
lock. If a hand-started run holds the lock when the timer fires, the unit exits 1 and OnFailure mails infra-ops
|
|
with that message. That mail is benign.
|
|
|
|
## Notes
|
|
|
|
- It runs albok-dev's **working tree**, not a pinned release. A broken edit there fails the next walk, and
|
|
OnFailure mails infra-ops. Forward that to albok-dev.
|
|
- **Reports:** since 2026-10-03 0600 nemi keeps the newest 48 run reports (two days, at most about 100 MB) and
|
|
prunes the rest on every write. `eval-*.json` files are measurements and are kept.
|
|
- Uninstall: `systemctl --user disable --now albok-nemi.timer`, then remove the two units and the `.d` dir.
|