Compare commits

..

1 Commits

Author SHA1 Message Date
Timmy
25dd988cc7 fix: #681
Some checks failed
Smoke Test / smoke (pull_request) Failing after 23s
2026-04-15 00:56:11 -04:00
22 changed files with 549 additions and 1611 deletions

View File

@@ -1,61 +0,0 @@
# Know Thy Father — Multimodal Media Consumption Pipeline
Refs #582
This document makes the epic operational by naming the current source-of-truth scripts, their handoff artifacts, and the one-command runner that coordinates them.
## Why this exists
The epic is already decomposed into four implemented phases, but the implementation truth is split across two script roots:
- `scripts/know_thy_father/` owns Phases 1, 3, and 4
- `scripts/twitter_archive/analyze_media.py` owns Phase 2
- `twitter-archive/know-thy-father/tracker.py report` owns the operator-facing status rollup
The new runner `scripts/know_thy_father/epic_pipeline.py` does not replace those scripts. It stitches them together into one explicit, reviewable plan.
## Phase map
| Phase | Script | Primary output |
|-------|--------|----------------|
| 1. Media Indexing | `scripts/know_thy_father/index_media.py` | `twitter-archive/know-thy-father/media_manifest.jsonl` |
| 2. Multimodal Analysis | `scripts/twitter_archive/analyze_media.py --batch 10` | `twitter-archive/know-thy-father/analysis.jsonl` + `meaning-kernels.jsonl` + `pipeline-status.json` |
| 3. Holographic Synthesis | `scripts/know_thy_father/synthesize_kernels.py` | `twitter-archive/knowledge/fathers_ledger.jsonl` |
| 4. Cross-Reference Audit | `scripts/know_thy_father/crossref_audit.py` | `twitter-archive/notes/crossref_report.md` |
| 5. Processing Log | `twitter-archive/know-thy-father/tracker.py report` | `twitter-archive/know-thy-father/REPORT.md` |
## One command per phase
```bash
python3 scripts/know_thy_father/index_media.py --tweets twitter-archive/extracted/tweets.jsonl --output twitter-archive/know-thy-father/media_manifest.jsonl
python3 scripts/twitter_archive/analyze_media.py --batch 10
python3 scripts/know_thy_father/synthesize_kernels.py --input twitter-archive/media/manifest.jsonl --output twitter-archive/knowledge/fathers_ledger.jsonl --summary twitter-archive/knowledge/fathers_ledger.summary.json
python3 scripts/know_thy_father/crossref_audit.py --soul SOUL.md --kernels twitter-archive/notes/know_thy_father_crossref.md --output twitter-archive/notes/crossref_report.md
python3 twitter-archive/know-thy-father/tracker.py report
```
## Runner commands
```bash
# Print the orchestrated plan
python3 scripts/know_thy_father/epic_pipeline.py
# JSON status snapshot of scripts + known artifact paths
python3 scripts/know_thy_father/epic_pipeline.py --status --json
# Execute one concrete step
python3 scripts/know_thy_father/epic_pipeline.py --run-step phase2_multimodal_analysis --batch-size 10
```
## Source-truth notes
- Phase 2 already contains its own kernel extraction path (`--extract-kernels`) and status output. The epic runner does not reimplement that logic.
- Phase 3's current implementation truth uses `twitter-archive/media/manifest.jsonl` as its default input. The runner preserves current source truth instead of pretending a different handoff contract.
- The processing log in `twitter-archive/know-thy-father/PROCESSING_LOG.md` can drift from current code reality. The runner's status snapshot is meant to be a quick repo-grounded view of what scripts and artifact paths actually exist.
## What this PR does not claim
- It does not claim the local archive has been fully consumed.
- It does not claim the halted processing log has been resumed.
- It does not claim fact_store ingestion has been fully wired end-to-end.
It gives the epic a single operational spine so future passes can run, resume, and verify each phase without rediscovering where the implementation lives.

View File

@@ -1,92 +0,0 @@
# MemPalace v3.0.0 — Ezra Integration Packet
This packet turns issue #570 into an executable, reviewable integration plan for Ezra's Hermes home.
It is a repo-side scaffold: no live Ezra host changes are claimed in this artifact.
## Commands
```bash
pip install mempalace==3.0.0
mempalace init ~/.hermes/ --yes
cat > ~/.hermes/mempalace.yaml <<'YAML'
wing: ezra_home
palace: ~/.mempalace/palace
rooms:
- name: sessions
description: Conversation history and durable agent transcripts
globs:
- "*.json"
- "*.jsonl"
- name: config
description: Hermes configuration and runtime settings
globs:
- "*.yaml"
- "*.yml"
- "*.toml"
- name: docs
description: Notes, markdown docs, and operating reports
globs:
- "*.md"
- "*.txt"
people: []
projects: []
YAML
echo "" | mempalace mine ~/.hermes/
echo "" | mempalace mine ~/.hermes/sessions/ --mode convos
mempalace search "your common queries"
mempalace wake-up
hermes mcp add mempalace -- python -m mempalace.mcp_server
```
## Manual config template
```yaml
wing: ezra_home
palace: ~/.mempalace/palace
rooms:
- name: sessions
description: Conversation history and durable agent transcripts
globs:
- "*.json"
- "*.jsonl"
- name: config
description: Hermes configuration and runtime settings
globs:
- "*.yaml"
- "*.yml"
- "*.toml"
- name: docs
description: Notes, markdown docs, and operating reports
globs:
- "*.md"
- "*.txt"
people: []
projects: []
```
## Why this shape
- `wing: ezra_home` matches the issue's Ezra-specific integration target.
- `rooms` split the mined material into sessions, config, and docs to keep retrieval interpretable.
- Mining commands pipe empty stdin to avoid the interactive entity-detector hang noted in the evaluation.
## Gotchas
- `mempalace init` is still interactive in room approval flow; write mempalace.yaml manually if the init output stalls.
- The yaml key is `wing:` not `wings:`. Using the wrong key causes mine/setup failures.
- Pipe empty stdin into mining commands (`echo "" | ...`) to avoid the entity-detector stdin hang on larger directories.
- First mine downloads the ChromaDB embedding model cache (~79MB).
- Report Ezra's before/after metrics back to issue #568 after live installation and retrieval tests.
## Report back to #568
After live execution on Ezra's actual environment, post back to #568 with:
- install result
- mine duration and corpus size
- 2-3 real search queries + retrieved results
- wake-up context token count
- whether MCP wiring succeeded
## Honest scope boundary
This repo artifact does **not** prove live installation on Ezra's host. It makes the work reproducible and testable so the next pass can execute it without guesswork.

View File

@@ -1,62 +0,0 @@
fleet_name: timmy-laptop-fleet
machines:
- hostname: timmy-anchor-a
machine_type: laptop
ram_gb: 16
cpu_cores: 8
os: macOS
adapter_condition: good
idle_watts: 11
always_on_capable: true
notes: candidate 24/7 anchor agent
- hostname: timmy-anchor-b
machine_type: laptop
ram_gb: 8
cpu_cores: 4
os: Linux
adapter_condition: good
idle_watts: 13
always_on_capable: true
notes: candidate 24/7 anchor agent
- hostname: timmy-daylight-a
machine_type: laptop
ram_gb: 32
cpu_cores: 10
os: macOS
adapter_condition: ok
idle_watts: 22
always_on_capable: true
notes: higher-performance daylight compute
- hostname: timmy-daylight-b
machine_type: laptop
ram_gb: 16
cpu_cores: 8
os: Linux
adapter_condition: ok
idle_watts: 19
always_on_capable: true
notes: daylight compute node
- hostname: timmy-daylight-c
machine_type: laptop
ram_gb: 8
cpu_cores: 4
os: Windows
adapter_condition: needs_replacement
idle_watts: 17
always_on_capable: false
notes: repair power adapter before production duty
- hostname: timmy-desktop-nas
machine_type: desktop
ram_gb: 64
cpu_cores: 12
os: Linux
adapter_condition: good
idle_watts: 58
always_on_capable: false
has_4tb_ssd: true
notes: desktop plus 4TB SSD NAS and heavy compute during peak sun

View File

@@ -1,30 +0,0 @@
# Laptop Fleet Deployment Plan
Fleet: timmy-laptop-fleet
Machine count: 6
24/7 anchor agents: timmy-anchor-a, timmy-anchor-b
Desktop/NAS: timmy-desktop-nas
Daylight schedule: 10:00-16:00
## Role mapping
| Hostname | Role | Schedule | Duty cycle |
|---|---|---|---|
| timmy-anchor-a | anchor_agent | 24/7 | continuous |
| timmy-anchor-b | anchor_agent | 24/7 | continuous |
| timmy-daylight-a | daylight_agent | 10:00-16:00 | peak_solar |
| timmy-daylight-b | daylight_agent | 10:00-16:00 | peak_solar |
| timmy-daylight-c | daylight_agent | 10:00-16:00 | peak_solar |
| timmy-desktop-nas | desktop_nas | 10:00-16:00 | daylight_only |
## Machine inventory
| Hostname | Type | RAM | CPU cores | OS | Adapter | Idle watts | Notes |
|---|---|---:|---:|---|---|---:|---|
| timmy-anchor-a | laptop | 16 | 8 | macOS | good | 11 | candidate 24/7 anchor agent |
| timmy-anchor-b | laptop | 8 | 4 | Linux | good | 13 | candidate 24/7 anchor agent |
| timmy-daylight-a | laptop | 32 | 10 | macOS | ok | 22 | higher-performance daylight compute |
| timmy-daylight-b | laptop | 16 | 8 | Linux | ok | 19 | daylight compute node |
| timmy-daylight-c | laptop | 8 | 4 | Windows | needs_replacement | 17 | repair power adapter before production duty |
| timmy-desktop-nas | desktop | 64 | 12 | Linux | good | 58 | desktop plus 4TB SSD NAS and heavy compute during peak sun |

