Skip to content

Commit a135ac6

Browse files
committed
fix: align edge catalog patches and scenario approval
- move Central server implementation out of the edge repo - load user and central catalog patches and make scenario.apply confirmable - remove engine-format hardcoding and refresh MCP docs/profile - add local and cjwx UAT evidence
1 parent 9428c59 commit a135ac6

89 files changed

Lines changed: 1443 additions & 6605 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
AIMA (AI-Inference-Managed-by-AI): a Go binary that manages AI inference on edge devices.
66
It detects hardware, resolves optimal configs from a YAML knowledge base, generates K3S Pod YAML,
7-
and exposes 56 MCP tools for AI Agents to operate everything. **This project is 100% developed by Claude Code.**
7+
and exposes MCP tools for AI Agents to operate everything. **This project is 100% developed by Claude Code.**
88

99
Tech: Go (no CGO), K3S, HAMi, SQLite (modernc.org/sqlite), MCP (JSON-RPC 2.0), Cobra CLI, log/slog.
1010
Design docs: `design/ARCHITECTURE.md` (system architecture), `design/PRD.md`, `design/MRD.md`.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# 2026-04-27 Design-Principles Fix UAT
2+
3+
## Scope
4+
5+
Branch: `develop`
6+
7+
This UAT covers the fixes from the architecture/principles review:
8+
9+
- Central server code removed from this repo; edge Central client remains.
10+
- Runtime catalog overlay uses `catalog/{central,user}` patch layers.
11+
- `scenario.apply` is confirmable for Agent-initiated calls.
12+
- Explorer/resolver compatibility is driven by YAML `supported_formats` / `supported_model_types`.
13+
- MCP discovery/docs match the current 62-tool registry.
14+
15+
## Matrix
16+
17+
| Lane | Host | Scope | Result |
18+
|------|------|-------|--------|
19+
| Local dev-mac | macOS arm64 | Full Go gates, patch overlay, scenario dry-run, MCP tool discovery | PASS |
20+
| cjwx linux-1 | `cjwx@100.121.255.97` (`qujing24`) | Linux amd64 binary smoke with isolated `AIMA_DATA_DIR` | PASS |
21+
22+
The cjwx host already had `/usr/local/bin/aima-serve` running on `:6188`; this UAT used `/tmp/aima-uat-20260427-design-fix`, did not stop or modify the live service, and cleaned the temp directory after evidence was copied back.
23+
24+
## Acceptance Checks
25+
26+
| Check | Evidence | Result |
27+
|-------|----------|--------|
28+
| Full test suite | `local/02-go-test-all.txt` | PASS |
29+
| Vet | `local/03-go-vet-all.txt` | PASS |
30+
| Scenario approval regression | `local/04-targeted-regression-tests.txt` | PASS |
31+
| Catalog patch writes to user layer | `local/09-catalog-overlay-files.txt`, `cjwx/evidence/07-catalog-overlay-files.txt` | PASS |
32+
| Catalog status counts model patch + scenario patch | `local/10b-catalog-status-after-all-patches.json`, `cjwx/evidence/08-catalog-status-after.json` | PASS (`overlay_assets=2`) |
33+
| Scenario asset from patch is consumable | `local/12-scenario-show.json`, `cjwx/evidence/09-scenario-show.json` | PASS |
34+
| Scenario dry-run does not deploy | `local/13-scenario-apply-dry-run.json`, `cjwx/evidence/10-scenario-apply-dry-run.json` | PASS (`dry_run=true`, status `dry_run`) |
35+
| MCP full registry count | `local/16-mcp-full-count.txt`, `cjwx/evidence/11-mcp-tools-full.json` | PASS (`62`) |
36+
| Explorer profile does not expose nonexistent `benchmark.ensure_assets` | `local/18-mcp-explorer-ensure-assets-check.txt`, `cjwx/evidence/12-mcp-tools-explorer.json` | PASS |
37+
| Remote cleanup | `cjwx/05-remote-cleanup.txt` plus post-check | PASS |
38+
39+
## UAT Findings Fixed During Run
40+
41+
1. `catalog status` returned an empty `kind` for shadowed assets.
42+
Fixed by adding `knowledge.CollectNameKinds()` and populating `shadowed[].kind`.
43+
44+
2. `catalogSize()` did not count deployment scenarios, so a loaded scenario patch was not reflected in `overlay_assets`.
45+
Fixed by including `DeploymentScenarios` and `BenchmarkProfileTiers` in catalog size accounting.
46+
47+
3. CLI/docs still described `catalog override` as writing a full overlay asset.
48+
Updated wording to user-owned catalog patches.
49+
50+
## Conclusion
51+
52+
PASS. The new behavior holds locally and on cjwx with isolated state. No live remote deployments were started, stopped, or changed.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
host=qujing24
2+
user=cjwx
3+
Linux qujing24 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
4+
11:41:25 up 4 days, 1:00, 0 users, load average: 18.40, 18.38, 18.36
5+
0, NVIDIA GeForce RTX 4090, 1, 49140, 0
6+
1, NVIDIA GeForce RTX 4090, 1, 49140, 0
7+
2221 /usr/local/bin/aima-serve serve --addr=0.0.0.0:6188 --mdns --allow-insecure-no-auth
8+
2236 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
9+
2326 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
10+
863883 bash -c set -e; echo host=$(hostname); echo user=$(whoami); uname -a; uptime; if command -v nvidia-smi >/dev/null 2>&1; then nvidia-smi --query-gpu=index,name,memory.used,memory.total,utilization.gpu --format=csv,noheader,nounits; else echo no-nvidia-smi; fi; pgrep -af "aima|vllm|sglang|llama|python" | head -40 || true
11+
2736820 python /app/afs_exporter.py

