Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7fa2b32
fix(deps): upgrade vitest 2.1.9 → 4.0.18, fix breaking changes
flyingrobots Mar 4, 2026
63dd929
docs(changelog): add vitest 4 upgrade to [Unreleased]
flyingrobots Mar 4, 2026
cbd1b01
fix(test): externalize roaring in vitest config for Bun compatibility
flyingrobots Mar 4, 2026
d43472c
fix(test): move roaring externalization to test.server.deps.external
flyingrobots Mar 4, 2026
aee350d
fix(test): add ssr.external for roaring native module under Bun
flyingrobots Mar 4, 2026
4393a6c
fix(test): use createRequire fallback for roaring native module under…
flyingrobots Mar 4, 2026
6c70e0d
fix(docker): build roaring native module in Bun container
flyingrobots Mar 4, 2026
3c525b7
fix(docker): use multi-stage build for roaring native module
flyingrobots Mar 4, 2026
15bbcd8
fix(docker): exclude bitmap tests from Bun suite (V8 API incompatibil…
flyingrobots Mar 4, 2026
4b425ba
fix: preserve both load failures in roaring fallback (CodeRabbit)
flyingrobots Mar 4, 2026
0a1139c
feat: add roaring-wasm WASM fallback for Bun/Deno bitmap indexes
flyingrobots Mar 4, 2026
60039ba
docs: add roaring-wasm to dependency tables and What's New
flyingrobots Mar 4, 2026
5bdfe64
fix: use RoaringModule type for adaptWasmApi param (tsc strict)
flyingrobots Mar 4, 2026
a0fd67f
feat: add levels, transitiveReduction, transitiveClosure, rootAncesto…
flyingrobots Mar 4, 2026
8d394dd
docs(roadmap): add B149-B151 large-graph streaming backlog items
flyingrobots Mar 4, 2026
cf3cba8
docs(roadmap): add B152-B156 streaming API, layout, and structural di…
flyingrobots Mar 4, 2026
7f49780
docs(roadmap): priority triage — 45 items into P0–P6 tiers with wave …
flyingrobots Mar 4, 2026
88e7b03
fix(roaring): reset nativeAvailability cache on reinit, preserve per-…
flyingrobots Mar 4, 2026
8d5f910
docs(readme): fix What's New heading to reflect unreleased status
flyingrobots Mar 4, 2026
7b77bc1
docs(changelog): add roaring cache reset and AggregateError fix entries
flyingrobots Mar 4, 2026
21dae78
fix(types): add JSDoc type annotations to roaring test module variable
flyingrobots Mar 4, 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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- **5 new graph algorithms in `GraphTraversal`** — `levels()` (longest-path level assignment for DAGs), `transitiveReduction()` (minimal edge set preserving reachability), `transitiveClosure()` (all implied reachability edges with `maxEdges` safety), `rootAncestors()` (find all in-degree-0 ancestors via backward BFS). All methods respect `NeighborProviderPort` abstraction, support `AbortSignal` cancellation, and produce deterministic output. Corresponding `LogicalTraversal` facade methods added. New error code: `E_MAX_EDGES_EXCEEDED`.
- **4 new test fixtures** — `F15_WIDE_DAG_FOR_LEVELS`, `F16_TRANSITIVE_REDUCTION`, `F17_MULTI_ROOT_DAG`, `F18_TRANSITIVE_CLOSURE_CHAIN` in the canonical fixture DSL.
- **BFS reverse reachability verification tests** — confirms `bfs(node, { direction: 'in' })` correctly discovers all backward-reachable ancestors.
- **`roaring-wasm` WASM fallback for Bun/Deno bitmap indexes** — `initRoaring()` now has a three-tier fallback chain: (1) ESM `import('roaring')`, (2) CJS `createRequire('roaring')`, (3) `import('roaring-wasm')` with WASM initialization. The WASM tier activates automatically when native V8 bindings are unavailable (Bun's JSC, Deno). Bitmap index tests (`materializedView`, `materialize.checkpointIndex.notStale`) are no longer excluded from the Bun test suite. Serialization formats are wire-compatible — portable bitmaps produced by native and WASM are byte-identical.

### Fixed

- **Roaring native module loading under Bun** — `initRoaring()` now catches dynamic `import('roaring')` failures and falls back to `createRequire()` for direct `.node` binary loading.
- **Stale `nativeAvailability` cache on `initRoaring()` reinit** — `getNativeRoaringAvailable()` now returns the correct value after swapping roaring implementations via `initRoaring(mod)`. Previously, the cached availability from the old module was returned.
- **Lost root causes on roaring load failure** — when all three tiers (native ESM, CJS require, WASM) fail, `initRoaring()` now throws `AggregateError` with per-tier errors instead of a plain `Error`, preserving diagnostic detail.

### Changed

- **ROADMAP priority triage** — 45 standalone items sorted into 6 priority tiers (P0–P6) with wave-based execution order and dependency chain mapping. Replaced flat Near-Term table with priority-grouped sub-tables. All milestones (M10–M14) marked complete. Inventory corrected to 133 total tracked items.
- **Vitest 2.1.9 → 4.0.18** — major test framework upgrade. Migrated deprecated `test(name, fn, { timeout })` signatures to `test(name, { timeout }, fn)` across 7 test files (40 call sites). Fixed `vi.fn().mockImplementation()` constructor mocks to use `function` expressions per Vitest 4 requirements. Resolves 5 remaining moderate-severity npm audit advisories (`esbuild` [GHSA-67mh-4wv8-2f99](https://github.com/advisories/GHSA-67mh-4wv8-2f99), `vite`, `@vitest/mocker`, `vite-node`, `vitest`). **`npm audit` now reports 0 vulnerabilities.**

## [13.0.1] — 2026-03-03

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
<img src="docs/images/hero.gif" alt="git-warp CLI demo" width="600">
</p>

## What's New in v13.0.1
## What's New (Unreleased)

- **5 new graph algorithms** — `levels()`, `transitiveReduction()`, `transitiveClosure()`, `rootAncestors()` in `GraphTraversal`, plus BFS reverse reachability verification. All use `NeighborProviderPort` and support cancellation.
- **`roaring-wasm` WASM fallback for Bun/Deno bitmap indexes** — bitmap indexes now work on Bun (JSC) and Deno via a three-tier fallback: native V8 bindings → CJS require → WASM. Wire-compatible, byte-identical serialization.
- **Dev dependency security updates** — resolved 4 high-severity advisories (`tar`, `rollup`, `minimatch`, `@isaacs/brace-expansion`). No runtime dependencies affected.

See the [full changelog](CHANGELOG.md) for details.
Expand Down Expand Up @@ -642,6 +644,7 @@ The codebase follows hexagonal architecture with ports and adapters:
| `@git-stunts/trailer-codec` | Git trailer encoding |
| `cbor-x` | CBOR binary serialization |
| `roaring` | Roaring bitmap indexes (native C++ bindings) |
| `roaring-wasm` | Roaring bitmap WASM fallback (Bun/Deno) |
| `zod` | Schema validation |

## Testing
Expand Down
274 changes: 166 additions & 108 deletions ROADMAP.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ services:
command: ["sh", "-c", "npx vitest run test/unit test/integration && bats test/bats/"]
profiles: [node22, full]

# Bun: API integration tests only (CLI is Node-only)
# Bun: API integration tests only (CLI is Node-only).
# Bitmap index tests pass via roaring-wasm WASM fallback (native roaring uses
# V8 C++ API, incompatible with Bun's JSC runtime).
test-bun:
build:
context: ..
dockerfile: git-warp/docker/Dockerfile.bun
environment:
- GIT_STUNTS_DOCKER=1
command: ["bunx", "vitest", "run", "test/integration/api/"]
command: bunx vitest run test/integration/api/
profiles: [bun, full]

# Deno: API integration tests via Deno.test() wrappers
Expand Down
7 changes: 3 additions & 4 deletions docker/Dockerfile.bun
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
# CLI tests are excluded — the CLI uses node: built-ins.
# Build context is the parent monorepo directory (context: ..).
FROM oven/bun:1.2-slim
# make/g++: native module compilation (roaring bitmaps).
# No bats/python3 — BATS CLI tests are Node-only.
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY git-warp/package*.json ./
Expand All @@ -26,4 +22,7 @@ RUN git init -q \
RUN useradd -m warp && chown -R warp:warp /app
USER warp
ENV GIT_STUNTS_DOCKER=1
# Bitmap index tests now pass under Bun via the roaring-wasm WASM fallback.
# The native roaring package (V8 C++ API) is incompatible with Bun's JSC runtime,
# but initRoaring() falls through to roaring-wasm automatically.
CMD ["bunx", "vitest", "run", "test/integration/api/"]
10 changes: 10 additions & 0 deletions docs/ROADMAP/COMPLETED.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,13 @@ Investigation revealed the correct approach is a two-phase split:
| B92 | ~~**SURFACE VALIDATOR UNIT TESTS**~~ — **DONE.** 34 tests for `parseExportBlock`, `extractJsExports`, `extractDtsExports`. |
| B93 | ~~**DEDUP EXPORT PARSING LOGIC**~~ — **DONE.** `parseExportBlock()` extracted as shared helper; `collectExportBlocks()` internal. |
| B94 | ~~**STANDALONE EXPORT DECLARATIONS**~~ — **DONE.** `extractJsExports` now handles `export const/function/class`. |

### v13.0.0 Standalone Items (completed)

| ID | Item |
|----|------|
| B44 | ~~**SUBSCRIBER UNSUBSCRIBE-DURING-CALLBACK E2E**~~ — **DONE (v13.0.0).** 3 edge-case tests (cross-unsubscribe, subscribe-during-callback, unsubscribe-in-onError). |
| B124 | ~~**TRUST PAYLOAD PARITY TESTS**~~ — **DONE (v13.0.0).** 22 tests verifying CLI vs service shape parity. |
| B125 | ~~**`CachedValue` NULL-PAYLOAD SEMANTIC TESTS**~~ — **DONE (v13.0.0).** 3 tests documenting null = "no value" sentinel. |
| B146 | ~~**UNIFY `CorePersistence` / `FullPersistence` TYPEDEFS**~~ — **DONE (v13.0.0).** Replaced `FullPersistence` with imported `CorePersistence`. |
| B148 | ~~**REVIEW NITS + INVENTORY RECONCILIATION**~~ — **DONE (v13.0.0).** Fix inventory counts, COMPLETED.md ordering, stale Deno test name, BisectService invariant comment. |
21 changes: 21 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,27 @@ export interface LogicalTraversal {
labelFilter?: string | string[];
signal?: AbortSignal;
}): Promise<{ path: string[]; totalCost: number }>;
levels(start: string | string[], options?: {
dir?: 'out' | 'in' | 'both';
labelFilter?: string | string[];
signal?: AbortSignal;
}): Promise<{ levels: Map<string, number>; maxLevel: number }>;
transitiveReduction(start: string | string[], options?: {
dir?: 'out' | 'in' | 'both';
labelFilter?: string | string[];
signal?: AbortSignal;
}): Promise<{ edges: Array<{ from: string; to: string; label: string }>; removed: number }>;
transitiveClosure(start: string | string[], options?: {
dir?: 'out' | 'in' | 'both';
labelFilter?: string | string[];
maxEdges?: number;
signal?: AbortSignal;
}): Promise<{ edges: Array<{ from: string; to: string }> }>;
rootAncestors(start: string, options?: {
labelFilter?: string | string[];
maxDepth?: number;
signal?: AbortSignal;
}): Promise<{ roots: string[] }>;
}

/**
Expand Down
Loading
Loading