Skip to content

t1075: Fix verification infinite loop, stuck verifying recovery, and bot review dismissal#1566

Merged
marcusquinn merged 1 commit intomainfrom
bugfix/fix-verification-failures
Feb 17, 2026
Merged

t1075: Fix verification infinite loop, stuck verifying recovery, and bot review dismissal#1566
marcusquinn merged 1 commit intomainfrom
bugfix/fix-verification-failures

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 17, 2026

Summary

Three systemic fixes for supervisor stuck states that caused tasks to loop indefinitely or get permanently stuck:

  • Verification retry cap: Phase 3b2 endlessly reset verify_faileddeployed, creating an infinite loop when checks genuinely fail. Now counts retries via state_log and marks failed after 3 attempts
  • Stuck verifying recovery: If pulse crashes mid-verification, tasks stay in verifying forever. process_verify_queue now detects tasks stuck >5 minutes and resets to deployed
  • Bot review dismissal fix: dismiss_bot_reviews() checked for "coderabbitai" but actual GitHub login is "coderabbitai[bot]". Changed to regex test() matching any login starting with known bot prefixes (coderabbitai, gemini-code-assist, copilot)

Also fixes:

  • tech-stack-helper.sh: remove unused USAGE_COMMAND_OPTIONS constant (SC2034)
  • subagent-index.toon: add missing openexplorer and wappalyzer provider entries (unblocks t1066, t1067 verification)

Files Changed

File Change
.agents/scripts/supervisor/pulse.sh Verification retry cap in Phase 3b2
.agents/scripts/supervisor/todo-sync.sh Stuck verifying timeout recovery
.agents/scripts/supervisor/deploy.sh Fix bot login regex in dismiss_bot_reviews()
.agents/scripts/tech-stack-helper.sh Remove unused constant
.agents/subagent-index.toon Add missing provider entries

Closes #1565

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved recognition and handling of automated bot reviews with enhanced pattern matching
    • Added safeguards to prevent infinite verification loops by implementing a maximum retry limit
    • Added automatic recovery mechanism for deployments stuck in verification state
  • New Features

    • Introduced new technology detection tools: openexplorer and wappalyzer for comprehensive platform analysis
  • Chores

    • Code maintenance and cleanup

… review dismissal (t1075)

Three systemic fixes for supervisor stuck states:

1. Verification infinite loop: Phase 3b2 endlessly resets verify_failed
   tasks back to deployed. Now caps at 3 retries via state_log counting,
   then marks failed with actionable error message.

2. Stuck verifying recovery: If pulse crashes mid-verification, tasks
   stay in 'verifying' forever. process_verify_queue now detects tasks
   stuck in verifying for >5 minutes and resets them to deployed.

3. Bot review dismissal: dismiss_bot_reviews() checked for 'coderabbitai'
   but actual login is 'coderabbitai[bot]'. Changed to regex test() that
   matches any login starting with known bot prefixes.

Also fixes:
- tech-stack-helper.sh: remove unused USAGE_COMMAND_OPTIONS (SC2034)
- subagent-index.toon: add missing openexplorer and wappalyzer entries
@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses several critical issues within the supervisor system that caused tasks to enter infinite loops or become permanently stuck. The changes enhance the system's robustness by introducing retry limits for verification failures, implementing a recovery mechanism for tasks stuck during verification, and improving the accuracy of bot review detection. These fixes aim to reduce manual intervention and improve the overall reliability of task processing.

Highlights

  • Verification Retry Cap: Implemented a mechanism to prevent infinite loops when post-merge verification fails by capping retries and marking tasks as permanently failed after 3 attempts.
  • Stuck Verifying Recovery: Added a recovery process to detect and reset tasks that remain in the 'verifying' state for more than 5 minutes back to 'deployed', addressing issues caused by mid-verification crashes.
  • Bot Review Dismissal Fix: Corrected the bot review dismissal logic to use a regular expression, accurately matching bot logins like 'coderabbitai[bot]' and 'gemini-code-assist[bot]', and including 'copilot'.
  • Unused Constant Removal: Removed the USAGE_COMMAND_OPTIONS constant from tech-stack-helper.sh as it was no longer in use.
  • Subagent Index Updates: Added missing openexplorer and wappalyzer provider entries to the subagent-index.toon file, unblocking related verification tasks.
