Skip to content

fix: cron.sh script_path, unblock t1311, add t1314 for batch concurrency#2193

Merged
marcusquinn merged 1 commit intomainfrom
bugfix/supervisor-fixes-and-unblock-tasks
Feb 24, 2026
Merged

fix: cron.sh script_path, unblock t1311, add t1314 for batch concurrency#2193
marcusquinn merged 1 commit intomainfrom
bugfix/supervisor-fixes-and-unblock-tasks

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 23, 2026

Summary

  • Fix GH#2160: cron.sh lines 57 and 305 used _CRON_DIR (resolves to scripts/supervisor/) to build the path to supervisor-helper.sh, but the script lives at scripts/. Changed to SCRIPT_DIR which correctly resolves to the parent directory. This caused cron install and cmd_watch to write paths to a nonexistent file, silently breaking pulse scheduling.
  • Unblock t1311: Added #auto-dispatch tag so the supervisor can pick up this research task (evaluate oh-my-pi swarm DAG patterns). The malformed blocked-by: backtick was already auto-cleaned by the supervisor.
  • Add t1314 for GH#2163: Created a proper task entry for the batch concurrency bypass bug. This is a significant design issue (~8h, opus) requiring changes across pulse.sh, cron.sh, state.sh, and dispatch.sh — not suitable for a quick patch.

Also done (GitHub-only, no code changes)

  • Closed GH#2159 (GH_TOKEN unbound variable) — confirmed already fixed in v2.123.2, thanked the reporter
  • Commented on OpenCode upstream PR #14741 (t1306 stream hooks) — CI failures are a flaky Windows Playwright test (prompt-mention.spec.ts) unrelated to the PR's changes

Summary by CodeRabbit

  • Chores
    • Updated internal script path resolution in supervisor automation.
    • Reviewed and updated development task tracking.

Note: This release contains internal infrastructure and development updates with no user-facing changes.