View File

@@ -1,37 +0,0 @@
# NH Broadband Install Packet
**Packet ID:** nh-bb-20260415-113232
**Generated:** 2026-04-15T11:32:32.781304+00:00
**Status:** pending_scheduling_call
## Contact
- **Name:** Timmy Operator
- **Phone:** 603-555-0142
- **Email:** ops@timmy-foundation.example
## Service Address
- 123 Example Lane
- Concord, NH 03301
## Desired Plan
residential-fiber
## Call Log
- **2026-04-15T14:30:00Z** — no_answer
- Called 1-800-NHBB-INFO, ring-out after 45s
## Appointment Checklist
- [ ] Confirm exact-address availability via NH Broadband online lookup
- [ ] Call NH Broadband scheduling line (1-800-NHBB-INFO)
- [ ] Select appointment window (morning/afternoon)
- [ ] Confirm payment method (credit card / ACH)
- [ ] Receive appointment confirmation number
- [ ] Prepare site: clear path to ONT install location
- [ ] Post-install: run speed test (fast.com / speedtest.net)
- [ ] Log final speeds and appointment outcome

View File

@@ -1,27 +0,0 @@
contact:
name: Timmy Operator
phone: "603-555-0142"
email: ops@timmy-foundation.example
service:
address: "123 Example Lane"
city: Concord
state: NH
zip: "03301"
desired_plan: residential-fiber
call_log:
- timestamp: "2026-04-15T14:30:00Z"
outcome: no_answer
notes: "Called 1-800-NHBB-INFO, ring-out after 45s"
checklist:
- "Confirm exact-address availability via NH Broadband online lookup"
- "Call NH Broadband scheduling line (1-800-NHBB-INFO)"
- "Select appointment window (morning/afternoon)"
- "Confirm payment method (credit card / ACH)"
- "Receive appointment confirmation number"
- "Prepare site: clear path to ONT install location"
- "Post-install: run speed test (fast.com / speedtest.net)"
- "Log final speeds and appointment outcome"

View File

