feat: auto-bootstrap CAS store on open (Phase 1a) #76

Merged
xiaoju merged 1 commits from fix/73-auto-bootstrap into main 2026-05-31 13:40:43 +00:00
Owner

What

openStore() 自动创建目录 + bootstrap,删除 init/bootstrap 命令。

Why

Phase 1a of #67 — 简化 CLI,无需手动初始化 store。

Changes

  • json-cas-fs/store.ts — 新增 async openStore(),自动 mkdir + bootstrap + 目录校验
  • cli-json-cas/index.ts — 删除 init/bootstrap 命令,所有 openStore 调用加 await
  • 测试同步更新 — 删除 init/bootstrap/store-validation 测试,478 全绿

Ref

Fixes #73

## What openStore() 自动创建目录 + bootstrap,删除 init/bootstrap 命令。 ## Why Phase 1a of #67 — 简化 CLI,无需手动初始化 store。 ## Changes - `json-cas-fs/store.ts` — 新增 async `openStore()`,自动 mkdir + bootstrap + 目录校验 - `cli-json-cas/index.ts` — 删除 init/bootstrap 命令,所有 openStore 调用加 await - 测试同步更新 — 删除 init/bootstrap/store-validation 测试,478 全绿 ## Ref Fixes #73
xiaoju added 1 commit 2026-05-31 13:38:31 +00:00
Changes:
1. openStore() now async, auto-creates directory and bootstraps
2. Removed shouldCreate parameter and validateStoreExists()
3. All openStore() calls now awaited
4. Deleted init and bootstrap commands
5. Removed Issue #55 store validation tests (superseded by auto-bootstrap)
6. Enhanced error handling in openStore() for permission/path issues
7. Updated e2e snapshots after fixing missed await in cmdRender

Bootstrap is idempotent. Core tests using createMemoryStore() unaffected.

Fixes #73

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
xiaoju merged commit f4cf92e128 into main 2026-05-31 13:40:43 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/json-cas#76