Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ SentinelAudit.exe
# Backup files
*.bak
*.backup
*.local-backup
agent-map.json

# Editor & OS
.vscode/
Expand Down
11 changes: 6 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TEST RUN is an optional skip-only demo — it is NOT a separate mode and it does
- The pipeline skips plan membership check, online scan, chain operations, and payments.
- Every node row gets `actualMbps: null, errorCode: 'TEST_RUN_SKIP'`.
- The run row is written to `audit.db` with `mode='test'` so it is visually distinguishable in the admin table.
- No second database. No `audit-test.db`. One file on disk.
- No second database. No `audit-dry.db`. One file on disk.

## Theme (Dark/Light)
- Toggle exists on BOTH `admin.html` and `public.html` (and `/live` when built).
Expand Down Expand Up @@ -85,8 +85,9 @@ TEST RUN is an optional skip-only demo — it is NOT a separate mode and it does
- DONE 2026-04-23: Port search to `public.html` (#20).
- DONE 2026-04-23: Build `/live` page + route (Option B).
- DONE 2026-04-25: Collapsed dual-mode (dev/bundled/public) → single mode + `broadcastLive` toggle. Removed mode cookie, `requireMode` middleware, `_currentMode`, `_applyModeUI`, `selectMode`, `switchMode`, mode overlay, public-test endpoints. Added `POST /GET /api/broadcast`.
- DONE 2026-04-25: Consolidated `audit-test.db` into `audit.db`. TEST RUN is now `?testRun=1` on `/api/start`, writes `mode='test'` rows to the single DB.
- DONE 2026-04-25: TEST RUN parity — runs the real pipeline end-to-end, short-circuits per-node after price discovery with `errorCode='TEST_RUN_SKIP'`. Stripped all `public-test:*` SSE prefixes, `_pipelinePublicMode`, three `/api/admin/public-test/*` endpoints, `TEST_RUN_SKIP`, `test-run:log`, `#testRunLoop`. Broadcast Live toggle moved to top action cluster.
- DONE 2026-04-25: Consolidated the legacy `audit-test.db` into `audit.db`. TEST RUN is now `?testRun=1` on `/api/start`, writes `mode='test'` rows to the single DB.
- DONE 2026-04-25: TEST RUN parity — runs the real pipeline end-to-end, short-circuits per-node after price discovery with `errorCode='TEST_RUN_SKIP'`. Stripped all `public-test:*` SSE prefixes, `_pipelinePublicMode`, three `/api/admin/public-test/*` endpoints, `TEST_RUN_SKIP` legacy code path, `test-run:log`, `#testRunLoop`. Broadcast Live toggle moved to top action cluster.
- DONE 2026-04-26: Renamed every `dry`/`dryRun`/`dry-run`/`DRY_RUN` identifier in the project to the `test`/`testRun`/`test-run`/`TEST_RUN` family. There is no `dry` vocabulary anywhere in the tester. The flag is `state.testRun`, the API param is `testRun` / `?testRun=1`, the UI vars are `isTestRun`. The GitHub canonical version of `audit/pipeline.js` and `audit/node-test.js` is updated to match.
- DONE: Theme toggle on `public.html` (#22) — `#btnTheme` + `toggleTheme()` already wired.

## Don't
Expand All @@ -95,11 +96,11 @@ TEST RUN is an optional skip-only demo — it is NOT a separate mode and it does
- Don't commit `.env` or `MNEMONIC=...`.
- Don't `taskkill /F /IM node.exe` — kills Claude Code's own runtime.
- Don't hide or remove the per-row failure copy button — the failure-log UX is a MUST, not a polish item.
- **DON'T FUCK WITH TEST RUN.** Never modify TEST RUN code paths. This file is the source of truth. This includes:
- **DON'T FUCK WITH TEST RUN.** Never modify TEST RUN code paths. The canonical implementation lives on GitHub at `Sentinel-Autonomybuilder/sentinel-node-tester` — that is the source of truth. This includes:
- The `if (state.testRun)` short-circuit in `audit/node-test.js` (the block that returns early with `errorCode: 'TEST_RUN_SKIP'` after price discovery).
- The TEST RUN branching in `audit/pipeline.js` (anything gated on `state.testRun`, including the batch-payment skip and `state.testRun = ...` assignment).
- The `testRun` flag plumbing through `POST /api/start` (body `testRun: true` and query `?testRun=1`) in `server.js`.
- The `mode='test'` row write in `core/db.js`.
- Any helper that exists solely to support TEST RUN (skip flags, `TEST_RUN_SKIP` error code, test-run UI badges, etc.).
- The vocabulary is `test`/`testRun`/`test-run`/`TEST_RUN` ONLY — never reintroduce `dry`/`dryRun`/`dry-run`/`DRY_RUN` anywhere in the project.
If a parity refactor, SDK upgrade, or "cleanup" seems to require touching TEST RUN — STOP. Ask the user first. Do not refactor, rename, "consolidate", "simplify", or otherwise modify these paths under any pretext. Treat TEST RUN as immutable.
If a parity refactor, SDK upgrade, or "cleanup" seems to require touching TEST RUN — STOP. Ask the user first. Do not refactor, rename, "consolidate", "simplify", or otherwise modify these paths under any pretext. If you find local divergence from the GitHub canonical version, the local version is wrong; restore from GitHub. Treat TEST RUN as immutable.
5 changes: 2 additions & 3 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ This will:
## 9. Verify

1. Open http://localhost:3001 -- you should see the dashboard with your wallet address and P2P balance
2. Open http://localhost:3001/dictator -- Dictator Mode loads (empty until first audit)
3. Click **Start Audit** -- the live log should show node discovery, then batch payments, then individual node tests
4. Check `results/results.json` after a few nodes complete -- should contain test result objects
2. Click **Start Audit** -- the live log should show node discovery, then batch payments, then individual node tests
3. Check `results/results.json` after a few nodes complete -- should contain test result objects

### Health check

Expand Down
Loading
Loading