@@ -0,0 +1,476 @@
# GENOME.md: burn-fleet
**Generated:** 2026-04-15
**Repo:** Timmy_Foundation/burn-fleet
**Purpose:** Laned tmux dispatcher for sovereign burn operations across Mac and Allegro
**Analyzed commit:** `2d4d9ab`
**Size:** 5 top-level source/config files + README | 985 total lines (`fleet-dispatch.py` 320, `fleet-christen.py` 205, `fleet-status.py` 143, `fleet-launch.sh` 126, `fleet-spec.json` 98, `README.md` 93)
---
## Project Overview
`burn-fleet` is a compact control-plane repo for the Hundred-Pane Fleet.
Its job is not model inference itself. Its job is to shape where inference runs, which panes wake up, which repos route to which windows, and how work is fanned out across Mac and VPS workers.
The repo turns a narrative naming scheme into executable infrastructure:
- Mac runs the local session (`BURN`) with windows like `CRUCIBLE`, `GNOMES`, `LOOM`, `FOUNDRY`, `WARD`, `COUNCIL`
- Allegro runs a remote session (`BURN`) with windows like `FORGE`, `ANVIL`, `CRUCIBLE-2`, `SENTINEL`
- `fleet-spec.json` is the single source of truth for pane counts, lanes, sublanes, glyphs, and names
- `fleet-launch.sh` materializes the tmux topology
- `fleet-christen.py` boots `hermes chat --yolo` in each pane and pushes identity prompts
- `fleet-dispatch.py` consumes Gitea issues, maps repos to windows through `MAC_ROUTE` and `ALLEGRO_ROUTE`, and sends `/queue` work into the right panes
- `fleet-status.py` inspects pane output and reports fleet health
The repo is small, but it sits on a high-blast-radius operational seam:
- it controls 100+ panes
- it writes to live tmux sessions
- it comments on live Gitea issues
- it depends on SSH reachability to the VPS
- it is effectively a narrative infrastructure orchestrator
This means the right way to read it is as a dispatch kernel, not just a set of scripts.
---
## Architecture
```mermaid
graph TD
A[fleet-spec.json] --> B[fleet-launch.sh]
A --> C[fleet-christen.py]
A --> D[fleet-dispatch.py]
A --> E[fleet-status.py]
B --> F[tmux session BURN on Mac]
B --> G[tmux session BURN on Allegro over SSH]
C --> F
C --> G
C --> H[hermes chat --yolo in every pane]
H --> I[identity + lane prompt]
J[Gitea issues on forge.alexanderwhitestone.com] --> D
D --> K[MAC_ROUTE]
D --> L[ALLEGRO_ROUTE]
D --> M[/queue prompt generation]
M --> F
M --> G
D --> N[comment_on_issue]
N --> J
D --> O[dispatch-state.json]
E --> F
E --> G
E --> P[get_pane_status]
P --> Q[fleet health summary]
```
### Structural reading
The repo has one real architecture pattern:
1. declarative topology in `fleet-spec.json`
2. imperative realization scripts that consume that topology
3. runtime state in `dispatch-state.json`
4. external side effects in tmux, SSH, and Gitea
That makes `fleet-spec.json` the nucleus and the four scripts adapters around it.
---
## Entry Points
| Entry point | Type | Role |
|-------------|------|------|
| `fleet-launch.sh [mac|allegro|both]` | Shell CLI | Creates tmux sessions and pane layouts from `fleet-spec.json` |
| `python3 fleet-christen.py [mac|allegro|both]` | Python CLI | Starts Hermes workers and injects identity/lane prompts |
| `python3 fleet-dispatch.py [--cycles N] [--interval S] [--machine mac|allegro|both]` | Python CLI | Pulls open Gitea issues, routes them, comments on issues, persists `dispatch-state.json` |
| `python3 fleet-status.py [--machine mac|allegro|both]` | Python CLI | Samples pane output and reports working/idle/error/dead state |
| `README.md` quick start | Human runbook | Documents the intended operator flow from launch to christening to dispatch to status |
### Hidden operational entry points
These are not CLI entry points, but they matter for behavior:
- `MAC_ROUTE` in `fleet-dispatch.py`
- `ALLEGRO_ROUTE` in `fleet-dispatch.py`
- `SKIP_LABELS` and `INACTIVE` filtering in `fleet-dispatch.py`
- `send_to_pane()` as the effectful dispatch primitive
- `comment_on_issue()` as the visible acknowledgement primitive
- `get_pane_status()` in `fleet-status.py` as the fleet health classifier
---
## Data Flow
### 1. Topology creation
`fleet-launch.sh` reads `fleet-spec.json`, parses each window's pane count, and creates the tmux layout.
Flow:
- load spec file path from `SCRIPT_DIR/fleet-spec.json`
- parse `machines.mac.windows` or `machines.allegro.windows`
- create `BURN` session locally or remotely
- create first window, then split panes, then create remaining windows
- continuously tile after splits
This script is layout-only. It does not launch Hermes.
### 2. Agent wake-up / identity seeding
`fleet-christen.py` reads the same `fleet-spec.json` and sends `hermes chat --yolo` into each pane.
After a fixed wait window, it sends a second `/queue` identity message containing:
- glyph
- pane name
- machine name
- window name
- pane number
- sublane
- sovereign operating instructions
That identity message is the bridge from infrastructure to narrative.
The worker is not just launched; it is assigned a mythic/operator identity with a lane.
### 3. Issue harvest and lane dispatch
`fleet-dispatch.py` is the center of the runtime.
Flow:
- load `fleet-spec.json`
- load `dispatch-state.json`
- load Gitea token
- fetch open issues per repo with `requests`
- filter PRs, meta labels, and previously dispatched issues
- build a candidate pool per machine/window
- assign issues pane-by-pane
- call `send_to_pane()` to inject `/queue ...`
- call `comment_on_issue()` to leave a visible burn dispatch comment
- persist the issue assignment into `dispatch-state.json`
Important: the data flow is not issue -> worker directly.
It is:
issue -> repo route table -> window -> pane -> `/queue` prompt -> worker.
### 4. Health sampling
`fleet-status.py` runs the inverse direction.
It samples pane output through `tmux capture-pane` locally or over SSH and classifies the last visible signal as:
- `working`
- `idle`
- `error`
- `dead`
It then summarizes by window, machine, and global fleet totals.
### 5. Runtime state persistence
`dispatch-state.json` is not checked in, but it is the only persistent memory of what the dispatcher already assigned.
That means the runtime depends on a local mutable file rather than a centralized dispatch ledger.
---
## Key Abstractions
### 1. `fleet-spec.json`
This is the primary abstraction in the repo.
It encodes:
- machine identity (`mac`, `allegro`)
- host / SSH details
- hardware metadata (`cores`, `ram_gb`)
- tmux session names
- default model/provider metadata
- windows with `panes`, `lane`, `sublanes`, `glyphs`, `names`
Everything else in the repo interprets this document.
If the spec drifts from the route tables or runtime assumptions, the fleet silently degrades.
### 2. Route tables: `MAC_ROUTE` and `ALLEGRO_ROUTE`
These tables are the repo's second control nucleus.
They map repo names to windows.
This is how `timmy-home`, `the-nexus`, `the-door`, `fleet-ops`, and `the-beacon` land in different operational lanes.
This split means routing logic is duplicated:
- once in the topology spec
- once in Python route dictionaries
That duplication is one of the most important maintainability risks in the repo.
### 3. Pane effect primitive: `send_to_pane()`
`send_to_pane()` is the real actuator.
It turns a dispatch decision into a tmux `send-keys` side effect.
It handles both:
- local tmux injection
- remote SSH + tmux injection
Everything operationally dangerous funnels through this function.
It is therefore a critical path even though the repo has no tests around it.
### 4. Issue acknowledgement primitive: `comment_on_issue()`
This is the repo's social trace primitive.
It posts a burn dispatch comment back to the issue so humans can see that the fleet claimed it.
This is the visible heartbeat of autonomous dispatch.
### 5. Runtime memory: `dispatch-state.json`
This file is the anti-duplication ledger for dispatch cycles.
Without it, the dispatcher would keep recycling the same issues every pass.
Because it is local-file state instead of centralized state, machine locality matters.
### 6. Health classifier: `get_pane_status()`
`fleet-status.py` does not know the true worker state.
It infers state from captured pane output using string heuristics.
So `get_pane_status()` is effectively a lightweight log classifier.
Its correctness depends on fragile output pattern matching.
---
## API Surface
The repo exposes CLI-level APIs rather than import-oriented libraries.
### Shell API
`fleet-launch.sh`
- `./fleet-launch.sh mac`
- `./fleet-launch.sh allegro`
- `./fleet-launch.sh both`
### Python CLIs
`fleet-christen.py`
- `python3 fleet-christen.py mac`
- `python3 fleet-christen.py allegro`
- `python3 fleet-christen.py both`
`fleet-dispatch.py`
- `python3 fleet-dispatch.py`
- `python3 fleet-dispatch.py --cycles 10 --interval 60`
- `python3 fleet-dispatch.py --machine mac`
`fleet-status.py`
- `python3 fleet-status.py`
- `python3 fleet-status.py --machine allegro`
### Internal function surface worth naming explicitly
`fleet-launch.sh`
- `parse_spec()`
- `launch_local()`
- `launch_remote()`
`fleet-christen.py`
- `send_keys()`
- `christen_window()`
- `christen_machine()`
- `christen_remote()`
`fleet-dispatch.py`
- `load_token()`
- `load_spec()`
- `load_state()`
- `save_state()`
- `get_issues()`
- `send_to_pane()`
- `comment_on_issue()`
- `build_prompt()`
- `dispatch_cycle()`
- `dispatch_council()`
`fleet-status.py`
- `get_pane_status()`
- `check_machine()`
These are the true API surface for future hardening and testing.
---
## Test Coverage Gaps
### Current state
Grounded from the pipeline dry run on `/tmp/burn-fleet-genome`:
- 0% estimated coverage
- untested modules called out by pipeline: `fleet-christen`, `fleet-dispatch`, `fleet-status`
- no checked-in automated test suite
### Critical paths with no tests
1. `send_to_pane()`
- local tmux command construction
- remote SSH command construction
- escaping of issue titles and prompts
- failure handling when tmux or SSH fails
2. `comment_on_issue()`
- verifies Gitea comment formatting
- verifies non-200 responses do not silently disappear
3. `get_issues()`
- PR filtering
- `SKIP_LABELS` filtering
- title-based meta filtering
- robustness when Gitea returns malformed or partial issue objects
4. `dispatch_cycle()`
- correct pooling by window
- deduplication via `dispatch-state.json`
- pane recycling behavior
- correctness when one repo has zero issues and another has many
5. `get_pane_status()`
- classification heuristics for working/idle/error/dead
- false positives from incidental strings like `error` in normal output
6. `fleet-launch.sh`
- parse correctness for pane counts
- layout creation behavior across first vs later windows
- remote script generation for Allegro
### Missing tests to generate next in the real target repo
If the goal is to harden `burn-fleet` itself, the first tests to add should be:
- `test_route_tables_cover_spec_windows`
- `test_send_to_pane_escapes_single_quotes_and_special_chars`
- `test_comment_on_issue_formats_machine_window_pane_body`
- `test_get_issues_skips_prs_and_meta_labels`
- `test_dispatch_cycle_persists_dispatch_state_once`
- `test_get_pane_status_classifies_spinner_vs_traceback_vs_empty`
These are the minimum critical-path tests.
---
## Security Considerations
### 1. Command injection surface
`send_to_pane()` and the remote tmux/SSH command assembly are the biggest security surface.
Even though single quotes are escaped in prompts, this remains a command injection boundary because untrusted issue titles and repo metadata cross into shell commands.
This is why `command injection` is the right risk label for the repo.
The risk is not hypothetical; the repo is literally translating issue text into shell transport.
### 2. Credential handling
The dispatcher uses a local token file for Gitea authentication.
That is a credential handling concern because:
- token locality is assumed
- file path and host assumptions are embedded into runtime code
- there is no retry / fallback / explicit missing-token UX beyond failure
### 3. SSH trust boundary
Remote pane control over `root@167.99.126.228` means the repo assumes a trusted SSH path to a root shell.
That is operationally powerful and dangerous.
A malformed remote command, stale known_hosts state, or wrong host mapping has fleet-wide consequences.
### 4. Runtime state tampering
`dispatch-state.json` is a local mutable state file with no locking, signing, or cross-machine reconciliation.
If it is corrupted or lost, deduplication semantics fail.
That can cause repeated dispatches or misleading status.
### 5. Live-forge mutation
`comment_on_issue()` mutates live issue threads on every dispatch cycle.
That means any bug in deduplication or routing will create visible comment spam on the forge.
### 6. Dependency risk
The repo depends on `requests` for Gitea API access but has no pinned dependency metadata or environment contract in-repo.
This is a small operational repo, but reproducibility is weak.
---
## Dependency Picture
### Runtime dependencies
- Python 3
- `requests`
- tmux
- SSH client
- ssh trust boundary to `root@167.99.126.228`
- access to a Gitea token file
### Implied environment dependencies
- active tmux sessions on Mac and Allegro
- SSH trust / connectivity to the VPS
- hermes available in pane environments
- Gitea reachable at `https://forge.alexanderwhitestone.com`
### Notably missing
- no `requirements.txt`
- no `pyproject.toml`
- no explicit test harness
- no schema validation for `fleet-spec.json`
---
## Performance Characteristics
For such a small repo, the performance question is not CPU time inside Python.
It is orchestration fan-out latency.
The main scaling costs are:
- repeated Gitea issue fetches across repos
- SSH round-trips to Allegro
- tmux pane fan-out across 100+ panes
- serialized `time.sleep(0.2)` dispatch staggering
This means the bottleneck is control-plane coordination, not computation.
The repo will scale until SSH / tmux / Gitea latency become dominant.
---
## Dead Code / Drift Risks
### 1. Spec vs route duplication
`fleet-spec.json` defines windows and lanes, while `fleet-dispatch.py` separately defines `MAC_ROUTE` and `ALLEGRO_ROUTE`.
That is the biggest drift risk.
A window can exist in the spec and be missing from a route table, or vice versa.
### 2. Runtime-generated files absent from repo contracts
`dispatch-state.json` is operationally critical but not described as a first-class contract in code.
The repo assumes it exists or can be created, but does not validate structure.
### 3. README drift risk
The README says "use fleet-christen.sh" in one place while the actual file is `fleet-christen.py`.
That is a small but real operator-footgun and a sign the human runbook can drift from the executable surface.
---
## Suggested Follow-up Work
1. Move repo-to-window routing into `fleet-spec.json` and derive `MAC_ROUTE` / `ALLEGRO_ROUTE` programmatically.
2. Add automated tests for `send_to_pane`, `get_issues`, `dispatch_cycle`, and `get_pane_status`.
3. Add a schema validator for `fleet-spec.json`.
4. Add explicit dependency metadata (`requirements.txt` or `pyproject.toml`).
5. Add dry-run / no-side-effect mode for dispatch and christening.
6. Add retry/backoff and error reporting around Gitea comments and SSH execution.
---
## Bottom Line
`burn-fleet` is a small repo with outsized operational leverage.
Its genome is simple:
- one declarative topology file
- four operational adapters
- one local runtime ledger
- many side effects across tmux, SSH, and Gitea
It already expresses the philosophy of narrative-driven infrastructure well.
What it lacks is not architecture.
What it lacks is hardening:
- tests around the dangerous paths
- centralization of duplicated routing truth
- stronger command / credential / runtime-state safeguards
That makes it a strong control-plane prototype and a weakly tested production surface.

View File

@@ -1,160 +0,0 @@
# GENOME.md — The Nexus (Timmy_Foundation/the-nexus)
> Codebase Genome v1.0 | Generated 2026-04-15 | Repo 5/16
## Project Overview
**The Nexus** is a dual-purpose project: a local-first training ground for Timmy AI agents and a wizardly visualization surface for the sovereign fleet. It combines a Three.js 3D world, Evennia MUD integration, MemPalace memory system, and fleet intelligence infrastructure.
**Core principle:** agents work, the world visualizes, memory persists.
## Architecture
```mermaid
graph TD
subgraph "3D World (Three.js)"
APP[app.js] --> SCENE[Scene Manager]
SCENE --> PORTALS[Portal System]
SCENE --> PARTICLES[Particle Engine]
SCENE --> MEMPALACE_3D[MemPalace 3D]
end
subgraph "Backend (Python)"
SERVER[server.py] --> NEXUS[nexus/]
NEXUS --> MEMPALACE[mempalace/]
NEXUS --> FLEET[fleet/]
NEXUS --> AGENT[agent/]
NEXUS --> INTEL[intelligence/]
end
subgraph "Evennia MUD Bridge"
NEXUS --> EVENNIA[nexus/evennia_mempalace/]
EVENNIA --> ROOMS[Room Typeclasses]
EVENNIA --> COMMANDS[Recall/Write Commands]
end
subgraph "Build & Deploy"
DOCKER[docker-compose.yml] --> SERVER
DEPLOY[deploy.sh] --> VPS[VPS Deployment]
end
```
## Key Subsystems
| Subsystem | Path | Purpose |
|-----------|------|---------|
| Three.js 3D World | `app.js`, `index.html` | Browser-based 3D visualization surface |
| Portal System | `portals.json`, commands/ | Teleportation between world zones |
| MemPalace | `mempalace/`, `nexus/mempalace/` | Fleet memory: rooms, search, retention |
| Evennia Bridge | `nexus/evennia_mempalace/` | MUD world ↔ MemPalace integration |
| Fleet Intelligence | `fleet/`, `intelligence/` | Cross-wizard analytics and coordination |
| Agent Tools | `agent/` | Agent capabilities and tool definitions |
| Boot System | `boot.js`, `bootstrap.mjs` | World initialization and startup |
| Evolution | `evolution/` | System evolution tracking and proposals |
| GOFAI Worker | `gofai_worker.js` | Classical AI logic engine |
| Concept Packs | `concept-packs/` | World content and knowledge packs |
| Gitea Integration | `gitea_api/` | Forge API helpers and automation |
## Entry Points
| Entry Point | File | Purpose |
|-------------|------|---------|
| Browser | `index.html` | Three.js 3D world entry |
| Node Server | `server.py` | Backend API and WebSocket server |
| Electron | `electron-main.js` | Desktop app shell |
| Deploy | `deploy.sh` | VPS deployment script |
| Docker | `docker-compose.yml` | Containerized deployment |
## MemPalace System
The MemPalace is the fleet's persistent memory:
- **Rooms:** forge, hermes, nexus, issues, experiments (core) + optional domain rooms
- **Taxonomy:** Defined in `mempalace/rooms.yaml` (fleet standard)
- **Search:** `nexus/mempalace/searcher.py` — semantic search across rooms
- **Fleet API:** `mempalace/fleet_api.py` — HTTP API for cross-wizard memory access
- **Retention:** `mempalace/retain_closets.py` — 90-day auto-pruning
- **Tunnel Sync:** `mempalace/tunnel_sync.py` — Cross-wing room synchronization
- **Privacy Audit:** `mempalace/audit_privacy.py` — Data privacy compliance
## Evennia Integration
The Evennia bridge connects the 3D world to a traditional MUD:
- **Room Typeclasses:** `nexus/evennia_mempalace/typeclasses/rooms.py` — MemPalace-aware rooms
- **NPCs:** `nexus/evennia_mempalace/typeclasses/npcs.py` — AI-powered NPCs
- **Commands:** `nexus/evennia_mempalace/commands/` — recall, write, and exploration commands
- **Protocol:** `EVENNIA_NEXUS_EVENT_PROTOCOL.md` — Event bridge specification
## Configuration
| File | Purpose |
|------|---------|
| `config/` | World configuration |
| `portals.json` | Portal definitions and teleportation |
| `vision.json` | Visual rendering configuration |
| `docker-compose.yml` | Container orchestration |
| `Dockerfile` | Build definition |
## Test Coverage
| Area | Tests | Notes |
|------|-------|-------|
| CI Workflows | `.gitea/workflows/`, `.github/` | Smoke tests, linting |
| Python | Limited | Core nexus modules lack unit tests |
| JavaScript | Limited | No dedicated test suite for 3D world |
| Integration | Manual | Evennia bridge tested via telnet |
## Documentation
| File | Purpose |
|------|---------|
| `README.md` | Branch protection policy + project overview |
| `DEVELOPMENT.md` | Dev setup guide |
| `CONTRIBUTING.md` | Contribution guidelines |
| `SOUL.md` | Project values and philosophy |
| `POLICY.md` | Operational policies |
| `EVENNIA_NEXUS_EVENT_PROTOCOL.md` | Evennia bridge spec |
| `GAMEPORTAL_PROTOCOL.md` | Game portal specification |
| `FIRST_LIGHT_REPORT.md` | Initial deployment report |
| `docs/` | Extended documentation |
## File Structure (Top Level)
```
the-nexus/
├── app.js # Three.js application
├── index.html # Browser entry point
├── server.py # Backend server
├── boot.js # Boot sequence
├── bootstrap.mjs # ES module bootstrap
├── electron-main.js # Desktop app
├── deploy.sh # VPS deployment
├── docker-compose.yml # Container config
├── nexus/ # Python core modules
│ ├── evennia_mempalace/ # Evennia MUD bridge
│ └── mempalace/ # Memory system
├── mempalace/ # Fleet memory tools
├── fleet/ # Fleet coordination
├── agent/ # Agent tools
├── intelligence/ # Cross-wizard analytics
├── commands/ # World commands
├── concept-packs/ # Content packs
├── evolution/ # System evolution
├── assets/ # Static assets
└── docs/ # Documentation
```
## Sovereignty Assessment
- **Local-first** — Designed for local development and sovereign VPS deployment
- **No phone-home** — All communication is user-controlled
- **Open source** — Full codebase on Gitea
- **Fleet-integrated** — Connects to sovereign agent fleet via MemPalace tunnels
- **Containerized** — Docker support for isolated deployment
**Verdict: Fully sovereign. 3D visualization + MUD + memory system in one integrated platform.**
---
*"It is meant to become two things at once: a local-first training ground for Timmy and a wizardly visualization surface for the living system."*

View File

@@ -1,138 +0,0 @@
# GENOME.md — TurboQuant (Timmy_Foundation/turboquant)
> Codebase Genome v1.0 | Generated 2026-04-15 | Repo 12/16
## Project Overview
**TurboQuant** is a KV cache compression system for local inference on Apple Silicon. Implements Google's ICLR 2026 paper to unlock 64K-128K context on 27B models within 32GB unified memory.
**Three-stage compression:**
1. **PolarQuant** — WHT rotation + polar coordinates + Lloyd-Max codebook (~4.2x compression)
2. **QJL** — 1-bit quantized Johnson-Lindenstrauss residual correction
3. **TurboQuant** — PolarQuant + QJL = ~3.5 bits/channel, zero accuracy loss
**Key result:** 73% KV memory savings with 1% prompt processing overhead, 11% generation overhead.
## Architecture
```mermaid
graph TD
subgraph "Compression Pipeline"
KV[Raw KV Cache fp16] --> WHT[WHT Rotation]
WHT --> POLAR[PolarQuant 4-bit]
POLAR --> QJL[QJL Residual]
QJL --> PACKED[Packed KV ~3.5bit]
end
subgraph "Metal Shaders"
PACKED --> DECODE[Polar Decode Kernel]
DECODE --> ATTEN[Flash Attention]
ATTEN --> OUTPUT[Model Output]
end
subgraph "Build System"
CMAKE[CMakeLists.txt] --> LIB[turboquant.a]
LIB --> TEST[turboquant_roundtrip_test]
LIB --> LLAMA[llama.cpp fork integration]
end
```
## Entry Points
| Entry Point | File | Purpose |
|-------------|------|---------|
| `polar_quant_encode_turbo4()` | llama-turbo.cpp | Encode float KV → 4-bit packed |
| `polar_quant_decode_turbo4()` | llama-turbo.cpp | Decode 4-bit packed → float KV |
| `cmake build` | CMakeLists.txt | Build static library + tests |
| `run_benchmarks.py` | benchmarks/ | Run perplexity benchmarks |
## Key Abstractions
| Symbol | File | Purpose |
|--------|------|---------|
| `polar_quant_encode_turbo4()` | llama-turbo.h/.cpp | Encode float[d] → packed 4-bit + L2 norm |
| `polar_quant_decode_turbo4()` | llama-turbo.h/.cpp | Decode packed 4-bit + norm → float[d] |
| `turbo_dequantize_k()` | ggml-metal-turbo.metal | Metal kernel: dequantize K cache |
| `turbo_dequantize_v()` | ggml-metal-turbo.metal | Metal kernel: dequantize V cache |
| `turbo_fwht_128()` | ggml-metal-turbo.metal | Fast Walsh-Hadamard Transform |
| `run_perplexity.py` | benchmarks/ | Measure perplexity impact |
| `run_benchmarks.py` | benchmarks/ | Full benchmark suite (speed + quality) |
## Data Flow
```
Input: float KV vectors [d=128 per head]
1. WHT rotation (in-place, O(d log d))
2. Convert to polar coords (radius, angles)
3. Lloyd-Max quantize angles → 4-bit indices
4. Store: packed indices [d/2 bytes] + float norm [4 bytes]
Decode: indices → codebook lookup → polar → cartesian → inverse WHT
Output: reconstructed float KV [d=128]
```
## File Index
| File | LOC | Purpose |
|------|-----|---------|
| `llama-turbo.h` | 24 | C API: encode/decode function declarations |
| `llama-turbo.cpp` | 78 | Implementation: PolarQuant encode/decode |
| `ggml-metal-turbo.metal` | 76 | Metal shaders: dequantize + flash attention |
| `CMakeLists.txt` | 44 | Build system: static lib + tests |
| `tests/roundtrip_test.cpp` | 104 | Roundtrip encode→decode validation |
| `benchmarks/run_benchmarks.py` | 227 | Benchmark suite |
| `benchmarks/run_perplexity.py` | ~100 | Perplexity measurement |
| `evolution/hardware_optimizer.py` | 5 | Hardware detection stub |
**Total: ~660 LOC | C++ core: 206 LOC | Python benchmarks: 232 LOC**
## Dependencies
| Dependency | Purpose |
|------------|---------|
| CMake 3.16+ | Build system |
| C++17 compiler | Core implementation |
| Metal (macOS) | GPU shader execution |
| Python 3.11+ | Benchmarks |
| llama.cpp fork | Integration target |
## Source Repos (Upstream)
| Repo | Role |
|------|------|
| TheTom/llama-cpp-turboquant | llama.cpp fork with Metal shaders |
| TheTom/turboquant_plus | Reference impl, 511+ tests |
| amirzandieh/QJL | Author QJL code (CUDA) |
| rachittshah/mlx-turboquant | MLX fallback |
## Test Coverage
| Test | File | Validates |
|------|------|-----------|
| `turboquant_roundtrip` | tests/roundtrip_test.cpp | Encode→decode roundtrip fidelity |
| Perplexity benchmarks | benchmarks/run_perplexity.py | Quality preservation across prompts |
| Speed benchmarks | benchmarks/run_benchmarks.py | Compression overhead measurement |
## Security Considerations
1. **No network calls** — Pure local computation, no telemetry
2. **Memory safety** — C++ code uses raw pointers; roundtrip tests validate correctness
3. **Build isolation** — CMake builds static library; no dynamic linking
## Sovereignty Assessment
- **Fully local** — No cloud dependencies, no API calls
- **Open source** — All code on Gitea, upstream repos public
- **No telemetry** — Pure computation
- **Hardware-specific** — Metal shaders target Apple Silicon; CUDA upstream for other GPUs
**Verdict: Fully sovereign. No corporate lock-in. Pure local inference enhancement.**
---
*"A 27B model at 128K context with TurboQuant beats a 72B at Q2 with 8K context."*