Changelog
  • .agents/scripts/supervisor/deploy.sh
    • Updated the bot review dismissal logic to use a regex for broader bot login matching, including 'coderabbitai', 'gemini-code-assist', and 'copilot'.
  • .agents/scripts/supervisor/pulse.sh
    • Implemented a retry cap for verification failures, marking tasks as 'failed' after 3 attempts to prevent infinite 'deployed' to 'verify_failed' loops.
  • .agents/scripts/supervisor/todo-sync.sh
    • Added a recovery mechanism to reset tasks stuck in the 'verifying' state for over 5 minutes back to 'deployed', preventing permanent stuck states.
  • .agents/scripts/tech-stack-helper.sh
    • Removed the unused USAGE_COMMAND_OPTIONS constant.
  • .agents/subagent-index.toon
    • Updated the subagent count from 48 to 50.
    • Added openexplorer and wappalyzer provider entries to the research tools section.
    • Updated the script count from 79 to 80.
    • Added wappalyzer-helper.sh to the script index.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Walkthrough

The changes address three core issues: bot review dismissal logic is widened with regex pattern matching to catch more bot types, infinite verify_failed→deployed retry loops are capped at 3 attempts with permanent failure escalation, and tasks stuck in 'verifying' state are recovered after 5 minutes. Additionally, the subagent index is incremented and two new tool entries (openexplorer and wappalyzer) are registered with supporting scripts.

Changes

Cohort / File(s) Summary
Verification Retry & Recovery Logic
.agents/scripts/supervisor/deploy.sh, .agents/scripts/supervisor/pulse.sh, .agents/scripts/supervisor/todo-sync.sh
Enhanced verification control flow: bot review dismissal now uses regex matching for broader bot detection; verify_failed→deployed transitions are capped at 3 retries with permanent failure escalation after exhaustion; stuck 'verifying' tasks are auto-recovered after 5 minutes with state logging.
Subagent Registry
.agents/subagent-index.toon
Incremented subagent index from 48 to 50 and scripts block from 79 to 80; added new entries for openexplorer and wappalyzer subagents with corresponding wappalyzer-helper.sh script and tools/research listings.
Code Cleanup
.agents/scripts/tech-stack-helper.sh
Removed unused USAGE_COMMAND_OPTIONS constant; HELP_USAGE_INFO now provides complete usage guidance.

Sequence Diagram(s)

sequenceDiagram
    participant PR as GitHub PR
    participant Pulse as pulse.sh<br/>(Phase 3b2)
    participant StateLog as state_log<br/>(Database)
    participant PR_Status as PR Status<br/>(Issue)

    PR->>Pulse: MERGED, in verify_failed
    Pulse->>StateLog: Query verify_failed→deployed<br/>transition count
    StateLog-->>Pulse: Reset count (transitions found)
    
    alt Reset count >= max_verify_retries (3)
        Pulse->>PR_Status: Mark task FAILED<br/>(Exhausted retries)
        Pulse->>StateLog: Log exhaustion reason
    else Reset count < max_verify_retries
        Pulse->>PR_Status: Reset to deployed
        Pulse->>PR_Status: Clear errors
        Pulse->>StateLog: Log retry attempt `#N`
        Pulse->>PR: Queue for re-verification
    end
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly Related PRs

  • #1488: Directly modifies Phase 3b2 retry logic for verify_failed→deployed transitions with capped retry behavior.
  • #1553: Also modifies Phase 3b2 reconciliation for MERGED PRs, handling pr field extraction and lifecycle transitions.
  • #1494: Modifies process_verify_queue in todo-sync.sh with alternative verification control flow logic.

Poem

🔄 No more loops that spin forever more,
🤖 Bot reviews filtered with regex lore,
⏰ Stuck tasks awakened from their sleep,
✅ Retries capped where order we keep,
🚀 Clean code, new tools—the framework's blessed!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the three main fixes: verification infinite loop prevention, stuck verifying recovery, and bot review dismissal logic correction.
Linked Issues check ✅ Passed All three coding objectives from #1565 are fully addressed: verification retry cap in pulse.sh, stuck verifying recovery in todo-sync.sh, and bot review dismissal fix in deploy.sh.
Out of Scope Changes check ✅ Passed The tech-stack-helper.sh cleanup (removing USAGE_COMMAND_OPTIONS) and subagent-index.toon entries are minor housekeeping changes directly supporting issue resolution without scope creep.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/fix-verification-failures

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 19 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 17 14:16:51 UTC 2026: Code review monitoring started
Tue Feb 17 14:16:52 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 19

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 19
  • VULNERABILITIES: 0

