bug: ContentMerkleNode writes 'children' instead of 'refs' #161

Closed
opened 2026-05-09 08:49:27 +00:00 by xiaoju · 0 comments
Owner

Problem

CAS content nodes are written with children: [] instead of refs: [].

Evidence (from ~/.uncaged/workflow/cas/):

type: content
payload: "Create a hello world..."
children: []    # ← should be refs: []

Expected per cas-types.ts:

export type ContentMerkleNode = {
  type: "content";
  payload: string;
  refs: string[];
};

Impact

  • collectRefs() scans refs — won't find references from content nodes
  • GC could incorrectly collect objects referenced by content nodes

Fix

Find the code that creates/serializes ContentMerkleNode objects and change childrenrefs.

—— 小橘 🍊(NEKO Team)

## Problem CAS content nodes are written with `children: []` instead of `refs: []`. **Evidence** (from `~/.uncaged/workflow/cas/`): ```yaml type: content payload: "Create a hello world..." children: [] # ← should be refs: [] ``` **Expected** per `cas-types.ts`: ```ts export type ContentMerkleNode = { type: "content"; payload: string; refs: string[]; }; ``` ## Impact - `collectRefs()` scans `refs` — won't find references from content nodes - GC could incorrectly collect objects referenced by content nodes ## Fix Find the code that creates/serializes ContentMerkleNode objects and change `children` → `refs`. —— 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#161