View File

@@ -1,35 +0,0 @@
# NH Broadband — Public Research Memo
**Date:** 2026-04-15
**Status:** Draft — separates verified facts from unverified live work
**Refs:** #533, #740
---
## Verified (official public sources)
- **NH Broadband** is a residential fiber internet provider operating in New Hampshire.
- Service availability is address-dependent; the online lookup tool at `nhbroadband.com` reports coverage by street address.
- Residential fiber plans are offered; speed tiers vary by location.
- Scheduling line: **1-800-NHBB-INFO** (published on official site).
- Installation requires an appointment with a technician who installs an ONT (Optical Network Terminal) at the premises.
- Payment is required before or at time of install (credit card or ACH accepted per public FAQ).
## Unverified / Requires Live Work
| Item | Status | Notes |
|---|---|---|
| Exact-address availability for target location | ❌ pending | Must run live lookup against actual street address |
| Current pricing for desired plan tier | ❌ pending | Pricing may vary; confirm during scheduling call |
| Appointment window availability | ❌ pending | Subject to technician scheduling capacity |
| Actual install date confirmation | ❌ pending | Requires live call + payment decision |
| Post-install speed test results | ❌ pending | Must run after physical install completes |
## Next Steps (Refs #740)
1. Run address availability lookup on `nhbroadband.com`
2. Call 1-800-NHBB-INFO to schedule install
3. Confirm payment method
4. Receive appointment confirmation number
5. Prepare site (clear ONT install path)
6. Post-install: speed test and log results

View File

@@ -1,56 +0,0 @@
# Triage Cadence Report — timmy-home (2026-04-15)
> Issue #685 | Backlog reduced from 220 to 50
## Summary
timmy-home's open issue count dropped from 220 (peak) to 50 through batch-pipeline codebase genome generation and triage. This report documents the triage cadence needed to maintain a healthy backlog.
## Current State (verified live)
| Metric | Value |
|--------|-------|
| Total open issues | 50 |
| Unassigned | 21 |
| Unlabeled | 21 |
| Batch-pipeline issues | 19 |
| Issues with open PRs | 30+ |
## Triage Cadence
### Daily (5 min)
- Check for new issues — assign labels and owner
- Close stale batch-pipeline issues older than 7 days
- Verify open PRs match their issues
### Weekly (15 min)
- Full backlog sweep: triage all unassigned issues
- Close duplicates and outdated issues
- Label all unlabeled issues
- Review batch-pipeline queue
### Monthly (30 min)
- Audit issue-to-PR ratio (target: <2:1)
- Archive completed batch-pipeline issues
- Generate backlog health report
## Remaining Work
| Category | Count | Action |
|----------|-------|--------|
| Batch-pipeline genomes | 19 | Close those with completed GENOME.md PRs |
| Unassigned | 21 | Assign or close |
| Unlabeled | 21 | Add labels |
| No PR | ~20 | Triage or close |
## Recommended Labels
- `batch-pipeline` — Auto-generated pipeline issues
- `genome` — Codebase genome analysis
- `ops` — Operations/infrastructure
- `documentation` — Docs and reports
- `triage` — Needs triage
---
*Generated: 2026-04-15 | timmy-home issue #685*

View File

@@ -1,127 +0,0 @@
#!/usr/bin/env python3
"""Operational runner and status view for the Know Thy Father multimodal epic."""
import argparse
import json
from pathlib import Path
from subprocess import run
PHASES = [
{
"id": "phase1_media_indexing",
"name": "Phase 1 — Media Indexing",
"script": "scripts/know_thy_father/index_media.py",
"command_template": "python3 scripts/know_thy_father/index_media.py --tweets twitter-archive/extracted/tweets.jsonl --output twitter-archive/know-thy-father/media_manifest.jsonl",
"outputs": ["twitter-archive/know-thy-father/media_manifest.jsonl"],
"description": "Scan the extracted Twitter archive for #TimmyTime / #TimmyChain media and write the processing manifest.",
},
{
"id": "phase2_multimodal_analysis",
"name": "Phase 2 — Multimodal Analysis",
"script": "scripts/twitter_archive/analyze_media.py",
"command_template": "python3 scripts/twitter_archive/analyze_media.py --batch {batch_size}",
"outputs": [
"twitter-archive/know-thy-father/analysis.jsonl",
"twitter-archive/know-thy-father/meaning-kernels.jsonl",
"twitter-archive/know-thy-father/pipeline-status.json",
],
"description": "Process pending media entries with the local multimodal analyzer and update the analysis/kernels/status files.",
},
{
"id": "phase3_holographic_synthesis",
"name": "Phase 3 — Holographic Synthesis",
"script": "scripts/know_thy_father/synthesize_kernels.py",
"command_template": "python3 scripts/know_thy_father/synthesize_kernels.py --input twitter-archive/media/manifest.jsonl --output twitter-archive/knowledge/fathers_ledger.jsonl --summary twitter-archive/knowledge/fathers_ledger.summary.json",
"outputs": [
"twitter-archive/knowledge/fathers_ledger.jsonl",
"twitter-archive/knowledge/fathers_ledger.summary.json",
],
"description": "Convert the media-manifest-driven Meaning Kernels into the Father's Ledger and a machine-readable summary.",
},
{
"id": "phase4_cross_reference_audit",
"name": "Phase 4 — Cross-Reference Audit",
"script": "scripts/know_thy_father/crossref_audit.py",
"command_template": "python3 scripts/know_thy_father/crossref_audit.py --soul SOUL.md --kernels twitter-archive/notes/know_thy_father_crossref.md --output twitter-archive/notes/crossref_report.md",
"outputs": ["twitter-archive/notes/crossref_report.md"],
"description": "Compare Know Thy Father kernels against SOUL.md and related canon, then emit a Markdown audit report.",
},
{
"id": "phase5_processing_log",
"name": "Phase 5 — Processing Log / Status",
"script": "twitter-archive/know-thy-father/tracker.py",
"command_template": "python3 twitter-archive/know-thy-father/tracker.py report",
"outputs": ["twitter-archive/know-thy-father/REPORT.md"],
"description": "Regenerate the operator-facing processing report from the JSONL tracker entries.",
},
]
def build_pipeline_plan(batch_size: int = 10):
plan = []
for phase in PHASES:
plan.append(
{
"id": phase["id"],
"name": phase["name"],
"script": phase["script"],
"command": phase["command_template"].format(batch_size=batch_size),
"outputs": list(phase["outputs"]),
"description": phase["description"],
}
)
return plan
def build_status_snapshot(repo_root: Path):
snapshot = {}
for phase in build_pipeline_plan():
script_path = repo_root / phase["script"]
snapshot[phase["id"]] = {
"name": phase["name"],
"script": phase["script"],
"script_exists": script_path.exists(),
"outputs": [
{
"path": output,
"exists": (repo_root / output).exists(),
}
for output in phase["outputs"]
],
}
return snapshot
def run_step(repo_root: Path, step_id: str, batch_size: int = 10):
plan = {step["id"]: step for step in build_pipeline_plan(batch_size=batch_size)}
if step_id not in plan:
raise SystemExit(f"Unknown step: {step_id}")
step = plan[step_id]
return run(step["command"], cwd=repo_root, shell=True, check=False)
def main():
parser = argparse.ArgumentParser(description="Know Thy Father epic orchestration helper")
parser.add_argument("--batch-size", type=int, default=10)
parser.add_argument("--status", action="store_true")
parser.add_argument("--run-step", default=None)
parser.add_argument("--json", action="store_true")
args = parser.parse_args()
repo_root = Path(__file__).resolve().parents[2]
if args.run_step:
result = run_step(repo_root, args.run_step, batch_size=args.batch_size)
raise SystemExit(result.returncode)
payload = build_status_snapshot(repo_root) if args.status else build_pipeline_plan(batch_size=args.batch_size)
if args.json or args.status:
print(json.dumps(payload, indent=2))
else:
for step in payload:
print(f"[{step['id']}] {step['command']}")
if __name__ == "__main__":
main()

View File

