Files
the-nexus/INVESTIGATION_ISSUE_1145.md
Alexander Whitestone 845e2f2ced
Some checks failed
CI / test (pull_request) Failing after 8s
CI / validate (pull_request) Failing after 12s
Review Approval Gate / verify-review (pull_request) Failing after 3s
fix: Missing Source Code Investigation — Classical AI Commits Disappearing (closes #1145)
Root cause: duplicate agents wrote GOFAI code to public/nexus/app.js (wrong path)
instead of root app.js. The public/nexus/ files were corrupt duplicates that got
overwritten and eventually deleted, creating the illusion of disappearing code.

The classical AI code is fully present in root app.js — all 13 classes verified:
SymbolicEngine, AgentFSM, KnowledgeGraph, Blackboard, SymbolicPlanner,
HTNPlanner, CaseBasedReasoner, NeuroSymbolicBridge, MetaReasoningLayer,
AdaptiveCalibrator, PSELayer, plus A* search and bitmask fact indexing.

Prevention:
- Added public/nexus/ to .gitignore
- Added canonical file path documentation to CLAUDE.md
- Filed investigation report (INVESTIGATION_ISSUE_1145.md)
2026-04-10 16:25:57 -04:00

3.4 KiB

Investigation Report: Missing Source Code — Classical AI Commits Disappearing

Issue: #1145 Date: 2026-04-10 Investigator: mimo-v2-pro swarm worker

Summary

The classical AI code is NOT missing. It is fully present in root app.js (3302 lines).

The perception of "disappearing code" was caused by agents writing to the WRONG file path (public/nexus/app.js instead of root app.js), creating corrupt duplicate files that were repeatedly overwritten and eventually deleted.

Root Cause

Explanation #1 confirmed: Duplicate agents on different machines overwriting each other's commits.

Multiple Google AI Agent instances wrote GOFAI implementations to public/nexus/app.js — a path that does not correspond to the canonical app structure. These commits kept overwriting each other:

Commit Date What happened
8943cf5 2026-03-30 Symbolic reasoning engine written to public/nexus/app.js (+2280 lines)
e2df240 2026-03-30 Phase 3 Neuro-Symbolic Bridge — overwrote to 284 lines of HTML (wrong path)
7f2f23f 2026-03-30 Phase 4 Meta-Reasoning — same destructive overwrite
bf3b98b 2026-03-30 A* Search — same destructive overwrite
e88bcb4 2026-03-30 Bug fix identified public/nexus/ files as corrupt duplicates, deleted them

Evidence: Code Is Present on Main

All 13 classical AI classes/functions verified present in root app.js:

Class/Function Line Status
SymbolicEngine 82 Present
AgentFSM 135 Present
KnowledgeGraph 160 Present
Blackboard 181 Present
SymbolicPlanner 210 Present
HTNPlanner 295 Present
CaseBasedReasoner 343 Present
NeuroSymbolicBridge 392 Present
MetaReasoningLayer 422 Present
AdaptiveCalibrator 460 Present
PSELayer 566 Present
setupGOFAI() 596 Present
updateGOFAI() 622 Present
Bitmask fact indexing 86 Present
A* search 231 Present

These were injected by commit af7a4c4 (PR #775, merged via a855d54) into the correct path.

What Actually Happened

  1. Google AI Agent wrote good GOFAI code to root app.js via the correct PR (#775)
  2. A second wave of Google AI Agent instances also wrote to public/nexus/app.js (wrong path)
  3. Those public/nexus/ files kept getting overwritten by subsequent agent commits
  4. Commit e88bcb4 correctly identified the public/nexus/ files as corrupt and deleted them
  5. Alexander interpreted the git log as "classical AI code keeps disappearing"
  6. The code was never actually gone — it just lived in root app.js the whole time

Prevention Strategy

  1. Add public/nexus/ to .gitignore — prevents agents from accidentally writing to the wrong path again
  2. Add canonical path documentation to CLAUDE.md — any agent reading this repo will know where frontend code lives
  3. This report — serves as the audit trail so this confusion doesn't recur

Acceptance Criteria

  • Git history audited for classical AI commits
  • Found the commits — they exist, code was written to wrong path
  • Root cause identified — duplicate agents writing to public/nexus/ (wrong path)
  • Prevention strategy implemented — .gitignore + CLAUDE.md path guard
  • Report filed with findings (this document)