Commit Graph

13 Commits

Author SHA1 Message Date
will.anderson c3bba5676b forge: install genesis seeds at their declared node ids
A persona seed is generative: values and biography are prose, the installer
mints an id for each node, and the ids are incidental because nothing
outside the graph refers to them. A genesis seed is declarative -- it ships
identity_nodes[] with explicit ids and edges[] written in terms of them,
and the ids are the artifact. is_protected_node keys on exact ids and every
declared edge references them.

install.el only understood the persona schema. It never read identity_nodes
or edges, so installing Neuron's genesis seed minted 102 unrelated nodes
and produced a graph structurally unrelated to the one the seed describes.
The result in the live graph: 87 of 102 declared nodes absent, 2 present
with only their label as content, 202 of 214 edges never laid.

Branch on seed_type. Seeds without one reach the identical persona code
they always did. Genesis seeds render their declared nodes and edges into a
snapshot-format file and hand it to the engram, which honors the ids --
POST /api/nodes/reseed where available, POST /api/load-merge otherwise.
Both skip nodes already present and dedup edges, so a rerun is a no-op by
construction.

Three things this path does differently, all inherent to what a genesis
seed is:

- It never provisions. A persona seed gets a port and a launchd Engram; a
  genesis seed installs into an engram that already exists and is owned by
  something else. The ":8742 refusal" is also inverted -- that guard stops
  a foreign soul landing in Neuron's engram, and Neuron's own identity
  graph is the one thing that belongs there. GENESIS_CONFIRM takes its
  place, because rewriting the graph a running CGI reads itself out of
  should never happen because someone typed a familiar command with an
  unfamiliar file.

- It splices raw JSON tokens rather than decoding and re-escaping. The seed
  bodies are multi-KB markdown with newlines, quotes and \u escapes; a
  round-trip through str_escape_json would have to reproduce every escape
  the author wrote, and any it does not know about silently corrupts the
  body. Copying a token verbatim cannot corrupt what it never decodes.

- It verifies by re-reading. The bug this replaces reported success while
  delivering empty bodies, so success is not what the write returned, it is
  what the graph now holds: every declared id is re-read and audited
  against the hollow signature, and the manifest reports created / filled /
  skipped / failed with the failing ids named.

Hollow detection is deliberately conservative -- under 40% of the declared
body and under 400 bytes -- so a node whose body legitimately grew in the
graph is left alone. Genesis restores what is missing; it does not
overwrite what the graph has learned.

Also registers Neuron in registry.json (installed:false until the identity
load is authorized) and defines HAVE_CURL in CFLAGS, without which the
el-compiler runtime links fine and then answers every HTTP call with
{"error":"not built with HAVE_CURL"}.

