Skip to content

GH#34287: fix(pulse): resume interrupted async housekeeping and reconcile before blocker catch-up - #34291

Merged
vladimirdulov merged 2 commits into
mainfrom
feature/auto-20261011-004256-gh34287
Oct 10, 2026
Merged

vladimirdulov merged 2 commits into
mainfrom
feature/auto-20261011-004256-gh34287

Conversation

@alex-solovyev

Copy link
Copy Markdown
Collaborator

Summary

Deploy reconciliation (setup.sh) SIGTERMs the detached housekeeping subshell, so long runs always restarted from stage 1 and preflight_ownership_reconcile was starved. Housekeeping now persists stage=epoch progress in ~/.aidevops/logs/pulse-post-dispatch-housekeeping.state (next to the lock, survives stale-lock reclaim); a following run skips stages completed within AIDEVOPS_PULSE_HOUSEKEEPING_RESUME_WINDOW_S (default 1800s, 0 disables) and a clean complete run removes the state. Stages whose child died by signal (rc>128) are not recorded. preflight_ownership_reconcile now runs before the GH#33246 blocker-refresh catch-up. The async subshell traps TERM/HUP and logs 'terminated by SIG during '. Housekeeping is still stopped on deploy; stage timeouts and catch-up gating are unchanged.

Files Changed

.agents/scripts/pulse-dispatch-engine.sh, .agents/scripts/tests/test-pulse-post-dispatch-housekeeping.sh

Runtime Testing

  • Risk level: Medium
  • Verification: self-assessed — bash .agents/scripts/tests/test-pulse-post-dispatch-housekeeping.sh (7/7, new: resume, signal-killed stage not recorded, SIGTERM attribution, reconcile-before-catch-up order); test-pulse-dispatch-engine-stage-wiring.sh 70/70; test-pulse-dispatch-first-wave.sh and test-pulse-systemd-timeout.sh pass; shellcheck -x clean on both files.

Resolves #34287


aidevops.sh v3.39.1 plugin for OpenCode v1.18.34 with claude-opus-5-5 spent 4m and 12,698 tokens on this as a headless worker.

@alex-solovyev alex-solovyev added the origin:worker Created by headless/pulse worker session label Oct 10, 2026
@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: 25f9f3d0-1437-4e77-ba4c-4e936543c4e2

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.

@alex-solovyev

alex-solovyev commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

Completion Summary

  • What: Deploy reconciliation (setup.sh) SIGTERMs the detached housekeeping subshell, so long runs always restarted from stage 1 and preflight_ownership_reconcile was starved. Housekeeping now persists stage=epoch progress in ~/.aidevops/logs/pulse-post-dispatch-housekeeping.state (next to the lock, survives stale-lock reclaim); a following run skips stages completed within AIDEVOPS_PULSE_HOUSEKEEPING_RESUME_WINDOW_S (default 1800s, 0 disables) and a clean complete run removes the state. Stages whose child died by signal (rc>128) are not recorded. preflight_ownership_reconcile now runs before the GH#33246 blocker-refresh catch-up. The async subshell traps TERM/HUP and logs 'terminated by SIG during '. Housekeeping is still stopped on deploy; stage timeouts and catch-up gating are unchanged.
  • Issue: t18650: fix(pulse): async housekeeping still dies before preflight_ownership_reconcile, starving parent/merged-PR reconcile #34287
  • Files changed: .agents/scripts/pulse-dispatch-engine.sh, .agents/scripts/tests/test-pulse-post-dispatch-housekeeping.sh
  • Testing: bash .agents/scripts/tests/test-pulse-post-dispatch-housekeeping.sh (7/7, new: resume, signal-killed stage not recorded, SIGTERM attribution, reconcile-before-catch-up order); test-pulse-dispatch-engine-stage-wiring.sh 70/70; test-pulse-dispatch-first-wave.sh and test-pulse-systemd-timeout.sh pass; shellcheck -x clean on both files.
  • Key decisions: none

aidevops.sh v3.39.1 plugin for OpenCode v1.18.34 with claude-opus-5-5 spent 4m and 12,698 tokens on this as a headless worker.


