This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: island ID is truncated SHA-256 of lexmin vertex

Shape: 16 hex chars (e.g. "a3f2c8b91e4d7a05"). Stable when
vertices are added, opaque, short enough for URLs and DB keys.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>

author
nandi
co-author
Letta Code
date (May 13, 2026, 5:28 AM UTC) commit 8f6c8a8d parent f9ee9daa
+6 -1
+6 -1
src/worker.ts
··· 113 113 e => componentSet.has(e.source) && componentSet.has(e.target), 114 114 ); 115 115 116 + // Stable ID: truncated SHA-256 of the lexicographic minimum vertex 117 + const lexmin = component.sort()[0]; 118 + const lexminHash = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(lexmin)); 119 + const id = Array.from(new Uint8Array(lexminHash)).map(b => b.toString(16).padStart(2, "0")).join("").slice(0, 16); 120 + 116 121 islands.push({ 117 - id: component.sort()[0], // stable ID: lexicographic minimum vertex 122 + id, 118 123 vertices: component, 119 124 edges: componentEdges, 120 125 });