jonah-fleet 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to `jonah-fleet` will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.19.0](https://github.com/juliendurandeu/jonah-fleet/compare/v1.18.0...v1.19.0) (2026-09-20)
9
+
10
+
11
+ ### Features
12
+
13
+ * **autowork:** add opportunistic operational log sweep (idle GC) to Step 9 ([#285](https://github.com/juliendurandeu/jonah-fleet/issues/285)) ([8e4cf12](https://github.com/juliendurandeu/jonah-fleet/commit/8e4cf122cb949bdc23bdc3eaa1f80e4a7739dde6))
14
+
8
15
  ## [1.18.0](https://github.com/juliendurandeu/jonah-fleet/compare/v1.17.0...v1.18.0) (2026-09-20)
9
16
 
10
17
 
@@ -30,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
37
  * **prompts:** add Prior Failure Ingestion Protocol to `autowork.md` and `peer-review.md`, inspecting past open failed routine issues to extract error logs and crash milestones before implementation or review.
31
38
  * **prompts:** add resolution-triggered auto-closure to `autowork.md` and `peer-review.md`, automatically commenting on and closing past failed routine issues for a target once work is marked ready or merged.
32
39
  * **housekeeping:** expand `issues-housekeeping.md` to sweep and close stale untargeted `status:failure` routine issues older than 48 hours or whose targets are resolved, eliminating backlog clutter.
40
+ * **autowork:** add opportunistic operational log sweep (idle GC) to Step 9 in `autowork.md`, cleaning up stale untargeted failures when the issue backlog is clear.
33
41
 
34
42
  ## [1.16.0](https://github.com/juliendurandeu/jonah-fleet/compare/v1.15.1...v1.16.0) (2026-09-19)
35
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jonah-fleet",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Standalone autonomous agent fleet with Symphony orchestration, claim protocols, and continuous improvement loops",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -168,7 +168,9 @@ Single source of truth for handling routine run failures, context extraction, an
168
168
  ```
169
169
  (or `PR #<PR_NUMBER>`). If prior failed runs exist, the runner extracts error messages, failing test names, or crash milestones from the Interruption Card and incorporates this context into Milestone 1 and its reproduction strategy, preventing repeated identical failures.
170
170
  3. **Resolution-Triggered Auto-Closure**: When a target issue or PR reaches terminal completion (a ready PR opened, review decision executed, or PR merged), the routine iterates through any open past failed routine issues for that target, posts a resolution comment referencing the successful run (including the Antigravity run footer), and closes them via `gh issue close <ISSUE> --reason completed`.
171
- 4. **Housekeeping Garbage Collection for Untargeted Crashes**: Routine runs that fail before claiming a target (e.g. runner VM startup errors, GitHub CLI auth failures) or whose target has already been resolved are audited by `issues-housekeeping.md` and closed once older than 48 hours, keeping consumer issue lists clean and noise-free.
171
+ 4. **Garbage Collection for Untargeted / Stale Crashes (Housekeeping & Idle Autowork)**: Routine runs that fail before claiming a target (e.g. runner VM startup errors, GitHub CLI auth failures) or whose target has already been resolved are audited and closed once older than 48 hours by:
172
+ - `issues-housekeeping.md` during scheduled backlog maintenance sweeps.
173
+ - `autowork.md` Step 9 as an opportunistic idle sweep when no eligible unclaimed work exists, ensuring repositories running minimal presets without dedicated housekeeping crons stay pristine.
172
174
 
173
175
  ---
174
176
 
@@ -165,8 +165,19 @@ _Generated by [Antigravity](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/ru
165
165
  - **Dual Execution Priority Routing**:
166
166
  - If running in **Cloud Actions** (`$GITHUB_ACTIONS` / `$CI`): Scan mode selects `priority/P0` or `priority/P1` issues first. Lower-priority `priority/P2` or `priority/P3` issues are eligible in cloud Scan mode ONLY if the issue has remained unclaimed for more than 48 hours (`created_at` older than 48h, acting as a cloud catchup sweep).
167
167
  - If running in **Local Agent** (`$LOCAL_AGENT`): Scan mode selects across all priorities (P0 → P1 → P2 → P3) without time gating, prioritizing active local backlog consumption.
168
- - Skip assigned issues (unless stale claim per `ORCHESTRATION.md`), issues with open PRs, issues with unclosed blocking dependencies (`Blocked by #N` / `Depends on #N`), issues labeled `needs-human`, `needs-design`, or `needs-info`, and issues under cross-run cooldown.
169
- 9. If no eligible candidate exists, STOP — run is SUCCESS with "No unclaimed work available".
168
+ 9. If no eligible candidate exists:
169
+ - **Opportunistic Operational Log Sweep (Idle GC)**: Before concluding an idle run, perform a lightweight sweep of open `routine-log` issues to prevent operational clutter from accumulating across repositories (especially those running minimal presets without dedicated housekeeping crons):
170
+ ```bash
171
+ STALE_FAILURES=$(gh issue list --label routine-log,status:failure --state open --limit 20 --json number,title,body,createdAt || true)
172
+ ```
173
+ For each stale failure issue:
174
+ - Check if it is untargeted (no `(Issue #N)` or `(PR #M)` in title/body) and older than 48 hours, OR if its referenced target issue or PR is already closed or merged.
175
+ - If eligible, close it with a resolution note:
176
+ ```bash
177
+ gh issue comment "$stale_num" --body "Closed by autowork idle sweep: routine failure superseded or untargeted crash older than 48 hours.\n\n_Generated by [Antigravity](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID:-})_" || true
178
+ gh issue close "$stale_num" --reason completed || true
179
+ ```
180
+ - STOP — run is SUCCESS with "No unclaimed work available; swept stale operational logs".
170
181
  10. If the candidate should be closed already (work done, merged PR found in git history or via `gh pr list --state merged --search "<ISSUE_NUMBER>"`), close it immediately (`gh issue close <ISSUE_NUMBER> --comment "Closed: work already merged in PR #<PR_NUMBER>.\n\n_Generated by [Antigravity](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID:-})_"`), close any lingering past failed routine run issues (`PAST_FAILURES=$(gh issue list --label routine-log --search "Issue #<ISSUE_NUMBER>" --state open --json number --jq '.[].number' || true); for p in $PAST_FAILURES; do if [ -n "$p" ] && [ "$p" != "$ROUTINE_ISSUE_NUMBER" ]; then gh issue comment "$p" --body "Resolved: work already merged in PR #<PR_NUMBER>.\n\n_Generated by [Antigravity](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID:-})_" || true; gh issue close "$p" --reason completed || true; fi; done`), and return to step 8.
171
182
  10a. **Stale-claim reclamation:** If candidate is a stale claim per `ORCHESTRATION.md`, re-read immediately before writing, unassign the dead owner, post reclamation comment, and proceed to claim.
172
183
  11. **Claim protocol:**