From 0cb03488e4ba104d4d51635162c7ba754c464902 Mon Sep 17 00:00:00 2001 From: AetherForge Date: Sun, 7 Jun 2026 05:16:19 -0700 Subject: [PATCH] Document fleet evolution coverage and harden E2E login/LOTL waits. Sync PROBLEMS.md and tests/README.md with 734 Vitest count, fleet evolution checklist, erasure-coded propagation deferred row; retry dashboard login and wait for agents API in LOTL E2E. --- PROBLEMS.md | 6 ++++-- server/web/e2e/fixtures.ts | 12 ++++++++++-- server/web/e2e/lotl-timeline.spec.ts | 2 +- tests/README.md | 24 +++++++++++++++++++++++- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/PROBLEMS.md b/PROBLEMS.md index d4dfdf8..28c4fbb 100644 --- a/PROBLEMS.md +++ b/PROBLEMS.md @@ -69,6 +69,7 @@ Open issues only. Fixed items removed. Last sweep: 2026-06-07. | **Mac PathForge runtime** | `.command` curl `/api/download/agent-mac`; needs reachable `server_url` + binary on server. | | **Terminal virtualization** | 400-line DOM cap only; full virtual scrollback deferred. | | **Vite chunk weight** | `three` + vendor warnings; FleetTopologyMap lazy but heavy first open. | +| **Erasure-coded multi-lane propagation** | Brainstorm only — no Reed–Solomon shard encode/decode, no parallel lane redundancy beyond existing single-lane spread + BGP router hints; do not half-ship without agent staging + server reassembly design. | ## Open bugs / behavior @@ -102,8 +103,9 @@ Open issues only. Fixed items removed. Last sweep: 2026-06-07. | Item | Notes | |------|-------| -| **P1 covered (2026-06-07)** | 14-tier spread chain, triple-onion gates, fleet recon, Fleet AI control, personas, phenotype, failure atlas, court, clearance L0–L4 — Go + Vitest (**736** frontend tests); see `tests/README.md` | -| **P2 covered (2026-06-07)** | Mock `MiningChainRunner` lifecycle (`mining_chain_lifecycle_test.go`); spread lane templates + dispatch (`spread_lanes_test.go`, `winrm_spread_test.go`, staging/BITS mocks); Path Forge API + Forge UI (`pathforge_test.go`, `BuilderPage.test.tsx`); WS/beacon + file upload round-trips (`ws_beacon_integration_test.go` server+agent); Playwright LOTL onion + discover→spread stub E2E (`lotl-timeline.spec.ts`, `discover-spread.spec.ts`); Vitest **736** — see `tests/README.md` § P2 | +| **P1 covered (2026-06-07)** | 14-tier spread chain, triple-onion gates, fleet recon, Fleet AI control, personas, phenotype, failure atlas, court, clearance L0–L4 — Go + Vitest (**734** frontend tests); see `tests/README.md` | +| **Fleet evolution covered (2026-06-07)** | Seeder/miner split, atlas gossip, genetic breeding, BGP spread router, genealogy telemetry (non-blocking auth), court retry L4, hashrate/subnet gates, APK scout, persona temperament, WSUS mimic — Go + Vitest **734** + Playwright phase 8; master table in `tests/README.md` | +| **P2 covered (2026-06-07)** | Mock `MiningChainRunner` lifecycle (`mining_chain_lifecycle_test.go`); spread lane templates + dispatch (`spread_lanes_test.go`, `winrm_spread_test.go`, staging/BITS mocks); Path Forge API + Forge UI (`pathforge_test.go`, `BuilderPage.test.tsx`); WS/beacon + file upload round-trips (`ws_beacon_integration_test.go` server+agent); Playwright LOTL onion + discover→spread stub E2E (`lotl-timeline.spec.ts`, `discover-spread.spec.ts`); Vitest **734** — see `tests/README.md` § P2 | | **P2 remaining** | Live Docker/Podman container start; real WinRM/GPO/systemd/crontab on remote hosts; live BITS/curl on target OS; live multi-hop discover→spread E2E (non-stub); Path Forge cancellation/batch race UI | | Agent pathtracer Go tests | Stub + Windows command routing expanded; full `wg_setup` on real hosts still manual. | | Client WS/beacon paths | httptest round-trips covered; live TLS/mesh beacon still manual. | diff --git a/server/web/e2e/fixtures.ts b/server/web/e2e/fixtures.ts index 6b0c768..acde002 100644 --- a/server/web/e2e/fixtures.ts +++ b/server/web/e2e/fixtures.ts @@ -64,8 +64,16 @@ export async function waitForServerHealth( } export async function loginToDashboard(page: Page): Promise { - await page.goto('/'); - await expect(page.getByRole('heading', { name: 'AetherForge' })).toBeVisible({ timeout: 15_000 }); + for (let attempt = 0; attempt < 2; attempt++) { + await page.goto('/', { waitUntil: 'load', timeout: 30_000 }); + try { + await expect(page.getByRole('heading', { name: 'AetherForge' })).toBeVisible({ timeout: 20_000 }); + break; + } catch (err) { + if (attempt === 1) throw err; + await page.waitForTimeout(1_500); + } + } await page.getByLabel('Username').fill(E2E_USER); await page.getByLabel('Password').fill(E2E_PASS); await page.getByRole('button', { name: /enter command deck/i }).click(); diff --git a/server/web/e2e/lotl-timeline.spec.ts b/server/web/e2e/lotl-timeline.spec.ts index 95963cc..05ea37d 100644 --- a/server/web/e2e/lotl-timeline.spec.ts +++ b/server/web/e2e/lotl-timeline.spec.ts @@ -159,7 +159,7 @@ test.describe('LOTL Timeline E2E', () => { await page.goto(`/lotl-timeline?agent=${encodeURIComponent(E2E_STUB_AGENT_ID)}`); await expect( page.locator('.lotl-fleet-chip').filter({ hasText: E2E_STUB_AGENT_HOSTNAME }), - ).toBeVisible({ timeout: 15_000 }); + ).toBeVisible({ timeout: 25_000 }); await expect(page.getByText('CLEARANCE HISTORY')).toBeVisible({ timeout: 10_000 }); await expect(page.locator('.lotl-clearance-list').getByText(/AI: L1 → L2/i)).toBeVisible(); await expect(page.getByText('CLEARANCE EVENTS')).toBeVisible(); diff --git a/tests/README.md b/tests/README.md index 7189e09..3c19a2b 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,6 +1,6 @@ # AetherForge Test Suite -**Current Vitest:** 736 tests in 87 files (`cd server/web && npm run test -- --run`). Full suite: `test.bat` → `scripts/test-suite.ps1`. +**Current Vitest:** 734 tests in 87 files (`cd server/web && npm run test -- --run`). Full suite: `test.bat` → `scripts/test-suite.ps1`. One command runs everything: @@ -20,6 +20,28 @@ Or with PowerShell directly: **Portable USB:** `pack-usb.bat` from repo root → copy `usb\` to a drive → `LAUNCH.bat` (opens `http://localhost:8989/`; `/agents` redirects to `/crucible` in the SPA). +## Fleet evolution master checklist (2026-06-07) + +Windows dashboard only; no in-process cloudflared. Genealogy fields are **telemetry on auth/stats only** — they never gate `fleet_secret` or block agent registration. + +| Feature | Where | Regression (quick) | +|---------|--------|-------------------| +| **Seeder / miner split** | Forge `fleet_role` + `seeder_mode`; agent `config/fleet_role.go`; server `internal/strategy/fleet_role.go`, `internal/api/fleet_role.go`; seeder staging (`deploy/seeder_staging.go`, `lan_seeder.go`) | `go test ./config/... ./client/... -run FleetRole -count=1` (agent); `go test ./internal/strategy/... ./internal/api/... ./internal/builder/... -run FleetRole -count=1` (server) | +| **Atlas LAN gossip** | Agent `client/atlas_gossip.go`; server `internal/atlas/lan_gossip.go`, `internal/api/atlas_gossip.go` | `go test ./client/... -run AtlasGossip -count=1`; `go test ./internal/atlas/... ./internal/api/... -run AtlasGossip -count=1` | +| **Genetic phenotype breeding** | `server/internal/strategy/breeding.go` merges sibling phenotypes | `go test ./internal/strategy/... -run Breeding -count=1` | +| **BGP-style spread router** | `server/internal/spreadrouter/`; Path Tracer + deploy plan `spread_route_hint` | `go test ./internal/spreadrouter/... -count=1`; `go test ./internal/api/... -run SpreadRoute -count=1` | +| **Spread genealogy watermark** | Forge `-ldflags` + env overrides; auth/stats JSON only | `go test ./config/... -run Genealogy -count=1`; `go test ./internal/builder/... -run Genealogy -count=1`; `go test ./internal/api/... -run SpreadGenealogy -count=1` | +| **Court retry + L4 elevation** | `server/internal/ai/court_commands.go`, scheduler `ensureCourtRetryClearance` | `go test ./internal/ai/... -run CourtRetry -count=1` | +| **Hashrate + subnet spread gates** | Agent `deploy/hashrate_gate.go`; server `internal/db/subnet_spread_pause.go`, `internal/atlas/subnet_immune.go` | `go test ./deploy/... -run HashrateGate -count=1`; `go test ./internal/db/... ./internal/atlas/... -run Subnet -count=1` | +| **APK scout mode** | Forge `scout_mode` / `ApkMode`; agent `client/scout_mode.go`; builder `build_apk.go` | `go test ./client/... -run Scout -count=1`; `go test ./internal/builder/... -run Apk -count=1`; `go test ./internal/api/... -run Scout -count=1` | +| **AI persona spread temperament** | Calibrate `ai_persona`; auth `spread_temperament` policy push | `go test ./internal/ai/... -run Persona -count=1`; `go test ./client/... -run SpreadTemperament -count=1`; Vitest Settings persona chips | +| **WSUS CAB/partial mimic** | Forge `WSUSFormatMimic`; staging wrap/unwrap in `wsus_cache_peer_staging.go` | `go test ./deploy/... -run FormatMimic -count=1`; `go test ./internal/api/... -run WSUSFormat -count=1` | +| **Spread immunity / subnet pause** | `server/internal/api/spread_immunity.go` | `go test ./internal/api/... -run SpreadImmunity -count=1` | +| **Fleet pressure telemetry** | Agent `client/fleet_pressure.go` (`seed_pressure`, `hashrate_pressure`, `emberwake_heat`) | `go test ./client/... -run FleetPressure -count=1`; Vitest `wsStatsCoalesce.test.ts` | + +Full gate: `.\scripts\test-suite.ps1` (phases 1–8). P2-focused slice: `.\scripts\test-suite.ps1 -P2` then phase 8 for Playwright onion + discover→spread stub. + + ## P2 completion (2026-06-07) Master suite: `.\scripts\test-suite.ps1` (all 8 phases). Focused P2 after landing parallel agents: `.\scripts\test-suite.ps1 -P2` (Go mining/spread/path-forge/WS + Vitest); add phase 8 for Playwright onion + discover→spread stub.