a23a9862ccae90a77d7d6985683c7ec88e785a5a
Adds inline comments explaining (a) why no-target onConflictDoNothing is safe for root inserts (the only unique index that can fire on a root row is uniq_document_folders_sibling_name; the partial entity index excludes entity_id=NULL rows) and (b) why createPort doesn't wrap the root bootstrap in a transaction (ensureSystemRoots is re- runnable; the backfill script heals orphaned ports). Surfaces the assumption that Task 3 (ensureEntityFolder) must not blindly copy this pattern — it inserts with entity_id NOT NULL and needs an explicit conflict target. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
98.7%
HTML
1%
CSS
0.1%
Shell
0.1%