Files
gbrain/scripts/structural-suites.tsv
Garry Tan 668b9bac30 v0.50.5.0 fix(security): critical+high advisory wave — DCR scope ceiling, cwd .env quarantine, format-based transcript redaction, consent pins (#5130)
* v0.50.2.0 fix(security): critical+high advisory wave — DCR scope ceiling, cwd .env quarantine, format-based transcript redaction, consent pins

Closes the critical- and high-severity items from six privately reported
advisories (GHSA-548g-mhxp-p66h, GHSA-42r8-3jfh-82vr, GHSA-62gp-q5hj-r9mv,
GHSA-q374-hhfh-f79x, GHSA-ghfq-gqmq-7fm4, GHSA-q5p9-qr3g-6v38). Squashed to a
single commit so no intermediate revision carries a test-fixture credential
shape through the gitleaks range gate.

Cluster A — OAuth consent gate (GHSA-548g / -42r8 / -62gp). The v0.50.0.0
owner-approval flow is pinned end to end against a real `serve --http
--enable-dcr` process and in-process: anonymous /authorize mints no code, a
forged code is rejected at /token, revoked clients are refused at grants.begin,
and OAuthGrants.begin() now caps awaiting-decision requests per client_id.

Cluster B — DCR scope ceiling (GHSA-q374 defect B, GHSA-548g fix #2).
registerClient rejects admin/sources_admin/users_admin/agent with HTTP 400 via
scope.ts:dcrScopeViolation; client_credentials DCR clients are read-only.
Remote sources_remove is source-fenced like sources_status. doctor's
oauth_client_scope_health flags privileged self-registered clients.

Cluster C — format-based secret detection (GHSA-ghfq). secret-scan.ts gains
jwt/aws(AKIA|ASIA)/google/stripe/sendgrid/twilio/supabase/gitlab/npm/hf plus
bearer and db_url_credentials catch-alls; the transcripts lane opts into the
digit-gated high-entropy rule; getRawData follows the page soft-delete on both
engines; delete_page --purge (local-CLI only) hard-removes a leaked page.

Cluster D — cwd .env quarantine (GHSA-q5p9). New env-trust.ts + cli-preflight.ts
drop a fixed list of code-loading / exec-target / posture-widening GBRAIN_*
variables when a working-directory .env assigns them (key-presence, since Bun
expands ${VAR}); the guardrails loader refuses cwd-relative and cwd-.env specs.

Release artifacts: VERSION/package.json/three plugin manifests bumped to
0.50.2.0; CHANGELOG entry (reporters credited); SECURITY.md, README, DEPLOY.md,
CHATGPT.md, guardrails.md, ENGINES.md and KEY_FILES updated; template + plugin
trees, skills.lock, flag registry and llms bundle regenerated; module-size
ceilings adjusted with per-row reasons; TODOS follow-ups filed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: pre-landing review fixes (v0.50.2.0 security wave)

Review cycle 1 of the ship: 6 specialists + red team + coverage audit.

Security / red team:
- env-trust: parse .env with Bun's line grammar (bare CR terminates a line;
  BOM/U+2028 cannot hide an assignment); protect the loader / git / node /
  proxy / AI-CLI variable families a checkout could plant for the programs
  gbrain spawns; cli-preflight re-execs gbrain once with the sanitized
  environment so git, the agent CLI and workers inherit the clean view;
  cwd == ~/.gbrain no longer quarantines the operator's own .env.
- guardrails: GBRAIN_GUARDRAILS_MODULE accepts only absolute or ~/ paths
  (a package name resolves from the cwd's node_modules).
- secret-scan: bounded db_url_credentials quantifiers + per-pattern
  prechecks (linear on long lines), windowed previews that redact every
  sibling span, single-pass longest-first replacement.
- TODOS: follow-up entries reworded to the functional level.

API contract / maintainability:
- delete_page purge: remote callers get permission_denied; a purged
  response always carries write_through; get_raw_data description states
  the soft-delete follow; includeDeleted narrowed to the getRawData
  signature; client_credentials gate evaluated before the DCR ceiling;
  doctor privileged set derived from the scope registry; sources_remove /
  sources_status share assertSourceInCallerScope; shell-job opt-in reaches
  --job-isolation process children as --allow-shell-jobs; stale help copy.
- transcripts ingest: raw-metadata compare uses canonical JSON (JSONB key
  order made every healthy re-run rewrite unchanged rows).

Coverage audit: 5 new test files + 4 extended (25 cases), plus RED-verified
pins for every fix above. Docs/KEY_FILES/CHANGELOG/SECURITY updated; llms
bundle, flag registry, tool catalog, structural suites regenerated;
module-size rows adjusted with reasons.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: pre-landing review fixes, cycle 2 (v0.50.2.0 security wave)

Re-exec redesign (security + red team + adversarial findings):
- cli-preflight re-runs gbrain from an empty temporary directory so the
  sanitized child never reloads the hostile .env: dropped keys are absent,
  never carried as '' (git and the dynamic loader presence-check
  GIT_SSL_NO_VERIFY / LD_TRACE_LOADED_OBJECTS; '' broke git ident).
- The re-run marker is JSON {cwd, neutral} honoured only when the process
  provably started in that empty directory — a marker planted via a cwd
  .env is ignored (the ppid-keyed marker was forgeable under systemd/docker).
- SIGINT is delivered by the tty once (wrapper no longer forwards it);
  SIGTERM/SIGHUP forwarded; execArgv preserved under the dev runtime.
- Protected families widened: XDG config roots (git reads
  $XDG_CONFIG_HOME/git/config as global config), GNUPGHOME, TLS trust
  stores, EDITOR/VISUAL/PAGER, every provider endpoint variable, the
  GBRAIN_REMOTE_* / GBRAIN_DIRECT_DATABASE_URL redirects, and the marker.
- cwd dotenv parsed once per start; jobs start uses the same '1' literal.

secret-scan (cycle-2 findings):
- db_url_credentials password class only stops at whitespace, '@' and
  string delimiters again (unescaped / { } < > | ^ ` \ passwords redact);
  BEARER uppercase recognized; jwt / high_entropy_assignment / PEM body
  bounded (adversarial '-eyJ' / '_token' runs and header-only PEM texts
  were quadratic); incremental PEM line cursor; redactFindings rebuilds
  the text by span-splice in one pass (was O(unique values x text)).

Contract / docs:
- delete_page purge responses carry a residuals hint (git history, exports,
  compiled context, slug-keyed derived rows); CHANGELOG states a single
  truth for GBRAIN_GUARDRAILS_MODULE (absolute or ~/ only, listed under
  Changed with a migration note); SECURITY.md / KEY_FILES / docs guides /
  minion-orchestrator skill describe the new mechanism and the
  --allow-shell-jobs opt-in; TODOS follow-ups filed; test-reads-source
  marker on the hook spawn-shape test; new PEM fixtures fragmented.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: pre-landing review fixes, cycle 3 (v0.50.2.0 security wave)

- Compiled binaries: every `bun build --compile` invocation passes
  `--no-compile-autoload-bunfig`; new `scripts/check-compile-autoload.sh`
  guard (self-tested, in verify CHECKS) keeps it that way.
- cwd `.env` quarantine: `GBRAIN_DATABASE_URL`, `GBRAIN_OAUTH_RELAY_URL`,
  OpenSSL config/engine/module loaders, temp roots and HOME/USERPROFILE
  join the protected set; the neutral hop dir is realpath'd; signal
  handlers are installed before the spawn; non-tty wrappers forward SIGINT
  once; guardrails fail closed when a dropped GBRAIN_GUARDRAILS_MODULE had
  a value.
- secret-scan: PEM header-line cursor is O(text) on newline-free tails;
  bounded bearer echo pass redacts bare re-occurrences of claimed tokens.
- transcripts ingest: raw-metadata probe reads active rows only.
- Tests: afterAll cleanup, execArgv/SIGHUP/chdir-back pins, pty SIGINT,
  perf pins; docs/CHANGELOG/TODOS/KEY_FILES/SECURITY updated; llms +
  skills.lock + plugin trees regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: pre-landing review fixes, cycle 4 (v0.50.2.0 security wave)

Cross-model adversarial pass (Codex) + Claude verifier findings:
- env-trust: shell-startup / interpreter-home family (BASH_ENV, SHELLOPTS,
  PS4, BASHOPTS, PROMPT_COMMAND, ZDOTDIR, PYTHONHOME, PERLLIB, GCONV_PATH,
  BASH_FUNC_* prefix) protected; sh `ENV` deliberately excluded.
- cli-preflight: config-dir exemption refused when the cwd .env assigns
  GBRAIN_HOME/HOME/USERPROFILE; wrapper removes pre-existing signal
  listeners so its exit is always the child's; SIGINT forwarded only
  without a controlling terminal (/dev/tty probe); a dropped planted HOME
  is restored from the passwd home; script-mode runs warn once when the
  cwd bunfig.toml declares a top-level preload.
- secret-scan: overlapping matches redact the UNION of matched spans;
  echo pass covers bearer + high-entropy values (64 unique, <=512 chars)
  via per-value sweeps over unclaimed gaps only; planRedaction/
  applyRedaction share a session-wide echo dictionary in transcripts
  render.
- sources_remove keys on write authority (assertSourceInCallerWriteScope);
  federated read grants confer no removal right.
- delete_page --purge retries the tombstone's file removal and fails
  closed (storage_error) while the file remains.
- Docs: SECURITY.md quarantine example no longer uses the one key that
  refuses instead of re-running; KEY_FILES/CHANGELOG/TODOS updated; llms.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* v0.50.3.0 chore: re-bump the security wave to 0.50.3.0 (master claimed 0.50.2.0 in #5122)

Five-file lockstep + BOOTSTRAP stamp + CHANGELOG header/date + TODOS
follow-up refs + bun.lock, template repo and plugin trees regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: pre-landing review fixes, cycle 5 — Codex structured-review gate (v0.50.3.0 security wave)

- cli-preflight: hop marker carries the wrapper pid; a verified re-run arms
  an unref'd 1 s watchdog and exits 137 (removing its neutral dir) when the
  wrapper is force-killed, so supervisor restarts never orphan a worker;
  relative path-bearing runtime flags (--preload/-r/--require/--import,
  --config/-c, --env-file, --tsconfig-override) are resolved against the
  original cwd before the hop.
- secret-scan: echo pass is a streaming leftmost-longest merge with O(values)
  retained state (Codex repro: 64 short claims + 2 MiB repetitive tail went
  from +233 MiB RSS / 1.4 s to +16 MiB / 140 ms); repetitive tails are now
  covered wall-to-wall.
- Docs: KEY_FILES, SECURITY.md, CHANGELOG; llms regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs: update project documentation for v0.50.3.0

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(ci): green the three failing checks on the v0.50.3.0 wave

- semgrep: six `nosemgrep` suppressions with justifications for the
  path-join/resolve and non-literal-RegExp taint heuristics on operator-
  controlled cwd/flag paths and compile-time pattern sources (no behaviour
  change).
- test (2): the two pty Ctrl-C pins ran the wrapper through `script -c`'s
  intermediate /bin/sh; on ubuntu-latest that is dash, which re-raises the
  pty's SIGINT on itself after the child exits (130) instead of relaying
  the child's 42. The pty command now `exec`s the wrapper so no shell stays
  in the foreground group; documented in a `ptyCommand` helper.
- Selected E2E: with --enable-dcr, OAuth discovery now advertises exactly
  the self-registration ceiling (`read write`) via
  `scopesSupportedForDiscovery`, so a connector that copies
  `scopes_supported` into /register succeeds (master's #5122 pin); without
  DCR the full operator list minus `agent` is unchanged. Sibling e2e
  assertions that expected privileged scopes on the DCR-enabled server
  updated; unit + PGLite e2e pins added; docs/TODOS/CHANGELOG/KEY_FILES
  updated; llms regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* v0.50.5.0 chore: re-bump the security wave to 0.50.5.0 (master claimed 0.50.4.0 in #5131)

Five-file lockstep + BOOTSTRAP stamp + CHANGELOG header + TODOS follow-up
refs + bun.lock, template repo and plugin trees regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-15 21:40:59 -07:00

30 KiB

1# Structural test suites — suites whose assertions read repo source/doc text.
2# GENERATED by scripts/classify-tests.ts; freshness-checked in verify.
3# Fix misclassifications in the classifier, never by hand-editing rows.
4# Columns: filesuitecasesdetector
5test/agent-install.test.ts(file-level)10readFileSync
6test/agent-register.test.tsPGLite integration (pre-flight → tx → audit → exchange)3readFileSync
7test/agent-register.test.tsresolvePreset7readFileSync
8test/agent-register.test.tsstructural guards2readFileSync
9test/apply-migrations.test.tsfailed migration prints phase detail (#921)1readFileSync
10test/apply-migrations.test.tsresolveSchemaBehind (#1530)5readFileSync
11test/apply-migrations.test.tsrunApplyMigrations exit codes (v0.36.1.x #1062)1readFileSync
12test/archived-source-scoping.test.ts#3880 structural pins — all-source local_path selections filter archived2readFileSync
13test/asymmetric-encoding-contract.test.tsSource-text contract (cheap belt + suspenders)3readFileSync
14test/auto-link-targeted-probe-2544.test.ts#2544 — auto-link behavior through put_page (targeted probe)6readFileSync
15test/autopilot-auto-drain-wiring.test.tsautopilot auto-drain wiring8readFileSync
16test/autopilot-cycle-failure-classification.test.tsautopilot cycle-failure classification — only 'failed' trips the circuit breaker2readFileSync
17test/autopilot-cycle-failure-classification.test.tsrunPhaseOrphans ratio threshold — no more absolute count > 203readFileSync
18test/autopilot-fanout-wiring.test.tsautopilot.ts ↔ dispatchPerSource wiring16readFileSync
19test/autopilot-install.test.tsautopilot install — reload-safety (#2608)1readFileSync
20test/autopilot-install.test.tsautopilot showStatus — wrapper-path detection1readFileSync
21test/autopilot-install.test.tsautopilot wiring: chat-unavailable boot warning (#2608)1readFileSync
22test/autopilot-install.test.tsautopilot wrapper script — bun PATH export (v0.42.x regression)1readFileSync
23test/autopilot-install.test.tsautopilot wrapper script — env source order (v0.36.1.x #966)1readFileSync
24test/autopilot-install.test.tsautopilot wrapper script — gbrain-owned env file (#2608)5readFileSync
25test/autopilot-install.test.tsautopilot wrapper script — key sourcing (#2608)1readFileSync
26test/autopilot-pause-marker.test.tspause marker fences minion job pickup1readFileSync
27test/autopilot-self-upgrade.test.tsautopilot self-upgrade static-shape regressions4readFileSync
28test/autopilot-shutdown-engine-close.test.tsautopilot.ts graceful engine shutdown (#1872)6readFileSync
29test/autopilot-supervisor-wiring.test.tsautopilot.ts ↔ ChildWorkerSupervisor wiring7readFileSync
30test/backlinks-job-default.test.tsbacklinks Minion handler — empty payload defaults to check, not fix3readFileSync
31test/backup-cli.serial.test.tsrunBackupCli — PGLite lock fallback3readFileSync
32test/backup-invalidation.serial.test.tsbootstrap repo — recordRepoInReceipt contract (source-text pin)2readFileSync
33test/book-mirror.test.tsgbrain book-mirror — source file invariants7readFileSync
34test/bootstrap-codex-door.test.tsCodex door — rendered AGENTS.md pull protocol (Gate 3)2readFileSync
35test/bootstrap-contract.test.tsbootstrap same-turn write-back contract6readFileSync
36test/bootstrap-opencode-door.serial.test.tsopencode door — rendered AGENTS.md pull protocol1readFileSync
37test/brain-durability-hook.serial.test.ts#4682 — push-lock timeout is fail-loud for the helper only1readFileSync
38test/brain-durability-hook.serial.test.tsbrain-commit-push.sh (D13 guarantee)4readFileSync
39test/brain-durability-hook.serial.test.tsdurability schedule (installCron:true) [D2/D12]0readFileSync
40test/brain-durability-hook.serial.test.tspost-commit hook (D9 local, D7 self-contained)4readFileSync
41test/brain-repo-durability.serial.test.tshardenBrainRepo16readFileSync
42test/brain-score-breakdown.test.tsBug 11 — BrainHealth type shape1bun-file
43test/brain-score-breakdown.test.tsBug 11 — doctor renders brain_score breakdown1doctor-source-helper
44test/brain-score-breakdown.test.tslinkable scope — archive pages do not drag the score3doctor-source-helper
45test/brainstorm-timeout.test.tsorchestrator entry-point wrap (CV11 single-point classification)2bun-file
46test/build-llms.test.tsCLAUDE.md restructure content contracts5readFileSync
47test/build-llms.test.tsbuild-llms generator7readFileSync
48test/canonical-migration-command.test.tscanonical migration command (single home: ai/defaults.ts)5doctor-source-helper
49test/chat-key-plane.test.ts#3944 both planner surfaces share the helper (source guard)2readFileSync
50test/check-bootstrap-guards.test.tscheck-grok-pin.sh10readFileSync
51test/check-bootstrap-guards.test.tscheck-opencode-pin.sh6readFileSync
52test/check-bootstrap-guards.test.tsverify + workflow wiring6readFileSync
53test/check-update.test.tscheck-update CLI3bun-file
54test/child-worker-supervisor.test.tsissue #1801 — restartCurrentChild + killChild liveness fix3readFileSync
55test/chronicle-extract.test.tsrunChronicleExtract9readFileSync
56test/ci-local-empty-mounts.test.ts(file-level)2readFileSync
57test/claude-cli-recipe.test.tsclaude-cli LanguageModel — abort + error envelopes13readFileSync
58test/claude-cli-recipe.test.tsclaude-cli LanguageModel — context isolation2readFileSync
59test/claude-cli-recipe.test.tsclaude-cli LanguageModel — text-only round trip4readFileSync
60test/claude-cli-recipe.test.tsclaude-cli LanguageModel — tool use17readFileSync
61test/claude-cli-recipe.test.tsclaude-cli recipe registration2readFileSync
62test/cli-force-exit-teardown-arming.test.tscli.ts — disconnect hard-deadline armed at teardown entry, not before the op body1readFileSync
63test/cli.test.tsBigInt-safe output normalization (#2450)5readFileSync
64test/cli.test.tsCLI structure6readFileSync
65test/cli.test.tsCLI version2readFileSync
66test/cli.test.tsask alias2readFileSync
67test/codex-plugin-manifest.test.tscodex mcp.json3readFileSync
68test/codex-plugin-manifest.test.tscurated tree membership + scanner guard5readFileSync
69test/codex-plugin-manifest.test.tsgenerator negative fixtures (a guard that cannot fail is not coverage)9readFileSync
70test/codex-plugin-manifest.test.tsvariant ${def.plugin_name} (persona ${personaName})5readFileSync
71test/compile-view.test.tscompileView — determinism3readFileSync
72test/compile-view.test.tscompileView — source isolation + read errors3readFileSync
73test/config.test.tsconfig source correctness1readFileSync
74test/connection-resilience.test.tsEng-review D3 — executeRaw has no per-call retry wrapper3readFileSync
75test/context-audit-skill.test.ts#4988 context-audit skill states its token-estimate basis3readFileSync
76test/contextual-retrieval-service-pure.test.tsinline import contextual synopsis containment1readFileSync
77test/conversation-facts-type-allowlist-drift.test.ts(file-level)18readFileSync
78test/cycle-abort.test.ts#1972 — complete cooperative-abort coverage3readFileSync
79test/cycle-abort.test.ts#4077 — synthesize/patterns cooperative-abort threading3readFileSync
80test/cycle-abort.test.tsCycleOpts.signal contract (v0.20.5)4readFileSync
81test/cycle-abort.test.tsautopilot-cycle handler contract (v0.20.5)3readFileSync
82test/cycle-drain-renewal.test.tsdb-lock heartbeat wiring (structural — issue #6 cancellation)1readFileSync
83test/cycle-drain-renewal.test.tsdrain-loop wiring (structural — the shape guard only covers worker.ts)2readFileSync
84test/cycle-pack-gating.test.ts#2117: pack-gated skip summaries are actionable2readFileSync
85test/cycle-pack-gating.test.tsv0.41 T9 R-GATE: NEEDS_LOCK_PHASES contract (source-shape)2readFileSync
86test/cycle-pack-gating.test.tsv0.41 T9 R-GATE: dispatch result envelope2readFileSync
87test/cycle-pack-gating.test.tsv0.41 T9 R-GATE: orchestrator dispatch wires the pack-gate5readFileSync
88test/cycle-pack-gating.test.tsv0.41 T9 R-GATE: pre-existing 17 core phases always run3readFileSync
89test/cycle-patterns-deadline-budget.test.tsdeadline plumbing wiring (structural)7readFileSync
90test/cycle-patterns.test.tspatterns phase wiring9readFileSync
91test/cycle-patterns.test.tspatterns scope filter7readFileSync
92test/cycle-phase-deadline-drift.test.tspropose_takes deadline < job timeout (#4168)4readFileSync
93test/cycle/cycle-lock-ttl.test.tscycle lock TTL (T2 regression pin)1readFileSync
94test/destructive-guard.test.tsFK-RESTRICT lifecycle (clientsReferencingSource + purge skip)9readFileSync
95test/destructive-guard.test.tsassessDestructiveImpact5readFileSync
96test/destructive-guard.test.tsformatters (display helpers)4readFileSync
97test/destructive-guard.test.tspurgeExpiredSources — clone cleanup containment1readFileSync
98test/detached-stderr.test.tsjobs.ts detach branch (source pin, #4418)2readFileSync
99test/docs-bootstrap-persistence-table.test.ts#4986 bootstrap.md scopes the Stop-push knobs and lists every push path2readFileSync
100test/docs-mcp-deploy.test.tsDEPLOY.md documents dual-mode /mcp auth (#4893)1readFileSync
101test/docs-mcp-deploy.test.tsDEPLOY.md documents the owner magic-link flow (#5007)5readFileSync
102test/docs-mcp-deploy.test.tsDEPLOY.md documents the tailnet/LAN-only serve --http shape (#4500)3readFileSync
103test/docs-timeline-extraction-guide.test.ts#4987 timeline extraction docs describe the real trigger2readFileSync
104test/doctor-atom-provenance-drift.test.tscomputeAtomProvenanceDriftCheck18doctor-source-helper
105test/doctor-embedding-env-override.test.tscross-surface parity (source-grep regression guard)1doctor-source-helper
106test/doctor-fix.test.tsgbrain doctor --fix CLI integration3readFileSync
107test/doctor-frontmatter-partial.test.tsdoctor frontmatter_integrity — load-bearing render strings5doctor-source-helper
108test/doctor-frontmatter-partial.test.tsdoctor frontmatter_integrity — structural rendering (source-grep)6doctor-source-helper
109test/doctor-orphan-ratio.test.tscross-surface parity contract3doctor-source-helper,readFileSync
110test/doctor-orphan-ratio.test.tsrunOrphanRatioCheck — thin-client surface (D11)1readFileSync
111test/doctor-schema-column-diff.test.tsdoctor schema_version wires the column diff (#4421)1doctor-source-helper
112test/doctor-skills-dir.test.tsdoctor --skills-dir (#4673)6readFileSync
113test/doctor-supervisor-singleton-pidfile.test.tsdoctor supervisor_singleton — honors the recorded pid_file (custom --pid-file)2doctor-source-helper
114test/doctor-supervisor-singleton-pidfile.test.tsdoctor supervisor_singleton — pid_file fallback (source-grep)1doctor-source-helper
115test/doctor-volunteer-channels.test.tscheckVolunteerChannels9doctor-source-helper,readFileSync
116test/doctor-wedged-queue.test.tsissue #1801 fix #3 — remote queue_health state→status regression1doctor-source-helper
117test/doctor.test.tsBUG 4 — in-progress sync via live lock, not stale freshness8doctor-source-helper
118test/doctor.test.tsdoctor command37doctor-source-helper
119test/doctor.test.tsissue #972 — link_resolution_opportunity check8doctor-source-helper
120test/doctor.test.tsstub_guard_24h check (v0.34.5)5doctor-source-helper
121test/doctor.test.tssupervisor crash classifier wiring (v0.35.x)4bun-file,doctor-source-helper
122test/doctor.test.tssync_freshness — clone-unavailable content-lag fallback6doctor-source-helper
123test/doctor.test.tsv0.31.8 — wedge migration force-retry hint (D19)4doctor-source-helper
124test/doctor.test.tsv0.32.4 — sync_freshness check12doctor-source-helper
125test/doctor.test.tsv0.40.4 — graph_signals_coverage check7doctor-source-helper
126test/doctor.test.tsv0.41.27.0 — sync_freshness git short-circuit9doctor-source-helper
127test/doctor.test.tsv0.41.32.0 — commit-relative staleness5doctor-source-helper
128test/doctor.test.tsv0.42 (#1699) — quarantined_pages + flagged_pages checks1doctor-source-helper
129test/dream-cli-flags.test.ts--drain wiring4readFileSync
130test/dream-cli-flags.test.ts--once wiring (issue #2860)5readFileSync
131test/dream-cli-flags.test.ts--source / --source-id wiring (v0.41.13)9readFileSync
132test/dream-cli-flags.test.tsdream CLI flag wiring10readFileSync
133test/dry-fix.test.tsautoFixDryViolations12readFileSync
134test/e2e/bootstrap-real-codex.serial.test.tsbootstrap rendered protocol — ambient boundaries (always runs)5readFileSync
135test/e2e/codex-plugin-install-real.serial.test.ts(file-level)2readFileSync
136test/e2e/migration-flow.test.ts(file-level)4readFileSync
137test/e2e/openclaw-reference-compat.test.tsOpenClaw reference workspace compat (W1 + W2 + W3)8readFileSync
138test/e2e/skillpack-flow.test.tsskillpack flow (E2E)17readFileSync
139test/e2e/workspace-generic-compat.test.tsgeneric agent-workspace compat (INSTALL_FOR_AGENTS.md flow)6readFileSync
140test/embedding-dim-check-facts.test.tsdoctor checkFactsEmbeddingWidthConsistency wiring (T6)4doctor-source-helper
141test/env-trust-protected-keys.test.tsCWD_DOTENV_PROTECTED_KEYS covers every suspicious GBRAIN_* env read in src/3readFileSync
142test/eval-brainbench-e2e.slow.test.ts--llm availability gate1exec-scan
143test/eval-brainbench-e2e.slow.test.tsprivacy guard violation branches (negative path)1exec-scan
144test/eval-brainbench-e2e.slow.test.tsrender-brainbench-delta.ts (the CI step-summary block)2exec-scan
145test/eval-brainbench-e2e.slow.test.tsrun-all once-per-sweep semantics (decision 16)1exec-scan
146test/eval-capture-db-plane.serial.test.tseval.capture set on the DB plane reaches the runtime gate (#1475)9bun-file
147test/eval-synthesize-concepts-routing.test.tsdispatch-layer source pins (routing can’t regress silently)2readFileSync
148test/eval-synthesize-concepts-routing.test.tssubprocess smoke — end-to-end routing1readFileSync
149test/eval-takes-bootstrap.test.tscorpus integrity4readFileSync
150test/exit-classification.test.tsconsumer wire-up — helper used by all 3 sites (no inline filters left)5doctor-source-helper,readFileSync
151test/extract-atoms-drain-errors.test.tsrunExtractAtomsDrainForSource forwards typed per-item failures (#4730)1readFileSync
152test/extract-atoms-drain.test.tsextract-atoms-drain Minion handler retries on provider_failure (issue #3218)2readFileSync
153test/extract-atoms-drain.test.tsprotected-names register comment names the real trust mechanism1readFileSync
154test/extract-atoms-drain.test.tsshared wiring helper holds the cycle lock (5A)2readFileSync
155test/extract-include-frontmatter-config.serial.test.tsno extraction path hardcodes includeFrontmatter1readFileSync
156test/extract-workers.test.tsextract.ts → workers wiring (T7)10readFileSync
157test/facts-backstop-remedy-verb.test.tsfacts backstop thin-client-fallback remedy verb (#4489)3readFileSync
158test/features.test.tsCLI routing2bun-file
159test/fence-extraction.test.tsLayer 8 D2 — markdown fence extraction18readFileSync
160test/files.test.tscollectFiles (production import)9readFileSync
161test/files.test.tsfiles upload-raw git-storage branch (#2297)6readFileSync
162test/files.test.tsfiles verify git lane (per-source root resolution)1readFileSync
163test/files.test.tsstorage precondition — the silent-no-op class (#4022)3readFileSync
164test/filing-rules-resolution.serial.test.tsper-source filing-rules resolution3readFileSync
165test/fix-wave-structural.test.ts#2084 — cli.ts owns process-exit teardown via finishCliTeardown4readFileSync
166test/fix-wave-structural.test.ts#2955 — sync multi-source repoPath routes through msysToNativePath1readFileSync
167test/fix-wave-structural.test.tsWAL-repair wave structural pins (#223/#2575)4readFileSync
168test/fix-wave-structural.test.tsfive-issue fix wave — integrity progress is (source_id, slug)-keyed1readFileSync
169test/fix-wave-structural.test.tsv0.36.1.x #1077 — admin register-client supports PKCE public clients1readFileSync
170test/fix-wave-structural.test.tsv0.36.1.x #1090 — admin embed two-tier resolution3readFileSync
171test/fix-wave-structural.test.tsv0.36.1.x #1124 — query --no-expand actually negates expand1readFileSync
172test/fix-wave-structural.test.tsv0.41.37.0 #1605 — v0.11.0 phaseASchema routes in-process for ALL engines2readFileSync
173test/fix-wave-structural.test.tsv0.41.8.0 #1340 — PGLite WASM init classifier2readFileSync
174test/fix-wave-structural.test.tsv0.42.20.0 — background-work registry drains every sink before disconnect9readFileSync
175test/fix-wave-structural.test.tsv0.42.20.0 — search-cache drained via the background-work registry1readFileSync
176test/fix-wave-structural.test.tsv0.42.43.0 #2095 — volunteer-events sink + cycle purge wiring (structural pins)2readFileSync
177test/frontmatter-install-hook.test.tsfrontmatter install-hook (B13)22readFileSync
178test/harness-onboarding.test.tsharness identity and private handoff5readFileSync
179test/hook-command.serial.test.tsuser-prompt14readFileSync
180test/hook-push-spawn-env.test.tsspawnDetachedPush env handoff2readFileSync
181test/hook-push-spawn-env.test.tstryExecAsync env handoff1readFileSync
182test/integrations-install.test.tsinstallRecipeIntoHostRepo — happy path6readFileSync
183test/integrations.test.tsCLI integration3readFileSync
184test/jobs-embed-background-parity.serial.test.tsembed job background parity (D7)2readFileSync
185test/jobs-gateway-refresh-set.test.ts#3387 — GATEWAY_REFRESH_JOB_NAMES ⇔ registerBuiltinJob call sites5readFileSync
186test/jobs-list-get-json.serial.test.tshelp advertises --json on list/get/stats (#3685)2readFileSync
187test/jobs-thin-client-date-rehydration.test.tsthin-client unpack sites route through rehydrateJobDates (source audit)2readFileSync
188test/jobs-worker-startup-recovery.test.tswork-handler recovery placement (structural)1readFileSync
189test/link-source-check-repair.test.tsregex literal drift guard (#4613)1readFileSync
190test/longmemeval-embed-cache.test.tsEmbeddingCache — canonical hash4readFileSync
191test/loops-extract-wiring.test.tsjobs.ts wiring2readFileSync
192test/loops-extract-wiring.test.tsrelational edge vocabulary2readFileSync
193test/mcp-registration-blocks.test.tsOpenClaw stdio registration docs (#4842)2readFileSync
194test/migrate-stdout-clean.test.tsmigration output stays off stdout2readFileSync
195test/migrate.test.tsPR #356 + #363 — session timeouts applied via startup parameters1readFileSync
196test/migrate.test.tsPR #356 — LATEST_VERSION is max(versions), not array[-1]2readFileSync
197test/migrate.test.tsPR #356 — apply-migrations pre-flight schema-version warning1readFileSync
198test/migrate.test.tsPR #356 — non-transactional DDL runs via reserved connection1readFileSync
199test/migrate.test.tsmigrate runner v67 — typed-claim columns materialized on PGLite3readFileSync
200test/migrate.test.tsmigrate v14 — pages_updated_at_index (handler-based, engine-aware)2readFileSync
201test/migrate.test.tsmigrate v20 — sources_table_additive6readFileSync
202test/migrate.test.tsmigrate v23 — files_source_id_page_id_ledger6readFileSync
203test/migrate.test.tsmigrate v36 — subagent_provider_neutral_persistence_v0_277readFileSync
204test/migrate.test.tsmigrate v66 — embed_stale_partial_index (D6)4readFileSync
205test/migrate.test.tsmigrate v89 — round-trip on PGLite4readFileSync
206test/migrate.test.tsmigrate — DROP INDEX CONCURRENTLY invalid-remnant cleanup (#1178, file-wide)3readFileSync
207test/migrate.test.tsmigrate — runner behavioral (v14 handler + v15 backfill)2readFileSync
208test/migrate.test.tsmigrate: v9 (timeline_dedup_index) regression — must be fast on 200 duplicate rows1readFileSync
209test/migrate.test.tsmigration v49 — eval_takes_quality_runs (v0.32)6readFileSync
210test/migrate.test.tsresolvePoolSize — env var + explicit override4readFileSync
211test/migrate.test.tsresolveSessionTimeouts — env var overrides5readFileSync
212test/migrate.test.tsv117 — context_volunteer_events_table5readFileSync
213test/migration-orchestrator-v0_46_3.serial.test.tsv0.46.3 orchestrator behavior4readFileSync
214test/migration-resume.test.tsBug 3 — orchestrator no longer writes the ledger directly6bun-file
215test/migrations-v0_11_0.test.tsAGENTS.md marker injection6readFileSync
216test/migrations-v0_11_0.test.tscron manifest rewrite — gbrain builtins only8readFileSync
217test/migrations-v0_14_0.test.tsBug 5 + Bug 8 — v0_14_0 module shape3bun-file
218test/migrations-v0_14_0.test.tsBug 5 — Phase B host-work entry dedup2readFileSync
219test/migrations-v0_14_0.test.tsBug 8 — max_stalled default bumped in schema files3bun-file
220test/migrations-v0_22_4.test.tsv0.22.4 migration (B11)9readFileSync
221test/model-pricing.test.tsDRIFT GUARD — derived views stay equal to canonical (re-hardcode trip-wire)4readFileSync
222test/model-pricing.test.tsno heavy import (cycle guard)1readFileSync
223test/models-doctor-embed.test.tsmodels doctor — embedding reachability probe (v0.40.x)3readFileSync
224test/ocr-run-budget.test.tsdoctor ocr_health surfaces the budget-skip counter (#3973)1doctor-source-helper
225test/openclaw-plugin-manifest.test.tsbundled-skill reference closure (nothing bundled points at a non-bundled skill)1readFileSync
226test/openclaw-plugin-manifest.test.tsplugin membership curation (skills = plugin ∪ exclusions, disjoint)9readFileSync
227test/openclaw-plugin-manifest.test.tsroot OpenClaw plugin manifest2readFileSync
228test/pg-access-classify.test.tsmarker contract (skill↔binary lockstep, the UPGRADE_AVAILABLE pattern)3bun-file
229test/pglite-engine.test.tsPGLiteEngine: v0.13.1 error-wrap on connect() (#223)1readFileSync
230test/pglite-repair-command.serial.test.tsgbrain pglite-repair — interactive confirm wiring (#4318 residual)1readFileSync
231test/pglite-wal-repair.serial.test.tsWAL auto-repair — real-brain regression (#223/#1670/#2575)6readFileSync
232test/phantom-redirect-per-source-lock.test.tsphantom-redirect lock contract3readFileSync
233test/postgres-engine-singleton-ownership.test.tspostgres-engine / module-singleton ownership (#1471)7readFileSync
234test/postgres-engine.test.tspostgres-engine / search date filtering1readFileSync
235test/postgres-engine.test.tspostgres-engine / search path timeout isolation7readFileSync
236test/private-visibility.test.tsshared private predicate lives once (#4352 remediation)1readFileSync
237test/readme-hero-anchors.test.tsREADME hero anchors (D9 regression guard)5readFileSync
238test/redos-hardening.test.ts#1569 --no-schema-pack + heartbeat wiring (structural)2readFileSync
239test/redos-hardening.test.tsmegawave vm-watchdog removal (bootstrap-verify freeze)5readFileSync
240test/register-client-source-normalize.test.tsregister-client route wiring (structural)1readFileSync
241test/regression-strict-source-id.test.tscycle reverse-write call sites use the consolidated path4readFileSync
242test/regression-strict-source-id.test.tsutils.ts no longer carries an inline permissive regex2readFileSync
243test/reindex-code-recovery.test.tsCLI help line (#3970 surface 1)1readFileSync
244test/release-workflow.test.tsrelease.yml ↔ binary-self-update asset contract10readFileSync
245test/remediation-command-resolution.test.ts#3697 — remediation text resolves against the live CLI surface3readFileSync
246test/reranker-default-seam.test.tsDEFAULT_RERANKER_MODEL seam (#3657, flipped v0.48.2)5readFileSync
247test/resolver.test.tsRESOLVER.md trigger round-trip (D5/C)2readFileSync
248test/resolver.test.tsSkill example-name validator (D13)4readFileSync
249test/retrieval-reflex-recipe-routing.test.tsretrieval-reflex recipe routing is MECE with the query skill (#4292)5readFileSync
250test/schema-cli-contract.test.tsv0.39 T6 — schema CLI contract7readFileSync
251test/schema-pack-unify-types-handler.test.ts#1575 unify-types worker dry-run default1readFileSync
252test/schema-pack/suggest.test.tsrunSuggest — source-text contract (structural)1readFileSync
253test/scripts/ci-gates.test.tsCI execution evidence5readFileSync
254test/scripts/ci-gates.test.tstest:full exit status0readFileSync
255test/scripts/ci-local-rendering.test.tsci-local command rendering1readFileSync
256test/scripts/ci-local-rendering.test.tsci-local execution coverage3readFileSync
257test/scripts/ci-local-rendering.test.tslocal test configuration through run-e2e2readFileSync
258test/scripts/ci-local-rendering.test.tsrequired PgBouncer execution through run-e2e1readFileSync
259test/scripts/classify-tests.test.tsclassify-tests detectors18bun-file,doctor-source-helper,exec-scan,readFileSync
260test/scripts/coverage-diff-gate.test.tsexemptions3readFileSync
261test/scripts/e2e-wiring.test.tse2e file claim ratchet5readFileSync
262test/scripts/e2e-wiring.test.tsselected-e2e job wiring6readFileSync
263test/scripts/run-verify-parallel.test.tsguard registration ⇒ execution coverage1readFileSync
264test/scripts/test-shard.slow.test.tstest-shard.sh — LPT balance contract5readFileSync
265test/scripts/test-shard.slow.test.tstest-shard.sh — exclusion contract6readFileSync
266test/serve-http-admin-route-guard.test.ts(file-level)4readFileSync
267test/serve-http-github-webhook.test.tshandler wiring (source pin)1readFileSync
268test/serve-http-mcp-transport-cleanup.test.tsPOST /mcp transport cleanup (#2844)2readFileSync
269test/serve-http-metrics.test.tsserve-http.ts wiring (structural — the two defects of the original PR)2readFileSync
270test/serve-stdin-eof-drain.test.tsserve-sync-runner stays off the boot path (#4409)1readFileSync
271test/skillify-scaffold.test.ts11-item scaffold contract (T9 + Phase 3 cross-modal eval)1readFileSync
272test/skillify-scaffold.test.tsapplyScaffold3readFileSync
273test/skillify-scaffold.test.tsplanScaffold13readFileSync
274test/skillopt/deadline-and-hermetic.test.ts#4741 — hermetic-config docs make no platform-survives-logout claim2readFileSync
275test/skillpack-harness-bridge.test.tsreview-driven hardening (ship pre-landing findings)5readFileSync
276test/skillpack-harvest.test.tsaddToBundleManifest1readFileSync
277test/skillpack-harvest.test.tsrunHarvest — happy path2readFileSync
278test/skillpack-harvest.test.tsrunHarvest — privacy linter integration (T7)2readFileSync
279test/skillpack-init-brain-pack.test.tsrunInitBrainPack5readFileSync
280test/skillpack-init-pack.test.tsrunInitScaffold — cathedral default6readFileSync
281test/skillpack-install.test.tsmanaged-block receipt + cumulative semantics (v0.19)4readFileSync
282test/skillpack-install.test.tsplanInstall + applyInstall11readFileSync
283test/skillpack-migrate-fence.test.tsrunMigrateFence8readFileSync
284test/skillpack-scaffold.test.tsrunScaffold — IRON-RULE regressions (R1, R2)3readFileSync
285test/skillpack-scaffold.test.tsrunScaffold — happy path3readFileSync
286test/skillpack-scrub-legacy.test.tsrunScrubLegacy8readFileSync
287test/snapshot-shape-guard.test.ts(file-level)10readFileSync
288test/sources-webhook.test.tsWebhook sync job extraction contract1readFileSync
289test/spend-off-switch.test.tsreindex / onboard off-switch dispatch (regression guards)3bun-file
290test/supervisor.test.tsrecovery hook timeout bound (structural)1readFileSync
291test/sync-failures.test.ts#4543 blocked output names failing files4bun-file,doctor-source-helper
292test/sync-failures.test.tsBug 9 — doctor surfaces sync failures2doctor-source-helper
293test/sync-failures.test.tsBug 9 — sync.ts CLI flag wiring6bun-file,doctor-source-helper
294test/sync-include-hidden.test.tssync.ts delta path threads includeHidden (#4027 merge guard)1readFileSync
295test/sync.test.tsbuildSyncManifest9bun-file
296test/sync.test.tsisSyncable8bun-file
297test/sync.test.tsresolveSlugByPathOrSourcePath (CJK wave v0.32.7, codex F4)3bun-file
298test/sync.test.tssync auto-embed arguments2bun-file
299test/sync.test.tssync regression — #132 nested transaction deadlock1bun-file
300test/template-repo-generator.test.tsgenerateTemplateTree0readFileSync
301test/template-repo-generator.test.tsrenderTemplateReadme5readFileSync
302test/thin-client-routing-audit.test.tsthin-client routing audit — scratch-DB additions (jobs partial dispatch + config refusal)5readFileSync
303test/thin-client-routing-audit.test.tsthin-client routing audit — v0.32 REFUSE additions stay in the table4readFileSync
304test/thin-client-routing-audit.test.tsthin-client routing audit — v0.32 ROUTE additions wire callRemoteTool4readFileSync
305test/think-embed-question-wiring.serial.test.ts#3734 — CRAG think escalation wires embedQuestion (source pin)1readFileSync
306test/think-embed-question-wiring.serial.test.ts#3734 — synthesize verb wires embedQuestion into runThink1readFileSync
307test/timing-safe.test.tsextraction contract1readFileSync
308test/tool-catalog.test.tsfreshness guard2readFileSync
309test/transcription-injection.test.tstranscription — command injection (#245)2readFileSync
310test/upgrade-skill-publish-prompt-race.test.tsgbrain upgrade — skill-publish prompt wiring (#4318 residual)3readFileSync
311test/upgrade.serial.test.tsdetectInstallMethod heuristic (source analysis)13readFileSync
312test/v0_37_fix_wave.serial.test.tsv0.37 Lane A — defaults sweep8readFileSync
313test/v0_37_fix_wave.serial.test.tsv0.37 Lane B — init paths3readFileSync
314test/v0_37_fix_wave.serial.test.tsv0.37 Lane C.3 — ZE key reaches buildGatewayConfig3readFileSync
315test/v0_37_fix_wave.serial.test.tsv0.37 Lane D.2 — embed pre-flight dim mismatch1readFileSync
316test/v0_37_fix_wave.serial.test.tsv0.37 Lane D.4 — sync --help dispatch1readFileSync
317test/v0_37_fix_wave.serial.test.tsv0.37 deferred TODO shipped — gbrain reinit-pglite3readFileSync
318test/v0_37_gap_fill.serial.test.tsLane A.7 — chunk-row INSERT default tracks the gateway-resolved model1readFileSync
319test/v0_37_gap_fill.serial.test.tsLane B — init precedence chain (CLI > env > existing file > default)1readFileSync
320test/v0_37_gap_fill.serial.test.tsLane C.3 — env ZEROENTROPY_API_KEY merges into loadConfig2readFileSync
321test/v0_37_gap_fill.serial.test.tsLane D.2 — embed pre-flight catches dim mismatch before worker pool2readFileSync
322test/v0_37_gap_fill.serial.test.tsLane D.3 — sync surfaces dim-mismatch recipe at incremental AND first-sync catches2readFileSync
323test/v0_37_gap_fill.serial.test.tsLane E.4 — loadRecommendationContext is provider-aware1readFileSync
324test/v0_37_gap_fill.serial.test.tsreinit-pglite — backup + reinit7readFileSync
325test/voyage-response-cap.test.tsv0.31.8 — voyage Content-Length pre-check + per-item cap6bun-file
326test/worker-supervised-db-probe.test.tsissue #1801 fix #2 — supervised DB self-defense5readFileSync