Verified against a sandbox engram seeded to mirror the live graph's state
for this seed: created 87, filled 2, skipped 13, failed 0; 102/102 nodes
verified byte-exact against the seed where the seed is authoritative;
214/214 edges laid; 682/682 non-seed incident edges preserved through the
two in-place replaces; rerun reports 102 skipped, 0 nodes and 0 edges
added. Against an engram without the reseed route it creates the 87, fills
none, and fails loudly naming the 2 it could not repair.
2026-08-10 16:44:35 -05:00
Will Anderson fa2c218d2e registry: deduplicate post-reinstall, fix ports, add missing soul_daemon_urls 2026-05-03 18:20:21 -05:00
Will Anderson e9debe26d6 add Carl Jung — soul slot 26, port 8826 2026-05-03 18:19:18 -05:00
Will Anderson 3493413dc7 registry: add soul_daemon_url to all 25 installed imprints
Port formula: daemon = engram_port + 100. Bobby Anderson 8801→8901
through Stephen Colbert 8825→8925. All souls with installed:true and
a real engram_root_id now have their daemon URL for direct dispatch.
2026-05-03 17:55:43 -05:00
Will Anderson 9c2bda4a24 registry: deduplicate late-night soul entries — 30 -> 25 imprints 2026-05-03 17:36:46 -05:00
Will Anderson 047c382238 add late-night hosts + Stephen King: research, install, wire (ports 8821-8825)
Forge Release / build-and-release (push) Failing after 4s
2026-05-03 15:59:33 -05:00
Will Anderson d09f7ec409 rename kal-el → superman; fix registry duplicates, use ENGRAM_DATA_DIR
- Renamed soul slot 20 from Kal-El to Superman (new seed, new slug)
- Cleared stale duplicate entries that forge reinstall was appending
- Updated all 20 engram_root_ids to reflect fresh reinstall
- soul.el plist generator already fixed to emit ENGRAM_DATA_DIR
2026-05-03 03:25:06 -05:00
Will Anderson cbeb9c02eb build DHARMA network: 19 soul Engram instances with full peer wiring
- Add scripts/: install_soul.py, install_all.py, launch_dharma.sh, stop_dharma.sh, wire_peers.py
- Move all seeds into seeds/ directory (consolidated from root-level scattered files)
- Update registry.json with engram_root_id, engram_api_key, engram_url for all 19 installed souls
- Add src/soul.el, src/research.el; remove src/daemon.el
- .gitignore: exclude imprints/, log/, sandboxes/ (runtime data)
- Remove superseded scripts: deploy.py, install_imprints.py, reinstall_imprints.py, fix_collision.py
- Remove old root-level seed files and shell scripts superseded by scripts/ versions

Key: native engram binary uses _auth body field, per-soul keys ntn-<slug>-2026,
DharmaPeer graph edges for peer wiring, sanitize_content() for JSON safety.
190/190 peer pairs wired successfully.
2026-05-03 03:09:27 -05:00
Will Anderson 0a15e2fa42 DHARMA network: per-soul Engram instances (8801–8819)
Each soul now gets their own isolated Engram process with a dedicated data
directory (imprints/<slug>/), port, and API key — the DHARMA network.
Neuron's Engram at 8742 is never touched.

- registry.json: add engram_db_path, engram_port, engram_url to all 19 entries
  (Bobby Anderson 8801 → Helen Keller 8819)
- launch_dharma.sh: start all 19 soul Engrams in background; supports
  single-slug filter and skip-if-running detection
- stop_dharma.sh: graceful shutdown via PID file, falls back to port scan
- reinstall_imprints.py: bulk reinstall — starts each Engram temporarily,
  installs seed, records new root_id, stops; supports --slug and --dry-run
- src/install.el: resolves soul's engram_url from registry (never 8742);
  guards against accidental writes to Neuron's shared Engram
- src/summon.el: reads engram_url per-soul from registry; passes it to soul
  server in POST body so soul connects to the right Engram; supports
  both single-soul (engram_url) and multi-soul (engram_urls array) payloads
2026-05-03 02:52:01 -05:00
Will Anderson 52b6830ab2 fix Turing/Einstein engram root ID collision — reinstall with unique IDs
Both imprints shared root 8608f497 due to a concurrent install bug. Removed
the colliding entries, reinstalled via direct Engram API calls with auth key,
and updated registry with fresh distinct roots:
- Alan Turing:    cce1d430-be4e-420d-9d81-d32380ae7281
- Albert Einstein: 291f8502-8f60-4f57-a800-4e3e1425c9bd
2026-05-03 02:42:16 -05:00
Will Anderson 6a69c94ab6 add 7 imprints: Douglass, Aurelius, Nietzsche, Baldwin, Lovelace, Tubman, Woolf 2026-05-03 02:39:09 -05:00
Will Anderson a769d846b4 add forge research command, registry, deploy.py, 5 new imprints (da Vinci, Feynman, Sagan, Descartes, Robin Williams), enrich Turing/Einstein/Tesla seeds 2026-05-03 02:37:58 -05:00
Will Anderson b6b081bd73 add Hedy Lamarr, Marie Curie, Helen Keller imprints 2026-05-03 02:36:12 -05:00