@@ -1,159 +0,0 @@
#!/usr/bin/env python3
"""Prepare a MemPalace v3.0.0 integration packet for Ezra's Hermes home."""
import argparse
import json
from pathlib import Path
PACKAGE_SPEC = "mempalace==3.0.0"
DEFAULT_HERMES_HOME = "~/.hermes/"
DEFAULT_SESSIONS_DIR = "~/.hermes/sessions/"
DEFAULT_PALACE_PATH = "~/.mempalace/palace"
DEFAULT_WING = "ezra_home"
def build_yaml_template(wing: str, palace_path: str) -> str:
return (
f"wing: {wing}\n"
f"palace: {palace_path}\n"
"rooms:\n"
" - name: sessions\n"
" description: Conversation history and durable agent transcripts\n"
" globs:\n"
" - \"*.json\"\n"
" - \"*.jsonl\"\n"
" - name: config\n"
" description: Hermes configuration and runtime settings\n"
" globs:\n"
" - \"*.yaml\"\n"
" - \"*.yml\"\n"
" - \"*.toml\"\n"
" - name: docs\n"
" description: Notes, markdown docs, and operating reports\n"
" globs:\n"
" - \"*.md\"\n"
" - \"*.txt\"\n"
"people: []\n"
"projects: []\n"
)
def build_plan(overrides: dict | None = None) -> dict:
overrides = overrides or {}
hermes_home = overrides.get("hermes_home", DEFAULT_HERMES_HOME)
sessions_dir = overrides.get("sessions_dir", DEFAULT_SESSIONS_DIR)
palace_path = overrides.get("palace_path", DEFAULT_PALACE_PATH)
wing = overrides.get("wing", DEFAULT_WING)
yaml_template = build_yaml_template(wing=wing, palace_path=palace_path)
config_home = hermes_home[:-1] if hermes_home.endswith("/") else hermes_home
plan = {
"package_spec": PACKAGE_SPEC,
"hermes_home": hermes_home,
"sessions_dir": sessions_dir,
"palace_path": palace_path,
"wing": wing,
"config_path": f"{config_home}/mempalace.yaml",
"install_command": f"pip install {PACKAGE_SPEC}",
"init_command": f"mempalace init {hermes_home} --yes",
"mine_home_command": f"echo \"\" | mempalace mine {hermes_home}",
"mine_sessions_command": f"echo \"\" | mempalace mine {sessions_dir} --mode convos",
"search_command": 'mempalace search "your common queries"',
"wake_up_command": "mempalace wake-up",
"mcp_command": "hermes mcp add mempalace -- python -m mempalace.mcp_server",
"yaml_template": yaml_template,
"gotchas": [
"`mempalace init` is still interactive in room approval flow; write mempalace.yaml manually if the init output stalls.",
"The yaml key is `wing:` not `wings:`. Using the wrong key causes mine/setup failures.",
"Pipe empty stdin into mining commands (`echo \"\" | ...`) to avoid the entity-detector stdin hang on larger directories.",
"First mine downloads the ChromaDB embedding model cache (~79MB).",
"Report Ezra's before/after metrics back to issue #568 after live installation and retrieval tests.",
],
}
return plan
def render_markdown(plan: dict) -> str:
gotchas = "\n".join(f"- {item}" for item in plan["gotchas"])
return f"""# MemPalace v3.0.0 — Ezra Integration Packet
This packet turns issue #570 into an executable, reviewable integration plan for Ezra's Hermes home.
It is a repo-side scaffold: no live Ezra host changes are claimed in this artifact.
## Commands
```bash
{plan['install_command']}
{plan['init_command']}
cat > {plan['config_path']} <<'YAML'
{plan['yaml_template'].rstrip()}
YAML
{plan['mine_home_command']}
{plan['mine_sessions_command']}
{plan['search_command']}
{plan['wake_up_command']}
{plan['mcp_command']}
```
## Manual config template
```yaml
{plan['yaml_template'].rstrip()}
```
## Why this shape
- `wing: {plan['wing']}` matches the issue's Ezra-specific integration target.
- `rooms` split the mined material into sessions, config, and docs to keep retrieval interpretable.
- Mining commands pipe empty stdin to avoid the interactive entity-detector hang noted in the evaluation.
## Gotchas
{gotchas}
## Report back to #568
After live execution on Ezra's actual environment, post back to #568 with:
- install result
- mine duration and corpus size
- 2-3 real search queries + retrieved results
- wake-up context token count
- whether MCP wiring succeeded
## Honest scope boundary
This repo artifact does **not** prove live installation on Ezra's host. It makes the work reproducible and testable so the next pass can execute it without guesswork.
"""
def main() -> None:
parser = argparse.ArgumentParser(description="Prepare the MemPalace Ezra integration packet")
parser.add_argument("--hermes-home", default=DEFAULT_HERMES_HOME)
parser.add_argument("--sessions-dir", default=DEFAULT_SESSIONS_DIR)
parser.add_argument("--palace-path", default=DEFAULT_PALACE_PATH)
parser.add_argument("--wing", default=DEFAULT_WING)
parser.add_argument("--output", default=None)
parser.add_argument("--json", action="store_true")
args = parser.parse_args()
plan = build_plan(
{
"hermes_home": args.hermes_home,
"sessions_dir": args.sessions_dir,
"palace_path": args.palace_path,
"wing": args.wing,
}
)
rendered = json.dumps(plan, indent=2) if args.json else render_markdown(plan)
if args.output:
output_path = Path(args.output).expanduser()
output_path.parent.mkdir(parents=True, exist_ok=True)
output_path.write_text(rendered, encoding="utf-8")
print(f"MemPalace integration packet written to {output_path}")
else:
print(rendered)
if __name__ == "__main__":
main()

View File

@@ -1,155 +0,0 @@
#!/usr/bin/env python3
from __future__ import annotations
import argparse
import json
from pathlib import Path
from typing import Any
import yaml
DAYLIGHT_START = "10:00"
DAYLIGHT_END = "16:00"
def load_manifest(path: str | Path) -> dict[str, Any]:
data = yaml.safe_load(Path(path).read_text()) or {}
data.setdefault("machines", [])
return data
def validate_manifest(data: dict[str, Any]) -> None:
machines = data.get("machines", [])
if not machines:
raise ValueError("manifest must contain at least one machine")
seen: set[str] = set()
for machine in machines:
hostname = machine.get("hostname", "").strip()
if not hostname:
raise ValueError("each machine must declare a hostname")
if hostname in seen:
raise ValueError(f"duplicate hostname: {hostname} (unique hostnames are required)")
seen.add(hostname)
for field in ("machine_type", "ram_gb", "cpu_cores", "os", "adapter_condition"):
if field not in machine:
raise ValueError(f"machine {hostname} missing required field: {field}")
def _laptops(machines: list[dict[str, Any]]) -> list[dict[str, Any]]:
return [m for m in machines if m.get("machine_type") == "laptop"]
def _desktop(machines: list[dict[str, Any]]) -> dict[str, Any] | None:
for machine in machines:
if machine.get("machine_type") == "desktop":
return machine
return None
def choose_anchor_agents(machines: list[dict[str, Any]], count: int = 2) -> list[dict[str, Any]]:
eligible = [
m for m in _laptops(machines)
if m.get("adapter_condition") in {"good", "ok"} and m.get("always_on_capable", True)
]
eligible.sort(key=lambda m: (m.get("idle_watts", 9999), -m.get("ram_gb", 0), -m.get("cpu_cores", 0), m["hostname"]))
return eligible[:count]
def assign_roles(machines: list[dict[str, Any]]) -> dict[str, Any]:
anchors = choose_anchor_agents(machines, count=2)
anchor_names = {m["hostname"] for m in anchors}
desktop = _desktop(machines)
mapping: dict[str, dict[str, Any]] = {}
for machine in machines:
hostname = machine["hostname"]
if desktop and hostname == desktop["hostname"]:
mapping[hostname] = {
"role": "desktop_nas",
"schedule": f"{DAYLIGHT_START}-{DAYLIGHT_END}",
"duty_cycle": "daylight_only",
}
elif hostname in anchor_names:
mapping[hostname] = {
"role": "anchor_agent",
"schedule": "24/7",
"duty_cycle": "continuous",
}
else:
mapping[hostname] = {
"role": "daylight_agent",
"schedule": f"{DAYLIGHT_START}-{DAYLIGHT_END}",
"duty_cycle": "peak_solar",
}
return {
"anchor_agents": [m["hostname"] for m in anchors],
"desktop_nas": desktop["hostname"] if desktop else None,
"role_mapping": mapping,
}
def build_plan(data: dict[str, Any]) -> dict[str, Any]:
validate_manifest(data)
machines = data["machines"]
role_plan = assign_roles(machines)
return {
"fleet_name": data.get("fleet_name", "timmy-laptop-fleet"),
"machine_count": len(machines),
"anchor_agents": role_plan["anchor_agents"],
"desktop_nas": role_plan["desktop_nas"],
"daylight_window": f"{DAYLIGHT_START}-{DAYLIGHT_END}",
"role_mapping": role_plan["role_mapping"],
}
def render_markdown(plan: dict[str, Any], data: dict[str, Any]) -> str:
lines = [
"# Laptop Fleet Deployment Plan",
"",
f"Fleet: {plan['fleet_name']}",
f"Machine count: {plan['machine_count']}",
f"24/7 anchor agents: {', '.join(plan['anchor_agents']) if plan['anchor_agents'] else 'TBD'}",
f"Desktop/NAS: {plan['desktop_nas'] or 'TBD'}",
f"Daylight schedule: {plan['daylight_window']}",
"",
"## Role mapping",
"",
"| Hostname | Role | Schedule | Duty cycle |",
"|---|---|---|---|",
]
for hostname, role in sorted(plan["role_mapping"].items()):
lines.append(f"| {hostname} | {role['role']} | {role['schedule']} | {role['duty_cycle']} |")
lines.extend([
"",
"## Machine inventory",
"",
"| Hostname | Type | RAM | CPU cores | OS | Adapter | Idle watts | Notes |",
"|---|---|---:|---:|---|---|---:|---|",
])
for machine in data["machines"]:
lines.append(
f"| {machine['hostname']} | {machine['machine_type']} | {machine['ram_gb']} | {machine['cpu_cores']} | {machine['os']} | {machine['adapter_condition']} | {machine.get('idle_watts', 'n/a')} | {machine.get('notes', '')} |"
)
return "\n".join(lines) + "\n"
def main() -> int:
parser = argparse.ArgumentParser(description="Plan LAB-005 laptop fleet deployment.")
parser.add_argument("manifest", help="Path to laptop fleet manifest YAML")
parser.add_argument("--markdown", action="store_true", help="Render a markdown deployment plan instead of JSON")
args = parser.parse_args()
data = load_manifest(args.manifest)
plan = build_plan(data)
if args.markdown:
print(render_markdown(plan, data))
else:
print(json.dumps(plan, indent=2))
return 0
if __name__ == "__main__":
raise SystemExit(main())

