jonah-fleet 1.28.4 → 1.28.5
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.28.5](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.28.4...v1.28.5) (2026-09-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **autowork:** prevent local and cloud autowork collisions on assignment and enforce active claim exclusion ([1f78443](https://github.com/Jonah-Projects/jonah-fleet/commit/1f784433b58f4523ccff53be0356034515a128c3))
|
|
14
|
+
|
|
8
15
|
## [1.28.4](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.28.3...v1.28.4) (2026-09-24)
|
|
9
16
|
|
|
10
17
|
|
|
@@ -23,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
23
30
|
|
|
24
31
|
### Bug Fixes
|
|
25
32
|
|
|
33
|
+
* **autowork:** prevent local and GitHub-hosted autowork runner collisions by excluding bot and self-assignments from `trigger-autowork-on-assign.yml`, enforcing a 2-hour active claim lock in Step 0.5a / Step 11a, and mandating concrete pre-PR collision checks with collision bail in Step 13
|
|
26
34
|
* **daemon:** query `statusCheckRollup` in `getOpenReviewablePRs` and filter out PRs with in-progress CI to prevent premature review dispatch and repetition loop trips
|
|
27
35
|
* **peer-review:** add Post-Merge Companion Measurement Issue Filing protocol to `peer-review.md` and `ORCHESTRATION.md` to automatically synthesize `Measure: ...` tracking issues upon merge
|
|
28
36
|
|
package/package.json
CHANGED
|
@@ -278,11 +278,13 @@ How agent routines are partitioned between cloud GitHub Actions (24/7 cloud runn
|
|
|
278
278
|
- **Cloud Catchup Sweep (48h Fallback)**: If a P2/P3 issue or PR remains unclaimed/unreviewed for $>48\text{ hours}$ (e.g. because local machines were offline), the scheduled cloud Actions scan sweep automatically picks it up to prevent work starvation.
|
|
279
279
|
2. **PR Priority Mirroring**: When Autowork opens a PR, it automatically mirrors the parent issue's priority labels (`priority/P0`..`P3`) onto the pull request so downstream review workflows can filter triggers without extra API overhead.
|
|
280
280
|
3. **Workspace Isolation via Git Worktrees**: Local agents execute inside ephemeral worktrees (`.jonah-fleet/worktrees/<routine>-<issue>`) off `origin/main`, ensuring active editor sessions, uncommitted changes, and local branches are never modified or disturbed.
|
|
281
|
-
4. **Local Claim Protocol**:
|
|
281
|
+
4. **Local Claim Protocol & Dual-Execution Collision Prevention**:
|
|
282
282
|
- Local agent issue claims post: `🔒 Claimed by local autowork session (host: <hostname>) <timestamp>`.
|
|
283
283
|
- Local agent PR convergence claims post: `🔒 Addressing review findings by local autowork session (host: <hostname>) <timestamp>`.
|
|
284
284
|
- Local processes trap `SIGINT`/`SIGTERM` to unassign claims and remove worktrees cleanly on exit.
|
|
285
|
-
-
|
|
285
|
+
- **Sender Filter on Assignment Triggers**: Cloud assignment workflows (`trigger-autowork-on-assign.yml`) explicitly exclude assignments triggered by bot personas or self-assignment (`github.event.sender.login != vars.AGENT_BOT_LOGIN`, `github.event.sender.login != github.event.assignee.login`), guaranteeing that local claims never trigger duplicate cloud runs.
|
|
286
|
+
- **2-Hour Active Claim Exclusion**: Both local and cloud runners check for active claim comments posted within 2 hours (`🔒 Claimed by...`) before claiming. If an active claim exists, the candidate is ineligible and duplicate claims/runs are prevented.
|
|
287
|
+
- Standard stale-claim rules (6h for issues, 2h for PRs) safely reclaim orphaned claims if a machine powers down unexpectedly.
|
|
286
288
|
|
|
287
289
|
---
|
|
288
290
|
|
|
@@ -82,10 +82,10 @@ Check if `$TARGET_ISSUE` or `$ISSUE_NUMBER` environment variable is set (or scan
|
|
|
82
82
|
|
|
83
83
|
### Step 0.5: Targeted mode — work the target issue first (only when Step 0 found one)
|
|
84
84
|
|
|
85
|
-
a. **Read the target issue and check eligibility.** Eligible = open, unassigned or assigned to designated bot persona (`vars.AGENT_BOT_LOGIN`) or reclaimable stale claim, no open PR (`Closes #N`), no unclosed inward blocking dependencies (`Blocked by #N` or `Depends on #N` where `#N` is open), and not carrying `needs-human` or `needs-design`.
|
|
85
|
+
a. **Read the target issue and check eligibility.** Eligible = open, unassigned or assigned to designated bot persona (`vars.AGENT_BOT_LOGIN`) or reclaimable stale claim, no active claim comment (`🔒 Claimed by autowork run` or `🔒 Claimed by local autowork session`) posted within the last 2 hours (unless stale claim per `ORCHESTRATION.md`), no open PR (`Closes #N`), no unclosed inward blocking dependencies (`Blocked by #N` or `Depends on #N` where `#N` is open), and not carrying `needs-human` or `needs-design`.
|
|
86
86
|
|
|
87
|
-
- **Ineligible** → fall back to Phase 1 and run the normal Scan flow.
|
|
88
|
-
|
|
87
|
+
- **Ineligible** → If the target is already actively claimed by another live runner or already has an open PR, STOP immediately — log SUCCESS with "Target issue #<TARGET_ISSUE> already has an active claim or open PR; yielding to prevent duplicate work". Otherwise (e.g. closed, blocked, or carries needs-human/needs-design), fall back to Phase 1 and run the normal Scan flow.
|
|
88
|
+
b. **Eligible → claim, then implement.** Call `get_me` once to learn your own login (step 7), reclaim stale claim if applicable (step 10a), run Claim protocol (step 11), evaluate and implement per steps 12–13, open draft PR, and run in-session review wait (step 15).
|
|
89
89
|
|
|
90
90
|
### Phase 1: Converge on open work (Scan mode; skipped in Targeted mode)
|
|
91
91
|
|
|
@@ -193,11 +193,13 @@ _Generated by [Antigravity](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/ru
|
|
|
193
193
|
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.
|
|
194
194
|
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.
|
|
195
195
|
11. **Claim protocol:**
|
|
196
|
-
a. Re-read candidate issue immediately before claiming (`
|
|
196
|
+
a. Re-read candidate issue and its comments immediately before claiming (`gh issue view <issue> --json assignees,comments`). If assigned to a user other than yourself or the configured bot persona (`vars.AGENT_BOT_LOGIN`), OR if the issue already carries an active claim comment (`🔒 Claimed by autowork run` or `🔒 Claimed by local autowork session`) posted within the last 2 hours (unless stale claim per `ORCHESTRATION.md`), abort and pick next candidate (or stop if in Targeted mode).
|
|
197
197
|
b. Claim atomically: assign yourself (`login` from step 7) AND post claim comment:
|
|
198
198
|
- In **Cloud Actions**: `🔒 Claimed by autowork run {run_url} {timestamp}`
|
|
199
199
|
- In **Local Agent**: `🔒 Claimed by local autowork session (host: {hostname}) {timestamp}`
|
|
200
|
-
c. Confirm sole ownership
|
|
200
|
+
c. Confirm sole ownership: immediately re-fetch comments (`gh issue view <issue> --json comments`). Filter for active claim comments (`🔒 Claimed by ...`). If your claim comment is NOT the earliest `created_at` timestamp among them, YOU LOST THE RACE. You MUST annotate your comment (`gh issue comment <issue> --body "⚠️ Claim ceded: duplicate race detected, yielding to earlier claim."`), leave assignee as is, and:
|
|
201
|
+
- In **Targeted mode**: STOP immediately — log SUCCESS with "Yielded claim to concurrent runner". Do NOT write code, do NOT open a PR.
|
|
202
|
+
- In **Scan mode**: pick the next candidate issue.
|
|
201
203
|
d. **Dynamic Target Binding (Scan Mode)**: If `$ROUTINE_ISSUE_NUMBER` is set and its title does not mention `Issue #<TARGET_ISSUE>`, update the routine issue title to bind the target issue:
|
|
202
204
|
```bash
|
|
203
205
|
TIMESTAMP=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
|
|
@@ -274,7 +276,7 @@ _Generated by [Antigravity](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/ru
|
|
|
274
276
|
- **Key Decision / Finding**: Tests verified passing with zero failures and clean type-check.
|
|
275
277
|
- **Next**: PR Creation & Autonomous Handoff" || true
|
|
276
278
|
```
|
|
277
|
-
- Check for competing open PRs immediately before creating PR. If collision, bail
|
|
279
|
+
- Check for competing open PRs immediately before creating PR (`gh pr list --state all --search "<TARGET_ISSUE>"`). If a competing PR is found (collision), execute Collision Bail immediately: push your branch, annotate your claim comment (`gh issue comment <TARGET_ISSUE> --body "⚠️ Collision bail: PR #<EXISTING_PR> was opened concurrently. Branch \`<branch>\` pushed as backup."`), DO NOT open a second PR, and complete run.
|
|
278
280
|
- Open draft PR via `gh pr create --draft --head <branch> --base main --title "<title>" --body "<body referencing Closes #N with Fleet run badge and footer>"`.
|
|
279
281
|
- **PR Priority Label Mirroring**: If the issue carried a priority label (`priority/P0`, `priority/P1`, `priority/P2`, `priority/P3`), add the identical priority label to the PR (`gh pr edit <PR> --add-label "<label>"` or via `--label` in create) so downstream review workflows can filter triggers immediately.
|
|
280
282
|
- Verify PR URL returned. Update issue `## Tasks` checkboxes.
|
|
@@ -6,7 +6,13 @@ on:
|
|
|
6
6
|
|
|
7
7
|
jobs:
|
|
8
8
|
fire-autowork:
|
|
9
|
-
if:
|
|
9
|
+
if: >-
|
|
10
|
+
(github.event.assignee.login == vars.AGENT_BOT_LOGIN || github.event.assignee.login == 'jonah-fleet-bot') &&
|
|
11
|
+
github.event.sender.login != vars.AGENT_BOT_LOGIN &&
|
|
12
|
+
github.event.sender.login != 'jonah-fleet-bot' &&
|
|
13
|
+
github.event.sender.login != 'github-actions[bot]' &&
|
|
14
|
+
!endsWith(github.event.sender.login, '[bot]') &&
|
|
15
|
+
github.event.sender.login != github.event.assignee.login
|
|
10
16
|
concurrency:
|
|
11
17
|
group: autowork-assign-${{ github.event.issue.number }}
|
|
12
18
|
cancel-in-progress: true
|