Skip to content

Commit ebb3318

Browse files
committed
fix: unblock US-400 CI on GitHub runners
1 parent 5c2fb61 commit ebb3318

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ jobs:
9696
- name: Install workspace dependencies
9797
run: pnpm install --frozen-lockfile
9898

99+
- name: Build TypeScript workspace dependencies
100+
run: pnpm build
101+
99102
- name: Build Rust sidecar binary for TS integration tests
100103
run: cargo build --package agent-os-sidecar
101104

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ Each agent type needs:
263263
- **CI must build `agent-os-sidecar` before TypeScript integration tests.** `packages/core` and registry integration suites talk to the native sidecar binary; if the workflow only runs `pnpm test`, it is not exercising the same path developers use locally.
264264
- **CI should run both `cargo test --workspace --no-fail-fast` and the ignored sidecar integration suite.** The four slow sidecar isolation tests are intentionally marked `#[ignore]` for local ergonomics, so the workflow needs a dedicated `cargo test -p agent-os-sidecar -- --ignored --test-threads=1` step to keep them covered.
265265
- **Cache the expensive layers explicitly.** Reuse pnpm store, workspace `node_modules`, and Rust `target/`/cargo caches in CI; otherwise this repo's mixed Rust/TS pipeline gets too slow to iterate on.
266+
- **Cross-crate Rust test helpers must use repo-relative paths, never machine-local absolute paths.** `#[path = "..."]` includes under `crates/*` are compiled on CI runners with different checkout roots, so absolute developer paths like `/home/nathan/...` will break `cargo test --workspace`.
266267
- **Local CI reproduction:** `git lfs pull && cargo test --workspace --no-fail-fast && cargo test -p agent-os-sidecar -- --ignored --test-threads=1 && cargo build -p agent-os-sidecar && AGENTOS_E2E_NETWORK=1 pnpm test`
267268
- **Framework**: vitest
268269
- `packages/core/tests/` is grouped by domain under `unit/`, `filesystem/`, `process/`, `session/`, `agents/{pi,claude,opencode,codex}/`, `wasm/`, `network/`, `sidecar/`, and `cron/`. When moving or adding tests, rebase relative `../src` and `helpers/` imports plus any `moduleAccessCwd` or repo-root paths to match the subdirectory depth.

crates/sidecar/src/service.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8920,8 +8920,12 @@ fn ignore_stale_javascript_sync_rpc_response(error: SidecarError) -> Result<(),
89208920

89218921
#[cfg(test)]
89228922
mod tests {
8923-
#[path = "/home/nathan/a5/crates/bridge/tests/support.rs"]
8924-
mod bridge_support;
8923+
mod bridge_support {
8924+
include!(concat!(
8925+
env!("CARGO_MANIFEST_DIR"),
8926+
"/../bridge/tests/support.rs"
8927+
));
8928+
}
89258929

89268930
use super::*;
89278931
use crate::protocol::{

0 commit comments

Comments
 (0)