View File

@@ -1,135 +0,0 @@
#!/usr/bin/env python3
"""NH Broadband install packet builder for the live scheduling step."""
from __future__ import annotations
import argparse
import json
from datetime import datetime, timezone
from pathlib import Path
from typing import Any
import yaml
def load_request(path: str | Path) -> dict[str, Any]:
data = yaml.safe_load(Path(path).read_text()) or {}
data.setdefault("contact", {})
data.setdefault("service", {})
data.setdefault("call_log", [])
data.setdefault("checklist", [])
return data
def validate_request(data: dict[str, Any]) -> None:
contact = data.get("contact", {})
for field in ("name", "phone"):
if not contact.get(field, "").strip():
raise ValueError(f"contact.{field} is required")
service = data.get("service", {})
for field in ("address", "city", "state"):
if not service.get(field, "").strip():
raise ValueError(f"service.{field} is required")
if not data.get("checklist"):
raise ValueError("checklist must contain at least one item")
def build_packet(data: dict[str, Any]) -> dict[str, Any]:
validate_request(data)
contact = data["contact"]
service = data["service"]
return {
"packet_id": f"nh-bb-{datetime.now(timezone.utc).strftime('%Y%m%d-%H%M%S')}",
"generated_utc": datetime.now(timezone.utc).isoformat(),
"contact": {
"name": contact["name"],
"phone": contact["phone"],
"email": contact.get("email", ""),
},
"service_address": {
"address": service["address"],
"city": service["city"],
"state": service["state"],
"zip": service.get("zip", ""),
},
"desired_plan": data.get("desired_plan", "residential-fiber"),
"call_log": data.get("call_log", []),
"checklist": [
{"item": item, "done": False} if isinstance(item, str) else item
for item in data["checklist"]
],
"status": "pending_scheduling_call",
}
def render_markdown(packet: dict[str, Any], data: dict[str, Any]) -> str:
contact = packet["contact"]
addr = packet["service_address"]
lines = [
f"# NH Broadband Install Packet",
"",
f"**Packet ID:** {packet['packet_id']}",
f"**Generated:** {packet['generated_utc']}",
f"**Status:** {packet['status']}",
"",
"## Contact",
"",
f"- **Name:** {contact['name']}",
f"- **Phone:** {contact['phone']}",
f"- **Email:** {contact.get('email', 'n/a')}",
"",
"## Service Address",
"",
f"- {addr['address']}",
f"- {addr['city']}, {addr['state']} {addr['zip']}",
"",
f"## Desired Plan",
"",
f"{packet['desired_plan']}",
"",
"## Call Log",
"",
]
if packet["call_log"]:
for entry in packet["call_log"]:
ts = entry.get("timestamp", "n/a")
outcome = entry.get("outcome", "n/a")
notes = entry.get("notes", "")
lines.append(f"- **{ts}** — {outcome}")
if notes:
lines.append(f" - {notes}")
else:
lines.append("_No calls logged yet._")
lines.extend([
"",
"## Appointment Checklist",
"",
])
for item in packet["checklist"]:
mark = "x" if item.get("done") else " "
lines.append(f"- [{mark}] {item['item']}")
lines.append("")
return "\n".join(lines)
def main() -> int:
parser = argparse.ArgumentParser(description="Build NH Broadband install packet.")
parser.add_argument("request", help="Path to install request YAML")
parser.add_argument("--markdown", action="store_true", help="Render markdown instead of JSON")
args = parser.parse_args()
data = load_request(args.request)
packet = build_packet(data)
if args.markdown:
print(render_markdown(packet, data))
else:
print(json.dumps(packet, indent=2))
return 0
if __name__ == "__main__":
raise SystemExit(main())

View File

@@ -0,0 +1,70 @@
from pathlib import Path
GENOME = Path('genomes/burn-fleet-GENOME.md')
def read_genome() -> str:
assert GENOME.exists(), 'burn-fleet genome must exist at genomes/burn-fleet-GENOME.md'
return GENOME.read_text(encoding='utf-8')
def test_genome_exists():
assert GENOME.exists(), 'burn-fleet genome must exist at genomes/burn-fleet-GENOME.md'
def test_genome_has_required_sections():
text = read_genome()
for heading in [
'# GENOME.md: burn-fleet',
'## Project Overview',
'## Architecture',
'## Entry Points',
'## Data Flow',
'## Key Abstractions',
'## API Surface',
'## Test Coverage Gaps',
'## Security Considerations',
]:
assert heading in text
def test_genome_contains_mermaid_diagram():
text = read_genome()
assert '```mermaid' in text
assert 'graph TD' in text or 'flowchart TD' in text
def test_genome_mentions_core_files_and_runtime_state():
text = read_genome()
for token in [
'fleet-spec.json',
'fleet-launch.sh',
'fleet-christen.py',
'fleet-dispatch.py',
'fleet-status.py',
'dispatch-state.json',
'tmux',
'ssh',
'MAC_ROUTE',
'ALLEGRO_ROUTE',
]:
assert token in text
def test_genome_mentions_test_gap_and_risk_findings():
text = read_genome()
for token in [
'0% estimated coverage',
'send_to_pane',
'comment_on_issue',
'get_pane_status',
'requests',
'command injection',
'credential handling',
]:
assert token in text
def test_genome_is_substantial():
text = read_genome()
assert len(text) >= 6000

View File

@@ -1,76 +0,0 @@
from pathlib import Path
import importlib.util
import unittest
ROOT = Path(__file__).resolve().parent.parent
SCRIPT_PATH = ROOT / "scripts" / "know_thy_father" / "epic_pipeline.py"
DOC_PATH = ROOT / "docs" / "KNOW_THY_FATHER_MULTIMODAL_PIPELINE.md"
def load_module(path: Path, name: str):
assert path.exists(), f"missing {path.relative_to(ROOT)}"
spec = importlib.util.spec_from_file_location(name, path)
assert spec and spec.loader
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
class TestKnowThyFatherEpicPipeline(unittest.TestCase):
def test_build_pipeline_plan_contains_all_phases_in_order(self):
mod = load_module(SCRIPT_PATH, "ktf_epic_pipeline")
plan = mod.build_pipeline_plan(batch_size=10)
self.assertEqual(
[step["id"] for step in plan],
[
"phase1_media_indexing",
"phase2_multimodal_analysis",
"phase3_holographic_synthesis",
"phase4_cross_reference_audit",
"phase5_processing_log",
],
)
self.assertIn("scripts/know_thy_father/index_media.py", plan[0]["command"])
self.assertIn("scripts/twitter_archive/analyze_media.py --batch 10", plan[1]["command"])
self.assertIn("scripts/know_thy_father/synthesize_kernels.py", plan[2]["command"])
self.assertIn("scripts/know_thy_father/crossref_audit.py", plan[3]["command"])
self.assertIn("twitter-archive/know-thy-father/tracker.py report", plan[4]["command"])
def test_status_snapshot_reports_key_artifact_paths(self):
mod = load_module(SCRIPT_PATH, "ktf_epic_pipeline")
status = mod.build_status_snapshot(ROOT)
self.assertIn("phase1_media_indexing", status)
self.assertIn("phase2_multimodal_analysis", status)
self.assertIn("phase3_holographic_synthesis", status)
self.assertIn("phase4_cross_reference_audit", status)
self.assertIn("phase5_processing_log", status)
self.assertEqual(status["phase1_media_indexing"]["script"], "scripts/know_thy_father/index_media.py")
self.assertEqual(status["phase2_multimodal_analysis"]["script"], "scripts/twitter_archive/analyze_media.py")
self.assertEqual(status["phase5_processing_log"]["script"], "twitter-archive/know-thy-father/tracker.py")
self.assertTrue(status["phase1_media_indexing"]["script_exists"])
self.assertTrue(status["phase2_multimodal_analysis"]["script_exists"])
self.assertTrue(status["phase3_holographic_synthesis"]["script_exists"])
self.assertTrue(status["phase4_cross_reference_audit"]["script_exists"])
self.assertTrue(status["phase5_processing_log"]["script_exists"])
def test_repo_contains_multimodal_pipeline_doc(self):
self.assertTrue(DOC_PATH.exists(), "missing committed Know Thy Father pipeline doc")
text = DOC_PATH.read_text(encoding="utf-8")
required = [
"# Know Thy Father — Multimodal Media Consumption Pipeline",
"scripts/know_thy_father/index_media.py",
"scripts/twitter_archive/analyze_media.py --batch 10",
"scripts/know_thy_father/synthesize_kernels.py",
"scripts/know_thy_father/crossref_audit.py",
"twitter-archive/know-thy-father/tracker.py report",
"Refs #582",
]
for snippet in required:
self.assertIn(snippet, text)
if __name__ == "__main__":
unittest.main()

