Skip to content

docs(lemonade): repo deep-dive + ADR/plan tightenings from research#138

Merged
thinmintdev merged 1 commit into
mainfrom
docs/lemonade-repo-deep-dive-2026-05-22
May 22, 2026
Merged

docs(lemonade): repo deep-dive + ADR/plan tightenings from research#138
thinmintdev merged 1 commit into
mainfrom
docs/lemonade-repo-deep-dive-2026-05-22

Conversation

@thinmintdev
Copy link
Copy Markdown
Contributor

Summary

Lands the upstream-codebase research handoff that resolved several open questions on ADR-0006, plus the ADR + migration-plan tightenings those answers produced.

  • NEW `docs/internal/lemonade-repo-deep-dive-2026-05-22.md` (276L) — read of lemonade-sdk/lemonade@7af26f75: dev internals, full API surface, embeddable build, omni recipe, WS protocol.
  • ADR-0006 §3 "HTTP-first + CLI fallback" → "HTTP only" + documents the `/v1/load` schema (`model_name` required, rest optional).
  • ADR-0006 §5/§6: containerised lemond → AMD's embeddable tarball + bare systemd unit (avoids the docker-build apparmor pain on LXC).
  • migration-plan: matching decisions on bundling shape + drive method.

Conforms with

PR #137 (`LemonadeClient` skeleton) already implements the post-tightening shape — these docs make the "client conforms to ADR §3" line accurate in `git log`.

🤖 Generated with Claude Code

Lands the upstream-codebase research handoff that resolved several
open questions on ADR-0006, plus the ADR + migration-plan tightenings
those answers produced.

## What lands

- `docs/internal/lemonade-repo-deep-dive-2026-05-22.md` (276L) — read
  of `lemonade-sdk/lemonade@7af26f75` (HEAD of main, 2026-05-21): dev
  internals, full API surface, embeddable build, omni recipe, WS
  protocol. The "what's actually in there" companion to the spike's
  "what happens when we run it" findings.

## ADR-0006 tightenings (from deep-dive)

- §3 (Drive method): "HTTP-first with CLI fallback" → "HTTP only". The
  spike's `/v1/load` "type must be string but is null" failure was a
  malformed body (nlohmann::json[] throws on null access), not a
  missing field. CLI fallback isn't needed.
- §3 (Schema): documents that only `model_name` is required for
  `/v1/load`; everything else is optional.
- §5/§6 (Process supervision + bundling): "containerised lemond" →
  "AMD's embeddable tarball + bare systemd unit". Lemonade ships an
  `embeddable` cmake target producing a portable lemond+lemonade
  tarball — that's the official redistributable artifact. Building
  a container around it duplicates AMD's work and reintroduces the
  docker-build apparmor pain hal0 has on LXC.

## migration-plan tightenings

- Decision #7 (Bundling+pin): `{image, digest, version}` →
  `{tarball_url, sha256, version}` to match the embeddable distribution.
- Decision #11 (Drive method): mirrors ADR §3 — HTTP-only with the
  resolved schema, no CLI bootstrap fallback.

## Why a separate PR from #137 (the client skeleton)

PR #137 already implements what these docs describe — keeping the
docs/code split on a per-PR basis makes the migration story easier to
read in `git log`: "client conforms to ADR-0006 §3 (HTTP-only)" reads
cleanly because the ADR §3 it conforms to is the post-tightening
version, landed alongside.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thinmintdev thinmintdev merged commit f9df077 into main May 22, 2026
4 checks passed
@thinmintdev thinmintdev deleted the docs/lemonade-repo-deep-dive-2026-05-22 branch May 22, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant