Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fd2833e
chore(tooling): pin the workspace to stable Bun 1.4.0
cursoragent Aug 20, 2026
1a013db
test(tooling): require bun.lock v1 and cover bun-version failures
cursoragent Aug 20, 2026
f2e13c6
test(tooling): reject Vercel bunVersion for Node Functions
cursoragent Aug 20, 2026
26987ba
fix(tooling): reject prerelease Bun pins and symlink no-ops
cursoragent Aug 21, 2026
3067fc0
fix(tooling): fail bun-lock-drift on lockfileVersion 2+
cursoragent Aug 21, 2026
4d4597e
test(tooling): reject bun --bun on Vercel install and ignore commands
cursoragent Aug 21, 2026
799ef9b
fix(tooling): do not remediate lockfileVersion failures with bun install
cursoragent Aug 21, 2026
a596150
test(tooling): pin every first-party setup-bun workflow to env.BUN_VE…
cursoragent Aug 21, 2026
66cbf74
test(tooling): scan .yml and .yaml GitHub workflow pins
cursoragent Aug 21, 2026
b03b050
test(tooling): remove lockfileVersion v2 fixture directory
cursoragent Aug 21, 2026
dafc40c
docs(ci): add copyable turbo prune check before accepting lockfile v2
cursoragent Aug 21, 2026
609fe17
fix(tooling): fail verify:bun-version when GitHub workflow Bun pins d…
cursoragent Aug 21, 2026
2cfa2c0
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cobmojo Sep 21, 2026
baab17a
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cursoragent Sep 23, 2026
88166f9
test: give git fixture checks the same 60s budget
cursoragent Sep 23, 2026
4a906f6
merge(develop): catch bun 1.4 branch up to current develop
cursoragent Sep 23, 2026
5327df6
fix(AL-1338): enforce workflow Bun pins and Node runtime policy
codex Sep 28, 2026
78f24fe
merge(develop): reconcile AL-1338 with current integration base
codex Sep 28, 2026
5fca662
fix: try later bun candidates for workflow yaml
cursoragent Sep 28, 2026
458ded0
test(tooling): preserve Node lookup and clean owned Bun fixtures
codex Sep 29, 2026
a7e333e
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cobmojo Sep 29, 2026
964e3af
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cobmojo Sep 30, 2026
c3199ea
ci(integration): prove demo auth before the smoke suite
cursoragent Sep 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bun-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.4.0
2 changes: 1 addition & 1 deletion .github/workflows/ci-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
contents: read

env:
BUN_VERSION: "1.3.14"
BUN_VERSION: "1.4.0"
NODE_VERSION: "24.15.0"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
contents: read

env:
BUN_VERSION: "1.3.14"
BUN_VERSION: "1.4.0"
NODE_VERSION: "24.15.0"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa-smoke-preview-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
cancel-in-progress: true

env:
BUN_VERSION: "1.3.14"
BUN_VERSION: "1.4.0"
NODE_VERSION: "24.15.0"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Thanks for contributing to asymmetric.al. We welcome pull requests, bug reports,
- **Base branches:** use `develop` for development validation and `production` only for
an intentional production release. `main` is retired/protected historical
history and is not an active deploy target.
- **Package manager:** `bun` pinned via `package.json#packageManager` (currently `bun@1.3.14`). `bun run setup` and `scripts/setup/*` call `bun run verify:bun-version` so a mismatched local Bun fails fast with upgrade instructions.
- **Package manager:** `bun` pinned via `package.json#packageManager` and `.bun-version` (currently `bun@1.4.0`). `bun run setup` and `scripts/setup/*` call `bun run verify:bun-version` so a mismatched local Bun fails fast with upgrade instructions. Apps still run on Node.js via Next.js; Bun is the package manager and script runner, not a replacement Node runtime.
- **Conventions:** `docs/conventions.md` (folder structure, code style, and pre-commit checklist).
- **Setup (macOS/Linux):** `bun run setup` (creates/validates `.env.local`, installs deps, runs verification).
- **Mission Control in Cursor Cloud:** `bun run setup:mission-control:cloud && bun run dev:mission-control` (writes gitignored dev placeholders only).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A high-performance Next.js 16.3.0-preview.9 (App Router) Turborepo monorepo for