Generated on: Tue Feb 17 14:16:54 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 79155cf into main Feb 17, 2026
10 of 11 checks passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.agents/scripts/supervisor/pulse.sh (1)

610-662: ⚠️ Potential issue | 🟡 Minor

Retry exhaustion currently logs as deployed — misreports reconciliation.

When the cap is hit, you mark failed but the generic proof-log still records verify_failed->deployed and bumps reconciled_merged. Add a failure-specific proof-log and skip the generic path.

🧾 Suggested fix
 						if [[ "$verify_reset_count" -ge "$max_verify_retries" ]]; then
 							# Exhausted verification retries — mark permanently failed
 							log_error "  Phase 3b2: $stale_id exhausted $max_verify_retries verification retries — marking failed"
 							db "$SUPERVISOR_DB" "UPDATE tasks SET
 								status = 'failed',
 								error = 'Verification failed after $max_verify_retries retries — manual fix needed',
 								updated_at = strftime('%Y-%m-%dT%H:%M:%SZ','now')
 							WHERE id = '$escaped_stale_id';" 2>/dev/null || true
 							db "$SUPERVISOR_DB" "INSERT INTO state_log (task_id, from_state, to_state, timestamp, reason)
 							VALUES ('$escaped_stale_id', 'verify_failed', 'failed',
 								strftime('%Y-%m-%dT%H:%M:%SZ','now'),
 								'Phase 3b2: verification exhausted ($verify_reset_count/$max_verify_retries retries)');" 2>/dev/null || true
 							sync_issue_status_label "$stale_id" "failed" "phase_3b2" 2>>"$SUPERVISOR_LOG" || true
+							write_proof_log --task "$stale_id" --event "reconcile_failed" --stage "phase_3b2" \
+								--decision "verify_failed->failed (retries exhausted)" \
+								--evidence "retries=$verify_reset_count/$max_verify_retries pr=#$pr_number" \
+								--maker "pulse:phase_3b2" 2>/dev/null || true
+							continue
 						else
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/scripts/supervisor/pulse.sh around lines 610 - 662, The proof-log
and reconciled_merged increment are always executed after the phase_3b2 block,
causing misreports when verify_reset_count >= max_verify_retries; modify the
branch that marks the task as 'failed' (the if branch guarded by
verify_reset_count and max_verify_retries) to emit a failure-specific
write_proof_log call (e.g., decision "verify_failed->failed", evidence including
verify_reset_count/max_verify_retries and pr_number) and then skip the common
generic write_proof_log + reconciled_merged increment (use a
continue/else/return or move the generic proof-log into the non-failure branch)
so only successful reconciliations increment reconciled_merged.
.agents/subagent-index.toon (1)

24-76: ⚠️ Potential issue | 🟠 Major

TOON index count looks out of sync (subagents[50] vs ~52 entries).

To keep the index machine-parseable, update the header count or consolidate duplicate tools/research/ rows.

🧭 If keeping all entries, update the header
-<!--TOON:subagents[50]{folder,purpose,key_files}:
+<!--TOON:subagents[52]{folder,purpose,key_files}:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/subagent-index.toon around lines 24 - 76, The TOON header count
"TOON:subagents[50]" is out of sync with the actual entries (about 52) and there
are duplicate "tools/research/" rows; either update the header count to the
correct total (adjust "subagents[50]" to the actual number) or
remove/consolidate the duplicate "tools/research/" entries so the index remains
machine-parseable, ensuring you edit the TOON header token and the duplicate
lines accordingly.
🧹 Nitpick comments (1)
.agents/scripts/supervisor/deploy.sh (1)

1442-1444: Harden bot-review detection to avoid dismissing human reviews.

For A-grade automation safety, require GitHub’s user.type == "Bot" in addition to the prefix match.

