Files
Linux_post_install/AgentsReport/maintainer/2026-09-06_ai-server-agtodo-done.md
T
Your Name 0b5043a9f3
gates / consistency-and-conventions (push) Successful in 26s
fix: llama-server start breakage — version detection, flag-validation race, model dir resolution, user-bus pre-flight
User report after the llamacpp app install: 'installed llama.cpp unknown',
valid flags rejected (randomly per run), 'Model not found' for the HF
downloader's own layout, and a systemd user-bus failure over SSH. Detective
(real b10822 binary, FACT) found four independent causes:

- version: llama-server --version prints to STDERR; detect_llama_version's
  2>/dev/null swallowed it -> always 'unknown'. Now captures 2>&1 + accepts
  semver/build tokens (incl. build 1.2.3 edge)
- validation: printf|grep -q under pipefail -> SIGPIPE rc=141 race randomly
  rejected flags present in the 59 KB --help. Now pipe-less grep (no race);
  20x determinism regression test
- model resolution: resolve_model accepted files only, but the HF downloader
  creates <models>/<repo>/file.gguf dirs. Now expands a dir with exactly one
  *.gguf (never silently picks; multi-gguf lists + errs)
- port: llama.cpp default 8080 vs tool/adapter 8088; validation reliability
  means --port is now always pinned in the unit
- user bus: headless/SSH sessions lack XDG_RUNTIME_DIR -> ensure_user_bus in
  lib/common.sh pre-flights all three systemctl --user tools with remediation
  text; pos ai server --no-unit direct-run escape hatch (pidfile) for boxes
  with no bus
- find_llamacpp narrowed to llama-server/llama-server-cuda (bare 'server'
  fallback hazard); installer post-install sanity (version+help execute,
  symlink targets resolve)

Architect decisions DQ1-DQ6 recorded. Tester: 4 new regression files
(version-from-stderr, 25x flag-validation determinism, model dir expansion,
bus pre-flight + E2E) + 3 fixture updates; suite 16 files / 269 checks.

Verified: make gen idempotent; make check OK; make lint 0 FAIL, 0 WARN;
make test 269/269 (~49s); bash -n clean; git diff --check clean.
2026-09-06 09:25:52 -04:00

76 lines
3.3 KiB
Markdown

# Maintainer — AGENT_TODO.md Done entry for 2026-09-06 AI-server round
## TL;DR
- **Finding:** AI-server breakage round (llamacpp install fallout) finished, but no
AGENT_TODO Done entry captured it yet. Per repo convention ("move completed work
into **Done** (dated one-line) in the same commit that finishes the work"), a
commit is imminent and the edit must ride it. Added ONE new **Done** entry.
- **Correction:** Added a single 2026-09-06 entry at the TOP of Done (newest-last
placement), style matching existing entries, ~9 lines, condensing the
Detective/Architect/Builder/Tester reports. All other content untouched.
- **Validation:** `git diff --stat AGENT_TODO.md` = 1 file changed, 2 insertions.
No gates run (file is not part of gen/check/lint).
## Step 1: Locate Done section + newest-last placement
Read `AGENT_TODO.md`. Done entries are newest-at-top within the section (e.g. the
existing 2026-09-06 entries precede 2026-09-05/04/…). The new entry was inserted
immediately after `## Done`, above the existing "Stabilization pass" entry.
## Step 2: Check the existing 2026-09-06 "Stabilization pass" entry for contradiction
Reviewed it (lines 45+). It records the 17-point audit's own scope (help-flag
validation, security, tooling, config, tests at 12 files/179 checks). The new
round found deeper defects (stderr version detection, SIGPIPE race, dir expansion,
port mismatch, user-bus) that the pass did not claim to have covered. No statement
in the stabilization entry asserts these were already fixed, so **no minimal
adjustment is warranted** — the entries are complementary, not contradictory.
Per the brief, left everything else untouched.
## Step 3: Add the new Done entry
Inserted one 2026-09-06 entry at the top of Done, ~9 lines, matching existing
style (`- **YYYY-MM-DD** —` prefix, terse evidence-backed summary), condensing:
- Detective root cause (b10822 binary: `--version`→STDERR mg07 hidden by
`2>/dev/null`; `printf|grep -q` SIGPIPE rc=141 flag race; `resolve_model`
file-only vs downloader dirs; port 8080 vs 8088)
- Architect DQ1-DQ6 (help-gated stays; no silent dir-expansion pick;
`ensure_user_bus` pre-flight; `--no-unit` escape hatch; candidates narrowed;
port pinned 8088; installer sanity)
- Builder F1-F7 + F1 regex edge (`build 1.2.3``1`)
- Tester (4 regression files + 3 fixture updates; 16 files / 269 checks)
- Verification (gen idempotent, check OK, lint 0 FAIL/0 WARN, test 269/269,
bash -n, git diff --check)
- Post-fix user outcome (`XDG_RUNTIME_DIR` + linger → Option A or `--no-unit`)
[DONE]
## Validation
`git diff --stat AGENT_TODO.md`:
```
AGENT_TODO.md | 2 ++
1 file changed, 2 insertions(+)
```
Only AGENT_TODO.md touched. No gates run (not part of gen/check/lint).
[DONE]
## Report status
Status: MAINTENANCE_COMPLETE
- Maintenance objective: add ONE Done entry for the AI-server round, newest-at-top,
style-matched; adjust stale text only if it contradicts (it did not).
- Files changed: AGENT_TODO.md (one entry added).
- Verification: git diff stat above; content diff reviewed.
- Scope compliance: in-scope corrections only (touched ONLY AGENT_TODO.md); no
features, no new standards, no other files.
- Remaining / deferred items: none for this objective. The edit rides the imminent
commit made by the committer (I did NOT commit).
- Recommended next agent: Orchestrator (commit + handoff).