forgedock 1.8.3 → 1.8.4
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/commands/orchestrate/phase-4-execution.md +2 -0
- package/commands/review-pr.md +5 -3
- package/commands/work-on/build.md +3 -0
- package/commands/work-on/close.md +3 -0
- package/commands/work-on/decompose.md +3 -0
- package/commands/work-on/investigate.md +3 -0
- package/commands/work-on/remediate.md +3 -0
- package/commands/work-on/review.md +3 -0
- package/commands/work-on.md +6 -0
- package/package.json +1 -1
|
@@ -1910,6 +1910,8 @@ done
|
|
|
1910
1910
|
- `TRAIL_RC -ge 2` (`PHASE_TRAIL: ERROR`: unreadable trail, unreadable labels, or 127 when the verifier is unresolvable) → classify as **BLOCKED (infrastructure)**, NOT a bypass. A re-dispatched `/work-on` would hit the same unreadable or unresolvable verifier in its resume preflight, so do NOT re-dispatch. Surface `PHASE TRAIL ERROR: #{NUMBER} — <TRAIL line>` in the operator status update, add `needs-human`, and continue with the rest of the batch.
|
|
1911
1911
|
- `TRAIL_RC=1` (`PHASE_TRAIL: FAIL`) → classify as a **bypass** (handling below).
|
|
1912
1912
|
|
|
1913
|
+
**Transient GitHub outage** — if a worker returns (or the issue's latest blocker comment shows) a blocker starting with `github-unavailable:`, the issue is not human-gated: do not count it as `needs-human`/GATED. Re-dispatch it once after the other ready issues (the `/work-on` router already retried each phase twice). <!-- field test: GitHub HTTP 500 window -->
|
|
1914
|
+
|
|
1913
1915
|
On `PHASE_TRAIL: FAIL`, classify the issue as a **bypass**, never `DONE`. Classify ONLY on objective evidence — the trail verdict above and the issue's labels. Do NOT reclassify an issue from a worker's own narrative ("ran inline", "dispatched reviewers directly", "skipped an optional step"): every phase runs forked and the merge itself is gated (CI green on the exact merged commit, reviewed head or docs-only delta, phase trail), so a merged issue whose trail passes is DONE. Field evidence: narrative-based holds flagged spec-compliant behaviour and put 5 of 6 merged issues in a stress batch on needs-human. Surface it in the operator status update (`PHASE BYPASS: #{NUMBER} — missing: ...`) and do not cascade it as a satisfied predecessor.
|
|
1914
1916
|
|
|
1915
1917
|
**Do NOT re-dispatch a merged issue** (forge#3148): `/work-on` Phase 0B stops on a closed or `workflow:merged` issue before its resume preflight, so a fresh agent exits without repairing anything and the predecessor would stay unresolved forever. The PR is already merged, so the gap can only be resolved by a human. Escalate it instead, which classifies it **GATED** (`classify_predecessor_state` holds `workflow:merged` + `needs-human` with no recorded release, regardless of the verifier; the comment is posted first, then the label, both verified), so item 6.5 tracks its dependents as `blocked-on-human-merge` instead of dispatching them. A merged issue whose trail could not be read (`TRAIL_RC -ge 2`, handled above) is escalated by the same block, so it is gated the same way. A bypass reported by the agent on a `workflow:merged` issue whose trail verifies is handled the same way (set `TRAIL_RC=1` before this block):
|
package/commands/review-pr.md
CHANGED
|
@@ -1751,7 +1751,9 @@ Run the deterministic dedup script first, then fall through to the line-range ch
|
|
|
1751
1751
|
# Step 0: Deterministic title dedup — catches near-duplicates before line-range check
|
|
1752
1752
|
# See scripts/issue-dedup.sh for the token-overlap algorithm. <!-- Added: forge#1335 -->
|
|
1753
1753
|
FINDING_TITLE_DEDUP="fix: brief description of finding (review finding — PR #${PR_NUMBER})"
|
|
1754
|
-
|
|
1754
|
+
# Never dedup against the issue this PR fixes (MERGE_ISSUE): it is about to be closed, so a
|
|
1755
|
+
# finding "matched" to it is tracked nowhere. Field test #3169: SEC-2 matched #3169 itself and was dropped.
|
|
1756
|
+
DEDUP_RESULT=$(scripts/issue-dedup.sh "$FINDING_TITLE_DEDUP" "$GH_FLAG" ${MERGE_ISSUE:+--exclude "$MERGE_ISSUE"} 2>&1)
|
|
1755
1757
|
DEDUP_EXIT=$?
|
|
1756
1758
|
if [ "$DEDUP_EXIT" -eq 1 ]; then
|
|
1757
1759
|
echo "DEDUP: Skipping — $DEDUP_RESULT"
|
|
@@ -1775,7 +1777,7 @@ LINE_MAX=$((FINDING_LINE + 5))
|
|
|
1775
1777
|
|
|
1776
1778
|
# Check open issues for line-range overlap OR title similarity on the same file
|
|
1777
1779
|
CANDIDATES=$(gh issue list --state open --label "review-finding" --limit 100 --json number,title,body \
|
|
1778
|
-
--jq "[.[] | select(.body | test(\"${FINDING_FILE}\"))]" 2>/dev/null)
|
|
1780
|
+
--jq "[.[] | select(.number != ${MERGE_ISSUE:-0}) | select(.body | test(\"${FINDING_FILE}\"))]" 2>/dev/null)
|
|
1779
1781
|
|
|
1780
1782
|
EXISTING=$(echo "$CANDIDATES" | jq -r --arg file "$FINDING_FILE" --argjson min "$LINE_MIN" --argjson max "$LINE_MAX" --arg title "$FINDING_TITLE" '
|
|
1781
1783
|
.[] |
|
|
@@ -1926,7 +1928,7 @@ if [ "$FINDING_PRIORITY_EXIT" -ne 0 ]; then
|
|
|
1926
1928
|
else
|
|
1927
1929
|
|
|
1928
1930
|
# --label is repeatable (not comma-joined) per the /issue programmatic contract.
|
|
1929
|
-
ISSUE_SKILL_OUTPUT=$(Skill(skill="{FORGE_SKILL_PREFIX}issue", args="--title \"$FINDING_ISSUE_TITLE\" --body-file \"$FINDING_ISSUE_BODY_FILE\" --label review-finding --label needs-validation --label \"$FINDING_PRIORITY\" ${MILESTONE_FLAG}"))
|
|
1931
|
+
ISSUE_SKILL_OUTPUT=$(Skill(skill="{FORGE_SKILL_PREFIX}issue", args="--title \"$FINDING_ISSUE_TITLE\" --body-file \"$FINDING_ISSUE_BODY_FILE\" --label review-finding --label needs-validation --label \"$FINDING_PRIORITY\" ${MILESTONE_FLAG} ${MERGE_ISSUE:+--exclude \"$MERGE_ISSUE\"}"))
|
|
1930
1932
|
# /issue re-reads the created issue and hard-fails unless this exact marker is present.
|
|
1931
1933
|
rm -f "$FINDING_ISSUE_BODY_FILE"
|
|
1932
1934
|
|
|
@@ -13,6 +13,9 @@ argument-hint: "{NUMBER} --repo {GH_REPO} --gh-flag \"{GH_FLAG}\" --base {PR_BAS
|
|
|
13
13
|
|
|
14
14
|
**Input**: $ARGUMENTS
|
|
15
15
|
|
|
16
|
+
> **Transient GitHub failures** (field test: a 12-minute GitHub HTTP 500 window parked an issue at needs-human): retry any `gh` call that fails with HTTP 5xx, a timeout or "Something went wrong" up to 3 times with 10s/30s/60s backoff. If it still fails, do NOT add `needs-human` — print this phase's RESULT block with `status: BLOCKED` and a blocker that starts with `github-unavailable:`. The router retries the phase; every phase resumes from GitHub state, so a retry is safe.
|
|
17
|
+
|
|
18
|
+
|
|
16
19
|
**Invoked by**: the work-on router, when the issue carries label `workflow:ready-to-build` or `workflow:building`. This skill runs in an isolated forked context: it sees only its args and re-reads everything else from GitHub and git.
|
|
17
20
|
**Output**: Create worktree, classify complexity, post contract, run the child phases (context, architect, implement, validate) through `Skill()`, run the acceptance gate, and print exactly one `BUILD_RESULT:` block as the final reply.
|
|
18
21
|
|
|
@@ -13,6 +13,9 @@ context: fork
|
|
|
13
13
|
|
|
14
14
|
**Input**: $ARGUMENTS
|
|
15
15
|
|
|
16
|
+
> **Transient GitHub failures** (field test: a 12-minute GitHub HTTP 500 window parked an issue at needs-human): retry any `gh` call that fails with HTTP 5xx, a timeout or "Something went wrong" up to 3 times with 10s/30s/60s backoff. If it still fails, do NOT add `needs-human` — print this phase's RESULT block with `status: BLOCKED` and a blocker that starts with `github-unavailable:`. The router retries the phase; every phase resumes from GitHub state, so a retry is safe.
|
|
17
|
+
|
|
18
|
+
|
|
16
19
|
**Invoked by**: the `work-on` router, as its final step, via `Skill(skill="{FORGE_SKILL_PREFIX}work-on:close", args="...")`. This file declares `context: fork`, so it runs in an isolated sub-agent context that sees ONLY this text and its args — there is no "Phase 0 state" to rely on. Everything not passed as an arg is re-derived from GitHub/git in Phase C0. The router sees ONLY the final `CLOSE_RESULT:` block (see Output), so this file is the single source of truth for the close report, the summary card, the trajectory comment and the decision record.
|
|
17
20
|
**Output**: Update project board, close issue, update parent tracker, post trajectory log, post decision record, clean up the worktree. Final reply is the `CLOSE_RESULT:` block.
|
|
18
21
|
|
|
@@ -13,6 +13,9 @@ argument-hint: "{NUMBER} --repo {GH_REPO} --gh-flag \"{GH_FLAG}\""
|
|
|
13
13
|
|
|
14
14
|
**Input**: $ARGUMENTS
|
|
15
15
|
|
|
16
|
+
> **Transient GitHub failures** (field test: a 12-minute GitHub HTTP 500 window parked an issue at needs-human): retry any `gh` call that fails with HTTP 5xx, a timeout or "Something went wrong" up to 3 times with 10s/30s/60s backoff. If it still fails, do NOT add `needs-human` — print this phase's RESULT block with `status: BLOCKED` and a blocker that starts with `github-unavailable:`. The router retries the phase; every phase resumes from GitHub state, so a retry is safe.
|
|
17
|
+
|
|
18
|
+
|
|
16
19
|
**Invoked by**: the work-on router, when `INVESTIGATE_RESULT.decompose = YES`. This skill runs in an isolated forked context: it sees only its args and re-reads everything else from GitHub.
|
|
17
20
|
**Output**: Create sub-issues, update parent tracker, post `<!-- FORGE:DECOMPOSED -->` comment, set `workflow:decomposed`. STOP — each sub-issue runs its own /work-on. This skill is the SOLE owner of the `workflow:decomposed` label. On BLOCKED it adds `needs-human` and posts the blocker.
|
|
18
21
|
|
|
@@ -11,6 +11,9 @@ context: fork
|
|
|
11
11
|
|
|
12
12
|
**Input**: $ARGUMENTS
|
|
13
13
|
|
|
14
|
+
> **Transient GitHub failures** (field test: a 12-minute GitHub HTTP 500 window parked an issue at needs-human): retry any `gh` call that fails with HTTP 5xx, a timeout or "Something went wrong" up to 3 times with 10s/30s/60s backoff. If it still fails, do NOT add `needs-human` — print this phase's RESULT block with `status: BLOCKED` and a blocker that starts with `github-unavailable:`. The router retries the phase; every phase resumes from GitHub state, so a retry is safe.
|
|
15
|
+
|
|
16
|
+
|
|
14
17
|
Standalone investigation phase for the work-on pipeline. Validates whether an issue is real, determines root cause, posts a structured FORGE:INVESTIGATOR comment to GitHub, and updates workflow labels.
|
|
15
18
|
|
|
16
19
|
This skill runs in an **isolated forked context**: it sees only this file and its args. It has no variables from the caller — every other piece of state is re-read from GitHub/git here. It ends by printing exactly one `INVESTIGATE_RESULT:` block (see `## Output`) as its final reply, on **every** exit path (success, ALREADY_DONE, INVALID, BLOCKED).
|
|
@@ -13,6 +13,9 @@ context: fork
|
|
|
13
13
|
|
|
14
14
|
**Input**: $ARGUMENTS
|
|
15
15
|
|
|
16
|
+
> **Transient GitHub failures** (field test: a 12-minute GitHub HTTP 500 window parked an issue at needs-human): retry any `gh` call that fails with HTTP 5xx, a timeout or "Something went wrong" up to 3 times with 10s/30s/60s backoff. If it still fails, do NOT add `needs-human` — print this phase's RESULT block with `status: BLOCKED` and a blocker that starts with `github-unavailable:`. The router retries the phase; every phase resumes from GitHub state, so a retry is safe.
|
|
17
|
+
|
|
18
|
+
|
|
16
19
|
**Invoked by**:
|
|
17
20
|
- `work-on.md` Phase 0A.1 (router), standalone: `/work-on <pr> --remediate` (see forge#1813).
|
|
18
21
|
- `commands/orchestrate/phase-4-execution.md` item 6.4, auto-dispatched against a `needs-human`-gated predecessor's own open PR.
|
|
@@ -13,6 +13,9 @@ argument-hint: "{NUMBER} --repo {GH_REPO} --gh-flag \"{GH_FLAG}\" --worktree {WO
|
|
|
13
13
|
|
|
14
14
|
**Input**: $ARGUMENTS
|
|
15
15
|
|
|
16
|
+
> **Transient GitHub failures** (field test: a 12-minute GitHub HTTP 500 window parked an issue at needs-human): retry any `gh` call that fails with HTTP 5xx, a timeout or "Something went wrong" up to 3 times with 10s/30s/60s backoff. If it still fails, do NOT add `needs-human` — print this phase's RESULT block with `status: BLOCKED` and a blocker that starts with `github-unavailable:`. The router retries the phase; every phase resumes from GitHub state, so a retry is safe.
|
|
17
|
+
|
|
18
|
+
|
|
16
19
|
**Invoked by**: the `work-on` router, after `build/validate.md` returns `GATE_PASSED: true`.
|
|
17
20
|
**Output**: Push branch, create PR, invoke /review-pr --auto-merge, verify the merge, and print exactly one `REVIEW_RESULT:` block as the final reply (all paths, including every guard/failure).
|
|
18
21
|
|
package/commands/work-on.md
CHANGED
|
@@ -507,6 +507,12 @@ gh issue comment {NUMBER} {GH_FLAG} --body "<!-- FORGE:HEARTBEAT -->
|
|
|
507
507
|
|
|
508
508
|
---
|
|
509
509
|
|
|
510
|
+
## Transient GitHub failures (router-owned retry)
|
|
511
|
+
|
|
512
|
+
Any phase result whose blocker starts with `github-unavailable:` is an infrastructure outage, not a decision: do not add `needs-human`. Wait 2 minutes, then re-invoke the **same phase with the same args**; repeat at most twice (5 minutes before the second retry). Phases are idempotent and resume from GitHub state. If the third attempt still returns `github-unavailable:`, post one comment with the blocker, add `needs-human`, and STOP — at that point GitHub has been unavailable for 10+ minutes.
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
510
516
|
## Phase 1: Investigate
|
|
511
517
|
|
|
512
518
|
**Skip if**: a `<!-- FORGE:INVESTIGATOR -->` comment contains `<!-- INVESTIGATION:COMPLETE -->` or `<!-- INVESTIGATION:INVALID -->` (route on the existing verdict as below — the skill's own resume check returns it if invoked).
|
package/package.json
CHANGED