🔒 Suggested filter hardening
-bot_reviews=$(echo "$reviews_json" | jq -r '.[] | select(.state == "CHANGES_REQUESTED" and (.user.login | test("^(coderabbitai|gemini-code-assist|copilot)"))) | .id' 2>/dev/null || echo "")
+bot_reviews=$(echo "$reviews_json" | jq -r '.[] | select(.state == "CHANGES_REQUESTED" and (.user.type == "Bot" or (.user.login | test("^(coderabbitai|gemini-code-assist|copilot)"; "i")))) | .id' 2>/dev/null || echo "")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/scripts/supervisor/deploy.sh around lines 1442 - 1444, The
bot-review detection currently selects reviews by matching reviewer login
prefixes in the jq filter for variable bot_reviews; update the jq expression to
also require that .user.type == "Bot" so only GitHub-identified bots are matched
(i.e., change the select to include both (.user.login |
test("^(coderabbitai|gemini-code-assist|copilot)")) and (.user.type == "Bot")),
keeping the existing fallback (2>/dev/null || echo "") behavior and referencing
the same reviews_json and bot_reviews variables.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.agents/scripts/supervisor/pulse.sh:
- Around line 610-662: The proof-log and reconciled_merged increment are always
executed after the phase_3b2 block, causing misreports when verify_reset_count
>= max_verify_retries; modify the branch that marks the task as 'failed' (the if
branch guarded by verify_reset_count and max_verify_retries) to emit a
failure-specific write_proof_log call (e.g., decision "verify_failed->failed",
evidence including verify_reset_count/max_verify_retries and pr_number) and then
skip the common generic write_proof_log + reconciled_merged increment (use a
continue/else/return or move the generic proof-log into the non-failure branch)
so only successful reconciliations increment reconciled_merged.

In @.agents/subagent-index.toon:
- Around line 24-76: The TOON header count "TOON:subagents[50]" is out of sync
with the actual entries (about 52) and there are duplicate "tools/research/"
rows; either update the header count to the correct total (adjust
"subagents[50]" to the actual number) or remove/consolidate the duplicate
"tools/research/" entries so the index remains machine-parseable, ensuring you
edit the TOON header token and the duplicate lines accordingly.

---

Nitpick comments:
In @.agents/scripts/supervisor/deploy.sh:
- Around line 1442-1444: The bot-review detection currently selects reviews by
matching reviewer login prefixes in the jq filter for variable bot_reviews;
update the jq expression to also require that .user.type == "Bot" so only
GitHub-identified bots are matched (i.e., change the select to include both
(.user.login | test("^(coderabbitai|gemini-code-assist|copilot)")) and
(.user.type == "Bot")), keeping the existing fallback (2>/dev/null || echo "")
behavior and referencing the same reviews_json and bot_reviews variables.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several important fixes for the supervisor's stability and robustness. It addresses an infinite loop in verification by adding a retry limit, recovers tasks stuck in the 'verifying' state, and improves the logic for dismissing bot reviews. The changes are well-structured and address critical operational issues.

My review focuses on improving maintainability and adhering to the repository's style guide. I've suggested making magic numbers for retry counts and timeouts into constants for easier configuration. I've also pointed out several instances where error output is suppressed with 2>/dev/null, which violates the style guide, and recommended redirecting to the supervisor log instead for better debuggability.

Overall, these are excellent and necessary changes.

WHERE task_id = '$escaped_stale_id'
AND from_state = 'verify_failed'
AND to_state = 'deployed';" 2>/dev/null || echo "0")
local max_verify_retries=3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability and clarity, it's best to define magic numbers like 3 as a script-level constant. Since this requires a change outside the diff, I can't provide a direct suggestion, but please consider defining readonly MAX_VERIFY_RETRIES=3 at the top of the script and using $MAX_VERIFY_RETRIES here. This also aligns with the style guide's naming convention for constants (line 39).

References
  1. The style guide at line 39 specifies that constants should use UPPER_SNAKE_CASE. (link)

