Update SESSION_LOG.md - Add Dec 14 entry and expand Dec 20 with architecture reality and wire contract findings
This commit is contained in:
parent
c9b6d4ef6a
commit
775258534a
@ -1,32 +1,39 @@
|
|||||||
# Session Log – zlh-grind
|
# Session Log – zlh-grind
|
||||||
|
|
||||||
## Session Dec 20, 2025 - Port Allocation & DNS Fix
|
Append-only execution log for GPT working in ZeroLagHub environment.
|
||||||
|
|
||||||
### ✅ Completed Fixes (zlh-api)
|
|
||||||
1. **handlers/provisionGame.js** - Added `portsNeeded: portsNeeded || 1` (default port allocation)
|
|
||||||
2. **provisionAgent.js** - Changed DB field `ports:` to `allocatedPorts:` (schema match)
|
|
||||||
|
|
||||||
### ⚠️ DNS Bug Identified (NOT YET FIXED)
|
|
||||||
**File:** `src/api/provisionAgent.js`
|
|
||||||
**Problem:** Passing FQDN to EdgePublisher instead of SHORT hostname
|
|
||||||
|
|
||||||
**Changes Needed:**
|
|
||||||
1. Line 46: Delete `const ZONE = ...`
|
|
||||||
2. Lines 330-331: Delete FQDN generation (`const slotHostname = ...`)
|
|
||||||
3. Line 402: Change to `slotHostname: hostname,`
|
|
||||||
|
|
||||||
**Impact:** Game provisioning works but DNS records not created
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Session Dec 19, 2025 - Dev Container Split
|
## 2025-12-14
|
||||||
- Split provision.js into provisionAgent.js + handlers (provisionGame.js, provisionDev.js)
|
- Goal: Stabilize zlh-agent provisioning pipeline for game + dev containers + addons without regressing game provisioning.
|
||||||
- Added dev container support
|
- Scope: Agent routing (ctype=dev), local artifacts strategy, addon skeleton, initial end-to-end tests.
|
||||||
- INTRODUCED: FQDN bug in EdgePublisher call
|
- Adopted single base template approach (zlh-agent template) where agent installs roles at runtime.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Session Dec 13, 2025 - Initial Implementation
|
## 2025-12-20
|
||||||
- Created zlh-api repository
|
- Goal: Restore reliable end-to-end provisioning for **game + dev** without regressions; preserve the explicit orchestration steps/logging.
|
||||||
- Agent-driven provisioning pipeline
|
|
||||||
- All 6 Minecraft variants working
|
### Current Architecture Reality (IMPORTANT)
|
||||||
|
- We are on **single base template**: `AGENT_TEMPLATE_VMID` is the only template in `.env`.
|
||||||
|
- In this workflow, **any zlh-agent code change requires rebuilding + pushing the binary into the template container**.
|
||||||
|
- That effectively means: **agent change = new template promotion**.
|
||||||
|
|
||||||
|
### Key Findings / Fixes
|
||||||
|
- Game provisioning steps are functioning again and show clear step-by-step orchestration output (allocate VMID → clone → configure → start → IP → agent config → wait → DB save → edge publish).
|
||||||
|
- Dev provisioning failure was traced to a **wire contract mismatch** between API JSON and agent `state.Config` struct tags:
|
||||||
|
- Agent expects: `container_type` (snake_case) on the JSON wire
|
||||||
|
- API refactors were sending: `ctype` / `containerType` (camelCase) in some variants
|
||||||
|
- Result: `cfg.ContainerType == ""` on decode → agent routes into game path → errors like:
|
||||||
|
- `unsupported container identity (containerType="" game="")`
|
||||||
|
|
||||||
|
### Decision (to minimize churn)
|
||||||
|
- Because agent changes force a template promotion in this pipeline, the correct short-term move is:
|
||||||
|
- **Update API to emit `container_type`** to match the existing agent contract
|
||||||
|
- Avoid touching agent code until we intentionally rev the template
|
||||||
|
|
||||||
|
### Operational Guardrails
|
||||||
|
- Do NOT remove or "simplify" the explicit provisioning steps/logging; they are required for debugging and operator confidence.
|
||||||
|
- Treat `container_type` as the canonical wire key until the next planned template rev.
|
||||||
|
|
||||||
|
---
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user