Compare commits

..

7 Commits

Author SHA1 Message Date
Alexander Whitestone
39dff7eec3 fix: add portals.json validation tests (closes #1440)
Some checks failed
Review Approval Gate / verify-review (pull_request) Failing after 8s
CI / test (pull_request) Failing after 38s
CI / validate (pull_request) Failing after 39s
The current portals.json on main is valid JSON. The malformed version
referenced in the issue was likely from a draft that was fixed before
merge. Added 4 validation tests to prevent future corruption:

- test_portals_json_valid: file must parse as JSON
- test_portals_json_no_duplicate_keys: no duplicate keys in any object
- test_portals_json_structure: required fields (id, name, description,
  status, color, position) present on every portal
- test_portals_json_positions_valid: x/y/z coordinates are numbers

Closes #1440
2026-04-14 14:14:26 -04:00
Alexander Whitestone
0b0dd87b4e docs: fix deploy.sh port comments (4200/4201 -> 8765/8766) (#1413)
Some checks failed
Review Approval Gate / verify-review (pull_request) Failing after 8s
CI / validate (pull_request) Failing after 56s
CI / test (pull_request) Failing after 58s
Comments referenced ports 4200/4201 but docker-compose.yml maps:
- nexus-main -> 8765
- nexus-staging -> 8766

Fixes #1413.
2026-04-14 14:05:26 -04:00
6160e87446 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Failing after 6s
Staging Verification Gate / verify-staging (push) Failing after 3s
2026-04-14 15:34:03 +00:00
d0fc662ad2 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:59 +00:00
4e8e9cd08d feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:56 +00:00
189c657fec feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:53 +00:00
abe21ce6ec feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:51 +00:00
3 changed files with 58 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# deploy.sh — spin up (or update) the Nexus staging environment
# Usage: ./deploy.sh — rebuild and restart nexus-main (port 4200)
# ./deploy.sh staging — rebuild and restart nexus-staging (port 4201)
# Usage: ./deploy.sh — rebuild and restart nexus-main (port 8765)
# ./deploy.sh staging — rebuild and restart nexus-staging (port 8766)
set -euo pipefail
SERVICE="${1:-nexus-main}"

View File

@@ -165,18 +165,18 @@
<!-- Top Right: Agent Log, Atlas & SOUL Toggle -->
<div class="hud-top-right">
<button id="atlas-toggle-btn" class="hud-icon-btn" title="Portal Atlas">
<span class="hud-icon">🌐</span>
<span class="hud-btn-label">WORLDS</span>
</button>
<button id="atlas-toggle-btn" class="hud-icon-btn" title="World Directory">
<button id="soul-toggle-btn" class="hud-icon-btn" title="Timmy's SOUL">
<span class="hud-icon"></span>
<span class="hud-btn-label">SOUL</span>
</button>
<button id="mode-toggle-btn" class="hud-icon-btn mode-toggle" title="Toggle Mode">
<span class="hud-icon">👁</span>
<span class="hud-btn-label" id="mode-label">VISITOR</span>
</button>
<button id="atlas-toggle-btn" class="hud-icon-btn" title="Portal Atlas">
<span class="hud-icon">🌐</span>
<span class="hud-btn-label">WORLDS</span>
</button>
<div id="bannerlord-status" class="hud-status-item" title="Bannerlord Readiness">
<span class="status-dot"></span>
<span class="status-label">BANNERLORD</span>

View File

@@ -0,0 +1,51 @@
"""Test portals.json integrity — valid JSON, no duplicate keys, expected structure."""
from pathlib import Path
import json
def test_portals_json_valid():
"""portals.json must be valid JSON."""
path = Path(__file__).resolve().parents[1] / "portals.json"
data = json.loads(path.read_text(encoding="utf-8"))
assert isinstance(data, list), "portals.json should be a JSON array"
def test_portals_json_no_duplicate_keys():
"""portals.json must not contain duplicate keys in any object."""
path = Path(__file__).resolve().parents[1] / "portals.json"
content = path.read_text(encoding="utf-8")
def check_duplicates(pairs):
keys = [k for k, _ in pairs]
seen = set()
for k in keys:
assert k not in seen, f"Duplicate key '{k}' found in portals.json"
seen.add(k)
return dict(pairs)
json.loads(content, object_pairs_hook=check_duplicates)
def test_portals_json_structure():
"""Each portal entry must have required fields."""
path = Path(__file__).resolve().parents[1] / "portals.json"
data = json.loads(path.read_text(encoding="utf-8"))
required = {"id", "name", "description", "status", "color", "position"}
for i, portal in enumerate(data):
assert isinstance(portal, dict), f"Portal [{i}] is not a dict"
missing = required - set(portal.keys())
assert not missing, f"Portal [{i}] ({portal.get('id', '?')}) missing fields: {missing}"
def test_portals_json_positions_valid():
"""Each portal position must have x, y, z coordinates."""
path = Path(__file__).resolve().parents[1] / "portals.json"
data = json.loads(path.read_text(encoding="utf-8"))
for i, portal in enumerate(data):
pos = portal.get("position", {})
for axis in ("x", "y", "z"):
assert axis in pos, f"Portal [{i}] ({portal.get('id')}) missing position.{axis}"
assert isinstance(pos[axis], (int, float)), f"Portal [{i}] position.{axis} is not a number"