Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
security: build and test on Bun 1.4.4 (CVE-2026-111497); doctor warns below it (#7373)
garrytanb58f9e878973
diff --git a/.github/workflows/ci-health.yml b/.github/workflows/ci-health.ymlindex 82aa486729..a88f1674cb 100644--- a/.github/workflows/ci-health.yml+++ b/.github/workflows/ci-health.yml@@ -58,7 +58,7 @@ jobs:fetch-depth: 0- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Upsert the weekly CI health issueenv:GH_TOKEN: ${{ github.token }}diff --git a/.github/workflows/convergence-nightly.yml b/.github/workflows/convergence-nightly.ymlindex ea4b4b0a9e..3cc4c961e3 100644--- a/.github/workflows/convergence-nightly.yml+++ b/.github/workflows/convergence-nightly.yml@@ -35,7 +35,7 @@ jobs:strategy:fail-fast: falsematrix:- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']services:postgres:image: pgvector/pgvector:pg16diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.ymlindex 4710ae9154..00c79ec4df 100644--- a/.github/workflows/e2e.yml+++ b/.github/workflows/e2e.yml@@ -72,7 +72,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -156,7 +156,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4# Master-push reuse (P2, scripts/ci-reuse.ts): a push whose tree equals the# tree of a passed full-suite run skips every full lane and records the# reused run. Any doubt, a crash included, leaves reuse unset: a full run.@@ -240,7 +240,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -337,7 +337,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -526,7 +526,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -605,7 +605,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -689,7 +689,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -799,7 +799,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile@@ -859,7 +859,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile@@ -905,7 +905,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile@@ -942,7 +942,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile@@ -998,7 +998,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4# PGLite snapshot (restore-only; test.yml's serial-tests job saves).- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:@@ -1096,7 +1096,7 @@ jobs:fetch-depth: 0 # baseline gate reads git show origin/master:- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile@@ -1161,7 +1161,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Download receiptscontinue-on-error: trueuses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0@@ -1268,7 +1268,7 @@ jobs:- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.full_corpus)with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Download nightly execution receiptsif: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.full_corpus)uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0diff --git a/.github/workflows/fix-wave-closeout.yml b/.github/workflows/fix-wave-closeout.ymlindex 49c74e27ae..e0fe92e8e1 100644--- a/.github/workflows/fix-wave-closeout.yml+++ b/.github/workflows/fix-wave-closeout.yml@@ -32,7 +32,7 @@ jobs:sparse-checkout-cone-mode: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Close superseded PRsenv:GH_TOKEN: ${{ github.token }}diff --git a/.github/workflows/fix-wave-gate.yml b/.github/workflows/fix-wave-gate.ymlindex 1dbf9b932e..594d0f63dc 100644--- a/.github/workflows/fix-wave-gate.yml+++ b/.github/workflows/fix-wave-gate.yml@@ -38,7 +38,7 @@ jobs:sparse-checkout-cone-mode: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Decideenv:GH_TOKEN: ${{ github.token }}@@ -59,7 +59,7 @@ jobs:sparse-checkout-cone-mode: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Post the welcome comment once on a contributor PRenv:GH_TOKEN: ${{ github.token }}diff --git a/.github/workflows/heavy-tests.yml b/.github/workflows/heavy-tests.ymlindex e373d1831a..a206b4aa38 100644--- a/.github/workflows/heavy-tests.yml+++ b/.github/workflows/heavy-tests.yml@@ -71,7 +71,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -175,7 +175,7 @@ jobs:persist-credentials: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -286,7 +286,7 @@ jobs:persist-credentials: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -538,7 +538,7 @@ jobs:persist-credentials: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -766,7 +766,7 @@ jobs:persist-credentials: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile@@ -864,7 +864,7 @@ jobs:persist-credentials: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile@@ -1078,7 +1078,7 @@ jobs:persist-credentials: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfilediff --git a/.github/workflows/macos-validation.yml b/.github/workflows/macos-validation.ymlindex edcdc18667..8cb2129f5b 100644--- a/.github/workflows/macos-validation.yml+++ b/.github/workflows/macos-validation.yml@@ -47,7 +47,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts@@ -135,7 +135,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scriptsdiff --git a/.github/workflows/native-locks.yml b/.github/workflows/native-locks.ymlindex 9747acf79b..63cbb9b9ee 100644--- a/.github/workflows/native-locks.yml+++ b/.github/workflows/native-locks.yml@@ -47,7 +47,7 @@ jobs:node-version: 24.18.0- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts@@ -66,7 +66,7 @@ jobs:strategy:fail-fast: falsematrix:- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']target: [linux-x64-glibc, linux-arm64-glibc, darwin-arm64, darwin-x64, win32-x64, win32-arm64]# Pull requests: primary Bun on every target (native paths changed) or# the Linux x64 glibc smoke cell. Runners map from the target above.@@ -169,7 +169,7 @@ jobs:timeout-minutes: 8run: |bun build --compile --no-compile-autoload-bunfig --outfile bin/gbrain-native-validation src/cli.ts- if [ "${{ runner.os }}" = "macOS" ] && [ "${{ matrix.bun }}" = "1.4.3" ]; then+ if [ "${{ runner.os }}" = "macOS" ] && [ "${{ matrix.bun }}" = "1.4.4" ]; thencodesign --verify --strict --verbose=2 bin/gbrain-native-validationfibun scripts/native/compiled-smoke.ts --binary bin/gbrain-native-validation@@ -185,7 +185,7 @@ jobs:fail-fast: falsematrix:runner: [windows-2022, windows-11-arm]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Named exception: PR scope reduction, covered by scope=full runs (docs/TESTING.md#event-parity).exclude: ${{ fromJSON(inputs.scope == 'full' && '[]' || '[{"bun":"1.4.0"}]') }}steps:@@ -216,7 +216,7 @@ jobs:fail-fast: falsematrix:runner: [windows-2022, windows-11-arm]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Named exception: PR scope reduction, covered by scope=full runs (docs/TESTING.md#event-parity).exclude: ${{ fromJSON(inputs.scope == 'full' && '[]' || '[{"bun":"1.4.0"}]') }}steps:@@ -247,7 +247,7 @@ jobs:strategy:fail-fast: falsematrix:- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']target: [linux-x64-musl, linux-arm64-musl]# Named exception: PR scope reduction, covered by scope=full runs (docs/TESTING.md#event-parity).exclude: ${{ fromJSON(inputs.scope == 'full' && '[]' || '[{"bun":"1.4.0"}]') }}diff --git a/.github/workflows/nightly-watch.yml b/.github/workflows/nightly-watch.ymlindex f6f0c1323a..c975889c63 100644--- a/.github/workflows/nightly-watch.yml+++ b/.github/workflows/nightly-watch.yml@@ -99,7 +99,7 @@ jobs:scripts- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- id: targetname: Resolve the target workflow and trackenv:@@ -146,7 +146,7 @@ jobs:TODOS.md- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Upsert the nightly-red or master-red issueenv:GH_TOKEN: ${{ github.token }}diff --git a/.github/workflows/persistence-validation.yml b/.github/workflows/persistence-validation.ymlindex 40b02bf865..5be1c0c875 100644--- a/.github/workflows/persistence-validation.yml+++ b/.github/workflows/persistence-validation.yml@@ -26,7 +26,7 @@ jobs:fail-fast: falsematrix:engine: [pglite, postgres]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions (docs/TESTING.md#event-parity).services:@@ -72,7 +72,7 @@ jobs:strategy:fail-fast: falsematrix:- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions (docs/TESTING.md#event-parity).services:@@ -189,13 +189,13 @@ jobs:# until it is listed there or wrapped in a test/e2e registerPostgresTests# file. The eleven shards (ARM_SHARDS in scripts/postgres-unit-arms.ts) are# balanced by measured runtime (scripts/postgres-arm-weights.json, and- # ARM_WEIGHTS_POSTGRES_ONLY for the Bun 1.4.3 cell, mined from this job's+ # ARM_WEIGHTS_POSTGRES_ONLY for the Bun 1.4.4 cell, mined from this job's# ARM_FILE lines). Each job runs two files at a time, each# worker against its own PostgreSQL service; a shard's two-worker makespan,# doubled for a slow runner, must end a minute inside the step's 20 minutes- # (ARM_SHARD_BUDGET_MS). The Bun 1.4.3 cell runs only the PostgreSQL side of+ # (ARM_SHARD_BUDGET_MS). The Bun 1.4.4 cell runs only the PostgreSQL side of# testBackends() suites (--postgres-only); their PGLite side runs in the unit- # and serial lanes on Bun 1.4.3, and the Bun 1.4.0 cell keeps both sides.+ # and serial lanes on Bun 1.4.4, and the Bun 1.4.0 cell keeps both sides.# Event parity (docs/ci-event-parity.md#full-ci-on-pull-requests): full profile only; a# pull request (cheap tier) runs only the crash robot and convergence here. The# full-ci dispatch on its head, every push and the nightly run this lane.@@ -208,7 +208,7 @@ jobs:fail-fast: falsematrix:shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions (docs/TESTING.md#event-parity).services:@@ -255,7 +255,7 @@ jobs:GBRAIN_TEST_ALLOW_DATABASE_URL: '1'GBRAIN_TEST_RECEIPT_DIR: ${{ runner.temp }}/receiptsGBRAIN_TEST_RECEIPT_LANE: pg-arms-bun-${{ matrix.bun }}- run: bun scripts/postgres-unit-arms.ts run ${{ matrix.shard }} 11 ${{ matrix.bun == '1.4.3' && '--postgres-only' || '' }}+ run: bun scripts/postgres-unit-arms.ts run ${{ matrix.shard }} 11 ${{ matrix.bun == '1.4.4' && '--postgres-only' || '' }}- name: Upload receiptsif: always()uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4@@ -280,7 +280,7 @@ jobs:fail-fast: falsematrix:engine: [pglite, postgres]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions (docs/TESTING.md#event-parity).services:@@ -335,7 +335,7 @@ jobs:fail-fast: falsematrix:engine: [pglite, postgres]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions (docs/TESTING.md#event-parity).services:@@ -418,7 +418,7 @@ jobs:fail-fast: falsematrix:engine: [pglite, postgres]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions (docs/TESTING.md#event-parity).services:@@ -480,7 +480,7 @@ jobs:strategy:fail-fast: falsematrix:- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions (docs/TESTING.md#event-parity).services:diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 614fe5988d..aab00d5cd8 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -91,7 +91,7 @@ jobs:src/core/behavior-change-notice.ts- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4# A since: 'TBD' BEHAVIOR_CHANGES row never ships (scripts/check-behavior-since.ts).- name: Refuse a since 'TBD' BEHAVIOR_CHANGES rowrun: bun scripts/check-behavior-since.ts --stamped@@ -126,7 +126,7 @@ jobs:ref: ${{ needs.ci-gate.outputs.sha }}- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -287,7 +287,7 @@ jobs:- if: steps.gate.outputs.publish == 'true'uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- if: steps.gate.outputs.publish == 'true'uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:@@ -370,7 +370,7 @@ jobs:persist-credentials: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfilediff --git a/.github/workflows/scale-tier.yml b/.github/workflows/scale-tier.ymlindex 86803193a6..5b29ebfeac 100644--- a/.github/workflows/scale-tier.yml+++ b/.github/workflows/scale-tier.yml@@ -65,7 +65,7 @@ jobs:- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2if: github.event_name == 'schedule'with:- bun-version: 1.4.3+ bun-version: 1.4.4- id: planenv:GH_TOKEN: ${{ github.token }}@@ -159,7 +159,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cachediff --git a/.github/workflows/stress.yml b/.github/workflows/stress.ymlindex 1015d8d967..81bab6e4c0 100644--- a/.github/workflows/stress.yml+++ b/.github/workflows/stress.yml@@ -52,7 +52,7 @@ jobs:fetch-depth: 0- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts@@ -108,7 +108,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -159,7 +159,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scriptsdiff --git a/.github/workflows/sync-freshness-gate.yml b/.github/workflows/sync-freshness-gate.ymlindex dfc2ec2393..81e9126d20 100644--- a/.github/workflows/sync-freshness-gate.yml+++ b/.github/workflows/sync-freshness-gate.yml@@ -29,7 +29,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scriptsdiff --git a/.github/workflows/test.yml b/.github/workflows/test.ymlindex bdc6370a60..bfd602ef89 100644--- a/.github/workflows/test.yml+++ b/.github/workflows/test.yml@@ -99,7 +99,7 @@ jobs:- if: github.event_name == 'push'uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4# Master-push reuse (P2, scripts/ci-reuse.ts): a push whose tree equals the# tree of a passed full-suite run skips every full lane and records the# reused run. Any doubt, a crash included, leaves reuse unset: a full run.@@ -241,7 +241,7 @@ jobs:fail-fast: falsematrix:os: [ubuntu-latest, macos-26, windows-latest]- bun: ['1.4.0', '1.4.3']+ bun: ['1.4.0', '1.4.4']# Event parity: every event, pull requests and merge-queue runs# included, runs both supported Bun versions on every OS# (docs/TESTING.md#event-parity).@@ -341,7 +341,7 @@ jobs:cat "$GITHUB_OUTPUT"- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts@@ -370,7 +370,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4# This job is the ONE designated saver of the bun cache (the others# restore-only, so 5 redundant post-job save attempts disappear).# admin/bun.lock is in the key because verify's check:admin-build@@ -465,7 +465,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -527,7 +527,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -614,7 +614,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -702,7 +702,7 @@ jobs:run: git fetch --no-tags --depth=1 origin +refs/heads/master:refs/remotes/origin/master- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -746,7 +746,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -864,7 +864,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -988,7 +988,7 @@ jobs:fetch-depth: 0 # diff gate needs origin/master; baseline gate reads git show origin/master:- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:path: ~/.bun/install/cache@@ -1103,7 +1103,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts@@ -1156,7 +1156,7 @@ jobs:- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Install dependencies (bounded, retried once)timeout-minutes: 8run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts@@ -1196,7 +1196,7 @@ jobs:sparse-checkout-cone-mode: false- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:- bun-version: 1.4.3+ bun-version: 1.4.4- name: Download receiptscontinue-on-error: trueuses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0diff --git a/docker-compose.ci.yml b/docker-compose.ci.ymlindex 01605481a5..37229e9b1a 100644--- a/docker-compose.ci.yml+++ b/docker-compose.ci.yml@@ -5,7 +5,7 @@# `bun run ci:local:diff` (see scripts/ci-local.sh).## All services are pulled as `image:` (no build) so `docker compose pull`-# refreshes everything. #4479: the bun tag is PINNED (default 1.4.3, matching+# refreshes everything. #4479: the bun tag is PINNED (default 1.4.4, matching# the CI/build bun) instead of floating with `oven/bun:1` — a floating tag# resolved to a newer bun than the host and produced container-only behavior# skew during release gates. Override per-run with GBRAIN_CI_BUN_TAG (e.g.@@ -129,7 +129,7 @@ services:runner:# #4479: pinned to the host bun version by default (see header comment).- image: oven/bun:${GBRAIN_CI_BUN_TAG:-1.4.3}+ image: oven/bun:${GBRAIN_CI_BUN_TAG:-1.4.4}working_dir: /appenvironment:# The bind-mounted checkout may contain private developer test keys.diff --git a/docs/RELEASING.md b/docs/RELEASING.mdindex 9649b6a2f6..f463ed0254 100644--- a/docs/RELEASING.md+++ b/docs/RELEASING.md@@ -538,7 +538,9 @@ the release the same, uses that version's `CHANGELOG.md` entry as the notes(`scripts/changelog-entry.sh`; falls back to a CHANGELOG link if the entry ismissing), and attaches the compiled binaries.-The executable build job pins Bun 1.4.3 and verifies the Darwin artifact with+The executable build job pins Bun 1.4.4, the first release with the Brotli fix+for CVE-2026-111497 (#7373): a standalone binary embeds the Bun it was built+with, so never pin a build below it. The job verifies the Darwin artifact withstrict native `codesign` before publishing it. A source merge does not repairalready-published bad binaries; an affected release needs its own explicitlyapproved recovery and asset verification. The template and plugin publishingdiff --git a/docs/TESTING.md b/docs/TESTING.mdindex 26d7df9ab1..73260ecdc4 100644--- a/docs/TESTING.md+++ b/docs/TESTING.md@@ -8,7 +8,7 @@ lives in `CHANGELOG.md`; per-file detail lives in the test files and in## Quick start-Prerequisites: Bun 1.4.0 or newer (CI pins 1.4.3), Git, and bash. E2E needs+Prerequisites: Bun 1.4.0 or newer (CI pins 1.4.4), Git, and bash. E2E needsDocker for a `pgvector/pgvector:pg16` container and Python 3 on `PATH` (the E2Erunner validates Bun's JUnit reports with the standard-library XML parser).@@ -1771,7 +1771,7 @@ existing fence and timeline suites.`test/guarded-http.test.ts` and `test/guarded-http-tls.serial.test.ts` cover DNS,TLS identity and ports, redirects, deadlines, body limits, and cleanup. CI runs-these boundaries on Bun 1.4.0 and 1.4.3, audits root and admin dependencies, and+these boundaries on Bun 1.4.0 and 1.4.4, audits root and admin dependencies, andexecutes `scripts/test-gitleaks-config.sh` to prove fixture exceptions stillreport an unrelated secret in the same file. `scripts/scan-worktree-secrets.sh`scans tracked files plus new files eligible for commit; tracked ignored filesdiff --git a/docs/architecture/key-files/core-utilities-2.md b/docs/architecture/key-files/core-utilities-2.mdindex 29c09b4bec..2b81eaa96a 100644--- a/docs/architecture/key-files/core-utilities-2.md+++ b/docs/architecture/key-files/core-utilities-2.md@@ -26,7 +26,7 @@ Current behavior and load-bearing invariants; history belongs in Git and CHANGEL- `src/core/restore-target.ts` -- `resolveRestoreTarget(engine, source, repo)`: the source and repo `gbrain export --restore-only` restores, shared with `gbrain storage status` so its printed restore command restores exactly the files it lists. An explicit source (already resolved) wins; a repo without a source selects the one active source registered at that exact path, refuses a repo registered only to an archived source, else selects the only active source; neither selects the flagless resolver chain's source and its `local_path` (the legacy `sync.repo_path` answers for `default` only). `restoreFilePath(repo, slug, sourcePath, sourcePathBytes, slugRootMode)` is the file whose absence makes the restore write a page: the recorded `source_path` resolved in the repo in the source's slug-root mode (`scannerSlugRootMode`), else `<slug>.md`; an over-long or unsafe recorded path throws. Refusals throw `RestoreTargetError`; resolver and database errors propagate unchanged.-- `src/core/runtime-version.ts` — Bun 1.4.0 minimum (`MINIMUM_BUN_VERSION`; the lowest 1.4 release, carrying the Linux child-exit fix oven-sh/bun#30301). `unsupportedBunMessage` names the found and required versions and the fix (`bun upgrade`, restart, `gbrain post-upgrade` for an interrupted upgrade). `exitOnUnsupportedBun` is the CLI entrypoint gate: every command below the floor exits 1 before dispatch (`--version` still prints, exit 0, so an older gbrain's upgrade can verify the swap; `autopilot` also writes the refusal to stdout, its service log); `scripts/postinstall.ts` prints it when an install lands on an older Bun; the guarded HTTP transport asserts it; doctor reports it as `bun_runtime`. Package engines, runtime checks and the CI minimum-version lanes share the same floor (`test/scripts/ci-pr-scope.test.ts`). `compareBunVersions`/`bunVersionMeets` order Bun versions by semver (a `-canary` prerelease sits below its release; `+revision` metadata is ignored), shared with the upgrade floor gate.+- `src/core/runtime-version.ts` — Bun 1.4.0 minimum (`MINIMUM_BUN_VERSION`; the lowest 1.4 release, carrying the Linux child-exit fix oven-sh/bun#30301). `unsupportedBunMessage` names the found and required versions and the fix (`bun upgrade`, restart, `gbrain post-upgrade` for an interrupted upgrade). `exitOnUnsupportedBun` is the CLI entrypoint gate: every command below the floor exits 1 before dispatch (`--version` still prints, exit 0, so an older gbrain's upgrade can verify the swap; `autopilot` also writes the refusal to stdout, its service log); `scripts/postinstall.ts` prints it when an install lands on an older Bun; the guarded HTTP transport asserts it; doctor reports it as `bun_runtime`. Package engines, runtime checks and the CI minimum-version lanes share the same floor (`test/scripts/ci-pr-scope.test.ts`). `compareBunVersions`/`bunVersionMeets` order Bun versions by semver (a `-canary` prerelease sits below its release; `+revision` metadata is ignored), shared with the upgrade floor gate. `SECURE_BUN_VERSION` (1.4.4) is the first Bun with the Brotli fix for CVE-2026-111497 (#7373): doctor's `bun_runtime` warns below it with the upgrade path for how gbrain runs (`gbrain upgrade` for a standalone binary, which embeds its Bun; `bun upgrade` for a bun install), the 1.4.0 floor still starts, and the CI primary pin may not drop below it (`test/scripts/ci-pr-scope.test.ts`).- `src/core/self-upgrade-swap.ts` — autopilot swap settlement (#6828): `prepareSwapReceipt`/`settleAutopilotSwap` read the receipt `gbrain upgrade --swap-only` writes (`GBRAIN_SWAP_RECEIPT`; one from another run is ignored, none falls back to `gbrain --version`). Unchanged version, or exit 0 with nothing newer confirmed: hold, no known-bad, `self_upgrade.last_check_ts` (24 h retry). Failure: known-bad names the installed version; when that is not the checked one, also throttle and drop the update cache. Floor refusal (78): hold. Real swap: breadcrumb on the installed version. Tests: `autopilot-unpublished-target-6828.test.ts`, `autopilot-bun-floor.test.ts`.- `src/core/self-upgrade-recovery.ts` — #6828 known-bad recovery: `neverInstalledFailedVersions` (pure) lists `self_upgrade.failed_versions` entries proven never installed: the no-op swap's own `last_upgrade` (`from` == `to` == running) is timestamped inside that entry's swap window, the entry has one failure (`crash-on-launch` after `swapped`, same running version), and no audit row ran it. Audit rows alone are not proof. `findNeverInstalledFailures` reads config, every audit file (`readAllSelfUpgrades`) and `last_upgrade`; used by `gbrain self-upgrade --clear-never-installed [--apply]` and the `self_upgrade_health` fix. Tests: `self-upgrade-never-installed-6828.test.ts`.diff --git a/docs/guides/authorization-upgrade.md b/docs/guides/authorization-upgrade.mdindex 6e26b3d698..24ab1a99bc 100644--- a/docs/guides/authorization-upgrade.md+++ b/docs/guides/authorization-upgrade.md@@ -10,7 +10,7 @@ uses `gbrain jobs authorize-legacy` to preview selected work for review.## Runtime and outbound requests-Use Bun **1.4.0 or newer**; run `bun upgrade` on an older Bun. CI covers 1.4.0 and the build runtime, 1.4.3.+Use Bun **1.4.0 or newer**; run `bun upgrade` on an older Bun. CI covers 1.4.0 and the build runtime, 1.4.4.Compiled distributions include their Bun runtime.URL reachability checks, HTTP integration checks, and remote image loading usediff --git a/scripts/ci-ubicloud.ts b/scripts/ci-ubicloud.tsindex 06fc0f8290..275ab080ac 100755--- a/scripts/ci-ubicloud.ts+++ b/scripts/ci-ubicloud.ts@@ -311,7 +311,7 @@ async function main() {const bunVersion = process.env.GBRAIN_CI_BUN_TAG?? /oven\/bun:\$\{GBRAIN_CI_BUN_TAG:-([^}]+)\}/.exec(readFileSync(join(ROOT, "docker-compose.ci.yml"), "utf8"))?.[1]- ?? "1.4.3";+ ?? "1.4.4";// ── Teardown on every exit path ──────────────────────────────────────────const owner = sh("bash", [RUNNER, "owner"]).trim();diff --git a/scripts/setup-in-agent.sh b/scripts/setup-in-agent.shindex 7c85883e88..c925a5f634 100644--- a/scripts/setup-in-agent.sh+++ b/scripts/setup-in-agent.sh@@ -45,7 +45,7 @@ done# The runtime pin follows the repository's supported CI release. Repair reads# its prior version from the non-secret receipt; no mutable latest runtime URL.-gbrain_bun_version=1.4.3+gbrain_bun_version=1.4.4gbrain_source_ref=''if [[ -f "$gbrain_receipt" && "$gbrain_upgrade" == 0 ]]; thengbrain_prior_bun=$(sed -n 's/.*"bun_version": *"\([0-9.]*\)".*/\1/p' "$gbrain_receipt" | head -1)diff --git a/scripts/ubicloud/setup-ci-vm.sh b/scripts/ubicloud/setup-ci-vm.shindex 4ef9de79a2..65d941f6ae 100755--- a/scripts/ubicloud/setup-ci-vm.sh+++ b/scripts/ubicloud/setup-ci-vm.sh@@ -24,7 +24,7 @@# the packages are already installed, so apt is skipped and the image pulls# only confirm the baked images are current.#-# Knobs: SLOTS (default nproc), BUN_VERSION (default 1.4.3), GITLEAKS=0|1,+# Knobs: SLOTS (default nproc), BUN_VERSION (default 1.4.4), GITLEAKS=0|1,# CHECKOUT (default .), CHECKOUT_MARKER (default: none, checkout present),# PG_IMAGE (default pgvector/pgvector:pg16; ci-ubicloud.ts --pg-image, e.g.# pgvector/pgvector:pg15 for the #7112 compatibility audit),@@ -33,7 +33,7 @@set -euo pipefailSLOTS="${SLOTS:-$(nproc)}"-BUN_VERSION="${BUN_VERSION:-1.4.3}"+BUN_VERSION="${BUN_VERSION:-1.4.4}"GITLEAKS="${GITLEAKS:-0}"CHECKOUT="${CHECKOUT:-.}"CHECKOUT_MARKER="${CHECKOUT_MARKER:-}"diff --git a/src/commands/doctor/checks/upgrade-health.ts b/src/commands/doctor/checks/upgrade-health.tsindex 22b38d522f..08eaca78d8 100644--- a/src/commands/doctor/checks/upgrade-health.ts+++ b/src/commands/doctor/checks/upgrade-health.ts@@ -10,13 +10,13 @@ import { existsSync, readFileSync } from 'fs';import type { BrainEngine } from '../../../core/engine.ts';import { gbrainPath } from '../../../core/config.ts';import { LATEST_VERSION } from '../../../core/migrate.ts';-import { MINIMUM_BUN_VERSION, unsupportedBunMessage } from '../../../core/runtime-version.ts';+import { MINIMUM_BUN_VERSION, SECURE_BUN_VERSION, bunVersionMeets, unsupportedBunMessage } from '../../../core/runtime-version.ts';import { isNewerVersion, isValidVersionString } from '../../../core/semver.ts';import type { SelfUpgradeAction } from '../../../core/self-upgrade.ts';import type { SelfUpgradeAuditEvent } from '../../../core/audit/self-upgrade-audit.ts';import { VERSION as GBRAIN_BINARY_VERSION } from '../../../version.ts';import type { Check } from '../../doctor.ts';-import { agentFix } from '../check-fix.ts';+import { agentFix, doctorVerify } from '../check-fix.ts';/*** #4517: is the latest upgrade-errors.jsonl record superseded? True when the@@ -223,10 +223,30 @@ export async function checkUpgradeErrors(/*** The running Bun against the supported floor. The CLI refuses to start below* it, so a local doctor normally reports ok; the fail row keeps the fix- * command for any caller that reaches doctor on an older runtime.+ * command for any caller that reaches doctor on an older runtime. A supported+ * runtime below SECURE_BUN_VERSION warns (#7373): a standalone binary embeds+ * the Bun it was built with, so its fix is a new gbrain binary, while a bun+ * install runs on the user's Bun and `bun upgrade` fixes it.*/-export function checkBunRuntime(version = typeof Bun === 'undefined' ? '' : Bun.version): Check {+export function checkBunRuntime(version = typeof Bun === 'undefined' ? '' : Bun.version, executable = process.execPath): Check {const refusal = unsupportedBunMessage(version);if (refusal) return { name: 'bun_runtime', status: 'fail', message: refusal.replaceAll('\n', ' ') };- return { name: 'bun_runtime', status: 'ok', message: `Bun ${version} (minimum ${MINIMUM_BUN_VERSION})` };+ if (bunVersionMeets(version, SECURE_BUN_VERSION)) return { name: 'bun_runtime', status: 'ok', message: `Bun ${version} (minimum ${MINIMUM_BUN_VERSION})` };+ const standalone = !/^bun(-[\w.-]+)?(\.exe)?$/i.test(executable.split(/[\\/]/).pop() ?? '');+ return {+ name: 'bun_runtime',+ status: 'warn',+ message: `Bun ${version} carries the Brotli decoder flaw CVE-2026-111497, fixed in Bun ${SECURE_BUN_VERSION} (reachable through fetch() with Content-Encoding: br and the decompression APIs). `+ + (standalone+ ? 'This gbrain binary embeds that Bun: install the latest gbrain binary (`gbrain upgrade`), then restart GBrain services. Upgrading a separately installed bun does not change it.'+ : 'Run `bun upgrade`, then restart GBrain services.'),+ fix: {+ argv: standalone ? ['gbrain', 'upgrade'] : ['bun', 'upgrade'],+ consent: [],+ actor: 'user',+ why: `Bun ${SECURE_BUN_VERSION} carries the Brotli fix for CVE-2026-111497; GBrain services pick it up on restart.`,+ verify: doctorVerify('bun_runtime'),+ requires_exclusive: false,+ },+ };}diff --git a/src/core/runtime-version.ts b/src/core/runtime-version.tsindex 362e2c8642..257dd09813 100644--- a/src/core/runtime-version.ts+++ b/src/core/runtime-version.ts@@ -4,6 +4,13 @@*/export const MINIMUM_BUN_VERSION = '1.4.0';+/**+ * First Bun with the Brotli decoder fix for CVE-2026-111497 (oven-sh/bun#46392),+ * reachable through fetch() with `Content-Encoding: br` and the decompression+ * APIs (#7373). Older supported runtimes still start; doctor warns.+ */+export const SECURE_BUN_VERSION = '1.4.4';+export const BUN_VERSION_RE = /^(\d{1,4})\.(\d{1,4})\.(\d{1,4})(-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;/**diff --git a/test/helpers/doctor-json-golden.ts b/test/helpers/doctor-json-golden.tsindex 48f550b34f..62ebab6fab 100644--- a/test/helpers/doctor-json-golden.ts+++ b/test/helpers/doctor-json-golden.ts@@ -28,6 +28,7 @@ import { defineNormalizer, mapStrings, scrubKeys, scrubPaths, scrubTimestamps }import { PROVIDER_ENV_KEYS } from './provider-env.ts';import { MIGRATIONS } from '../../src/core/schema-migrations/registry.generated.ts';import { SEGMENTED_WRITER_FLOOR } from '../../src/core/page-body/writer-floor.ts';+import { SECURE_BUN_VERSION } from '../../src/core/runtime-version.ts';const REPO_ROOT = join(import.meta.dir, '..', '..');const CLI = join(REPO_ROOT, 'src', 'cli.ts');@@ -161,6 +162,13 @@ const UUID = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gconst VOLATILE_KEYS = /(^|_)(ms|pid|elapsed|duration|uptime)$|_ms$|^elapsed|^table_bytes$|^oldest_age_seconds$/i;export function normalizeDoctorText(text: string, roots: Record<string, string>, extra: Array<[RegExp | string, string]> = []): string {+ if (Bun.semver.order(Bun.version, SECURE_BUN_VERSION) < 0) {+ throw new Error([+ `FAIL: the doctor goldens are recorded on Bun ${SECURE_BUN_VERSION} or newer, and this run is Bun ${Bun.version}.`,+ `Why: below ${SECURE_BUN_VERSION} the bun_runtime row warns about CVE-2026-111497 (#7373), which changes the row, the score and the top issues.`,+ 'Fix: bun upgrade, then rerun this test (CI and the Ubicloud gate pin the build runtime).',+ ].join('\n'));+ }let out = scrubPaths(text, roots);for (const [pattern, label] of extra) out = typeof pattern === 'string' ? out.split(pattern).join(label) : out.replace(pattern, label);out = scrubTimestamps(out).replace(UUID, '<uuid>');diff --git a/test/runtime-version.test.ts b/test/runtime-version.test.tsindex eca260796e..815c8a265f 100644--- a/test/runtime-version.test.ts+++ b/test/runtime-version.test.ts@@ -14,7 +14,7 @@import { describe, expect, spyOn, test } from 'bun:test';import { readFileSync } from 'node:fs';import { join } from 'node:path';-import { MINIMUM_BUN_VERSION, assertSupportedBun, exitOnUnsupportedBun, unsupportedBunMessage } from '../src/core/runtime-version.ts';+import { MINIMUM_BUN_VERSION, SECURE_BUN_VERSION, assertSupportedBun, exitOnUnsupportedBun, unsupportedBunMessage } from '../src/core/runtime-version.ts';import { checkBunRuntime } from '../src/commands/doctor/checks/upgrade-health.ts';const root = join(import.meta.dir, '..');@@ -47,9 +47,28 @@ describe('Bun runtime floor', () => {});test('doctor reports the running Bun against the floor, with the fix on failure', () => {- expect(checkBunRuntime('1.4.2')).toEqual({ name: 'bun_runtime', status: 'ok', message: 'Bun 1.4.2 (minimum 1.4.0)' });+ expect(checkBunRuntime('1.4.4')).toEqual({ name: 'bun_runtime', status: 'ok', message: 'Bun 1.4.4 (minimum 1.4.0)' });+ expect(checkBunRuntime('1.5.0+abc123')).toEqual({ name: 'bun_runtime', status: 'ok', message: 'Bun 1.5.0+abc123 (minimum 1.4.0)' });expect(checkBunRuntime('1.3.14')).toEqual({ name: 'bun_runtime', status: 'fail', message: OLD_BUN_REFUSAL.replace('\n', ' ') });- expect(checkBunRuntime().status).toBe('ok');+ expect(checkBunRuntime().status).toBe(Bun.semver.order(Bun.version, SECURE_BUN_VERSION) >= 0 ? 'ok' : 'warn');+ });++ test('#7373: a supported Bun without the Brotli fix warns with the CVE and the upgrade path for how gbrain is installed', () => {+ expect(SECURE_BUN_VERSION).toBe('1.4.4');+ for (const version of ['1.4.0', '1.4.3', '1.4.4-canary.2']) {+ const standalone = checkBunRuntime(version, '/usr/local/bin/gbrain');+ expect(standalone.status).toBe('warn');+ expect(standalone.message).toStartWith(`Bun ${version} carries the Brotli decoder flaw CVE-2026-111497, fixed in Bun 1.4.4`);+ expect(standalone.message).toContain('This gbrain binary embeds that Bun: install the latest gbrain binary (`gbrain upgrade`)');+ expect(standalone.fix).toMatchObject({ argv: ['gbrain', 'upgrade'], actor: 'user', verify: { argv: expect.arrayContaining(['doctor']) } });+ for (const runtime of ['/home/alice-example/.bun/bin/bun', 'C:\\Users\\alice-example\\.bun\\bin\\bun.exe', '/opt/bun-1.4.3/bun-linux-x64']) {+ const viaBun = checkBunRuntime(version, runtime);+ expect(viaBun.status).toBe('warn');+ expect(viaBun.message).toEndWith('Run `bun upgrade`, then restart GBrain services.');+ expect(viaBun.fix).toMatchObject({ argv: ['bun', 'upgrade'], actor: 'user' });+ }+ }+ expect(MINIMUM_BUN_VERSION).toBe('1.4.0');});});diff --git a/test/scripts/ci-pr-scope.test.ts b/test/scripts/ci-pr-scope.test.tsindex 33b95bd76b..fd89f32793 100644--- a/test/scripts/ci-pr-scope.test.ts+++ b/test/scripts/ci-pr-scope.test.ts@@ -5,7 +5,7 @@ import { join } from 'node:path';import { spawnSync } from 'node:child_process';import { runInNewContext } from 'node:vm';import { load as loadYaml } from 'js-yaml';-import { MINIMUM_BUN_VERSION } from '../../src/core/runtime-version.ts';+import { MINIMUM_BUN_VERSION, SECURE_BUN_VERSION } from '../../src/core/runtime-version.ts';type Matrix = Record<string, unknown> & { exclude?: string };type Job = { if?: string; 'runs-on'?: string; strategy?: { matrix: Matrix }; steps?: Array<{ id?: string; run?: string; env?: Record<string, string> }> };@@ -51,16 +51,16 @@ describe('pull-request CI scope', () => {test('a pull request touching native paths runs every target on the primary Bun version', () => {const primary = nativeCells('primary');- expect(primary.native.sort()).toEqual(['darwin-arm64', 'darwin-x64', 'linux-arm64-glibc', 'linux-x64-glibc', 'win32-arm64', 'win32-x64'].map(target => `1.4.3/${target}`));- expect(primary.musl).toEqual(['1.4.3/linux-x64-musl', '1.4.3/linux-arm64-musl']);- expect(primary.console).toEqual(['windows-2022/1.4.3', 'windows-11-arm/1.4.3']);- expect(primary.dotnet).toEqual(['windows-2022/1.4.3', 'windows-11-arm/1.4.3']);+ expect(primary.native.sort()).toEqual(['darwin-arm64', 'darwin-x64', 'linux-arm64-glibc', 'linux-x64-glibc', 'win32-arm64', 'win32-x64'].map(target => `1.4.4/${target}`));+ expect(primary.musl).toEqual(['1.4.4/linux-x64-musl', '1.4.4/linux-arm64-musl']);+ expect(primary.console).toEqual(['windows-2022/1.4.4', 'windows-11-arm/1.4.4']);+ expect(primary.dotnet).toEqual(['windows-2022/1.4.4', 'windows-11-arm/1.4.4']);expect(primary.openclaw).toBe(true);});test('other pull requests keep one Linux smoke cell that runs the whole native step list', () => {const smoke = nativeCells('smoke');- expect(smoke).toEqual({ native: ['1.4.3/linux-x64-glibc'], musl: [], console: [], dotnet: [], openclaw: false });+ expect(smoke).toEqual({ native: ['1.4.4/linux-x64-glibc'], musl: [], console: [], dotnet: [], openclaw: false });});test('native path changes, an empty list and docs-only diffs classify as expected', () => {@@ -272,7 +272,7 @@ esacexpect(Object.keys(raw.on).sort()).toEqual(['schedule', 'workflow_dispatch']);expect(raw.concurrency).toEqual({ group: '${{ github.workflow }}-${{ github.ref }}', 'cancel-in-progress': false });const nightly = raw.jobs.convergence!;- expect(nightly.strategy!.matrix.bun).toEqual([MINIMUM_BUN_VERSION, '1.4.3']);+ expect(nightly.strategy!.matrix.bun).toEqual([MINIMUM_BUN_VERSION, '1.4.4']);expect(nightly.name).toContain('seed ${{ inputs.seed || github.run_id }}');expect(cell(nightly)).toEqual({ NOTES: '2000', LATENCY_MS: '50', KILLS: '20', SEED: '${{ inputs.seed || github.run_id }}' });// Outside test-status: no workflow calls it, and test.yml's aggregator never names it.@@ -290,7 +290,9 @@ esac// #4479: a local gate or VM on a different Bun than CI produced// runtime-only skew, so every single-version pin moves together.test('every single-version Bun pin matches the primary, and matrices keep the oldest supported version', () => {- const primary = '1.4.3';+ const primary = '1.4.4';+ // #7373: release binaries embed this Bun, so it never drops below the first release with the CVE-2026-111497 fix.+ expect(Bun.semver.order(primary, SECURE_BUN_VERSION)).toBeGreaterThanOrEqual(0);const read = (path: string) => readFileSync(join(root, path), 'utf8');const workflows = ['test', 'e2e', 'heavy-tests', 'macos-validation', 'persistence-validation', 'release', 'native-locks'].map(name => read(`.github/workflows/${name}.yml`)).join('\n');diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfileindex 225308cade..a5574580aa 100644--- a/tests/docker/Dockerfile+++ b/tests/docker/Dockerfile@@ -6,7 +6,7 @@## BUN_IMAGE is overridable so the harness can track CI's pinned bun version# (see .github/workflows/heavy-tests.yml setup-bun) without editing this file.-ARG BUN_IMAGE=oven/bun:1.4.3+ARG BUN_IMAGE=oven/bun:1.4.4FROM ${BUN_IMAGE}# git drives the interview/render/repo phases; ca-certificates is build-timediff --git a/tests/docker/bootstrap-e2e.sh b/tests/docker/bootstrap-e2e.shindex f5e54564bb..e2410b82c5 100644--- a/tests/docker/bootstrap-e2e.sh+++ b/tests/docker/bootstrap-e2e.sh@@ -14,7 +14,7 @@# keyless verify on a temp PGLite brain.## Env knobs:-# GBRAIN_E2E_BUN_IMAGE base image override (default oven/bun:1.4.3 —+# GBRAIN_E2E_BUN_IMAGE base image override (default oven/bun:1.4.4 —# keep in step with heavy-tests.yml's bun-version)# GBRAIN_E2E_IMAGE_TAG image tag override (default gbrain-bootstrap-e2e:local)set -euo pipefail@@ -23,7 +23,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"INNER="$SCRIPT_DIR/bootstrap-e2e-inner.sh"DOCKERFILE="$SCRIPT_DIR/Dockerfile"-BUN_IMAGE="${GBRAIN_E2E_BUN_IMAGE:-oven/bun:1.4.3}"+BUN_IMAGE="${GBRAIN_E2E_BUN_IMAGE:-oven/bun:1.4.4}"IMAGE_TAG="${GBRAIN_E2E_IMAGE_TAG:-gbrain-bootstrap-e2e:local}"DRY_RUN=0