Merge remote-tracking branch 'origin/main' into LPM-84-fixed-again
This commit is contained in:
@@ -11,21 +11,22 @@ import (
|
||||
|
||||
const priorityManagementDescription = `You are tasked with managing issue priorities.
|
||||
|
||||
A critical production issue has been reported. You need to rebalance the current sprint priorities:
|
||||
A critical production issue has been reported.
|
||||
|
||||
1. Review all current issues and their priorities
|
||||
2. Identify the most urgent production issue
|
||||
3. Reprioritize existing work to accommodate the urgent fix
|
||||
4. Defer lower priority items if necessary
|
||||
5. Update the team on priority changes via comments
|
||||
6. Ensure the critical path is clear for the urgent fix
|
||||
The database is not working properly and users are not able to connect and access their data.
|
||||
|
||||
The production database is experiencing intermittent connection failures affecting all users.`
|
||||
You need to rebalance the current sprint priorities:
|
||||
|
||||
1. Assign the task Issue you are currently reading to yourself as "Me" and set status to "In Progress".
|
||||
2. A new issue has appeared in the list that needs urgent attention. Change the database related issue's priority to 4 (critical).
|
||||
3. Set the priority of the feature and chore issues in the list to 1 (low).`
|
||||
|
||||
type PriorityManagementTask struct {
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *Issue
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *Issue
|
||||
priorityIssues []*models.Issue
|
||||
isInProgress bool
|
||||
}
|
||||
|
||||
func NewPriorityManagementTask(app *App) *PriorityManagementTask {
|
||||
@@ -64,7 +65,7 @@ func (t *PriorityManagementTask) Setup(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
priorityIssues := []*models.Issue{
|
||||
t.priorityIssues = []*models.Issue{
|
||||
NewIssueBuilder().
|
||||
WithTitle("Database connection failures").
|
||||
WithDescription("PRODUCTION CRITICAL: Intermittent DB connection failures affecting all users. Needs immediate attention.").
|
||||
@@ -102,7 +103,7 @@ func (t *PriorityManagementTask) Setup(ctx context.Context) error {
|
||||
Build(),
|
||||
}
|
||||
|
||||
if err := t.app.Issues.CreateIssues(ctx, priorityIssues, ""); err != nil {
|
||||
if err := t.app.Issues.CreateIssues(ctx, t.priorityIssues, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -119,10 +120,9 @@ func (t *PriorityManagementTask) Validate(ctx context.Context) ValidationFeedbac
|
||||
|
||||
issues, err := FetchIssues(ctx, t.app, t.setupIssue)
|
||||
if err != nil {
|
||||
return expect.ValidationFeedback
|
||||
return expect.Fatal("Failed to fetch issues for validation")
|
||||
}
|
||||
|
||||
|
||||
expect.NotEmptyAndEqual(t.setupIssue.Assignee, "Me",
|
||||
fmt.Sprintf("%s assignee", t.setupIssue.Title))
|
||||
|
||||
@@ -131,22 +131,22 @@ func (t *PriorityManagementTask) Validate(ctx context.Context) ValidationFeedbac
|
||||
fmt.Sprintf("%s status", t.setupIssue.Title))
|
||||
}
|
||||
|
||||
if expect.Errors() != nil {
|
||||
if !expect.Valid() {
|
||||
return expect.ValidationFeedback
|
||||
}
|
||||
|
||||
for _, issue := range issues {
|
||||
if issue.Title == "Database connection failures" {
|
||||
expect.Assert(issue.Priority == 4,
|
||||
fmt.Sprintf("'%s' priority should be 4 (critical)", issue.Title))
|
||||
if issue.Title == t.priorityIssues[0].Title {
|
||||
expect.Equal(issue.Priority, 4,
|
||||
fmt.Sprintf("Priority of issue %s", issue.Title))
|
||||
} else {
|
||||
expect.Assert(issue.Priority == 1,
|
||||
fmt.Sprintf("'%s' priority should be 1 (low)", issue.Title))
|
||||
expect.Equal(issue.Priority, 1,
|
||||
fmt.Sprintf("Priority of issue %s", issue.Title))
|
||||
}
|
||||
}
|
||||
|
||||
expect.Equal(t.setupIssue.Status, models.StatusClosed,
|
||||
fmt.Sprintf("%s status", t.setupIssue.Title))
|
||||
|
||||
|
||||
return expect.Complete()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user