feat(template): propagate gate fields through template cloning

Ensures AwaitType, AwaitID, and Timeout fields are carried over when
cloning template subgraphs, enabling async coordination in instantiated
molecules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
wolf
2026-01-03 12:43:58 -08:00
committed by Steve Yegge
parent c6fe9d71ca
commit f156e16da3

View File

@@ -961,10 +961,14 @@ func cloneSubgraph(ctx context.Context, s storage.Storage, subgraph *TemplateSub
IssueType: oldIssue.IssueType,
Assignee: issueAssignee,
EstimatedMinutes: oldIssue.EstimatedMinutes,
Ephemeral: opts.Ephemeral, // mark for cleanup when closed
IDPrefix: opts.Prefix, // distinct prefixes for mols/wisps
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
Ephemeral: opts.Ephemeral, // mark for cleanup when closed
IDPrefix: opts.Prefix, // distinct prefixes for mols/wisps
// Gate fields (for async coordination)
AwaitType: oldIssue.AwaitType,
AwaitID: substituteVariables(oldIssue.AwaitID, opts.Vars),
Timeout: oldIssue.Timeout,
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
}
// Generate custom ID for dynamic bonding if ParentID is set