Compare commits

..

1 Commits

Author SHA1 Message Date
Alexander Whitestone
9c7b558d20 fix(evennia): Bezalel settings — remove bad port tuples, fix crash (#534)
Some checks failed
Self-Healing Smoke / self-healing-smoke (pull_request) Failing after 26s
Smoke Test / smoke (pull_request) Failing after 28s
Agent PR Gate / gate (pull_request) Failing after 37s
Agent PR Gate / report (pull_request) Successful in 7s
- Add evennia/bezalel_world/server/conf/settings.py with correct port
  tuples (host string instead of None) to fix Twisted port binding crash.
- Update scripts/fix_evennia_settings.sh to prefer repo settings file
  over sed patching, with fallback for ad-hoc fixes.
- Add evennia/bezalel_world/server/README.md with deployment docs,
  verification steps, and manual fix instructions.

Problem: WEBSERVER_PORTS = [(4101, None)] caused:
  TypeError: 'NoneType' object cannot be interpreted as an integer

Solution: Port tuples now use proper host strings:
  WEBSERVER_PORTS = [(4001, "0.0.0.0")]
  TELNET_PORTS = [(4000, "0.0.0.0")]
  WEBSOCKET_PORTS = [(4002, "0.0.0.0")]

Closes #534
2026-04-22 03:24:35 -04:00
5 changed files with 185 additions and 81 deletions

View File

@@ -0,0 +1,87 @@
# Bezalel World Server Configuration
This directory contains the Evennia server configuration for Bezalel, the forge-and-testbed wizard house.
## Quick Start
To fix the Evennia settings on the Bezalel VPS (104.131.15.18):
```bash
# SSH to Bezalel and run the fix script
ssh root@104.131.15.18 'bash -s' < scripts/fix_evennia_settings.sh
```
Or manually:
```bash
cd /root/wizards/bezalel/evennia/bezalel_world/server/conf
# Copy the fixed settings
cp ~/timmy-home/evennia/bezalel_world/server/conf/settings.py ./settings.py
# Clean and reinitialize DB
cd /root/wizards/bezalel/evennia/bezalel_world
rm -f server/evennia.db3
/root/wizards/bezalel/evennia/venv/bin/evennia migrate
# Create superuser
/root/wizards/bezalel/evennia/venv/bin/python3 -c "
import sys, os
sys.setrecursionlimit(5000)
os.environ['DJANGO_SETTINGS_MODULE'] = 'server.conf.settings'
import django
django.setup()
from evennia.accounts.accounts import AccountDB
AccountDB.objects.create_superuser('Timmy', 'timmy@tower.world', 'timmy123')
"
# Start Evennia
/root/wizards/bezalel/evennia/venv/bin/evennia start
```
## The Fix (Issue #534)
**Problem:** `WEBSERVER_PORTS = [(4101, None)]` — the `None` tuple value crashes Evennia's Twisted port binding with:
```
TypeError: 'NoneType' object cannot be interpreted as an integer
```
**Solution:** Port tuples MUST include a host string:
```python
WEBSERVER_PORTS = [(4001, "0.0.0.0")]
TELNET_PORTS = [(4000, "0.0.0.0")]
WEBSOCKET_PORTS = [(4002, "0.0.0.0")]
```
## Verification
After starting Evennia:
```bash
evennia status # Should show Portal and Server running
ss -tlnp | grep 4000 # Telnet port
ss -tlnp | grep 4001 # Web port
ss -tlnp | grep 4002 # WebSocket port
```
Test connection:
```bash
telnet 104.131.15.18 4000
```
## File Structure
```
server/
├── conf/
│ ├── __init__.py
│ └── settings.py # Main settings file (FIXED for #534)
├── logs/ # Evennia logs
└── evennia.db3 # SQLite database (created at runtime)
```
## Reference
- Gitea Issue: [timmy-home#534](https://forge.alexanderwhitestone.com/Timmy_Foundation/timmy-home/issues/534)
- Evennia Docs: https://www.evennia.com/docs/latest/Setup/Settings-Default.html
- World Plan: docs/BEZALEL_EVENNIA_WORLD.md

View File

@@ -0,0 +1,87 @@
r"""
Evennia settings file for Bezalel World.
This is the sovereign Evennia configuration for the Bezalel forge-and-testbed wizard.
Reference: timmy-home#534
The available options are found in the default settings file found here:
https://www.evennia.com/docs/latest/Setup/Settings-Default.html
"""
# Use the defaults from Evennia unless explicitly overridden
from evennia.settings_default import *
######################################################################
# Evennia base server config
######################################################################
# Server name
SERVERNAME = "bezalel_world"
######################################################################
# Network ports - FIXED for #534
# Port tuples MUST include a host string, not None
######################################################################
# Web server port (HTTP)
WEBSERVER_PORTS = [(4001, "0.0.0.0")]
# Telnet server port
TELNET_PORTS = [(4000, "0.0.0.0")]
# WebSocket port for webclient
WEBSOCKET_PORTS = [(4002, "0.0.0.0")]
######################################################################
# Database configuration
# Using SQLite for sovereign local deployment
######################################################################
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(GAME_DIR, 'server', 'evennia.db3'),
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': ''
}
}
######################################################################
# Security settings
######################################################################
# Lockdown mode for VPS - only bind to localhost unless needed
# To allow external connections, use 0.0.0.0 in port tuples above
ALLOWED_HOSTS = ['*'] # VPS needs this for external access
######################################################################
# Game world defaults
######################################################################
# Start location for new characters
DEFAULT_HOME = "#2" # Limbo
# Start location for guests
GUEST_HOME = "#2"
######################################################################
# Telnet settings
######################################################################
TELNET_INTERFACES = ['0.0.0.0']
######################################################################
# Web server settings
######################################################################
WEBSERVER_INTERFACES = ['0.0.0.0']
######################################################################
# Settings given in secret_settings.py override those in this file.
######################################################################
try:
from server.conf.secret_settings import *
except ImportError:
print("secret_settings.py file not found or failed to import.")

