-
Notifications
You must be signed in to change notification settings - Fork 7
t1263: Fix false-positive claim detection and add verified skip in auto-pickup #1979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -540,9 +540,10 @@ cmd_auto_pickup() { | |||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
|
||||||||||||||
| # Skip tasks with assignee: or started: fields (t1062) | ||||||||||||||
| # These indicate someone is already working on the task | ||||||||||||||
| if echo "$line" | grep -qE '(assignee:|started:)'; then | ||||||||||||||
| # Skip tasks with assignee: or started: metadata fields (t1062, t1263) | ||||||||||||||
| # Match actual metadata fields, not description text containing these words. | ||||||||||||||
| # assignee: must be followed by a username (word chars), started: by ISO timestamp. | ||||||||||||||
| if echo "$line" | grep -qE '(assignee:[a-zA-Z0-9_-]+|started:[0-9]{4}-[0-9]{2}-[0-9]{2}T)'; then | ||||||||||||||
| log_info " $task_id: already claimed or in progress — skipping auto-pickup" | ||||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
|
@@ -556,7 +557,7 @@ cmd_auto_pickup() { | |||||||||||||
| local existing | ||||||||||||||
| existing=$(db "$SUPERVISOR_DB" "SELECT status FROM tasks WHERE id = '$(sql_escape "$task_id")';" 2>/dev/null || true) | ||||||||||||||
| if [[ -n "$existing" ]]; then | ||||||||||||||
| if [[ "$existing" == "complete" || "$existing" == "cancelled" ]]; then | ||||||||||||||
| if [[ "$existing" == "complete" || "$existing" == "cancelled" || "$existing" == "verified" ]]; then | ||||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
Comment on lines
+560
to
562
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve readability and make it easier to add more statuses in the future, consider using a
Suggested change
|
||||||||||||||
| log_info " $task_id: already tracked (status: $existing)" | ||||||||||||||
|
|
@@ -616,9 +617,10 @@ cmd_auto_pickup() { | |||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
|
||||||||||||||
| # Skip tasks with assignee: or started: fields (t1062) | ||||||||||||||
| # These indicate someone is already working on the task | ||||||||||||||
| if echo "$line" | grep -qE '(assignee:|started:)'; then | ||||||||||||||
| # Skip tasks with assignee: or started: metadata fields (t1062, t1263) | ||||||||||||||
| # Match actual metadata fields, not description text containing these words. | ||||||||||||||
| # assignee: must be followed by a username (word chars), started: by ISO timestamp. | ||||||||||||||
| if echo "$line" | grep -qE '(assignee:[a-zA-Z0-9_-]+|started:[0-9]{4}-[0-9]{2}-[0-9]{2}T)'; then | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For performance and to reduce reliance on external processes, consider using bash's built-in regular expression matching instead of piping to
Suggested change
|
||||||||||||||
| log_info " $task_id: already claimed or in progress — skipping auto-pickup" | ||||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
|
@@ -631,7 +633,7 @@ cmd_auto_pickup() { | |||||||||||||
| local existing | ||||||||||||||
| existing=$(db "$SUPERVISOR_DB" "SELECT status FROM tasks WHERE id = '$(sql_escape "$task_id")';" 2>/dev/null || true) | ||||||||||||||
| if [[ -n "$existing" ]]; then | ||||||||||||||
| if [[ "$existing" == "complete" || "$existing" == "cancelled" ]]; then | ||||||||||||||
| if [[ "$existing" == "complete" || "$existing" == "cancelled" || "$existing" == "verified" ]]; then | ||||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
Comment on lines
+636
to
638
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve readability and make it easier to add more statuses in the future, consider using a
Suggested change
|
||||||||||||||
| log_info " $task_id: already tracked (status: $existing)" | ||||||||||||||
|
|
@@ -764,8 +766,8 @@ cmd_auto_pickup() { | |||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
|
||||||||||||||
| # Skip tasks with assignee: or started: fields | ||||||||||||||
| if echo "$sub_line" | grep -qE '(assignee:|started:)'; then | ||||||||||||||
| # Skip tasks with assignee: or started: metadata fields (t1263) | ||||||||||||||
| if echo "$sub_line" | grep -qE '(assignee:[a-zA-Z0-9_-]+|started:[0-9]{4}-[0-9]{2}-[0-9]{2}T)'; then | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For performance and to reduce reliance on external processes, consider using bash's built-in regular expression matching instead of piping to
Suggested change
|
||||||||||||||
| log_info " $sub_id: already claimed or in progress — skipping subtask pickup" | ||||||||||||||
| continue | ||||||||||||||
| fi | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For performance and to reduce reliance on external processes, consider using bash's built-in regular expression matching instead of piping to
grep. This avoids creating a subshell and invoking another process.