From f156e16da30c84f904e3a3e076b0f4ffa374b7dc Mon Sep 17 00:00:00 2001 From: wolf Date: Sat, 3 Jan 2026 12:43:58 -0800 Subject: [PATCH] feat(template): propagate gate fields through template cloning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cmd/bd/template.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/bd/template.go b/cmd/bd/template.go index 8b30295a..fa781d9a 100644 --- a/cmd/bd/template.go +++ b/cmd/bd/template.go @@ -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