forgedock 1.4.0 → 1.5.1
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/bin/engine/runlog.mjs +11 -1
- package/bin/engine-cli.mjs +6 -0
- package/bin/engine.mjs +194 -59
- package/bin/forgedock.mjs +112 -5
- package/bin/hooks/pre-tool-use.mjs +29 -7
- package/bin/journey.mjs +790 -193
- package/bin/runner.mjs +159 -2
- package/bin/watch-utils.mjs +4 -1
- package/commands/cleanup.md +27 -2
- package/commands/issue.md +14 -4
- package/commands/orchestrate/config.md +3 -1
- package/commands/orchestrate/phase-1-resolve.md +125 -14
- package/commands/orchestrate/phase-3-dependency.md +254 -40
- package/commands/orchestrate/phase-4-execution.md +402 -39
- package/commands/orchestrate/phase-5-cleanup.md +2 -0
- package/commands/review-pr-staging.md +51 -8
- package/commands/review-pr.md +97 -32
- package/commands/work-on/build/architect.md +28 -3
- package/commands/work-on/remediate.md +53 -4
- package/package.json +1 -1
- package/packages/protocol/src/validate.js +24 -1
- package/scripts/build-knowledge-index.mjs +6 -2
- package/scripts/check-phase-registry-drift.mjs +23 -1
- package/scripts/check-spec-markers.sh +2 -0
- package/scripts/classify-lane.sh +29 -3
- package/scripts/derive-finding-milestone.sh +194 -0
- package/scripts/doctor-pipeline-state.sh +1 -0
- package/scripts/extract-affected-files.sh +232 -0
- package/scripts/extract-affected-files.test.sh +331 -0
- package/scripts/forge-run.sh +4 -0
- package/scripts/issue-dedup.sh +69 -8
- package/scripts/issue-dedup.test.sh +142 -0
- package/scripts/severity-to-priority.sh +81 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios
|
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
4
|
+
#
|
|
5
|
+
# severity-to-priority.sh — Single source of truth for the Severity → priority:*
|
|
6
|
+
# label mapping used by review-finding issue creation.
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# severity-to-priority.sh <SEVERITY>
|
|
10
|
+
#
|
|
11
|
+
# SEVERITY One of: CRITICAL, HIGH, MEDIUM, LOW (case-sensitive,
|
|
12
|
+
# matches the exact tokens written into a finding's
|
|
13
|
+
# `**Severity**:` body field by commands/review-pr-agents/*.md)
|
|
14
|
+
#
|
|
15
|
+
# Mapping (fixed — do not add a second copy of this table anywhere else;
|
|
16
|
+
# both commands/review-pr.md and commands/review-pr-staging.md call this
|
|
17
|
+
# script rather than hand-rolling their own copy, specifically so the two
|
|
18
|
+
# specs cannot independently drift the way they did before this fix):
|
|
19
|
+
#
|
|
20
|
+
# CRITICAL -> priority:P0
|
|
21
|
+
# HIGH -> priority:P1
|
|
22
|
+
# MEDIUM -> priority:P2
|
|
23
|
+
# LOW -> priority:P3
|
|
24
|
+
#
|
|
25
|
+
# NOTE: an `INFO -> priority:P3` branch previously existed here (forge#2447)
|
|
26
|
+
# but was removed (forge#2480) — no `commands/review-pr-agents/*.md` persona
|
|
27
|
+
# ever documented or instructed emitting `INFO` as a `**Severity**` value, and
|
|
28
|
+
# neither finding-body template (`review-pr.md`/`review-pr-staging.md`) ever
|
|
29
|
+
# listed it as valid, making the branch permanently unreachable dead code. If
|
|
30
|
+
# a real producer for `INFO` is added in the future, reintroduce the mapping
|
|
31
|
+
# here AND update both finding-body template enums AND the relevant
|
|
32
|
+
# review-pr-agents persona(s) in the same change — see forge#2480.
|
|
33
|
+
#
|
|
34
|
+
# IMPORTANT: this maps SEVERITY, never Confidence (CONFIRMED/LIKELY/POSSIBLE).
|
|
35
|
+
# Confidence and Severity are independent axes of a finding — conflating them
|
|
36
|
+
# is exactly the bug this script exists to prevent (forge#2447: a LOW-severity,
|
|
37
|
+
# CONFIRMED-confidence finding was previously labeled priority:P1 because the
|
|
38
|
+
# label was derived from Confidence instead of Severity, defeating the
|
|
39
|
+
# orchestrator's P3 batching rule for LOW-severity nits).
|
|
40
|
+
#
|
|
41
|
+
# Output: the resolved `priority:P*` label on stdout, nothing else.
|
|
42
|
+
#
|
|
43
|
+
# Exit codes:
|
|
44
|
+
# 0 success — label printed to stdout
|
|
45
|
+
# 1 error (missing argument or unrecognized severity — fails loud rather
|
|
46
|
+
# than silently guessing a default priority)
|
|
47
|
+
#
|
|
48
|
+
# Example:
|
|
49
|
+
# FINDING_PRIORITY=$(scripts/severity-to-priority.sh "$FINDING_SEVERITY")
|
|
50
|
+
#
|
|
51
|
+
# <!-- Added: forge#2447 -->
|
|
52
|
+
|
|
53
|
+
set -euo pipefail
|
|
54
|
+
|
|
55
|
+
if [ "$#" -lt 1 ]; then
|
|
56
|
+
echo "ERROR: Usage: severity-to-priority.sh <SEVERITY>" >&2
|
|
57
|
+
echo " SEVERITY: CRITICAL | HIGH | MEDIUM | LOW" >&2
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
SEVERITY="$1"
|
|
62
|
+
|
|
63
|
+
case "$SEVERITY" in
|
|
64
|
+
CRITICAL)
|
|
65
|
+
echo "priority:P0"
|
|
66
|
+
;;
|
|
67
|
+
HIGH)
|
|
68
|
+
echo "priority:P1"
|
|
69
|
+
;;
|
|
70
|
+
MEDIUM)
|
|
71
|
+
echo "priority:P2"
|
|
72
|
+
;;
|
|
73
|
+
LOW)
|
|
74
|
+
echo "priority:P3"
|
|
75
|
+
;;
|
|
76
|
+
*)
|
|
77
|
+
echo "ERROR: Unrecognized severity: '$SEVERITY'" >&2
|
|
78
|
+
echo " Valid severities: CRITICAL, HIGH, MEDIUM, LOW" >&2
|
|
79
|
+
exit 1
|
|
80
|
+
;;
|
|
81
|
+
esac
|