refactor(mrqueue): remove mrqueue package, use beads for MRs (gt-dqi)
Remove the mrqueue side-channel from gastown. The merge queue now uses
beads merge-request wisps exclusively, not parallel .beads/mq/*.json files.
Changes:
- Delete internal/mrqueue/ package (~830 lines removed)
- Move scoring logic to internal/refinery/score.go
- Update Refinery engineer to query beads via ReadyWithType("merge-request")
- Add MRInfo struct to replace mrqueue.MR
- Add ClaimMR/ReleaseMR methods using beads assignee field
- Update HandleMergeReady to not create duplicate queue entries
- Update gt refinery commands (claim, release, unclaimed) to use beads
- Stub out MQEventSource (no longer needed)
The Refinery now:
- Lists MRs via beads.ReadyWithType("merge-request")
- Claims via beads.Update(..., {Assignee: worker})
- Closes via beads.CloseWithReason("merged", mrID)
- Blocks on conflicts via beads.AddDependency(mrID, taskID)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/steveyegge/gastown/internal/beads"
|
||||
"github.com/steveyegge/gastown/internal/mrqueue"
|
||||
"github.com/steveyegge/gastown/internal/refinery"
|
||||
"github.com/steveyegge/gastown/internal/style"
|
||||
)
|
||||
|
||||
@@ -260,7 +260,7 @@ func outputJSON(data interface{}) error {
|
||||
return enc.Encode(data)
|
||||
}
|
||||
|
||||
// calculateMRScore computes the priority score for an MR using the mrqueue scoring function.
|
||||
// calculateMRScore computes the priority score for an MR using the refinery scoring function.
|
||||
// Higher scores mean higher priority (process first).
|
||||
func calculateMRScore(issue *beads.Issue, fields *beads.MRFields, now time.Time) float64 {
|
||||
// Parse MR creation time
|
||||
@@ -273,7 +273,7 @@ func calculateMRScore(issue *beads.Issue, fields *beads.MRFields, now time.Time)
|
||||
}
|
||||
|
||||
// Build score input
|
||||
input := mrqueue.ScoreInput{
|
||||
input := refinery.ScoreInput{
|
||||
Priority: issue.Priority,
|
||||
MRCreatedAt: mrCreatedAt,
|
||||
Now: now,
|
||||
@@ -291,5 +291,5 @@ func calculateMRScore(issue *beads.Issue, fields *beads.MRFields, now time.Time)
|
||||
}
|
||||
}
|
||||
|
||||
return mrqueue.ScoreMRWithDefaults(input)
|
||||
return refinery.ScoreMRWithDefaults(input)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user