# DNS Fix - provisionAgent.js

## Quick Reference for Next Session

**Status:** Identified but NOT yet applied  
**Priority:** CRITICAL - blocks DNS record creation  
**File:** `jester/zlh-api/src/api/provisionAgent.js`

## The Problem
EdgePublisher expects SHORT hostname but we're passing FQDN, breaking Cloudflare/Technitium DNS records.

## The Fix (3 changes)

### 1. Delete Line 46
```javascript
const ZONE = process.env.TECHNITIUM_ZONE || "zerolaghub.quest";
```

### 2. Delete Lines 330-331
```javascript
// Generate FQDN for DNS/EdgePublisher
const slotHostname = `${hostname}.${ZONE}`;
```

### 3. Change Line 402
```javascript
// FROM:
slotHostname,           // ← FQDN for DNS records

// TO:
slotHostname: hostname,  // ← SHORT hostname (EdgePublisher adds zone)
```

## Expected Result
```javascript
await enqueuePublishEdge({
  vmid,
  slotHostname: hostname,        // "mc-vanilla-5074"
  instanceHostname: hostname,    // "mc-vanilla-5074" 
  ports: allocatedPorts,
  ctIp,
  game: req.game,
  txnId,
});
```

## Why This Works
Original working version (commit 9138add) passed short hostname. EdgePublisher adds zone suffix internally. Dev container refactor accidentally broke this by pre-appending FQDN.