View File

@@ -1,52 +0,0 @@
from pathlib import Path
import yaml
from scripts.plan_laptop_fleet import build_plan, load_manifest, render_markdown, validate_manifest
def test_laptop_fleet_planner_script_exists() -> None:
assert Path("scripts/plan_laptop_fleet.py").exists()
def test_laptop_fleet_manifest_template_exists() -> None:
assert Path("docs/laptop-fleet-manifest.example.yaml").exists()
def test_build_plan_selects_two_lowest_idle_watt_laptops_as_anchors() -> None:
data = load_manifest("docs/laptop-fleet-manifest.example.yaml")
plan = build_plan(data)
assert plan["anchor_agents"] == ["timmy-anchor-a", "timmy-anchor-b"]
assert plan["desktop_nas"] == "timmy-desktop-nas"
assert plan["role_mapping"]["timmy-daylight-a"]["schedule"] == "10:00-16:00"
def test_validate_manifest_requires_unique_hostnames() -> None:
data = {
"machines": [
{"hostname": "dup", "machine_type": "laptop", "ram_gb": 8, "cpu_cores": 4, "os": "Linux", "adapter_condition": "good"},
{"hostname": "dup", "machine_type": "laptop", "ram_gb": 16, "cpu_cores": 8, "os": "Linux", "adapter_condition": "good"},
]
}
try:
validate_manifest(data)
except ValueError as exc:
assert "duplicate hostname" in str(exc)
assert "unique hostnames" in str(exc)
else:
raise AssertionError("validate_manifest should reject duplicate hostname")
def test_markdown_contains_anchor_agents_and_daylight_schedule() -> None:
data = load_manifest("docs/laptop-fleet-manifest.example.yaml")
plan = build_plan(data)
content = render_markdown(plan, data)
assert "24/7 anchor agents: timmy-anchor-a, timmy-anchor-b" in content
assert "Daylight schedule: 10:00-16:00" in content
assert "desktop_nas" in content
def test_manifest_template_is_valid_yaml() -> None:
data = yaml.safe_load(Path("docs/laptop-fleet-manifest.example.yaml").read_text())
assert data["fleet_name"] == "timmy-laptop-fleet"
assert len(data["machines"]) == 6

View File

@@ -1,68 +0,0 @@
from pathlib import Path
import importlib.util
import unittest
ROOT = Path(__file__).resolve().parent.parent
SCRIPT_PATH = ROOT / "scripts" / "mempalace_ezra_integration.py"
DOC_PATH = ROOT / "docs" / "MEMPALACE_EZRA_INTEGRATION.md"
def load_module(path: Path, name: str):
assert path.exists(), f"missing {path.relative_to(ROOT)}"
spec = importlib.util.spec_from_file_location(name, path)
assert spec and spec.loader
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
class TestMempalaceEzraIntegration(unittest.TestCase):
def test_build_plan_contains_issue_required_steps_and_gotchas(self):
mod = load_module(SCRIPT_PATH, "mempalace_ezra_integration")
plan = mod.build_plan({})
self.assertEqual(plan["package_spec"], "mempalace==3.0.0")
self.assertIn("pip install mempalace==3.0.0", plan["install_command"])
self.assertEqual(plan["wing"], "ezra_home")
self.assertIn('echo "" | mempalace mine ~/.hermes/', plan["mine_home_command"])
self.assertIn('--mode convos', plan["mine_sessions_command"])
self.assertIn('mempalace wake-up', plan["wake_up_command"])
self.assertIn('hermes mcp add mempalace -- python -m mempalace.mcp_server', plan["mcp_command"])
self.assertIn('wing:', plan["yaml_template"])
self.assertTrue(any('stdin' in item.lower() for item in plan["gotchas"]))
self.assertTrue(any('wing:' in item for item in plan["gotchas"]))
def test_build_plan_accepts_path_and_wing_overrides(self):
mod = load_module(SCRIPT_PATH, "mempalace_ezra_integration")
plan = mod.build_plan(
{
"hermes_home": "/root/wizards/ezra/home",
"sessions_dir": "/root/wizards/ezra/home/sessions",
"wing": "ezra_archive",
}
)
self.assertEqual(plan["wing"], "ezra_archive")
self.assertIn('/root/wizards/ezra/home', plan["mine_home_command"])
self.assertIn('/root/wizards/ezra/home/sessions', plan["mine_sessions_command"])
self.assertIn('wing: ezra_archive', plan["yaml_template"])
def test_repo_contains_mem_palace_ezra_doc(self):
self.assertTrue(DOC_PATH.exists(), "missing committed MemPalace Ezra integration doc")
text = DOC_PATH.read_text(encoding="utf-8")
required = [
"# MemPalace v3.0.0 — Ezra Integration Packet",
"pip install mempalace==3.0.0",
'echo "" | mempalace mine ~/.hermes/',
"mempalace mine ~/.hermes/sessions/ --mode convos",
"mempalace wake-up",
"hermes mcp add mempalace -- python -m mempalace.mcp_server",
"Report back to #568",
]
for snippet in required:
self.assertIn(snippet, text)
if __name__ == "__main__":
unittest.main()

View File

@@ -1,105 +0,0 @@
from pathlib import Path
import yaml
from scripts.plan_nh_broadband_install import (
build_packet,
load_request,
render_markdown,
validate_request,
)
def test_script_exists() -> None:
assert Path("scripts/plan_nh_broadband_install.py").exists()
def test_example_request_exists() -> None:
assert Path("docs/nh-broadband-install-request.example.yaml").exists()
def test_example_packet_exists() -> None:
assert Path("docs/nh-broadband-install-packet.example.md").exists()
def test_research_memo_exists() -> None:
assert Path("reports/operations/2026-04-15-nh-broadband-public-research.md").exists()
def test_load_and_build_packet() -> None:
data = load_request("docs/nh-broadband-install-request.example.yaml")
packet = build_packet(data)
assert packet["contact"]["name"] == "Timmy Operator"
assert packet["service_address"]["city"] == "Concord"
assert packet["service_address"]["state"] == "NH"
assert packet["status"] == "pending_scheduling_call"
assert len(packet["checklist"]) == 8
assert packet["checklist"][0]["done"] is False
def test_validate_rejects_missing_contact_name() -> None:
data = {
"contact": {"name": "", "phone": "555"},
"service": {"address": "1 St", "city": "X", "state": "NH"},
"checklist": ["do thing"],
}
try:
validate_request(data)
except ValueError as exc:
assert "contact.name" in str(exc)
else:
raise AssertionError("should reject empty contact name")
def test_validate_rejects_missing_service_address() -> None:
data = {
"contact": {"name": "A", "phone": "555"},
"service": {"address": "", "city": "X", "state": "NH"},
"checklist": ["do thing"],
}
try:
validate_request(data)
except ValueError as exc:
assert "service.address" in str(exc)
else:
raise AssertionError("should reject empty service address")
def test_validate_rejects_empty_checklist() -> None:
data = {
"contact": {"name": "A", "phone": "555"},
"service": {"address": "1 St", "city": "X", "state": "NH"},
"checklist": [],
}
try:
validate_request(data)
except ValueError as exc:
assert "checklist" in str(exc)
else:
raise AssertionError("should reject empty checklist")
def test_render_markdown_contains_key_sections() -> None:
data = load_request("docs/nh-broadband-install-request.example.yaml")
packet = build_packet(data)
md = render_markdown(packet, data)
assert "# NH Broadband Install Packet" in md
assert "## Contact" in md
assert "## Service Address" in md
assert "## Call Log" in md
assert "## Appointment Checklist" in md
assert "Concord" in md
assert "NH" in md
def test_render_markdown_shows_checklist_items() -> None:
data = load_request("docs/nh-broadband-install-request.example.yaml")
packet = build_packet(data)
md = render_markdown(packet, data)
assert "- [ ] Confirm exact-address availability" in md
def test_example_yaml_is_valid() -> None:
data = yaml.safe_load(Path("docs/nh-broadband-install-request.example.yaml").read_text())
assert data["contact"]["name"] == "Timmy Operator"
assert len(data["checklist"]) == 8

View File

@@ -17,24 +17,8 @@ from typing import Dict, Any, Optional, List
from pathlib import Path
from dataclasses import dataclass
from enum import Enum
import importlib.util
def _load_local(module_name: str, filename: str):
"""Import a module from an explicit file path, bypassing sys.path resolution."""
spec = importlib.util.spec_from_file_location(
module_name,
str(Path(__file__).parent / filename),
)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
return mod
_harness = _load_local("v2_harness", "harness.py")
UniWizardHarness = _harness.UniWizardHarness
House = _harness.House
ExecutionResult = _harness.ExecutionResult
from harness import UniWizardHarness, House, ExecutionResult
class TaskType(Enum):

View File

@@ -8,30 +8,13 @@ import time
import sys
import argparse
import os
import importlib.util
from pathlib import Path
from datetime import datetime
from typing import Dict, List, Optional
def _load_local(module_name: str, filename: str):
"""Import a module from an explicit file path, bypassing sys.path resolution.
Prevents namespace collisions when multiple directories contain modules
with the same name (e.g. uni-wizard/harness.py vs uni-wizard/v2/harness.py).
"""
spec = importlib.util.spec_from_file_location(
module_name,
str(Path(__file__).parent / filename),
)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
return mod
_harness = _load_local("v2_harness", "harness.py")
UniWizardHarness = _harness.UniWizardHarness
House = _harness.House
ExecutionResult = _harness.ExecutionResult
sys.path.insert(0, str(Path(__file__).parent))
from harness import UniWizardHarness, House, ExecutionResult
from router import HouseRouter, TaskType
from author_whitelist import AuthorWhitelist