Skip to content

GH#18539: fix review-followup findings in new-task-helper.sh#18604

Closed
marcusquinn wants to merge 2 commits intomainfrom
bugfix/GH-18539-new-task-helper
Closed

GH#18539: fix review-followup findings in new-task-helper.sh#18604
marcusquinn wants to merge 2 commits intomainfrom
bugfix/GH-18539-new-task-helper

Conversation

@marcusquinn
Copy link
Copy Markdown
Owner

Summary

Resolves #18539

Addresses all 4 actionable review bot findings from PR #18416 on .agents/scripts/new-task-helper.sh:

  1. HIGH — TODO.md insertion position: _append_todo_entry was appending to EOF with >>, placing new tasks after ## Done and TOON blocks. Now correctly finds the ## Ready header (falling back to ## Backlog) and inserts after the last task line in that section using awk.

  2. MEDIUM — Destructive # stripping: ${line%%#*} stripped everything after the first #, breaking titles like "Fix bug feat(plan+): add granular bash permissions for file discovery #123". Changed to only skip full-line comments (^#), preserving inline # references. Also fixes the inconsistency where --title flag input was not stripped but file/stdin input was.

  3. MEDIUM — Redundant TODO.md check: The file existence check was inside _append_todo_entry (called per task). Moved to cmd_batch — validated once before the loop starts.

  4. MEDIUM — Suppressed stderr: 2>/dev/null on claim-task-id.sh hid auth/network/lock errors. Removed so allocation failures surface properly.

Runtime Testing

  • shellcheck clean
  • Risk: low (batch task creation helper, no critical paths)
  • Verification: self-assessed

aidevops.sh v3.8.5 plugin for OpenCode v1.4.3 with claude-opus-4-6 spent 4m and 9,561 tokens on this as a headless worker.

- Insert TODO entries under ## Ready header instead of appending to EOF
- Only skip full-line # comments in file/stdin input, preserve inline refs like #123
- Move TODO.md existence check to cmd_batch (once) instead of per-task
- Remove 2>/dev/null from claim-task-id.sh to surface allocation errors
@marcusquinn marcusquinn added the origin:interactive Auto-created from TODO.md tag label Apr 13, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 13, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 23 seconds.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4c22f902-e29c-4eaf-ae20-dd4663dab62a

📥 Commits

Reviewing files that changed from the base of the PR and between 469732b and 103979d.

📒 Files selected for processing (2)
  • .agents/scripts/new-task-helper.sh
  • .agents/scripts/post-merge-review-scanner.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/GH-18539-new-task-helper

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.

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions bot added the bug Auto-created from TODO.md tag label Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

SonarCloud: 0 bugs, 0 vulnerabilities, 226 code smells

Mon Apr 13 04:37:50 UTC 2026: Code review monitoring started
Mon Apr 13 04:37:50 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 226

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 226
  • VULNERABILITIES: 0

Generated on: Mon Apr 13 04:37:52 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

The post-merge-review-scanner creates issues that lack implementation
context (file paths, steps, verification), causing headless workers to
stall and time out. This is the systemic root cause of GH#18539.

Changes to post-merge-review-scanner.sh:
- Extract unique file paths from review findings
- Add Worker Guidance section with Files to Modify, Implementation Steps,
  and Verification commands
- Increase snippet length from 200 to 500 chars to preserve review context
- Pass file_paths as new arg to create_issue()
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

SonarCloud: 0 bugs, 0 vulnerabilities, 226 code smells

Mon Apr 13 04:39:15 UTC 2026: Code review monitoring started
Mon Apr 13 04:39:16 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 226

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 226
  • VULNERABILITIES: 0

Generated on: Mon Apr 13 04:39:18 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link
Copy Markdown

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

marcusquinn added a commit that referenced this pull request Apr 13, 2026
…NG PR