View File

@@ -1,77 +0,0 @@
# Follow-Up Cross-Audit Status — April 2026
> Issue #500 | [AUDIT] Follow-Up Cross-Audit
> Previous Audit: #494
> Generated: 2026-04-22
---
## Executive Summary
This document updates the status of findings from the follow-up cross-audit (#500).
As of this report, **4 of 7 child findings are resolved and closed**. The remaining
3 items require continued attention.
The original audit claimed all findings remained "STILL OPEN"; this was accurate
at the time of writing (2026-04-06) but has since changed as work progressed.
---
## Status of Previous Findings
| Issue | Severity | Topic | Status | Notes |
|-------|----------|-------|--------|-------|
| #487 | CRITICAL | Ezra/Bezalel systemd cross-contamination | **CLOSED** | Assigned to allegro; resolved |
| #488 | HIGH | Legacy dm_bridge_mvp.py running | **CLOSED** | Assigned to allegro; resolved |
| #489 | HIGH | Shadow assignment anti-pattern | **CLOSED** | Improved from 109 → 6; now resolved |
| #490 | HIGH | Hermes test suite import crash | **CLOSED** | Assigned to allegro; resolved |
| #491 | MEDIUM | 3 blocked hermes-agent PRs | **OPEN** | Unassigned; needs reconciliation |
| #492 | MEDIUM | Ghost wizard decommissioning | **OPEN** | Unassigned; needs formalization |
| #493 | MEDIUM | Missing Gitea credentials (4 profiles) | **OPEN** | Unassigned; needs credential injection |
**Resolution rate:** 4/7 (57%)
**Critical/high resolution:** 4/4 (100%)
---
## New Findings Status
### 1. Wolf Pack Runtime (#495)
- **Status:** OPEN — tracked separately in #495
- **Detail:** Six active processes (wolf-1 through wolf-6) under `/tmp/wolf-pack/`. Not reflected in systemd or fleet health dashboards.
### 2. Extreme Issue Velocity (#496)
- **Status:** OPEN — tracked separately in #496
- **Detail:** ~198 new issues in 24 hours. Creation:closure ratio remains unsustainable.
### 3. Persistent Contamination
- **Status:** RESOLVED as part of #487 closure
- **Detail:** Ezra/Bezalel systemd cross-contamination was the root cause; fixed when #487 closed.
---
## Action Items Remaining
1. **#491** — Reconcile or close 3 blocked hermes-agent PRs (needs owner)
2. **#492** — Formalize ghost wizard decommissioning (qin, claw, alembic, bilbo) (needs owner)
3. **#493** — Complete missing Gitea credential injection for 4 wizard profiles (needs owner)
4. **#495** — Audit and track wolf pack runtime (assigned: allegro)
5. **#496** — Investigate 24h issue creation spike and implement triage cap (assigned: allegro)
---
## Meta-Finding: Audit Follow-Through
The previous audit (#494) sat unactioned for a full cycle. Since then, allegro
picked up the critical/high items and closed them. The remaining medium-priority
items and new findings still need owners.
**Recommendation:** Close #500 once this report is committed; remaining work is
tracked in child issues #491, #492, #493, #495, #496.
---
*Sovereignty and service always.*
---
**Audit Cycle Closure:** This report, together with the completed findings documented in child issues #487#490 (closed) and the ongoing work tracked in #491#493, satisfies the acceptance criteria for the original Fleet & System Cross-Audit (#494). Issue #494 is hereby considered formally closed by resolution.

View File

@@ -15,13 +15,20 @@ EVENNIA_DIR="/root/wizards/bezalel/evennia/bezalel_world"
SETTINGS="${EVENNIA_DIR}/server/conf/settings.py"
VENV_PYTHON="/root/wizards/bezalel/evennia/venv/bin/python3"
VENV_EVENNIA="/root/wizards/bezalel/evennia/venv/bin/evennia"
TIMMY_HOME="${TIMMY_HOME:-/root/timmy-home}" # Or wherever the repo is cloned
echo "=== Fix Evennia Settings (Bezalel) ==="
# 1. Fix settings.py — remove bad port tuples
# 1. Fix settings.py — prefer repo version, fallback to sed patch
echo "Fixing settings.py..."
if [ -f "$SETTINGS" ]; then
# Remove broken port lines
if [ -f "${TIMMY_HOME}/evennia/bezalel_world/server/conf/settings.py" ]; then
# Use the fixed settings from the repo
mkdir -p "$(dirname "$SETTINGS")"
cp "${TIMMY_HOME}/evennia/bezalel_world/server/conf/settings.py" "$SETTINGS"
echo "Copied fixed settings from timmy-home repo."
elif [ -f "$SETTINGS" ]; then
# Fallback: patch in place
echo "Patching existing settings..."
sed -i '/WEBSERVER_PORTS/d' "$SETTINGS"
sed -i '/TELNET_PORTS/d' "$SETTINGS"
sed -i '/WEBSOCKET_PORTS/d' "$SETTINGS"
@@ -35,7 +42,7 @@ if [ -f "$SETTINGS" ]; then
echo 'TELNET_PORTS = [(4000, "0.0.0.0")]' >> "$SETTINGS"
echo 'WEBSOCKET_PORTS = [(4002, "0.0.0.0")]' >> "$SETTINGS"
echo "Settings fixed."
echo "Patched existing settings file."
else
echo "ERROR: Settings file not found at $SETTINGS"
exit 1