Compare commits
12 Commits
fix/1333
...
fix/1427-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f791cca049 | ||
| 324cdb0d26 | |||
| b4473267e0 | |||
| ed733d4eea | |||
| 7c9f4310d0 | |||
| 2016a7e076 | |||
| b6ee9ba01b | |||
| 15b9a4398c | |||
| 3f7277d920 | |||
| cb944be172 | |||
|
|
ec2ed3c62f | ||
|
|
11175e72c0 |
3
app.js
3
app.js
@@ -734,6 +734,9 @@ async function init() {
|
||||
const response = await fetch('./portals.json');
|
||||
const portalData = await response.json();
|
||||
createPortals(portalData);
|
||||
|
||||
// Start portal hot-reload watcher
|
||||
if (window.PortalHotReload) PortalHotReload.start(5000);
|
||||
} catch (e) {
|
||||
console.error('Failed to load portals.json:', e);
|
||||
addChatMessage('error', 'Portal registry offline. Check logs.');
|
||||
|
||||
@@ -397,6 +397,7 @@
|
||||
<script src="./boot.js"></script>
|
||||
<script src="./avatar-customization.js"></script>
|
||||
<script src="./lod-system.js"></script>
|
||||
<script src="./portal-hot-reload.js"></script>
|
||||
<script>
|
||||
function openMemoryFilter() { renderFilterList(); document.getElementById('memory-filter').style.display = 'flex'; }
|
||||
function closeMemoryFilter() { document.getElementById('memory-filter').style.display = 'none'; }
|
||||
|
||||
@@ -29,7 +29,7 @@ from typing import Any, Callable, Optional
|
||||
|
||||
import websockets
|
||||
|
||||
from bannerlord_trace import BannerlordTraceLogger
|
||||
from nexus.bannerlord_trace import BannerlordTraceLogger
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
# CONFIGURATION
|
||||
|
||||
@@ -304,6 +304,43 @@ async def inject_event(event_type: str, ws_url: str, **kwargs):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def clean_lines(text: str) -> str:
|
||||
"""Remove ANSI codes and collapse whitespace from log text."""
|
||||
import re
|
||||
text = strip_ansi(text)
|
||||
text = re.sub(r'\s+', ' ', text).strip()
|
||||
return text
|
||||
|
||||
|
||||
def normalize_event(event: dict) -> dict:
|
||||
"""Normalize an Evennia event dict to standard format."""
|
||||
return {
|
||||
"type": event.get("type", "unknown"),
|
||||
"actor": event.get("actor", event.get("name", "")),
|
||||
"room": event.get("room", event.get("location", "")),
|
||||
"message": event.get("message", event.get("text", "")),
|
||||
"timestamp": event.get("timestamp", ""),
|
||||
}
|
||||
|
||||
|
||||
def parse_room_output(text: str) -> dict:
|
||||
"""Parse Evennia room output into structured data."""
|
||||
import re
|
||||
lines = text.strip().split("\n")
|
||||
result = {"name": "", "description": "", "exits": [], "objects": []}
|
||||
if lines:
|
||||
result["name"] = strip_ansi(lines[0]).strip()
|
||||
if len(lines) > 1:
|
||||
result["description"] = strip_ansi(lines[1]).strip()
|
||||
for line in lines[2:]:
|
||||
line = strip_ansi(line).strip()
|
||||
if line.startswith("Exits:"):
|
||||
result["exits"] = [e.strip() for e in line[6:].split(",") if e.strip()]
|
||||
elif line.startswith("You see:"):
|
||||
result["objects"] = [o.strip() for o in line[8:].split(",") if o.strip()]
|
||||
return result
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Evennia -> Nexus WebSocket Bridge")
|
||||
sub = parser.add_subparsers(dest="mode")
|
||||
|
||||
@@ -44,9 +44,13 @@ class MemPalaceResult:
|
||||
|
||||
|
||||
def _get_client(palace_path: Path):
|
||||
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable."""
|
||||
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable.
|
||||
|
||||
Telemetry is disabled for sovereignty — no data leaks to Chroma Inc.
|
||||
"""
|
||||
try:
|
||||
import chromadb # type: ignore
|
||||
from chromadb.config import Settings
|
||||
except ImportError as exc:
|
||||
raise MemPalaceUnavailable(
|
||||
"ChromaDB is not installed. "
|
||||
@@ -59,7 +63,10 @@ def _get_client(palace_path: Path):
|
||||
"Run 'mempalace mine' to initialise the palace."
|
||||
)
|
||||
|
||||
return chromadb.PersistentClient(path=str(palace_path))
|
||||
return chromadb.PersistentClient(
|
||||
path=str(palace_path),
|
||||
settings=Settings(anonymized_telemetry=False),
|
||||
)
|
||||
|
||||
|
||||
def search_memories(
|
||||
|
||||
105
portal-hot-reload.js
Normal file
105
portal-hot-reload.js
Normal file
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* Portal Hot-Reload for The Nexus
|
||||
*
|
||||
* Watches portals.json for changes and hot-reloads portal list
|
||||
* without server restart. Existing connections unaffected.
|
||||
*
|
||||
* Usage:
|
||||
* PortalHotReload.start(intervalMs);
|
||||
* PortalHotReload.stop();
|
||||
* PortalHotReload.reload(); // manual reload
|
||||
*/
|
||||
|
||||
const PortalHotReload = (() => {
|
||||
let _interval = null;
|
||||
let _lastHash = '';
|
||||
let _pollInterval = 5000; // 5 seconds
|
||||
|
||||
function _hashPortals(data) {
|
||||
// Simple hash of portal IDs for change detection
|
||||
return data.map(p => p.id || p.name).sort().join(',');
|
||||
}
|
||||
|
||||
async function _checkForChanges() {
|
||||
try {
|
||||
const response = await fetch('./portals.json?t=' + Date.now());
|
||||
if (!response.ok) return;
|
||||
|
||||
const data = await response.json();
|
||||
const hash = _hashPortals(data);
|
||||
|
||||
if (hash !== _lastHash) {
|
||||
console.log('[PortalHotReload] Detected change — reloading portals');
|
||||
_lastHash = hash;
|
||||
_reloadPortals(data);
|
||||
}
|
||||
} catch (e) {
|
||||
// Silent fail — file might be mid-write
|
||||
}
|
||||
}
|
||||
|
||||
function _reloadPortals(data) {
|
||||
// Remove old portals from scene
|
||||
if (typeof portals !== 'undefined' && Array.isArray(portals)) {
|
||||
portals.forEach(p => {
|
||||
if (p.group && typeof scene !== 'undefined' && scene) {
|
||||
scene.remove(p.group);
|
||||
}
|
||||
});
|
||||
portals.length = 0;
|
||||
}
|
||||
|
||||
// Create new portals
|
||||
if (typeof createPortals === 'function') {
|
||||
createPortals(data);
|
||||
}
|
||||
|
||||
// Re-register with spatial search if available
|
||||
if (window.SpatialSearch && typeof portals !== 'undefined') {
|
||||
portals.forEach(p => {
|
||||
if (p.config && p.config.name && p.group) {
|
||||
SpatialSearch.register('portal', p, p.config.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Notify
|
||||
if (typeof addChatMessage === 'function') {
|
||||
addChatMessage('system', `Portals reloaded: ${data.length} portals active`);
|
||||
}
|
||||
|
||||
console.log(`[PortalHotReload] Reloaded ${data.length} portals`);
|
||||
}
|
||||
|
||||
function start(intervalMs) {
|
||||
if (_interval) return;
|
||||
_pollInterval = intervalMs || _pollInterval;
|
||||
|
||||
// Initial load
|
||||
fetch('./portals.json').then(r => r.json()).then(data => {
|
||||
_lastHash = _hashPortals(data);
|
||||
}).catch(() => {});
|
||||
|
||||
_interval = setInterval(_checkForChanges, _pollInterval);
|
||||
console.log(`[PortalHotReload] Watching portals.json every ${_pollInterval}ms`);
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (_interval) {
|
||||
clearInterval(_interval);
|
||||
_interval = null;
|
||||
console.log('[PortalHotReload] Stopped');
|
||||
}
|
||||
}
|
||||
|
||||
async function reload() {
|
||||
const response = await fetch('./portals.json?t=' + Date.now());
|
||||
const data = await response.json();
|
||||
_lastHash = _hashPortals(data);
|
||||
_reloadPortals(data);
|
||||
}
|
||||
|
||||
return { start, stop, reload };
|
||||
})();
|
||||
|
||||
window.PortalHotReload = PortalHotReload;
|
||||
@@ -1,74 +0,0 @@
|
||||
# Forge-Wide QA Pass — 2026-04-12 Evening
|
||||
|
||||
**Reviewer:** Perplexity
|
||||
**Scope:** All 6 Timmy Foundation repos
|
||||
**Source:** Issue #1333 on `Timmy_Foundation/the-nexus`
|
||||
**Reference:** `perplexity-status-report-2026-04-12-evening`
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
| Repo | Open PRs | Reviewed | Approved | Changes Requested | Closed |
|
||||
|------|----------|----------|----------|-------------------|--------|
|
||||
| the-nexus | 33 → 32 | 10 | 8 | 1 | 1 |
|
||||
| timmy-config | 5 | 5 | 3 | 2 | 0 |
|
||||
| timmy-home | 2 | 2 | 0 | 2 | 0 |
|
||||
| fleet-ops | 0 | — | — | — | — |
|
||||
| hermes-agent | 0 | — | — | — | — |
|
||||
| the-beacon | 0 | 1 post-merge flag | — | — | — |
|
||||
|
||||
**Total: 40 open PRs across the org. 17 reviewed this pass.**
|
||||
|
||||
---
|
||||
|
||||
## Critical Findings
|
||||
|
||||
### 1. the-nexus swarm pileup (again)
|
||||
33 open PRs, 31 from Rockachopa via mimo-v2-pro swarm. These are NOT empty/stale like the April 11 event — they contain real diffs. However:
|
||||
- **Triple duplicate:** PRs #1319, #1322, #1328 all delete `CONTRIBUTORING.md`. Closed #1322 as duplicate.
|
||||
- **4 sibling `app.js` PRs** (#1285, #1307, #1330, #1331) branch from the same commit. Merge sequentially or they'll conflict.
|
||||
- **Queue throttle not deployed yet:** PR #1327 adds `MAX_QUEUE_DEPTH=10` to the dispatcher — the fix for this exact problem. **Merge #1327 first and restart the dispatcher.**
|
||||
|
||||
### 2. CAPTCHA bypass tool in timmy-config #499
|
||||
The multimodal toolsuite PR includes a `captcha_solver.py`. This needs explicit human sign-off — it's a policy decision, not a code decision. Requested changes.
|
||||
|
||||
### 3. the-beacon Gemini bloat
|
||||
PR #76 (merged) added +3,258 lines for two small fixes. Gemini likely rewrote large portions of `game.js`. Also: `game/npc-logic.js` and `scripts/guardrails.js` may be dead code (runtime lives in `js/`). Flagged for audit.
|
||||
|
||||
### 4. Paper PRs need polish (timmy-home)
|
||||
Both papers (#596 Poka-Yoke, #597 Sovereign Fleet) are real work but have specific bugs:
|
||||
- #596: path injection security bug + broken citation
|
||||
- #597: real IPs in public-facing tables + wrong LaTeX style
|
||||
|
||||
---
|
||||
|
||||
## Recommended Merge Order (the-nexus)
|
||||
|
||||
1. **#1327** — Queue throttle (stops the pileup)
|
||||
2. **#1319** — .gitea.yml cleanup
|
||||
3. **#1326** — Multi-user bridge (Timmy, strong)
|
||||
4. **#1330** — GOFAI facts (Timmy, clean)
|
||||
5. **#1285** — Performance gating
|
||||
6. **#1329** — Watchdog fix
|
||||
7. **#1331** — Health HUD
|
||||
8. **#1328** — Portfolio CTA (rebase after #1319)
|
||||
9. Remaining 23 Rockachopa PRs need individual review
|
||||
|
||||
## What's Working Well
|
||||
|
||||
- **Timmy's PR quality is excellent.** Both #1330 and #1326 are targeted, complete, well-structured.
|
||||
- **hermes-agent is clean.** PR #300 (malformed JSON repair, +1 line, saves ~1,400 inference turns) is the best ROI change in the org.
|
||||
- **fleet-ops GOFIA series** (#80, #81, #82) landed with strong test coverage.
|
||||
- **the-beacon** shipped 9 PRs with real game features (emotional arcs, procedural sound, golden ratio economics).
|
||||
|
||||
## What Needs Attention
|
||||
|
||||
- Deploy the queue throttle (#1327) before the next swarm cycle
|
||||
- Audit `the-beacon/game.js` for Gemini-introduced regressions
|
||||
- The remaining 23 unreviewed nexus PRs — continue reviewing if desired
|
||||
- Branch protection still not enabled (waiting on rockachopa per #1253/#1255)
|
||||
|
||||
---
|
||||
|
||||
Reference: perplexity-status-report-2026-04-12-evening
|
||||
@@ -26,7 +26,7 @@ HERMES_CONTEXT = [
|
||||
|
||||
class RelevanceEngine:
|
||||
def __init__(self, collection_name: str = "deep_dive"):
|
||||
self.client = chromadb.PersistentClient(path="./chroma_db")
|
||||
self.client = chromadb.PersistentClient(path="./chroma_db", settings=chromadb.config.Settings(anonymized_telemetry=False))
|
||||
self.embedding_fn = embedding_functions.SentenceTransformerEmbeddingFunction(
|
||||
model_name="all-MiniLM-L6-v2"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ VIOLATION_KEYWORDS = [
|
||||
|
||||
def audit(palace_path: Path):
|
||||
violations = []
|
||||
client = chromadb.PersistentClient(path=str(palace_path))
|
||||
client = chromadb.PersistentClient(path=str(palace_path), settings=chromadb.config.Settings(anonymized_telemetry=False))
|
||||
try:
|
||||
col = client.get_collection("mempalace_drawers")
|
||||
except Exception as e:
|
||||
|
||||
@@ -18,7 +18,7 @@ DOCS_PER_ROOM = 5
|
||||
|
||||
|
||||
def main():
|
||||
client = chromadb.PersistentClient(path=PALACE_PATH)
|
||||
client = chromadb.PersistentClient(path=PALACE_PATH, settings=chromadb.config.Settings(anonymized_telemetry=False))
|
||||
col = client.get_collection("mempalace_drawers")
|
||||
|
||||
# Discover rooms in this wing
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
REPORT_PATH = ROOT / "reviews" / "2026-04-12-forge-wide-qa-pass.md"
|
||||
|
||||
|
||||
def test_forge_wide_qa_pass_report_exists():
|
||||
assert REPORT_PATH.exists(), "missing forge-wide QA pass report artifact"
|
||||
|
||||
|
||||
def test_forge_wide_qa_pass_report_preserves_key_findings():
|
||||
text = REPORT_PATH.read_text(encoding="utf-8")
|
||||
required = [
|
||||
"# Forge-Wide QA Pass — 2026-04-12 Evening",
|
||||
"**Reviewer:** Perplexity",
|
||||
"**Scope:** All 6 Timmy Foundation repos",
|
||||
"## Summary",
|
||||
"the-nexus swarm pileup (again)",
|
||||
"Queue throttle not deployed yet",
|
||||
"CAPTCHA bypass tool in timmy-config #499",
|
||||
"the-beacon Gemini bloat",
|
||||
"Paper PRs need polish (timmy-home)",
|
||||
"## Recommended Merge Order (the-nexus)",
|
||||
"#1327",
|
||||
"Reference: perplexity-status-report-2026-04-12-evening",
|
||||
]
|
||||
for snippet in required:
|
||||
assert snippet in text, f"missing report detail: {snippet}"
|
||||
Reference in New Issue
Block a user