Skip to content

fix(storage): resolve CAS-backed generations in delta publishing and compaction #1219

Description

@DecisionNerd

Public composite property mutation directly after resumable construction fails with GF_PROJECT_CORRUPT: generation graph tree is missing. The selected generation correctly declares CAS-backed graph/files, but prepare_graph_delta resolves parent.graph_tree_root() and verifies/copies it as a generation-owned tree. Compaction uses the same assumption. Ordinary full-Parquet mutation can first produce a generation-owned tree and mask this mismatch; the baseline must exercise direct construction → composite mutation too.

Verified through GraphForge::publish_composite_transaction(SetNodeProperty) on current main plus the isolated #1218 edge-layout candidate: 66 random-UUID nodes, two construction sessions, 258 edges/two relationships; failure occurs before replay at the ownership check. The direct public storage publisher fails identically. Source: graph_delta_journal.rs prepare_graph_delta and graph_delta_compaction.rs prepare_compaction. Existing #901 is the broad ancestor; searches found no focused duplicate.

This isolates a required #1213 production-path blocker under #1194. It is not backwards compatibility: both CAS-backed and generation-owned trees are emitted by current production writers.

Acceptance criteria:

  • Resolve graph payloads, delta runs and control metadata through the selected generation's declared authenticated ownership, for all production delta preparation/replay/compaction entry points.
  • Public construction → composite mutation → reopen/query → compaction → reopen/export/verify/clean import succeeds with exact current-format graph values. Cover CAS-backed and generation-owned inputs; preserve complete participant generations, identity, semantic routing, authentication, cancellation, recovery and active snapshots.
  • Reuse existing lifecycle/materialization/publication primitives. Preserve immutable base payload reuse when appending a delta; avoid silently converting CAS sharing into complete permanent copies. Measure any necessary temporary materialization, read/write I/O and memory, with explicit admission/budgets.
  • Preserve exact idempotency and parent-conflict behavior. No untrusted-path fallbacks, compatibility readers, migration machinery, or generic writer abstraction.
  • Focused PR with deterministic regression evidence, independent review, required exact-head CI Gate and squash merge.

Sequence within the three-change WIP limit: #1216's in-flight replacement repair must merge before implementation begins here. #1218 separately repairs exploratory ordering/schema assumptions; use node-only or typed fixtures to isolate ownership evidence and integrate the multi-relationship regression after both repairs.

Further verified current-path failures during the isolated ownership regression:

  • Composite catalog persistence truncated a read-only CAS alias with File::create. Catalog and label-encoding marker need one authenticated private-alias replacement; the observed catalog must be included in the delta candidate when a property name is introduced.
  • Generic CAS append selected a raw-layout root despite mapped construction paths. Replay publication must retain the candidate's authenticated semantic route contract.
  • The public compaction facade calls the storage publisher directly; preserve parent capabilities and non-graph participant snapshots instead of assembling empty workspace records.

The focused candidate uses existing CAS manifest append, retained publication leases through CURRENT, and durable rewrite primitives. Node-only public round trips isolate ownership from #1218. Separate multi-relationship edge ordering/schema/ID repairs remain in #1218.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions