fix: Connect gt done and mq submit to refinery mrqueue (gt-9mzd)
Root cause: gt done and mq submit created merge-request beads but did not write to the .beads/mq/ directory that the refinery Engineer polls for work. Changes: - done.go: Submit to mrqueue after creating MR bead - mq_submit.go: Submit to mrqueue after creating MR bead - mq_migrate.go: New command to migrate existing stale MR beads - mrqueue.go: Follow beads redirects for shared queue location The migration command allows recovery of existing stale MRs that were never processed because they only existed as beads. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/steveyegge/gastown/internal/events"
|
||||
"github.com/steveyegge/gastown/internal/git"
|
||||
"github.com/steveyegge/gastown/internal/mail"
|
||||
"github.com/steveyegge/gastown/internal/mrqueue"
|
||||
"github.com/steveyegge/gastown/internal/style"
|
||||
"github.com/steveyegge/gastown/internal/workspace"
|
||||
)
|
||||
@@ -163,6 +164,28 @@ func runDone(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
mrID = mrIssue.ID
|
||||
|
||||
// Also submit to mrqueue so refinery can process it
|
||||
// The mrqueue is the work queue the refinery polls; beads are the audit record
|
||||
mq, err := mrqueue.NewFromWorkdir(cwd)
|
||||
if err != nil {
|
||||
// Non-fatal: bead was created, just warn about queue
|
||||
style.PrintWarning("could not access merge queue: %v", err)
|
||||
} else {
|
||||
mqEntry := &mrqueue.MR{
|
||||
ID: mrID,
|
||||
Branch: branch,
|
||||
Target: target,
|
||||
SourceIssue: issueID,
|
||||
Worker: worker,
|
||||
Rig: rigName,
|
||||
Title: title,
|
||||
Priority: priority,
|
||||
}
|
||||
if err := mq.Submit(mqEntry); err != nil {
|
||||
style.PrintWarning("could not submit to merge queue: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Success output
|
||||
fmt.Printf("%s Work submitted to merge queue\n", style.Bold.Render("✓"))
|
||||
fmt.Printf(" MR ID: %s\n", style.Bold.Render(mrID))
|
||||
|
||||
Reference in New Issue
Block a user