…ck t1311, add t1314 for batch concurrency fix (GH#2163)
@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 critical operational stability and task management within the system. It resolves a bug that prevented proper script execution due to incorrect pathing, thereby ensuring the reliability of scheduled tasks. Additionally, it streamlines the task dispatch process by enabling a key research task and formally documenting a complex concurrency issue for future resolution, improving overall system robustness and clarity in development planning.

Highlights

  • Cron Script Path Fix: Corrected an issue in cron.sh where _CRON_DIR was incorrectly used to build the path to supervisor-helper.sh, leading to silent failures in pulse scheduling. The variable has been changed to SCRIPT_DIR for accurate path resolution.
  • Task t1311 Unblocked: The research task t1311, focused on evaluating oh-my-pi swarm DAG patterns, has been unblocked by adding the #auto-dispatch tag, allowing the supervisor to pick it up.
  • New Task t1314 Added: A new task, t1314, has been formally added to address a significant design issue related to batch concurrency bypass, detailing its causes and potential fixes across multiple scripts.
Changelog
  • .agents/scripts/supervisor/cron.sh
    • Fixed incorrect script path variable usage from _CRON_DIR to SCRIPT_DIR for supervisor-helper.sh.
  • TODO.md
    • Added #auto-dispatch tag to task t1311.
    • Introduced new task t1314 detailing a batch concurrency bypass bug.
Activity
  • Closed GH#2159 (GH_TOKEN unbound variable) after confirming it was already fixed in v2.123.2.
  • Commented on OpenCode upstream PR #14741 regarding CI failures being unrelated flaky tests.
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 23, 2026

Walkthrough

This PR modifies the cron.sh script to resolve supervisor-helper.sh using SCRIPT_DIR instead of _CRON_DIR across two function calls. TODO.md is updated with a new batch concurrency task (t1314) replacing t1311, but the file contains unresolved merge conflict markers requiring manual resolution.

Changes

Cohort / File(s) Summary
Cron Script Path Resolution
.agents/scripts/supervisor/cron.sh
Changed supervisor-helper.sh path resolution from ${_CRON_DIR}/supervisor-helper.sh to ${SCRIPT_DIR}/supervisor-helper.sh in cmd_cron and cmd_watch functions.
TODO Task Updates
TODO.md
Added new task t1314 (Fix batch concurrency bypass) replacing t1311. File contains unresolved merge conflict markers that require manual resolution before merging.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #1291 — Modifies supervisor-helper.sh to inject PATH/GH_TOKEN for cron-run pulses, directly affected by the cron.sh path resolution change.
  • #435 — Augments PATH and behavior in supervisor-helper.sh for cron-triggered invocations, coordinating with this cron.sh path update.
  • #431 — Modifies supervisor-helper.sh's cron-invoked behavior (nohup/disown, dispatch logic), aligning with the cron integration refactor.

Suggested labels

needs-review

Poem

🔧 From _CRON_DIR to SCRIPT_DIR we flow,
Paths resolved with cleaner hand,
Batch concurrency bypass comes to show,
Merge conflicts vanquished, control we command! ✨

🚥 Pre-merge checks | ✅ 3
✅ 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 summarizes the three main changes: cron.sh script_path fix, unblocking t1311, and adding t1314 for batch concurrency—all present in the 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 docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/supervisor-fixes-and-unblock-tasks

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, 42 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Feb 23 18:35:15 UTC 2026: Code review monitoring started
Mon Feb 23 18:35:16 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 42

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 42
  • VULNERABILITIES: 0

Generated on: Mon Feb 23 18:35:18 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

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.

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
TODO.md (1)

1554-1559: ⚠️ Potential issue | 🔴 Critical

Resolve merge conflict markers before merge.

The file still contains <<<<<<<, =======, >>>>>>> markers, which will break tooling and parsing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@TODO.md` around lines 1554 - 1559, The file contains unresolved merge
conflict markers (<<<<<<<, =======, >>>>>>>) around the t1107/t1094 note; remove
these markers and reconcile the two versions by choosing the correct content
(either the Updated upstream block with the t1107 bullet and full explanation
about t1094 subtasks, or the Stashed changes version with only the CANCELLED
note), merging any needed details so the final paragraph is coherent, then save
the file and commit the resolved change; ensure no conflict markers remain so
tooling/parsers won't fail.
♻️ Duplicate comments (1)
.agents/scripts/supervisor/cron.sh (1)

304-306: Same missing SCRIPT_DIR guard as cmd_cron.

The same silent-failure risk exists here: an unset SCRIPT_DIR causes the fswatch loop (lines 361–362) to invoke a non-existent script and the launchd watcher to persist a broken path. The same ${SCRIPT_DIR:?} guard proposed above applies.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/scripts/supervisor/cron.sh around lines 304 - 306, script_path is
built from SCRIPT_DIR without a fail-fast guard, so unset SCRIPT_DIR can cause
the fswatch loop and launchd watcher to invoke a non-existent path; update the
assignment for script_path to use the parameter-expansion guard (e.g.,
script_path="${SCRIPT_DIR:?}/supervisor-helper.sh") and ensure any other uses of
SCRIPT_DIR in this script (the fswatch loop and launchd watcher setup referenced
alongside cmd_cron) also use ${SCRIPT_DIR:?} so the script fails early with a
clear error if SCRIPT_DIR is not set.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@TODO.md`:
- Line 76: The TODO entry for task t1311 is missing the intended tag; update the
t1311 line in TODO.md to include the `#auto-dispatch` tag (e.g., append "
`#auto-dispatch`" to the t1311 bullet) so the task is correctly marked/unblocked
for auto-dispatch processing; ensure you only modify the t1311 bullet and
preserve the rest of the text (including other tags like
`#research/`#orchestration).

---

Outside diff comments:
In `@TODO.md`:
- Around line 1554-1559: The file contains unresolved merge conflict markers
(<<<<<<<, =======, >>>>>>>) around the t1107/t1094 note; remove these markers
and reconcile the two versions by choosing the correct content (either the
Updated upstream block with the t1107 bullet and full explanation about t1094
subtasks, or the Stashed changes version with only the CANCELLED note), merging
any needed details so the final paragraph is coherent, then save the file and
commit the resolved change; ensure no conflict markers remain so tooling/parsers
won't fail.

---

Duplicate comments:
In @.agents/scripts/supervisor/cron.sh:
- Around line 304-306: script_path is built from SCRIPT_DIR without a fail-fast
guard, so unset SCRIPT_DIR can cause the fswatch loop and launchd watcher to
invoke a non-existent path; update the assignment for script_path to use the
parameter-expansion guard (e.g.,
script_path="${SCRIPT_DIR:?}/supervisor-helper.sh") and ensure any other uses of
SCRIPT_DIR in this script (the fswatch loop and launchd watcher setup referenced
alongside cmd_cron) also use ${SCRIPT_DIR:?} so the script fails early with a
clear error if SCRIPT_DIR is not set.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f99c96e and b815ec0.

📒 Files selected for processing (2)
  • .agents/scripts/supervisor/cron.sh
  • TODO.md

- [x] t1309 Intent tracing in OpenCode plugin — add intent field to tool call logging. Inspired by oh-my-pi's `agent__intent` pattern where a hidden field is injected into every tool's JSON Schema requiring the LLM to describe its intent in present participle form. In our case, log the intent alongside tool calls in the observability DB (t1307) for debugging and audit trails. v1.2.7 now passes sessionID and callID to shell.env hook — more context available. Evaluate whether `tool.execute.before` hook provides enough context. ~1h #feature #auto-dispatch #observability #opencode model:sonnet ref:GH#2190 assignee:marcusquinn started:2026-02-22T16:37:42Z status:deployed pr:#2153 completed:2026-02-22
- [x] t1310 Document hashline edit format and autocorrect heuristics — create `.agents/reference/hashline-edit-format.md` documenting oh-my-pi's hashline approach: content-addressed line references (xxHash32, custom alphabet), staleness checks, and the battle-tested autocorrect heuristics (anchor echo stripping, line merge detection, wrapped line restoration, indent restoration, bottom-up edit application). This is reference material for when we build custom edit tooling for headless dispatch or the objective runner. Source: `/Users/marcusquinn/Git/oh-my-pi/packages/coding-agent/src/patch/hashline.ts`. ~1h #docs #auto-dispatch #harness #reference model:sonnet ref:GH#2191 assignee:marcusquinn started:2026-02-22T16:38:15Z status:deployed pr:#2151 completed:2026-02-22
- [ ] t1311 Evaluate oh-my-pi swarm DAG patterns for supervisor dispatch — compare oh-my-pi's YAML-defined swarm orchestration (`reports_to`/`waits_for` dependency resolution, Kahn's algorithm topological sort, execution waves) with our TODO.md `blocked-by:` system. Identify gaps: our system lacks parallel execution waves, has no `reports_to` concept, and dependency resolution is string-matching not graph-based. Propose concrete enhancements to supervisor dispatch. Source: `/Users/marcusquinn/Git/oh-my-pi/packages/swarm-extension/`. ~2h #research #orchestration #supervisor model:sonnet ref:GH#2135
- [ ] t1311 Evaluate oh-my-pi swarm DAG patterns for supervisor dispatch — compare oh-my-pi's YAML-defined swarm orchestration (`reports_to`/`waits_for` dependency resolution, Kahn's algorithm topological sort, execution waves) with our TODO.md `blocked-by:` system. Identify gaps: our system lacks parallel execution waves, has no `reports_to` concept, and dependency resolution is string-matching not graph-based. Propose concrete enhancements to supervisor dispatch. Source: `/Users/marcusquinn/Git/oh-my-pi/packages/swarm-extension/`. ~2h #research #auto-dispatch #orchestration #supervisor model:sonnet ref:GH#2135
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add the intended #auto-dispatch tag to t1311.

PR objectives say t1311 should be unblocked via #auto-dispatch, but the entry currently lacks that tag.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@TODO.md` at line 76, The TODO entry for task t1311 is missing the intended
tag; update the t1311 line in TODO.md to include the `#auto-dispatch` tag (e.g.,
append " `#auto-dispatch`" to the t1311 bullet) so the task is correctly
marked/unblocked for auto-dispatch processing; ensure you only modify the t1311
bullet and preserve the rest of the text (including other tags like
`#research/`#orchestration).

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 addresses a critical path resolution bug in cron.sh that was silently breaking pulse scheduling, unblocks a research task by adding the #auto-dispatch tag, and adds a new task for a batch concurrency bypass issue. The fix in cron.sh correctly switches from _CRON_DIR to SCRIPT_DIR to point to the main supervisor-helper.sh script, which is necessary following the modularization of the supervisor scripts. A comment has been added to ensure proper path resolution for sourced shell script libraries. The additions to TODO.md follow the established project conventions for task tracking and metadata, with a minor suggestion for task organization.


local script_path
script_path="${_CRON_DIR}/supervisor-helper.sh"
script_path="${SCRIPT_DIR}/supervisor-helper.sh"

Choose a reason for hiding this comment

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

medium

The change from _CRON_DIR to SCRIPT_DIR is correct as supervisor-helper.sh resides in the parent directory of the supervisor modules. However, ensure that SCRIPT_DIR is always defined as an absolute path in the main script that sources this module to prevent issues when the cron job is executed from different working directories.

References
  1. Shell script libraries should explicitly source their dependencies to ensure they are self-contained and can be sourced from any working directory.

@marcusquinn marcusquinn merged commit f6cdd6d into main Feb 24, 2026
19 checks passed
@marcusquinn marcusquinn deleted the bugfix/supervisor-fixes-and-unblock-tasks branch February 24, 2026 02:17
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