Skip to content

Comments

t1035: Fix ALL_STATUS_LABELS unbound variable — t1031 modularisation regression#1375

Merged
marcusquinn merged 1 commit intomainfrom
hotfix/all-status-labels-unbound
Feb 13, 2026
Merged

t1035: Fix ALL_STATUS_LABELS unbound variable — t1031 modularisation regression#1375
marcusquinn merged 1 commit intomainfrom
hotfix/all-status-labels-unbound

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 13, 2026

Summary

  • Restores ALL_STATUS_LABELS constant that was dropped during t1031 supervisor modularisation
  • This constant is used by sync_issue_status_label() in issue-sync.sh and Phase 8b reconciliation in pulse.sh
  • Under set -euo pipefail, the unbound variable crashed sync_issue_status_label(), which blocked cmd_dispatch() from completing — the dispatch function wrote metadata to the log but crashed before creating the dispatch script and launching the worker process
  • This was the root cause of all workers showing worker_never_started:no_sentinel after t1031 merged

Testing

  • Deployed fix live to ~/.aidevops/agents/scripts/supervisor/issue-sync.sh
  • Ran supervisor-helper.sh dispatch t1032.1 — worker started successfully (WORKER_STARTED sentinel present)
  • ShellCheck: no new violations
  • Previous dispatch attempts (without fix) all failed with dispatch hanging at sync_issue_status_label

Related

Summary by CodeRabbit

  • Chores
    • Improved GitHub issue status label management by centralizing the label sync process. Issue status updates now properly handle removal of outdated labels and state transitions across all status categories.

@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 resolves a critical regression introduced by a recent modularization, which led to an unbound variable error. The fix reintroduces a necessary constant, thereby restoring the correct operation of issue status label management and enabling the successful dispatch and execution of worker processes.

Highlights

  • Regression Fix: Restored the ALL_STATUS_LABELS constant which was inadvertently removed during a previous modularization effort (t1031).
  • Critical Bug Resolution: Addressed an unbound variable error in sync_issue_status_label() that caused cmd_dispatch() to crash, preventing worker processes from starting and resulting in worker_never_started:no_sentinel errors.
  • System Stability: Ensured the proper functioning of issue status label synchronization and worker dispatch mechanisms, improving overall system reliability.
Changelog
  • .agents/scripts/supervisor/issue-sync.sh
    • Restored the ALL_STATUS_LABELS constant, which was missing after the t1031 modularization.
Activity
  • The fix was deployed live to ~/.aidevops/agents/scripts/supervisor/issue-sync.sh for immediate validation.
  • Successful worker startup was confirmed by running supervisor-helper.sh dispatch t1032.1, with the WORKER_STARTED sentinel present.
  • ShellCheck analysis confirmed no new violations were introduced.
  • Previous dispatch attempts without this fix consistently failed, hanging at sync_issue_status_label.
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 13, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Added sync_issue_status_label() helper function and ALL_STATUS_LABELS constant to .agents/scripts/supervisor/issue-sync.sh. These additions centralize GitHub issue status label management, enabling consistent removal of stale status labels before applying new ones while handling terminal and non-terminal state transitions.

Changes

Cohort / File(s) Summary
Issue Status Label Management
.agents/scripts/supervisor/issue-sync.sh
Added sync_issue_status_label() public function to centralize status label updates with cleanup logic. Introduced ALL_STATUS_LABELS constant declaring valid status labels (available, queued, claimed, in-review, blocked, verify-failed, done) for use in label removal and validation operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Poem

🏷️ Labels once scattered, now align
Status flows through a single design
Terminal states and reopens too
All_status_labels, tried and true
DevOps automation, clean and bright ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ⚠️ Unable to check for merge conflicts: Failed to fetch base branch: From https://github.com/marcusquinn/aidevops
! [rejected] main -> main (non-fast-forward)
+ 76845b9...e1eb104 main -> origin/main (forced update)
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the core fix: restoring the ALL_STATUS_LABELS unbound variable that broke during t1031 modularisation, matching the actual changeset.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hotfix/all-status-labels-unbound

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:
Fri Feb 13 14:57:52 UTC 2026: Code review monitoring started
Fri Feb 13 14:57:52 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 19

📈 Current Quality Metrics

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

Generated on: Fri Feb 13 14:57:54 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

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 correctly fixes a regression from the t1031 modularization by restoring the ALL_STATUS_LABELS constant, which resolves an unbound variable error. The fix is straightforward and necessary. I've kept the suggestion to improve the maintainability of the new constant by defining it as a bash array instead of a comma-separated string, as it aligns with general shell scripting best practices and repository style guidelines, and is not contradicted by any specific rules.

# Used to remove stale labels before applying the new one.
# Restored from pre-modularisation supervisor-helper.sh (t1035).
#######################################
ALL_STATUS_LABELS="status:available,status:queued,status:claimed,status:in-review,status:blocked,status:verify-failed,status:done"

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 robustness, it's recommended to define this list of labels as a bash array instead of a comma-separated string. Using an array avoids the need for string splitting (e.g., with tr or by changing IFS) and allows for safer iteration over the elements, preventing potential issues with word splitting or globbing.

The repository style guide also encourages the use of arrays for dynamic command construction, and this principle extends well to managing lists of values.

Suggested change
ALL_STATUS_LABELS="status:available,status:queued,status:claimed,status:in-review,status:blocked,status:verify-failed,status:done"
ALL_STATUS_LABELS=("status:available" "status:queued" "status:claimed" "status:in-review" "status:blocked" "status:verify-failed" "status:done")
References
  1. The style guide recommends using bash arrays for dynamic command construction, which implies a preference for arrays over delimited strings for managing lists of items to avoid issues like word splitting and make iteration safer. (link)

…(t1035)

The ALL_STATUS_LABELS constant was defined in the monolithic
supervisor-helper.sh but dropped when code was split into
issue-sync.sh module. Under set -euo pipefail, the unbound
variable crashed sync_issue_status_label(), which blocked
cmd_dispatch() from completing (dispatch hung during the
cmd_transition -> sync_issue_status_label call chain).

This was the root cause of workers never starting after t1031
merged — the dispatch function wrote metadata to the log but
crashed before creating the dispatch script and launching the
worker process.
@marcusquinn marcusquinn force-pushed the hotfix/all-status-labels-unbound branch from 3d58f2e to 72b7e97 Compare February 13, 2026 14:59
@marcusquinn marcusquinn merged commit 77dba29 into main Feb 13, 2026
7 of 8 checks passed
@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:
Fri Feb 13 15:00:20 UTC 2026: Code review monitoring started
Fri Feb 13 15:00:20 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 19

📈 Current Quality Metrics

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

Generated on: Fri Feb 13 15:00:23 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

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.

1 participant