Comment on lines +613 to +635
db "$SUPERVISOR_DB" "UPDATE tasks SET
status = 'failed',
error = 'Verification failed after $max_verify_retries retries — manual fix needed',
updated_at = strftime('%Y-%m-%dT%H:%M:%SZ','now')
WHERE id = '$escaped_stale_id';" 2>/dev/null || true
db "$SUPERVISOR_DB" "INSERT INTO state_log (task_id, from_state, to_state, timestamp, reason)
VALUES ('$escaped_stale_id', 'verify_failed', 'failed',
strftime('%Y-%m-%dT%H:%M:%SZ','now'),
'Phase 3b2: verification exhausted ($verify_reset_count/$max_verify_retries retries)');" 2>/dev/null || true
sync_issue_status_label "$stale_id" "failed" "phase_3b2" 2>>"$SUPERVISOR_LOG" || true
else
log_info " Phase 3b2: $stale_id (verify_failed) — PR #$pr_number merged, resetting to deployed for re-verification (attempt $((verify_reset_count + 1))/$max_verify_retries)"
db "$SUPERVISOR_DB" "UPDATE tasks SET
status = 'deployed',
error = NULL,
updated_at = strftime('%Y-%m-%dT%H:%M:%SZ','now')
WHERE id = '$escaped_stale_id';" 2>/dev/null || true
db "$SUPERVISOR_DB" "INSERT INTO state_log (task_id, from_state, to_state, timestamp, reason)
VALUES ('$escaped_stale_id', 'verify_failed', 'deployed',
strftime('%Y-%m-%dT%H:%M:%SZ','now'),
'Phase 3b2: reset for re-verification attempt $((verify_reset_count + 1))/$max_verify_retries (PR #$pr_number merged)');" 2>/dev/null || true
sync_issue_status_label "$stale_id" "deployed" "phase_3b2" 2>>"$SUPERVISOR_LOG" || true
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The style guide (line 50) states that 2>/dev/null should only be used when redirecting to log files, not for blanket suppression. The db calls in this block use this pattern. To improve debuggability and adhere to the style guide, please redirect stderr to $SUPERVISOR_LOG instead (e.g., ... 2>>"$SUPERVISOR_LOG" || true).

References
  1. The style guide at line 50 states that 2>/dev/null is only acceptable when redirecting to log files, not for blanket error suppression. (link)

Comment on lines +320 to +341
stuck_verifying=$(db -separator '|' "$SUPERVISOR_DB" "
SELECT id FROM tasks
WHERE status = 'verifying'
AND updated_at < strftime('%Y-%m-%dT%H:%M:%SZ', 'now', '-5 minutes')
ORDER BY id;
" 2>/dev/null || echo "")

if [[ -n "$stuck_verifying" ]]; then
while IFS='|' read -r stuck_id; do
[[ -z "$stuck_id" ]] && continue
log_warn " $stuck_id: stuck in 'verifying' for >5min — resetting to 'deployed'"
local escaped_stuck_id
escaped_stuck_id=$(sql_escape "$stuck_id")
db "$SUPERVISOR_DB" "UPDATE tasks SET
status = 'deployed',
error = NULL,
updated_at = strftime('%Y-%m-%dT%H:%M:%SZ','now')
WHERE id = '$escaped_stuck_id';" 2>/dev/null || true
db "$SUPERVISOR_DB" "INSERT INTO state_log (task_id, from_state, to_state, timestamp, reason)
VALUES ('$escaped_stuck_id', 'verifying', 'deployed',
strftime('%Y-%m-%dT%H:%M:%SZ','now'),
'process_verify_queue: recovered from stuck verifying state (>5min timeout)');" 2>/dev/null || true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The style guide (line 50) states that 2>/dev/null should only be used when redirecting to log files, not for blanket suppression. The db calls in this block (lines 320, 333, and 338) use this pattern. To improve debuggability and adhere to the style guide, please redirect stderr to $SUPERVISOR_LOG instead (e.g., ... 2>>"$SUPERVISOR_LOG" || true).

References
  1. The style guide at line 50 states that 2>/dev/null is only acceptable when redirecting to log files, not for blanket error suppression. (link)

stuck_verifying=$(db -separator '|' "$SUPERVISOR_DB" "
SELECT id FROM tasks
WHERE status = 'verifying'
AND updated_at < strftime('%Y-%m-%dT%H:%M:%SZ', 'now', '-5 minutes')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The timeout value '5 minutes' is a magic number. For better maintainability, please define it as a script-level constant, e.g., readonly STUCK_VERIFYING_TIMEOUT_MINUTES=5, and use the variable in the query. This makes the timeout policy easier to find and adjust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t1075: Fix verification infinite loop, stuck verifying recovery, and bot review dismissal

1 participant

Comments