Merged via PR #34291 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).

@alex-solovyev alex-solovyev added the status:in-review Non-draft PR ready for review/merge label Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Pulse Unbound-Var Violations (set -u safety)

The following files introduce local foo bar baz multi-var
declarations without initialisation (see t2863 and canonical
failure t2841 — _b_nums unbound, 3-7x per pulse cycle):

/tmp/puv-diff-lines/pulse-dispatch-engine.sh:145: multi-var local without init (set -u risk): local lockdir state_file

--- Pulse Unbound-Var Check ---
Found 1 violation(s) across 1 file(s).
Fix: initialise all vars at declaration: local foo="" bar="" baz=""
See: t2863 and reference fix at e05bcae1f (t2841)

Fix: initialise all vars at declaration time:

# BAD — any var only assigned in a conditional branch aborts with set -u
local _g_nums _b_nums _p_nums child_nums

# GOOD — explicit empty-string init
local _g_nums="" _b_nums="" _p_nums="" child_nums=""

# GOOD — single-var declaration is safe
local pr_json
pr_json=$(gh pr list ...)

Run .agents/scripts/pulse-unbound-var-check.sh --fix-hint for more remediation examples.
Reference fix: commit e05bcae (t2841).

@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

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Qlty Smell Regression Gate

✅ No change — smell count unchanged.

Metric Base (038d414) Head (ca7445c) 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 (038d414) Head (ca7445c)
Total bash 3.2-incompatible construct(s) 0 0

@github-actions

Copy link
Copy Markdown
Contributor

Shell Function Complexity Regression Gate

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

Metric Base (038d414) Head (ca7445c)
Total function(s) >100 lines 0 0

@github-actions

Copy link
Copy Markdown
Contributor

Shell Nesting Depth Regression Gate

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

Metric Base (038d414) Head (ca7445c)
Total file(s) with nesting depth >8 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 22:52:38 UTC 2026: Code review monitoring started
Sat Oct 10 22:52:39 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 1
Sat Oct 10 22:55:09 UTC 2026: Codacy analysis completed - issues found (exit 2)

📈 Current Quality Metrics

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

Generated on: Sat Oct 10 22:55:10 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@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 (038d414) Head (ca7445c)
Total non-README Markdown file(s) >1000 lines at root / >500 elsewhere 0 0

@vladimirdulov vladimirdulov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Auto-approved by pulse runner @vladimirdulov — author @alex-solovyev confirmed collaborator, pre-merge gates passed.


aidevops.sh v3.39.0 automated scan.

@vladimirdulov
vladimirdulov merged commit bd92906 into main Oct 10, 2026
57 checks passed
@vladimirdulov
vladimirdulov deleted the feature/auto-20261011-004256-gh34287 branch October 10, 2026 23:00
@github-actions github-actions Bot added status:done Task is complete and removed status:in-review Non-draft PR ready for review/merge labels Oct 10, 2026
alex-solovyev added a commit that referenced this pull request Oct 10, 2026
* fix: explain tag-push release evidence failures (GH#34286)

* test: cover tag-push release diagnostic safety (GH#34286)

* GH#34287: fix(pulse): resume interrupted async housekeeping and reconcile before blocker catch-up (#34291)

* GH#34287: fix(pulse): resume interrupted async housekeeping and reconcile before blocker catch-up

* GH#34287: fix(pulse): initialise housekeeping lock/state locals for unbound-var lint

* GH#34289: fix(pulse): defer parent-close near reconcile budget (GH#34289) (#34292)

* fix(pulse): defer parent-close when reconcile budget is below mutation reserve (GH#34289)

* refactor: extract parent close postcondition helper to stay under complexity limit

* GH#34293: docs: keep Qlty on organisation repos and skip its out-of-minutes check

---------

Co-authored-by: Marcus Quinn <6428977+marcusquinn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:worker Created by headless/pulse worker session status:done Task is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t18650: fix(pulse): async housekeeping still dies before preflight_ownership_reconcile, starving parent/merged-PR reconcile

2 participants