artifacts/uat/v0.4/20260427-design-principles-fix/cjwx/01-scp-binary.txt

Whitespace-only changes.

artifacts/uat/v0.4/20260427-design-principles-fix/cjwx/02-scp-yaml.txt

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2026/04/27 11:41:38 INFO runtime selected runtime=docker docker_available=true k3s_available=false
2+
2026/04/27 11:41:38 INFO explorer started tier=1
3+
2026/04/27 11:41:39 INFO runtime selected runtime=docker docker_available=true k3s_available=false
4+
2026/04/27 11:41:39 INFO explorer started tier=1
5+
2026/04/27 11:41:39 INFO runtime selected runtime=docker docker_available=true k3s_available=false
6+
2026/04/27 11:41:39 INFO explorer started tier=1
7+
2026/04/27 11:41:39 INFO catalog patch layer merged layer=user dir=/tmp/aima-uat-20260427-design-fix/data/catalog/user overlay_assets=1 new_assets=0
8+
2026/04/27 11:41:40 INFO runtime selected runtime=docker docker_available=true k3s_available=false
9+
2026/04/27 11:41:40 INFO explorer started tier=1
10+
2026/04/27 11:41:40 INFO catalog patch layer merged layer=user dir=/tmp/aima-uat-20260427-design-fix/data/catalog/user overlay_assets=2 new_assets=1
11+
2026/04/27 11:41:40 INFO runtime selected runtime=docker docker_available=true k3s_available=false
12+
2026/04/27 11:41:40 INFO explorer started tier=1
13+
2026/04/27 11:41:40 INFO catalog patch layer merged layer=user dir=/tmp/aima-uat-20260427-design-fix/data/catalog/user overlay_assets=2 new_assets=1
14+
2026/04/27 11:41:40 INFO runtime selected runtime=docker docker_available=true k3s_available=false
15+
2026/04/27 11:41:40 INFO explorer started tier=1
16+
2026/04/27 11:41:40 INFO catalog patch layer merged layer=user dir=/tmp/aima-uat-20260427-design-fix/data/catalog/user overlay_assets=2 new_assets=1
17+
2026/04/27 11:41:41 INFO runtime selected runtime=docker docker_available=true k3s_available=false
18+
2026/04/27 11:41:41 INFO explorer started tier=1
19+
2026/04/27 11:41:41 INFO catalog patch layer merged layer=user dir=/tmp/aima-uat-20260427-design-fix/data/catalog/user overlay_assets=2 new_assets=1
20+
2026/04/27 11:41:42 INFO runtime selected runtime=docker docker_available=true k3s_available=false
21+
2026/04/27 11:41:42 INFO explorer started tier=1
22+
2026/04/27 11:41:42 INFO catalog patch layer merged layer=user dir=/tmp/aima-uat-20260427-design-fix/data/catalog/user overlay_assets=2 new_assets=1
23+
2026/04/27 11:41:42 INFO runtime selected runtime=docker docker_available=true k3s_available=false
24+
2026/04/27 11:41:42 INFO explorer started tier=1

artifacts/uat/v0.4/20260427-design-principles-fix/cjwx/04-scp-evidence-back.txt

Whitespace-only changes.

artifacts/uat/v0.4/20260427-design-principles-fix/cjwx/05-remote-cleanup.txt

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
remote_dir=/tmp/aima-uat-20260427-design-fix
2+
date_utc=2026-04-27T03:41:36Z
3+
host=qujing24
4+
user=cjwx
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./aima: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=MI16xi0Yu_8M8r-GPQ3v/UDvwEcR94WHMzZF_ZvDV/FfUdCfmqHbX5J5-QVR1U/KetKVydOraVS7JPVJZJl, BuildID[sha1]=d9664da3e003df44b33efd2ef0627c609cbe75f6, with debug_info, not stripped

0 commit comments

Comments
 (0)