Skip to content

[REQ-128][CODE] 切换 BundleGraph V3 ledger、claim set 与全部 writer #706

Closed

Description

@jinjunnn

Covers

alpha-work#49 AC5/AC7:把安装账本切到 all-writer V3 repository,提供 package graph、
claim set、root-only原子 mutation、迁移与 downgrade fail-closed;在完成前 package 只能
browse,不能 production install。

Solution baseline

REQ-128 accepted baseline
§2.9。

Ground truth and boundary

  • packages/ui-mac/src/main/ext-receipt-v2.ts schema严格且无 graph/claim。
  • 当前 standalone install/uninstall/enabled/recovery/import/adoption等均写同一 V2 ledger。
  • CAS已经内容共享;不新增 CAS refcount。

Development plan

  1. 定义 PackageLedgerMutationV1、PackageRecordV1、PackageGraphV1、claim mutations
    与 V3 strict decoder/writer。
  2. 只有 root package receipt item携带 mutation;child items不独立提交 ledger。
  3. commitReceipt/receiptCommitted/crash replay 对同一 transactionId exact replay;
    repository一次验证、一次 rename。
  4. cut over全部 read-modify-write入口:
    standalone install/update/uninstall、enabled state、transaction/uninstall recovery、
    import/adoption/migration、Bundle mutation、普通 upsert/remove。
  5. owner set仅允许 standalone、bundle digest owner、legacy-protected;refcount由set派生。
  6. V2 migration全部 legacy-protected,不猜历史 Bundle;old V2 writer遇V3拒写。
  7. direct uninstall claim-aware;仍有Bundle owner时只释放 standalone claim。
  8. rollout:完成前不广告 alpha.install.package.v1。

Acceptance and named gates

  • all-writer table每入口一个生产 wiring test;第一次 V3 write后所有扩展管理操作仍可用。
  • root-only mutation在全部 crash points只出现全旧或全新,无 child-only durable。
  • fixed-seed model/property tests + canonical standalone/Bundle A/B permutations。
  • tampered owner、dangling claim、digest/version conflict、unknown child loud-fail。
  • legacy/unmanaged/identity不确定内容永不 GC。

Dependencies

Blocked by alpha-code#694 与 Bundle builder/probe enabling issue。

Out of scope

多代 graph retention、semver solver、CAS refcount、Bundle graph diff UI。

Exit condition

Merged V3 cutover + all-writer/fault/property evidence + migration/downgrade docs。

Activity

  1. self-assigned this
    on Jul 30, 2026
  2. added
    type:featureNew user or system capability
    prio:P1High-value near-term delivery
    area:dataPersistence or data quality
    cross-repoRequires coordinated work in multiple repositories
    on Jul 30, 2026
  3. added 6 commits that reference this issue on Aug 1, 2026
  4. added 5 commits that reference this issue on Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:dataPersistence or data qualitycross-repoRequires coordinated work in multiple repositoriesprio:P1High-value near-term deliverytype:featureNew user or system capability

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions