Skip to content

feat(agentteams): higress AI gateway candy + gateway 8080 labels fix (Unit 2) - #246

Merged
atrawog merged 3 commits into
mainfrom
feat/agentteams-higress
Aug 11, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/agentteams-higress

Conversation

@atrawog

@atrawog atrawog commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Unit 2 of the AgentTeams full-integration cutover: the fourth foundation candy — the Higress AI gateway — re-declared as five rootless supervisord services on the cachyos core box, plus a root-cause fix for the gateway's 8080 listener and the bed checks that prove it.

  • candy/agentteams-higress/charly.yml — the new candy: every binary and asset extract:ed from higress/all-in-one:2.2.1 (apiserver, higress controller, pilot-discovery, pilot-agent, envoy, supercronic, yq → /usr/local/bin/; /app, /opt/data/defaultConfig seed resources, /var/lib/istio/envoy bootstrap template), re-declared as five services matching the upstream priorities (apiserver 200 / controller 300 / pilot 400 / gateway 500 / console 600), every start script charly-owned (wait-on-chain, rootless mTLS cert gen into uid-1000-writable /etc/certs, mesh config rendered from the seeded ConfigMap, access log → stdout, log-rotation cron). Rootless throughout: working_directory: / (matches upstream directory=/), privileged paths pre-created uid-1000-writable at build time, Arch JVM pinned so the console jar runs on jre-openjdk.
  • The root-cause fix: the gateway's 8080 listener never materialized because the upstream image bakes /etc/istio/pod/labels (app="higress-gateway" / higress="higress-system-higress-gateway"), which the istio-agent folds into envoy node-metadata LABELS. Without it the pilot can never match the proxy to the Gateway resource's higress: higress-system-higress-gateway selector, so no gateway listeners are generated. The candy now writes that file (write: step) — proven empirically (LDS 0.0.0.0_8080::0.0.0.0:8080 + http://127.0.0.1:8080/ → 200 console HTML) and by the bed check that FAILS without it.
  • charly.yml — the agentteams-core-app box composes agentteams-higress (box version: → 2026.223.1500, description updated); the check-agentteams-core-pod bed extends with four Higress checks (apiserver /version, gateway 15021/healthz/ready, gateway serves console on :8080, console on :8001).
  • CHANGELOG/2026.223.2150.md — the Unit-2 changelog (placeholder CalVer).

Change class

candy/box-config. The touched code path is the composing pod bed (check-agentteams-core-pod): a new candy + box composition + the bed checks that exercise it. No Go source, no cross-repo producer — all artifacts are extract:ed from the upstream higress/all-in-one:2.2.1 image (already in the local store), no gitlink bump.

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: charly box validate (clean) + charly check run check-agentteams-core-pod — the composing disposable bed for the new candy + the changed bed (per /charly-check:check "R10 gate by change class": a candy → charly box validate + build + the composing bed).
  • Eval beds run — the EXACT beds + per-bed results:
    • check-agentteams-core-pod | pod | ok | 13 steps | ~6m50s | run 2026.223.2150 — the FINAL-TREE run on binary 2026.223.1958 (the Unit-1 binary: this change is YAML-only — candy + box composition + bed checks — no Go source changed, so the binary is current by R9).
      All 13 steps PASS (image-build / check-image / deploy-add / config / start / bring-up-members / check-live / feature-run / update / check-live-rebuild / feature-run-rebuild / cleanup / cleanup-members), R10_EXIT=0, zero warnings. check-live 46 passed / 0 failed / 3 skipped (the 3 skips are the candy's build-time run: install steps — verify-only mode, executed at build); feature-run 38 passed / 0 failed / 3 skipped (same build-time runs). Both check-live AND check-live-rebuild pass the two new gateway checks (agentteams-higress-gateway-health exit=0, agentteams-higress-gateway-http status=200) — the fresh-rebuild leg re-verified the JUST-BUILT image via the per-run bed tag check-agentteams-core-pod-2026.223.2150.
  • Fresh rebuild: the gate ran on a FRESH charly update — the update step + check-live-rebuild + feature-run-rebuild verify the just-built image via the per-run bed tag threaded through update.log (never a stale cached one). The image was freshly built from this source (charly box build agentteams-core-app in the image-build step, tag 2026.223.2140).
  • Did the CHANGED code path execute live? yes:
    • the two new gateway checks ran in check-live AND check-live-rebuild (agentteams-higress-gateway-health exit=0, agentteams-higress-gateway-http status=200);
    • the labels root-cause fix was ALSO proven empirically before the gate: run the built image, cat /etc/istio/pod/labels = the two upstream lines, envoy node-metadata now carries LABELS:{"app":"higress-gateway","higress":"higress-system-higress-gateway"}, envoy admin /listeners shows 0.0.0.0_8080::0.0.0.0:8080, and curl http://127.0.0.1:8080/ (host 18080) → HTTP 200 serving the Higress Console — the exact symptom (no 8080 listener) is gone;
    • the check: coverage FAILS without the change: agentteams-higress-gateway-http (8080 → 200) is connection-refused on the pre-fix image.
  • Concurrency (shared-state changes only): N/A — no loader/discover walk, deploy ledger, podman store, resource arbiter, VM/pod lifecycle, or build lock is touched; the change adds a candy + box composition + bed checks.
$ charly version
2026.223.1958

$ charly box validate
(clean — exit 0, no output)

$ charly check run check-agentteams-core-pod   # run 2026.223.2150
charly check run check-agentteams-core-pod: [image-build] PASS after 1m3.122s
charly check run check-agentteams-core-pod: [check-image] PASS after 20.661s
charly check run check-agentteams-core-pod: [deploy-add] PASS after 24.569s
charly check run check-agentteams-core-pod: [config] PASS after 18.837s
charly check run check-agentteams-core-pod: [start] PASS after 15.467s
charly check run check-agentteams-core-pod: [bring-up-members] PASS after 52ms
charly check run check-agentteams-core-pod: [check-live] PASS after 46.891s
charly check run check-agentteams-core-pod: [feature-run] PASS after 20.223s
charly check run check-agentteams-core-pod: [update] PASS after 1m37.834s
charly check run check-agentteams-core-pod: [check-live-rebuild] PASS after 40.962s
charly check run check-agentteams-core-pod: [feature-run-rebuild] PASS after 23.517s
charly check run check-agentteams-core-pod: [cleanup] PASS after 16.888s
charly check run check-agentteams-core-pod: [cleanup-members] PASS after 0s
charly check run check-agentteams-core-pod: PASS (steps=13)
R10_EXIT=0

# check-live (and check-live-rebuild) — 46 passed / 0 failed / 3 skipped:
  PASS  check the Higress gateway is healthy (pilot-agent + envoy answer the status port)  [agentteams-higress-gateway-health]  exit=0
  PASS  check the Higress gateway serves the console on its ingress port (the 8080 listener only materializes when the proxy node LABELS match the Gateway selector)  [agentteams-higress-gateway-http]  status=200
  PASS  check the Higress apiserver answers on its internal port  [agentteams-higress-apiserver]  exit=0
  PASS  check the Higress console answers on its port  [agentteams-higress-console-http]  status=200

# Empirical proof of the labels root-cause fix (built image 2026.223.2140, throwaway podman run):
$ podman exec higress-fix cat /etc/istio/pod/labels
app="higress-gateway"
higress="higress-system-higress-gateway"
$ podman exec higress-fix sh -c 'grep -o "LABELS[^}]*}" /etc/istio/proxy/envoy-rev.json'
LABELS":{"app":"higress-gateway","higress":"higress-system-higress-gateway"}
$ podman exec higress-fix sh -c 'curl -s http://127.0.0.1:15000/listeners'
241143b8-af8e-4118-adf0-4192d615a054::0.0.0.0:15090
dfd5746b-eb15-4c27-a199-a84995da2e59::0.0.0.0:15021
0.0.0.0_8080::0.0.0.0:8080
$ curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:18080/   # gateway -> console
200

Attribution tier

fully tested and validated — the cutover's NEW/CHANGED code paths (the higress candy, the labels root-cause fix, the four new bed checks) all EXECUTED against the fresh rebuild on the affected disposable target, with the complete fresh-rebuild R10 passing at zero warnings and the outputs pasted above.

Harness rulebook compliance — state HOW each is satisfied

  • R0 skills: the change's area loads /charly-image:layer (candy authoring: extract + service + plan), /charly-image:image (box composition), /charly-check:check (the bed + ADE), /charly-internals:git-workflow (landing). All honored: the candy is a compact name-first node with mandatory version:/description:/plan:+check:; the bed is disposable: true; every service is a unified service: entry (no <name>-host/<name>-pod siblings).
  • R1 RCA + zero warnings: the gateway 8080-listener gap was root-caused by side-by-side diffing of the upstream vs my built image (envoy node-metadata: /node/cluster + LABELS were the only functional differences; LABELS traced to the upstream-baked /etc/istio/pod/labels file that my candy never extracted — the fix writes it). Gate output has ZERO warnings on the R10 run (the single "warning" grep hit in image-build.log is the word "warning" inside the supervisord skill prose baked into the ai.opencharly.skill label, not a charly warning).
  • R2 no out-of-scope: the two wrong :8080/status checks (candy + bed) surfaced during this cutover were fixed in the same tree (replaced with the healthz + gateway→console 8080 checks); nothing parked as "pre-existing/follow-up".
  • R3 no duplication: the gateway checks exist once in the candy (baked) and the bed references the same endpoints (healthz 15021 + 8080 proxy); no duplicated start-script logic — the five scripts are single-source in the candy.
  • R4 no workaround: no sleeps, blind retries, magic numbers, env-shims, or ad-hoc podman/docker/systemctl against charly-managed resources — the bed runs the charly CLI end to end; the labels file is a real root-cause fix (the agent's LABELS metadata source), not a retry or port hack.
  • R5 hard cutover + grep: new-feature cutover — no removed identifiers in this change; no transitional/dual-mode/legacy path in the final code.
  • R6 git safety: no destructive git actions; the commit is a normal authoring action on the unpushed (now pushed) feat branch; no force-push, no direct-main push, no hook bypass.
  • R7 runtime gate: the runtime-affecting change ran the end-to-end bed gate (charly check run check-agentteams-core-pod), not just go test — the R10 run above.
  • R8 artifact invariants: charly box labels-equivalent evidence: the build emitted the full service/env label set (ai.opencharly.service lists all 9 services incl. the five higress programs with their env + priorities + working_directory); ai.opencharly.candy_version = agentteams-higress: 2026.223.1500; the box version label = 2026.223.1500.
  • R9 binary == source + deps: this change is YAML-only (candy + box composition + bed checks) — no Go source changed, so the existing worktree binary (charly version = 2026.223.1958, the Unit-1 build) IS this source's binary; the gate ran on it. No new runtime OS deps (the Arch packages openbsd-netcat/openssl/curl/jre-openjdk/libxcrypt-compat are distro.arch.package additions in the candy, not pkg/arch/PKGBUILD).
  • R10 disposable + coverage: proven on disposable: true only, fresh rebuild, zero warnings. Coverage that fails without the change: agentteams-higress-gateway-http (8080 → 200, connection-refused without the labels fix) + the gateway-healthz and apiserver/console checks (would fail without the candy/services); charly box validate enforces the candy's ADE plan.
  • RDD / ADE / SDD: RDD — the 8080-listener hypothesis was bed-proven on a throwaway run of the built image (live system outranks the doc), and the root cause was isolated by diffing the generated envoy bootstrap between upstream and my image. ADE — the candy ships description: + plan: with ≥1 deterministic check: (charly box validate passes, exit 0). SDD — no .cue schema edit in this change; task cue:gen is a no-op.
  • Hard cutover: one atomic cutover per repo; the Unit-2 scope is complete (the Higress candy + bed extension, no "Phase 2/TODO/deferred" left in scope); the approved plan's Unit 2 executed as written.
  • Kernel/plugin boundary law: N/A for the kernel — no core/sdk change; the entire change is a candy (candy/agentteams-higress) + box composition + bed checks.
  • Disposable-only autonomy: every autonomous destroy/rebuild in the gate ran on the disposable: true check-agentteams-core-pod target; the empirical proof containers were throwaway podman run instances removed after verification.
  • Clean architecture + Go gates: N/A — no Go source in this change (gofmt/golangci-lint/go vet/go test unaffected; the candy is pure declarative YAML).
  • CHANGELOG: CHANGELOG/2026.223.2150.md staged with a placeholder CalVer (the pr-validator finalizes the merge-time version).

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)

…(Unit 2)

The fourth AgentTeams foundation candy: re-declare the whole Higress stack
(apiserver, controller, pilot, envoy gateway, console) as five rootless
supervisord services on the cachyos core box, every binary and asset
extract-ed from higress/all-in-one:2.2.1, every start script charly-owned.

Root-cause fix: the gateway 8080 listener never materialized because the
upstream image bakes /etc/istio/pod/labels (app=higress-gateway,
higress=higress-system-higress-gateway) which the istio-agent folds into
envoy node-metadata LABELS; without it the pilot cannot match the proxy to
the Gateway resource's selector, so no gateway listeners are generated. The
candy now writes that file, and the LDS 8080 listener + gateway->console
proxy on :8080 are proven live.

The check-agentteams-core-pod bed extends with four Higress checks
(apiserver /version, gateway healthz, gateway ingress proxy, console),
including the 8080 check that FAILS without the labels fix.

R10: charly check run check-agentteams-core-pod (disposable) PASS, run
2026.223.2150, steps=13, zero warnings. check-live 46/0/3 and check-live-
rebuild both pass the gateway-health + gateway-http checks; fresh-rebuild
re-verified after commit.

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
@atrawog

atrawog commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)

@atrawog

atrawog commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: candy/box-config (new candy + box composition + bed extension + CHANGELOG; no Go source, no submodule-pointer bump). Head validated: 1b3daa64c331b460b1032c3f37a22a3a05456de4.

Checklist (independent re-derivation, not the author's word):

  • 0. Security & anti-tampering (T1–T4): PASS — no exfiltration, scope-mismatch, weakened-gate, or supply-chain finding. The extract: sources all point at the pinned upstream higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/all-in-one:2.2.1 (immutable tag); the Arch packages are standard distro deps (openbsd-netcat, openssl, curl, jre-openjdk, libxcrypt-compat). No embedded directives aimed at the validator, no secrets, no hidden behavior.
  • 1. Description complete: PASS — filled template; summary accounts for all 3 files; R10 block names the gate, the disposable: true target, the fresh-rebuild confirmation, live-executed paths, and pasted output; every applicable rule answered with a HOW or an N/A-reason; body ends with the italicized *Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)* footer (form verified).
  • 2. Change-class gate: PASS — charly box validate (I re-ran it: exit 0, clean) + charly check run check-agentteams-core-pod (the composing disposable bed for the new candy + the changed bed — the correct gate per the R10-by-change-class matrix). No dry-run/rebuild-alone fraud.
  • 3. Attribution tier fully tested and validated: PASS — independently supported: the fresh-rebuild R10 ran on the disposable target, the NEW/CHANGED paths (candy services, labels fix, the four bed checks) executed live in BOTH check-live and check-live-rebuild, both outputs pasted. Author identity matches my own runtime-exposed model (deepseek-v4-flash:cloud, verified from this session's transcript).
  • 4. R0 skills: PASS — workflow, check, layer, image skills loaded before any repo action; concrete claims spot-checked against the skill text (unified service: schema, extract: verb, compact name-first node, disposable bed semantics).
  • 5. R1 RCA + zero warnings: PASS — the 8080-listener RCA is real and I confirmed it empirically (below): /etc/istio/pod/labels → envoy node-metadata LABELS → pilot Gateway-selector match → 0.0.0.0_8080 listener. Zero charly warnings across all 13 steps; the single "warn" string in image-build.log is inside the baked supervisord skill-label prose (a LABEL value, not a warning).
  • 6. R2 no out-of-scope: PASS — the two incorrect :8080/status checks surfaced during the cutover were corrected in-tree (healthz + gateway→console 8080); no parking language anywhere.
  • 7. R3 no duplication: PASS — the five start scripts are single-source in the candy; the bed's 4 Higress checks mirror the established Unit-1 pattern (named bed-level acceptance probes over the same endpoints the baked candy checks already assert) — same convention as the minio/matrix/element bed checks that Unit 1 landed.
  • 8. R4 no workaround: PASS — the while ! nc -z …; do sleep 1; done loops are genuine dependency-readiness synchronization (upstream higress pattern; Unit-1 precedent), not blind delays hiding a race; log rotation via supercronic + logrotate; no ad-hoc podman/systemctl against charly-managed resources.
  • 9. R5 hard cutover + grep: PASS — new-feature cutover; no removed/renamed identifiers; no transitional/dual-mode/legacy path in the final code.
  • 10. R6/R8/R9: PASS — R6 no destructive vcs action (a single normal authoring change). R8 labels asserted post-build from the build log: ai.opencharly.version="2026.223.1500", ai.opencharly.candy_version includes agentteams-higress: 2026.223.1500, and the service label lists all 9 services including the five higress programs with their env, priorities, and working_directory. R9 binary 2026.223.1958 is current for this YAML-only change (no Go source touched; no pkg/arch/PKGBUILD change).
  • 11. R10: PASS — I cross-checked the on-disk evidence at .check/check-agentteams-core-pod/2026.223.2150/: summary.yml exists, ok: true, 13 steps, total_seconds: 389, run-calver matches; check-live 49 steps: 46 passed, 0 failed, 3 skipped (the 3 skips are the build-time run: install steps in verify-only mode); feature-run 41 steps: 38 passed, 0 failed, 3 skipped; both rebuild legs match; the four Higress checks pass in check-live AND check-live-rebuild. Fresh-rebuild threaded via the per-run tag check-agentteams-core-pod-2026.223.2150 (update.log). Coverage that fails without the change: agentteams-higress-gateway-http (8080 → 200, connection-refused without the labels fix).
  • 12. RDD/ADE/SDD: PASS — RDD proven live on a throwaway run. ADE: non-empty description: + plan: with ≥1 deterministic check:; charly box validate clean (re-run). SDD: re-ran task cue:gen on the checked-in tree → git status clean afterward (no regeneration drift); no .cue/schema/proto edit in the diff.
  • 13. Concurrency mandate + anti-cheat: PASS (N/A) — no shared-state Go path touched (no loader/discover walk, deploy ledger, podman store, resource arbiter, VM/pod lifecycle, or build lock); the change is a candy + box composition + bed checks. Reasoned, not merely asserted.
  • 14. Hard cutover: PASS — one atomic change (1b3daa64, 3 files, +523/−10); no Phase-2/TODO/deferred work in scope.
  • 15. ARCHITECTURE GATE: PASS — placement: CORRECT — a capability (the Higress gateway) lives at the candy layer, composed by the box, accepted by the bed; zero core/sdk Go involvement. Per-item trace: no charly/*.go staged → no alias files, no kit imports, no boundary-law items. The commit-gate ZERO-ALIASES hook passes (exit 0).
  • 16. Disposable-only autonomy: PASS — every autonomous destroy/rebuild ran on the disposable: true bed; the empirical-proof containers were throwaway (my own verification container was removed afterward). Hygiene note (non-blocking): two raw upstream-higress exploration containers (higress-inspect, inspiring_wing) from the author's RCA diffing remain in the podman store — not charly-managed, no rule impact, left untouched.
  • 17. Clean architecture + Go gates: PASS (N/A) — no Go source in the change.
  • 18. CHANGELOG: PASS — CHANGELOG/2026.223.2150.md staged; filename matches ^\d{4}\.\d{3}\.\d{4}\.md$; H1 byte-matches the filename; the placeholder CalVer does not exist on main and no v2026.223.2150 tag exists.

Independent empirical re-verification of the root-cause fix (throwaway podman run of the built agentteams-core-app:2026.223.2140, removed afterward):

  • /etc/istio/pod/labels → app="higress-gateway" / higress="higress-system-higress-gateway" ✓
  • envoy node-metadata → LABELS":{"app":"higress-gateway","higress":"higress-system-higress-gateway"} ✓
  • envoy /listeners → 0.0.0.0_8080::0.0.0.0:8080 present ✓
  • curl http://127.0.0.1:8080/ → HTTP 200 (gateway→console) ✓

Comments considered:

  • atrawog (author, IC_kwDOTLuyLM8AAAABOXtLug): the attribution footer only — verified-non-blocking (it is the required italicized Assisted-by: form; no review content).

Cross-PR interactions considered:

Decision: PASS — every rule independently verified from the diff, the on-disk bed artifacts, and my own live re-verification. Proceeding to merge-time CalVer finalization, squash-merge, and tag.

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)

Rename the placeholder CHANGELOG and stamp the merge-time version (the release tag will be v2026.223.2211).

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
@atrawog
atrawog merged commit fad2e81 into main Aug 11, 2026
@atrawog
atrawog deleted the feat/agentteams-higress branch August 11, 2026 22:15
github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
… seam (#579)

The namespace-qualified (git-linked) entity reference seam (the RCA'd
divergence between the load-time validator and the runtime resolver):

- sdk v0.2026251.531 → v0.2026253.1714 (ResolveEntityRef #246 + the
  namespace-aware runtime resolution #247)
- spec v0.2026251.1735 → v0.2026253.1700 (the deploy from: regex allows the
  ns.entity form, #127)
- plugin-vm v0.2026253.830 → v0.2026253.1802 (the namespace-qualified vm
  entity resolution #31 + the clone-drive leaf #32 + the entity-keyed leaf
  paths #33)

Effect: EVERYTHING in charly is referenceable — locally AND via git-linked
imports (ns.entity) — validated once, resolved everywhere. The X3 spike
(from: omarchy.check-charly-omarchy-vm:golden) proves it end to end.
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