Skip to content

t18653: fix(pulse): resume reconcile single pass from a cursor after budget abort or stage timeout (GH#34299) - #34300

Merged
marcusquinn merged 1 commit into
mainfrom
bugfix/t18653-reconcile-resume-cursor
Oct 10, 2026
Merged

marcusquinn merged 1 commit into
mainfrom
bugfix/t18653-reconcile-resume-cursor

Conversation

@marcusquinn

Copy link
Copy Markdown
Owner

Summary

reconcile_issues_single_pass restarted at the first repository and first issue every cycle. Recent passes all end by time-budget abort (360s) or stage-timeout kill (380s), so every issue past the abort point was starved indefinitely. Concretely, parent #34125 has had 3/3 sub-issues closed since 2026-10-10T19:16Z but no pass reaches it. Sibling #34180, earlier in the scan order, closed about 294s into the 22:31 run, which was then killed at 22:38:00Z.

The pass now keeps a resume cursor, following the checkpoint pattern in pulse-canonical-maintenance.sh.

Resolves #34299
Ref #34125

Changes

  • New .agents/scripts/pulse-issue-reconcile-cursor.sh, sourced by the orchestrator so the 1.7k-line file barely grows. It loads and validates the cursor (slug<TAB>issue<TAB>attempts), writes it with builtin printf (no fork per issue), clears it, rotates the slug list, and seeks to the cursor issue.
  • .agents/scripts/pulse-issue-reconcile.sh:
    • Records the in-flight issue before its stages run, so a kill resumes there.
    • On a budget abort, records the next unprocessed issue or repo.
    • Rotates repos to start at the cursor repo and fast-forwards that repo's rows to the cursor issue.
    • Clears the cursor when the rotated list completes, so the next pass starts at the top and every issue is covered across cycles.
  • Poison-pill guard: an issue resumed AIDEVOPS_RECONCILE_SP_CURSOR_MAX_ATTEMPTS (default 2) times without finishing is skipped and logged, so one slow issue cannot pin the cursor.
  • A malformed cursor, an unknown repo, or a cursor issue that is no longer open falls back safely: original order, or the top of that repo.
  • Cursor path override: AIDEVOPS_RECONCILE_SP_CURSOR_FILE. Default: ~/.aidevops/state/reconcile-single-pass.cursor, alongside the existing parent-repair-repo.cursor.
  • tests/test-reconcile-budget-isolation.sh: pins the cursor to its temp dir so test runs never touch the real state file.
  • New tests/test-reconcile-single-pass-cursor.sh: drives the real orchestrator with stubbed stages that advance SECONDS to simulate cost. It covers abort → resume → rotation → completion → clear, kill-retry with attempt increment, poison-pill skip, and the fallback cases.

Verification

  • bash .agents/scripts/tests/test-reconcile-single-pass-cursor.sh → 18 passed, 0 failed.
  • Existing suites, all rc=0: test-reconcile-budget-isolation (7/7), test-pulse-issue-reconcile (37/37), test-pulse-reconcile-parent-task-subissue-graph (46/46), test-pulse-parent-backfill (12/12), test-maintenance-selector-contract, test-pulse-labelless-reconcile.
  • shellcheck -x clean on all four changed files.

Runtime evidence to watch after deploy

pulse.log should show reconcile_issues_single_pass: resuming at <slug>#<n> (GH#34299) after an abort. #34125 should close via Reconcile parent-task: closed #34125 within a few cycles.


aidevops.sh v3.39.1 plugin for OpenCode v1.18.35 with claude-opus-5-5 spent 6h 15m and 660,336 tokens on this with the user in an interactive session.

@marcusquinn marcusquinn added the origin:interactive Created by interactive user session label Oct 10, 2026
@marcusquinn
marcusquinn marked this pull request as ready for review October 10, 2026 23:48
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)

🚫 Excluded labels (none allowed) (1)
  • no-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: marcusquinn/aidevops/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65b1ea18-6512-402d-817a-05a39d2be7f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown
Contributor

Qlty New-File Smell Gate

✅ Clean — 1 new source file(s) scanned, no smells found.

Base (b7cc886) Head (996230b) New files Smells
1 0

New files scanned

  • .agents/scripts/pulse-issue-reconcile-cursor.sh

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

Copy link
Copy Markdown
Contributor

Shell Function Complexity Regression Gate

✅ No regression — no new function(s) >100 lines.

Metric Base (c49f661) Head (996230b)
Total function(s) >100 lines 0 0

@github-actions

Copy link
Copy Markdown
Contributor

Qlty Smell Regression Gate

✅ No change — smell count unchanged.

Metric Base (b7cc886) Head (996230b) Delta
Total smells 65 65 +0

@github-actions

Copy link
Copy Markdown
Contributor

Bash 3.2 Compatibility Regression Gate

✅ No regression — no new bash 3.2-incompatible construct(s).

Metric Base (c49f661) Head (996230b)
Total bash 3.2-incompatible construct(s) 0 0

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

SonarCloud: 0 bugs, 0 vulnerabilities, 1 code smells

Sat Oct 10 23:50:56 UTC 2026: Code review monitoring started
Sat Oct 10 23:50:56 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 1
Sat Oct 10 23:53:17 UTC 2026: Codacy analysis completed - issues found (exit 2)

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 1
  • VULNERABILITIES: 0

Generated on: Sat Oct 10 23:53:17 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@github-actions

Copy link
Copy Markdown
Contributor

Shell Nesting Depth Regression Gate

✅ No regression — no new file(s) with nesting depth >8.

Metric Base (c49f661) Head (996230b)
Total file(s) with nesting depth >8 0 0

@github-actions

Copy link
Copy Markdown
Contributor

File Size Regression Gate

✅ No regression — no new non-README Markdown file(s) >1000 lines at root / >500 elsewhere.

Metric Base (c49f661) Head (996230b)
Total non-README Markdown file(s) >1000 lines at root / >500 elsewhere 0 0

@marcusquinn
marcusquinn merged commit ae5eb4f into main Oct 10, 2026
69 of 72 checks passed
@marcusquinn
marcusquinn deleted the bugfix/t18653-reconcile-resume-cursor branch October 10, 2026 23:56
@github-actions github-actions Bot added the status:done Task is complete label Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:interactive Created by interactive user session status:done Task is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t18653: fix(pulse): resume reconcile_issues_single_pass from a cursor after budget abort or stage timeout

1 participant