## Quickstart

1. **Install prerequisites:** [Node.js 20.9+](https://nodejs.org/), [Bun 1.3.14](https://bun.sh), and Git on your PATH.
1. **Install prerequisites:** [Node.js 20.9+](https://nodejs.org/), [Bun 1.4.0](https://bun.sh), and Git on your PATH.
2. **Choose your setup path.**

### Credential-free Mission Control sandbox
Expand Down Expand Up @@ -218,7 +218,7 @@ Commit both the canonical files and any mirror updates.

### Package Manager

This repo uses **Bun** pinned in root `package.json` `packageManager` (currently **1.3.14**). Install that exact version locally (`bun run verify:bun-version` after setup). Prefer `bun` / `bunx` for scripts in this workspace; CI installs with `bun ci`.
This repo uses **Bun** pinned in root `package.json` `packageManager` and `.bun-version` (currently **1.4.0**). Install that exact version locally (`bun run verify:bun-version` after setup). Prefer `bun` / `bunx` for scripts in this workspace; CI installs with `bun ci`. Apps still run on Node.js via Next.js — do not use `bun --bun` to swap the application runtime.

### Monorepo Workspace Contract

Expand Down
2 changes: 1 addition & 1 deletion docs/ai/repo-groundtruth.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ convention, not rule.
| ---- | ------------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------- |
| G-01 | Direct observation | 3 deployable apps: `@asym/admin`, `@asym/donor`, `@asym/missionary-app` | `apps/*/package.json` names | Confirmed |
| G-02 | Direct observation | 11 packages under `packages/*`, all `@asym/*` | `packages/*/package.json` names; `ls -1d packages/*/ \| wc -l` = 11 | Confirmed |
| G-03 | Direct observation | Root package name is `give-hope`; Bun pinned `bun@1.3.14` | root `package.json` `name`, `packageManager` | Confirmed |
| G-03 | Direct observation | Root package name is `give-hope`; Bun pinned `bun@1.4.0` | root `package.json` `name`, `packageManager`; `.bun-version` | Confirmed |
| G-04 | Direct observation | Next.js `16.2.6`, React `19.2.3`; root TS `6.0.3` | root + `apps/donor` `package.json` | Confirmed |
| G-05 | Direct observation | `apps/donor` declares `typescript: ^5.7.3` (diverges from root `6.0.3`) | `apps/donor/package.json` | Confirmed (see C-03) |
| G-06 | Direct observation | `packages/mock-data` (`@asym/mock-data`) is a real workspace | `packages/mock-data/package.json`; matched by `packages/*` glob | Confirmed |
Expand Down
2 changes: 1 addition & 1 deletion docs/ai/stack-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Agents MUST use this to build better Nia query preambles and to pick the right d
- React
- TypeScript (default language); future TS 6/7 prep policy: `docs/guides/typescript-6-readiness.md`
- Node.js (runtime target)
- Bun (preferred package manager/runtime)
- Bun (package manager and script runner; apps still run on Node.js)
- PostgreSQL (Supabase Postgres)

Nia keywords:
Expand Down
6 changes: 4 additions & 2 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ Required checks:

### Bun toolchain

- **Pinned version:** root `package.json` `packageManager` (currently `bun@1.3.14`).
- **GitHub Actions:** both workflows set `env.BUN_VERSION` to that exact version; every `oven-sh/setup-bun@v2` step uses `bun-version: ${{ env.BUN_VERSION }}`.
- **Pinned version:** root `package.json` `packageManager` and `.bun-version` (currently `bun@1.4.0`, stable only — never canary).
- **Runtime vs package manager:** Bun is the install/script runner. Next.js apps still execute on Node.js. Do not pass `bun --bun` or otherwise swap the application runtime.
- **GitHub Actions:** `ci.yml`, `ci-integration.yml`, and `qa-smoke-preview-deploy.yml` set `env.BUN_VERSION` to that exact version; every first-party `oven-sh/setup-bun@v2` step uses `bun-version: ${{ env.BUN_VERSION }}`.
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
- **Install in CI:** `bun ci --no-cache --backend=copyfile` (frozen lockfile install with Bun's portable file-copy backend). Do not use `bun install --frozen-lockfile` in workflows unless a future Bun release documents a regression.
- **Lockfile format:** `bun.lock` remains `"lockfileVersion": 1` with `"configVersion": 1` (isolated linker). Bun 1.4 writes lockfileVersion 2 for _new_ lockfiles, but does not bump an existing v1 file on re-save ([oven-sh/bun#31602](https://github.com/oven-sh/bun/pull/31602)). Do not regenerate `bun.lock` just to pick up v2, and do not run `bun install --save-text-lockfile` — that rewrite can retarget nested resolutions without a manifest change. Installed Turborepo `2.10.0` parses bun lockfile versions 0 and 1 only. If a future install rewrites `bun.lock` to lockfileVersion 2 or 3, do not merge until `turbo prune` on the installed turbo actually parses that file.
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
- **Lockfile drift:** a frozen-lockfile install does **not** notice when a `package.json` dependency is missing from `bun.lock`'s `workspaces` map — commit `ea9a7673` added a root dependency without the regenerated lockfile and CI stayed green, while every contributor's next plain `bun install` silently rewrote `bun.lock`. `bun run verify:bun-lock-drift` compares the two files directly and is the check that catches this; it is a pure file read, so it needs no install and no network.
- **Turbo cache keys** in `ci.yml` include `bun-${{ env.BUN_VERSION }}` so cache restores do not cross Bun upgrades.
- **Local parity:** match the pin (`bun run verify:bun-version`); reproducible install from a clean tree is `bun ci`. GitHub Actions uses `bun ci --no-cache --backend=copyfile` so Linux runners use Bun's portable install backend for vendored `file:` tarballs.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"license": "AGPL-3.0-only",
"packageManager": "bun@1.3.14",
"packageManager": "bun@1.4.0",
"workspaces": [
"apps/*",
"packages/*",
Expand Down
2 changes: 1 addition & 1 deletion plans/004-remove-radix-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Verified:
- `apps/admin/package.json:44` — `"@radix-ui/react-visually-hidden": "^1.2.4"` — unused (zero imports in `apps/admin`).
- `apps/donor/package.json:34` — `"@radix-ui/react-tabs": "^1.1.13"` — unused (zero imports in `apps/donor`; donor uses `@asym/ui/components/shadcn/tabs`).
- `bun.lock` — ~152 lines matching `radix` (the rollup package + transitive `@radix-ui/*` packages).
- Root `package.json` declares `"packageManager": "bun@1.3.14"` — all
- Root `package.json` declares `"packageManager": "bun@1.4.0"` — all
dependency operations must use Bun.

## Commands you will need
Expand Down
45 changes: 38 additions & 7 deletions scripts/verify/bun-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { homedir } from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";

const repoRoot = path.resolve(
const defaultRepoRoot = path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
"../..",
);
const packageJsonPath = path.join(repoRoot, "package.json");
const scriptPath = fileURLToPath(import.meta.url);

function candidateBunPaths() {
const candidates = process.env.BUN_BINARY ? [process.env.BUN_BINARY] : [];
Expand All @@ -32,7 +32,9 @@ function candidateBunPaths() {
return [...new Set(candidates)];
}

function readExpectedVersion() {
export function readExpectedVersion(root = defaultRepoRoot) {
const packageJsonPath = path.join(root, "package.json");

if (!existsSync(packageJsonPath)) {
throw new Error(`missing root package.json at ${packageJsonPath}`);
}
Expand All @@ -52,7 +54,31 @@ function readExpectedVersion() {
);
}

return match[1].replace(/^v/, "");
const expected = match[1].replace(/^v/, "");

if (/canary/i.test(expected)) {
throw new Error(
`packageManager must pin stable Bun, not canary: ${packageManager}`,
);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

const bunVersionPath = path.join(root, ".bun-version");

if (!existsSync(bunVersionPath)) {
throw new Error("missing .bun-version; it must match packageManager");
}

const bunVersionFile = readFileSync(bunVersionPath, "utf8")
.trim()
.replace(/^v/, "");

if (bunVersionFile !== expected) {
throw new Error(
`.bun-version (${bunVersionFile}) does not match packageManager bun@${expected}`,
);
}

return expected;
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
}

function readInstalledVersion() {
Expand All @@ -71,11 +97,11 @@ function readInstalledVersion() {
return null;
}

function main() {
export function main(root = defaultRepoRoot) {
let expected;

try {
expected = readExpectedVersion();
expected = readExpectedVersion(root);
} catch (error) {
console.error(`error: ${error.message}`);
process.exit(2);
Expand Down Expand Up @@ -103,4 +129,9 @@ function main() {
console.log(`Bun version OK: bun@${installed}`);
}

main();
const isDirectRun =
process.argv[1] && path.resolve(process.argv[1]) === scriptPath;

if (isDirectRun) {
main();
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
}
96 changes: 96 additions & 0 deletions tests/unit/scripts/bun-pin-sync.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import { existsSync, readFileSync, readdirSync } from "node:fs";
import path from "node:path";

import { describe, expect, it } from "vitest";

import { parseBunLock } from "../../../scripts/verify/bun-lock-drift.mjs";

const repoRoot = process.cwd();

/** Official stable pin verified from GitHub `bun-v1.4.0` and npm `bun@latest`. */
const VERIFIED_STABLE_BUN = "1.4.0";

const WORKFLOW_DIR = path.join(repoRoot, ".github", "workflows");

function readPackageJson(): {
packageManager?: string;
devDependencies?: Record<string, string>;
} {
return JSON.parse(readFileSync(path.join(repoRoot, "package.json"), "utf8"));
}

function bunVersionFromPackageManager(
packageManager: string | undefined,
): string {
expect(packageManager, "package.json packageManager").toMatch(/^bun@.+$/);
const version = packageManager!.slice("bun@".length);
expect(version).not.toMatch(/canary/i);
return version;
}

describe("Bun toolchain pin sync", () => {
const packageJson = readPackageJson();
const packageManagerVersion = bunVersionFromPackageManager(
packageJson.packageManager,
);

it("pins the verified stable Bun 1.4.x release, never canary", () => {
expect(packageJson.packageManager).toBe(`bun@${VERIFIED_STABLE_BUN}`);
expect(packageManagerVersion).toBe(VERIFIED_STABLE_BUN);
expect(packageManagerVersion.startsWith("1.4.")).toBe(true);
});

it("keeps .bun-version in lockstep with packageManager", () => {
const bunVersionPath = path.join(repoRoot, ".bun-version");
expect(existsSync(bunVersionPath), ".bun-version exists").toBe(true);
const bunVersion = readFileSync(bunVersionPath, "utf8").trim();
expect(bunVersion).toBe(packageManagerVersion);
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
});

it("keeps every first-party GitHub Actions BUN_VERSION on the same pin", () => {
const workflowFiles = readdirSync(WORKFLOW_DIR).filter((name) =>
name.endsWith(".yml"),
);
const bunPins: string[] = [];

for (const fileName of workflowFiles) {
const workflow = readFileSync(path.join(WORKFLOW_DIR, fileName), "utf8");
const matches = [...workflow.matchAll(/^\s*BUN_VERSION:\s*"([^"]+)"/gm)];
for (const match of matches) {
bunPins.push(`${fileName}:${match[1]}`);
expect(match[1], fileName).toBe(packageManagerVersion);
}

if (workflow.includes("oven-sh/setup-bun")) {
expect(workflow, fileName).toContain(
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
"bun-version: ${{ env.BUN_VERSION }}",
);
expect(
matches.length,
`${fileName} declares BUN_VERSION`,
).toBeGreaterThan(0);
}
}

expect(bunPins.length).toBeGreaterThan(0);
});

it("keeps bun.lock at lockfileVersion 1 for the installed Turborepo parser", () => {
const lock = parseBunLock(
readFileSync(path.join(repoRoot, "bun.lock"), "utf8"),
) as {
lockfileVersion?: number;
configVersion?: number;
};

// Turborepo 2.10.x parses bun lockfile versions 0 and 1 only.
// If Bun rewrites this file to 2 or 3, fail here until `turbo prune`
// proves the installed turbo can read it — do not guess from a changelog.
expect([0, 1]).toContain(lock.lockfileVersion);
expect(lock.lockfileVersion).toBe(1);
expect(lock.configVersion).toBe(1);
expect(packageJson.devDependencies?.turbo, "root turbo pin").toMatch(
/^\d+\.\d+\.\d+$/,
);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
});
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
});
72 changes: 69 additions & 3 deletions tests/unit/scripts/bun-version.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import { mkdtempSync, writeFileSync } from "node:fs";
import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import path from "node:path";
import { spawnSync } from "node:child_process";

import { describe, expect, it } from "vitest";

import { readExpectedVersion } from "../../../scripts/verify/bun-version.mjs";

const repoRoot = process.cwd();
const scriptPath = path.join(repoRoot, "scripts", "verify", "bun-version.sh");
const expectedPackageManager = (
JSON.parse(readFileSync(path.join(repoRoot, "package.json"), "utf8")) as {
packageManager: string;
}
).packageManager;
const bashSystemPath =
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";

Expand Down Expand Up @@ -89,7 +96,9 @@ describe("bun version guard", () => {
const result = runGuard();

expect(result.status).toBe(0);
expect(result.stdout).toContain("Bun version OK: bun@1.3.14");
expect(result.stdout).toContain(
`Bun version OK: ${expectedPackageManager}`,
);
expect(result.stderr).toBe("");
},
30000,
Expand Down Expand Up @@ -124,7 +133,7 @@ describe("bun version guard", () => {
expect(result.status).toBe(1);
expect(result.stderr).toContain("error: Bun version mismatch.");
expect(result.stderr).toContain(
"expected (package.json packageManager): bun@1.3.14",
`expected (package.json packageManager): ${expectedPackageManager}`,
);
expect(result.stderr).toContain(
"installed (bun --version): bun@1.3.4",
Expand All @@ -133,3 +142,60 @@ describe("bun version guard", () => {
30000,
);
});

function writePinFixture(options: {
packageManager: string;
bunVersion?: string | null;
}): string {
const dir = mkdtempSync(path.join(tmpdir(), "bun-version-mjs-"));
writeFileSync(
path.join(dir, "package.json"),
`${JSON.stringify({ packageManager: options.packageManager }, null, 2)}\n`,
);

if (options.bunVersion !== null && options.bunVersion !== undefined) {
writeFileSync(path.join(dir, ".bun-version"), `${options.bunVersion}\n`);
}

return dir;
}

describe("bun-version.mjs pin contract", () => {
it("accepts a matching stable pin", () => {
const root = writePinFixture({
packageManager: "bun@1.4.0",
bunVersion: "1.4.0",
});

Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
expect(readExpectedVersion(root)).toBe("1.4.0");
});

it("rejects a canary packageManager pin", () => {
const root = writePinFixture({
packageManager: "bun@1.4.0-canary.20260820.1",
bunVersion: "1.4.0-canary.20260820.1",
});

expect(() => readExpectedVersion(root)).toThrow(/stable Bun, not canary/);
});

it("rejects a missing .bun-version file", () => {
const root = writePinFixture({
packageManager: "bun@1.4.0",
bunVersion: null,
});

expect(() => readExpectedVersion(root)).toThrow(/missing \.bun-version/);
});

it("rejects a .bun-version that does not match packageManager", () => {
const root = writePinFixture({
packageManager: "bun@1.4.0",
bunVersion: "1.3.14",
});

expect(() => readExpectedVersion(root)).toThrow(
/\.bun-version \(1\.3\.14\) does not match packageManager bun@1\.4\.0/,
);
});
});
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
Loading