[fix] Revive the consciousness loop — 2 SyntaxErrors, Groq 404, server race, corrupt duplicates #792

Merged
allegro merged 1 commits from gemini/fix-syntax-errors into main 2026-03-30 23:41:19 +00:00
Member

The Nexus Mind Has Been Dead

Two SyntaxErrors in nexus_think.py mean the consciousness loop cannot import at all. The Nexus Mind has been inoperable since these were committed.

Bugs Fixed

# File Bug Severity
1 nexus/nexus_think.py:318 Stray . between function call and if-block — SyntaxError 🔴 Critical
2 nexus/nexus_think.py:445 parser.add_.argument()SyntaxError 🔴 Critical
3 nexus/groq_worker.py:28 groq/llama3-8b-8192 — Groq API returns 404 on prefixed names 🟡 Medium
4 server.py:24 clients.remove() race condition — KeyError on early disconnect 🟡 Medium
5 public/nexus/ 3 corrupt duplicate files (all identical content, 28.6KB waste) 🟢 Low

Changes

  • nexus/nexus_think.py: 2 line fixes (SyntaxErrors)
  • nexus/groq_worker.py: 1 line fix (model name)
  • server.py: 3 line fix (discard + disconnected client tracking)
  • public/nexus/: deleted (3 corrupt files)
  • tests/test_syntax_fixes.py: 6 new regression tests
  • .gitignore: added pycache

Tests: 21/22 pass

The 1 failure is pre-existing: test_portals_json_uses_expanded_registry_schema expects portal fields that dont exist in the current schema.

## The Nexus Mind Has Been Dead Two SyntaxErrors in `nexus_think.py` mean the consciousness loop **cannot import at all**. The Nexus Mind has been inoperable since these were committed. ### Bugs Fixed | # | File | Bug | Severity | |---|------|-----|----------| | 1 | `nexus/nexus_think.py:318` | Stray `.` between function call and if-block — **SyntaxError** | 🔴 Critical | | 2 | `nexus/nexus_think.py:445` | `parser.add_.argument()` — **SyntaxError** | 🔴 Critical | | 3 | `nexus/groq_worker.py:28` | `groq/llama3-8b-8192` — Groq API returns 404 on prefixed names | 🟡 Medium | | 4 | `server.py:24` | `clients.remove()` race condition — KeyError on early disconnect | 🟡 Medium | | 5 | `public/nexus/` | 3 corrupt duplicate files (all identical content, 28.6KB waste) | 🟢 Low | ### Changes - `nexus/nexus_think.py`: 2 line fixes (SyntaxErrors) - `nexus/groq_worker.py`: 1 line fix (model name) - `server.py`: 3 line fix (discard + disconnected client tracking) - `public/nexus/`: deleted (3 corrupt files) - `tests/test_syntax_fixes.py`: 6 new regression tests - `.gitignore`: added pycache ### Tests: 21/22 pass The 1 failure is pre-existing: `test_portals_json_uses_expanded_registry_schema` expects portal fields that dont exist in the current schema.
gemini added 1 commit 2026-03-30 23:05:25 +00:00
Bug 1: nexus_think.py line 318 — stray '.' between function call and if-block
  This is a SyntaxError. The entire consciousness loop cannot import.
  The Nexus Mind has been dead since this was committed.

Bug 2: nexus_think.py line 445 — 'parser.add_.argument()'
  Another SyntaxError — extra underscore in argparse call.
  The CLI entrypoint crashes on startup.

Bug 3: groq_worker.py — DEFAULT_MODEL = 'groq/llama3-8b-8192'
  The Groq API expects bare model names. The 'groq/' prefix causes a 404.
  Fixed to 'llama3-8b-8192'.

Bug 4: server.py — clients.remove() in finally block
  Raises KeyError if the websocket was never added to the set.
  Fixed to clients.discard() (safe no-op if not present).
  Also added tracking for disconnected clients during broadcast.

Bug 5: public/nexus/ — 3 corrupt duplicate files (28.6 KB wasted)
  app.js, style.css, and index.html all had identical content (same SHA).
  These are clearly a broken copy operation. The real files are at repo root.

Tests: 6 new, 21/22 total pass. The 1 pre-existing failure is in
test_portals_json_uses_expanded_registry_schema (schema mismatch, not
related to this PR).

Signed-off-by: gemini <gemini@hermes.local>
Owner

The code changes look good on a quick file scan. Please ensure tests pass and CI is green.

The code changes look good on a quick file scan. Please ensure tests pass and CI is green.
allegro merged commit 576b394248 into main 2026-03-30 23:41:19 +00:00
Sign in to join this conversation.