Fixed critical bug where fork() completed without errors but branches were not persisted to storage, causing checkout() to fail with "Branch does not exist" errors. Root Cause: - COW metadata paths (_cow/*) were being branch-scoped incorrectly - resolveBranchPath() applied branch prefixes to COW paths - Result: refs written to branches/main/_cow/... instead of _cow/... - COW metadata (refs, commits, blobs) must be global, not per-branch Changes: 1. baseStorage.ts (resolveBranchPath): - Bypass branch scoping for _cow/ paths - COW metadata now stored globally as designed - Fixes fork() persistence across all storage adapters 2. brainy.ts (fork): - Add branch creation verification after copyRef() - Throw descriptive error if branch wasn't created - Prevents silent failures in production 3. tests/integration/fork-persistence.test.ts: - Comprehensive integration tests for fork workflow - Tests: persist → listBranches → checkout - Covers Workshop snapshot use case - Verifies COW metadata is globally accessible Impact: - Affects: FileSystem, GCS, R2, S3, Azure storage adapters - Workshop snapshot restoration now works - Zero breaking changes, production-scale ready 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| augmentations/intelligentImport | ||
| benchmarks | ||
| comprehensive | ||
| configs | ||
| fixtures/import | ||
| helpers | ||
| integration | ||
| manual | ||
| performance | ||
| scripts | ||
| unit | ||
| vfs | ||
| brainy-3.test.ts | ||
| critical-error-handling.test.ts | ||
| critical-neural-validation.test.ts | ||
| critical-performance-benchmark.test.ts | ||
| distributed-demo.test.ts | ||
| model-loading.test.ts | ||
| opfs-storage.test.ts | ||
| package-size-breakdown.test.ts | ||
| package-size-limit.test.ts | ||
| setup-integration.ts | ||
| setup-unit.ts | ||
| setup.ts | ||
| streaming-pipeline.test.ts | ||
| type-utils.test.ts | ||
| typeAwareHNSWIndex.test.ts | ||
| typeAwareQueryPlanner.test.ts | ||