When the pulse merge pass skips auto-close on an origin:interactive
CONFLICTING PR (GH#18285 — maintainer session work is theirs to own),
it now posts an idempotent nudge comment with the exact rebase command.
Previously the skip was silent — the pulse log recorded 'skipping
auto-close' every cycle but the maintainer never saw the signal, and
the CONFLICTING state persisted forever.

The nudge is idempotent via _gh_idempotent_comment with marker
'<!-- pulse-rebase-nudge -->' — posted exactly once per PR lifetime.
If the PR is updated and still conflicts, the nudge does NOT repeat.

Fail-open: missing _gh_idempotent_comment helper, invalid PR number,
or empty repo slug all return 0 without crashing the merge pass.
Nudging is best-effort operational plumbing.

Evidence from 2026-04-13 queue: PRs #18604 (GH#18539), #18566 (GH#18547),
and #18531 (GH#18418) all CONFLICTING for 6+ hours with no signal to the
author. Live verification after this merges will post the nudge on each.

6 new unit tests cover:
- nudge body contains marker, branch interpolation, rebase command
- posts as PR entity (type='pr'), not issue
- PR number and repo slug are threaded correctly
- no-ops when _gh_idempotent_comment is undefined (fail-open)
- no-ops on invalid PR number
- no-ops on empty repo slug

Function lengths after addition:
  _close_conflicting_pr: 96 lines (was 95, +1 for the nudge call)
  _post_rebase_nudge_on_interactive_conflicting: 49 lines (new)

Scope: intentionally narrow. Does NOT auto-rebase, does NOT close after
N cycles, does NOT escalate via any channel other than the PR's native
GitHub notification. Humans own the conflict resolution.

Fixes #18650
marcusquinn added a commit that referenced this pull request Apr 13, 2026
…NG PR (#18651)

When the pulse merge pass skips auto-close on an origin:interactive
CONFLICTING PR (GH#18285 — maintainer session work is theirs to own),
it now posts an idempotent nudge comment with the exact rebase command.
Previously the skip was silent — the pulse log recorded 'skipping
auto-close' every cycle but the maintainer never saw the signal, and
the CONFLICTING state persisted forever.

The nudge is idempotent via _gh_idempotent_comment with marker
'<!-- pulse-rebase-nudge -->' — posted exactly once per PR lifetime.
If the PR is updated and still conflicts, the nudge does NOT repeat.

Fail-open: missing _gh_idempotent_comment helper, invalid PR number,
or empty repo slug all return 0 without crashing the merge pass.
Nudging is best-effort operational plumbing.

Evidence from 2026-04-13 queue: PRs #18604 (GH#18539), #18566 (GH#18547),
and #18531 (GH#18418) all CONFLICTING for 6+ hours with no signal to the
author. Live verification after this merges will post the nudge on each.

6 new unit tests cover:
- nudge body contains marker, branch interpolation, rebase command
- posts as PR entity (type='pr'), not issue
- PR number and repo slug are threaded correctly
- no-ops when _gh_idempotent_comment is undefined (fail-open)
- no-ops on invalid PR number
- no-ops on empty repo slug

Function lengths after addition:
  _close_conflicting_pr: 96 lines (was 95, +1 for the nudge call)
  _post_rebase_nudge_on_interactive_conflicting: 49 lines (new)

Scope: intentionally narrow. Does NOT auto-rebase, does NOT close after
N cycles, does NOT escalate via any channel other than the PR's native
GitHub notification. Humans own the conflict resolution.

Fixes #18650
@marcusquinn
Copy link
Copy Markdown
Owner Author

Rebase needed — branch has diverged from main

This origin:interactive PR has merge conflicts against main. The pulse merge pass skips auto-close on maintainer session work (GH#18285), but there is no automated path to resolve conflicts on behalf of a human author — this PR needs your attention.

To resolve

From a terminal (not a chat session):

wt switch bugfix/GH-18539-new-task-helper
git pull --rebase origin main
# resolve any conflicts, then:
git push --force-with-lease

Or use the GitHub web UI's Update branch button if the conflicts are trivial enough for GitHub's web merger.

Why you're seeing this

Every pulse cycle the deterministic merge pass evaluates open PRs and auto-closes CONFLICTING ones that have no clear owner. origin:interactive PRs are explicitly protected from that path, which is correct for active maintainer work but left them to rot silently in the queue. This nudge is posted exactly once per PR so the stuck state surfaces in your inbox. If the PR still conflicts after you think you've rebased, the nudge will NOT repeat — re-check manually via gh pr view 18604.

Posted automatically by pulse-merge.sh (GH#18650 / Fix 4 of the 2026-04-13 dispatch-unblocker pass).

@marcusquinn
Copy link
Copy Markdown
Owner Author

Superseded — closing in favour of a fresh PR against current main.

Why closing instead of rebasing

This PR was created against main before two substantial refactors landed:

Disposition of the 4 findings

The new-task-helper findings are still unfixed on current main:

  • HIGH_append_todo_entry still uses echo "$entry" >>"$todo_file" (line 159) despite the comment claiming backlog-header insertion.
  • MEDIUM_read_titles_stream still uses line="${line%%#*}" (line 254), destroying titles like "Fix bug feat(plan+): add granular bash permissions for file discovery #123".
  • MEDIUM — TODO.md existence check still lives inside _append_todo_entry (called per task), not at cmd_batch entry.
  • MEDIUM — claim call still wraps stderr with 2>/dev/null (line 316), hiding auth/network/lock errors.

The scanner findings are resolved — main's implementation exceeds this PR's scope.

Replacement

A fresh PR will apply just the 4 new-task-helper.sh fixes to the current refactored helpers, no obsolete scanner changes, clean diff against current main.


aidevops.sh v3.8.8 plugin for OpenCode v1.4.3 with claude-opus-4-6 spent 4m and 1,175 tokens on this as a headless worker. Overall, 16h 25m since this issue was created.

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

Labels

bug Auto-created from TODO.md tag origin:interactive Auto-created from TODO.md tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review followup: PR #18416 — GH#18411: guard cmd_enrich body writes with sentinel+content-diff gate; add --batch mode to /new-task

1 participant