Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs/ci: document GBRAIN_PAID_LANES in the CI red runbook; regenerate structural-suites.tsv and llms-full.txt
garrytanb250f19bc8da
diff --git a/docs/TESTING.md b/docs/TESTING.mdindex 5c9353ab04..6046db371c 100644--- a/docs/TESTING.md+++ b/docs/TESTING.md@@ -1260,7 +1260,7 @@ there even though they pass on Linux and macOS.### CI vs local: intentionally divergent file sets-- **CI matrix** (`.github/workflows/test.yml`) runs `scripts/test-shard.sh` across 8 shards partitioned by weight-aware LPT bin-packing (`scripts/sharding.ts`; unweighted files get the p75 weight) and includes `*.slow.test.ts` files without a dedicated job (`eval-longmemeval-e2e.slow.test.ts` runs inside the shards; entity-resolve-perf, entity-card-perf, export-scale and brainbench-e2e have dedicated jobs, and the `reconcile-crash-*.slow.test.ts` files runs only in persistence-validation) plus keyless-allowlisted `evals/**/*.test.ts` (`test/scripts/evals-collection.test.ts`). Shards keep planned file order (`test-shard.sh --dry-run-list <i> 8`). Every Bun job activates the PGLite schema snapshot (built in-runner, cached across jobs with the runner's hash check authoritative). Serial files run across four `serial-tests` workers via `bun run test:serial`; `verify` and the BrainBench memory-conformance gate (`scripts/ci-brainbench-gate.sh`, compared against `evals/brainbench/baselines/main.json`) have their own jobs, all aggregated by `test-status`. `e2e.yml` aggregates through `e2e-status`, with jsonb-parity gating Tier 2's token spend; scheduled runs also require the full-corpus lanes. Both aggregates reject failures, cancellations and unexpected skips, and successful test results are never reused. The repository variable `GBRAIN_PAID_LANES=0` switches every paid lane off (Tier 2, the hermes door's paid leg and the OpenCode credentialed lane in `heavy-tests.yml`) for forks and spend freezes; `e2e-status` then accepts Tier 2 as skipped, says so in the step summary, and still rejects every other skip, failure or cancellation (#5903, `test/paid-lanes-switch-5903.test.ts`). CI is the ground truth for "did everything pass."+- **CI matrix** (`.github/workflows/test.yml`) runs `scripts/test-shard.sh` across 8 shards partitioned by weight-aware LPT bin-packing (`scripts/sharding.ts`; unweighted files get the p75 weight) and includes `*.slow.test.ts` files without a dedicated job (`eval-longmemeval-e2e.slow.test.ts` runs inside the shards; entity-resolve-perf, entity-card-perf, export-scale and brainbench-e2e have dedicated jobs, and the `reconcile-crash-*.slow.test.ts` files runs only in persistence-validation) plus keyless-allowlisted `evals/**/*.test.ts` (`test/scripts/evals-collection.test.ts`). Shards keep planned file order (`test-shard.sh --dry-run-list <i> 8`). Every Bun job activates the PGLite schema snapshot (built in-runner, cached across jobs with the runner's hash check authoritative). Serial files run across four `serial-tests` workers via `bun run test:serial`; `verify` and the BrainBench memory-conformance gate (`scripts/ci-brainbench-gate.sh`, compared against `evals/brainbench/baselines/main.json`) have their own jobs, all aggregated by `test-status`. `e2e.yml` aggregates through `e2e-status`, with jsonb-parity gating Tier 2's token spend; scheduled runs also require the full-corpus lanes. Both aggregates reject failures, cancellations and unexpected skips, and successful test results are never reused. CI is the ground truth for "did everything pass."- **Local fast loop** (`scripts/run-unit-shard.sh` via the parallel wrapper) uses the same weighted partitioner as CI and EXCLUDES `*.slow.test.ts` AND `*.serial.test.ts`. Each shard runs its complete ordered selection with a fresh Bun process per file, without adding workers. Later groups still run after failures; missing summaries or file-completion evidence fail the shard. Local trades coverage for inner-loop speed; CI catches what local skips.This divergence is intentional; the two scripts solve different problems.diff --git a/docs/ci-red-runbook.md b/docs/ci-red-runbook.mdindex 7aa94ff892..7f4e4dfb93 100644--- a/docs/ci-red-runbook.md+++ b/docs/ci-red-runbook.md@@ -82,6 +82,10 @@ The nightly E2E workflow's `order-hunt` job (also `gh workflow run e2e.yml -f or- **A failure** is rerun alone. A file that passes alone is reported as `order-dependent test` with `bash scripts/run-e2e.sh <the files before it, in order> <file>` to replay it; bisect the files before it to find the one that leaks, and fix that file's teardown. A file that also fails alone is only a warning here, since the full E2E lanes report it.- The job is keyless and outside `e2e-status`, so it never blocks a PR; a red order hunt turns the E2E nightly red.+## Paid lanes switch++The repository variable `GBRAIN_PAID_LANES=0` switches every paid lane off: Tier 2 (LLM Skills) in `e2e.yml`, the hermes door's paid leg and the OpenCode credentialed lane in `heavy-tests.yml` (#5903). Use it on a fork or during a spend freeze; unset (or any other value) keeps the lanes on. Each lane writes a visible "paid lanes disabled" step summary, and `e2e-status` accepts Tier 2 as `skipped` only under that exact value, saying so in its own summary; any other skip, failure or cancellation still fails the aggregate (`test/paid-lanes-switch-5903.test.ts` runs the aggregate script with every combination). A run with the variable set is not green coverage of the paid lanes.+## CI failure manifestThe `executed-receipts` job of test.yml and e2e.yml runs `scripts/ci-manifest.ts`diff --git a/llms-full.txt b/llms-full.txtindex a5b7c3428f..47e8574369 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -1196,6 +1196,17 @@ destination on a local filesystem with Windows ACL support and permittedWindows PowerShell. A busy database or achanging file fails the operation instead of publishing a success receipt.+Before the dump, the command removes gbrain's own IPC socket files+(`.gbrain-resolve.sock`, `.gbrain-persistence.sock`) from the data dir when+nothing listens on them, so a `gbrain serve` that was killed does not block+later backups; each removal is listed in the archive's `omitted` inventory.+Any other socket, FIFO or symlink in the data dir is left alone and the+command refuses with `backup_dump_failed` naming it: stop the process that+uses it (or move it out of the data dir) and run the same command again.+This cleanup is verified on Linux and macOS; on Windows a stale socket is+removed through the native lock binding and has not been exercised on a+native runner.+| Included | Excluded or inventoried for reconnection || --- | --- || Full PGLite database: pages, DB-only facts, jobs, settings, authentication state, and other tables | Runtime packages, Bun, caches, Git metadata, previous backups |diff --git a/scripts/structural-suites.tsv b/scripts/structural-suites.tsvindex 1801c34ff7..bff3ffca87 100644--- a/scripts/structural-suites.tsv+++ b/scripts/structural-suites.tsv@@ -107,6 +107,7 @@ test/destructive-guard.test.ts assessDestructiveImpact 5 readFileSynctest/destructive-guard.test.ts formatters (display helpers) 4 readFileSynctest/destructive-guard.test.ts purgeExpiredSources — clone cleanup containment 1 readFileSynctest/detached-stderr.test.ts jobs.ts detach branch (source pin, #4418) 2 source-surface-helper+test/divergence-safe-pull-5429.serial.test.ts --no-autostash (#5429, bug fix) 3 readFileSynctest/docs-mcp-deploy.test.ts DEPLOY.md documents the owner magic-link flow (#5007) 1 readFileSync,source-surface-helpertest/docs-navigation.test.ts primary documentation navigation 1 readFileSynctest/doctor-atom-provenance-drift.test.ts computeAtomProvenanceDriftCheck 19 doctor-source-helper@@ -244,6 +245,7 @@ test/ocr-run-budget.test.ts doctor ocr_health surfaces the budget-skip counter (test/openclaw-plugin-manifest.test.ts bundled-skill reference closure (nothing bundled points at a non-bundled skill) 1 readFileSynctest/openclaw-plugin-manifest.test.ts plugin membership curation (skills = plugin ∪ exclusions, disjoint) 9 readFileSynctest/openclaw-plugin-manifest.test.ts root OpenClaw plugin manifest 2 readFileSync+test/paid-lanes-switch-5903.test.ts (file-level) 10 readFileSynctest/persistence-git-subdir-origin.test.ts (file-level) 6 readFileSynctest/persistence-request-indexes.test.ts (file-level) 4 readFileSynctest/persistence-sync-options.serial.test.ts (file-level) 1 readFileSync