forgedock 1.61.2 → 1.62.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/bin/config-schema.mjs +10 -1
- package/bin/engine/outcome-codes.mjs +4 -0
- package/bin/engine-cli.mjs +159 -17
- package/bin/env/env.mjs +6 -4
- package/bin/forge-home-check.mjs +91 -0
- package/bin/forgedock.mjs +50 -7
- package/bin/gc.mjs +2 -0
- package/bin/hooks/pre-tool-use.mjs +4 -0
- package/bin/journey.mjs +55 -5
- package/bin/lean/admission.mjs +16 -5
- package/bin/lean/batch-health.mjs +55 -16
- package/bin/lean/batch-health.test.mjs +67 -1
- package/bin/lean/batch.mjs +8 -0
- package/bin/lean/batch.test.mjs +5 -0
- package/bin/lean/ceiling.mjs +20 -0
- package/bin/lean/ceiling.test.mjs +33 -2
- package/bin/lean/ci-gate.mjs +240 -0
- package/bin/lean/ci-gate.test.mjs +227 -0
- package/bin/lean/ci-precheck.mjs +178 -0
- package/bin/lean/ci-precheck.test.mjs +149 -0
- package/bin/lean/conformance.mjs +85 -9
- package/bin/lean/conformance.test.mjs +155 -3
- package/bin/lean/context.test.mjs +7 -6
- package/bin/lean/dag.mjs +128 -0
- package/bin/lean/dag.test.mjs +131 -0
- package/bin/lean/decisions.mjs +5 -4
- package/bin/lean/decisions.test.mjs +11 -0
- package/bin/lean/delguard.mjs +84 -0
- package/bin/lean/delguard.test.mjs +104 -0
- package/bin/lean/depcache.mjs +125 -17
- package/bin/lean/depcache.test.mjs +111 -0
- package/bin/lean/design-gate.mjs +5 -5
- package/bin/lean/design-gate.test.mjs +14 -0
- package/bin/lean/effects.mjs +72 -4
- package/bin/lean/execution.mjs +41 -7
- package/bin/lean/execution.test.mjs +99 -3
- package/bin/lean/forgedock-lane-workflow.test.mjs +35 -0
- package/bin/lean/guardgate.mjs +30 -7
- package/bin/lean/guardgate.test.mjs +44 -1
- package/bin/lean/guards.test.mjs +1 -1
- package/bin/lean/heavy.test.mjs +87 -0
- package/bin/lean/hotarea.mjs +73 -0
- package/bin/lean/hotarea.test.mjs +73 -0
- package/bin/lean/issuewatch-reconcile.mjs +20 -1
- package/bin/lean/issuewatch-reconcile.test.mjs +30 -0
- package/bin/lean/lanecheck.mjs +27 -3
- package/bin/lean/lanecheck.test.mjs +47 -5
- package/bin/lean/laneconfine.mjs +83 -0
- package/bin/lean/laneconfine.test.mjs +113 -0
- package/bin/lean/lean.mjs +376 -79
- package/bin/lean/lean.test.mjs +710 -22
- package/bin/lean/live-reconcile.mjs +169 -0
- package/bin/lean/live-reconcile.test.mjs +176 -0
- package/bin/lean/orchestrate-envhold.test.mjs +245 -0
- package/bin/lean/orchestrate-hostfallback.test.mjs +39 -0
- package/bin/lean/orchestrate.mjs +207 -17
- package/bin/lean/outcomeevidence.mjs +104 -0
- package/bin/lean/outcomeevidence.test.mjs +78 -0
- package/bin/lean/page-capture.mjs +68 -0
- package/bin/lean/page-capture.test.mjs +44 -0
- package/bin/lean/pagegate.mjs +46 -7
- package/bin/lean/pagegate.test.mjs +66 -1
- package/bin/lean/postdeploy-check.mjs +18 -4
- package/bin/lean/postdeploy-check.test.mjs +32 -1
- package/bin/lean/prefilter.mjs +36 -4
- package/bin/lean/prefilter.test.mjs +31 -1
- package/bin/lean/preflight.mjs +22 -0
- package/bin/lean/preflight.test.mjs +19 -1
- package/bin/lean/probe.mjs +18 -0
- package/bin/lean/probe.test.mjs +40 -0
- package/bin/lean/prompts.mjs +40 -3
- package/bin/lean/recovery.test.mjs +20 -0
- package/bin/lean/recurrence.mjs +133 -0
- package/bin/lean/recurrence.test.mjs +99 -0
- package/bin/lean/release-config.mjs +2 -1
- package/bin/lean/release-config.test.mjs +18 -0
- package/bin/lean/release-control.mjs +4 -2
- package/bin/lean/release-control.test.mjs +15 -0
- package/bin/lean/release-merge-hold.mjs +65 -0
- package/bin/lean/release-merge-hold.test.mjs +69 -0
- package/bin/lean/release-review.mjs +26 -9
- package/bin/lean/release-review.test.mjs +53 -0
- package/bin/lean/release-status.mjs +3 -1
- package/bin/lean/release-status.test.mjs +11 -0
- package/bin/lean/release.test.mjs +26 -1
- package/bin/lean/render.mjs +8 -7
- package/bin/lean/routing.mjs +49 -0
- package/bin/lean/routing.test.mjs +54 -1
- package/bin/lean/run-issue-placement.test.mjs +30 -1
- package/bin/lean/sandbox-actions.mjs +121 -0
- package/bin/lean/sandbox-actions.test.mjs +94 -0
- package/bin/lean/sandbox-provider.contract.test.mjs +22 -1
- package/bin/lean/sandbox-remote.mjs +3 -1
- package/bin/lean/schedd-health.mjs +14 -2
- package/bin/lean/schedd-health.test.mjs +13 -0
- package/bin/lean/schedd.mjs +43 -17
- package/bin/lean/schedd.test.mjs +61 -1
- package/bin/lean/toolchain.mjs +16 -6
- package/bin/lean/toolplace.mjs +12 -0
- package/bin/lean/weakguard.mjs +105 -0
- package/bin/lean/weakguard.test.mjs +59 -0
- package/bin/lean/winspawn.mjs +61 -0
- package/bin/lean/winspawn.test.mjs +45 -0
- package/bin/lean/worktree.mjs +3 -1
- package/bin/lean/worktree.test.mjs +11 -0
- package/bin/pool/agent.mjs +210 -14
- package/bin/pool/cache-sweep.mjs +74 -0
- package/bin/pool/cli.mjs +11 -3
- package/bin/pool/docker.mjs +33 -2
- package/bin/pool/health.mjs +38 -0
- package/bin/pool/lane-tools.mjs +23 -4
- package/bin/pool/lane-tools.test.mjs +12 -1
- package/bin/pool/router.mjs +21 -3
- package/bin/runner.mjs +37 -0
- package/bin/splash-scene.mjs +356 -0
- package/bin/win-hide-children.mjs +114 -0
- package/commands/orchestrate.md +18 -27
- package/commands/review-pr-agents/infra.md +1 -0
- package/commands/review-pr-staging.md +2 -2
- package/docs/CONFIG.md +60 -3
- package/docs/OUTCOME-CODES.md +3 -0
- package/package.json +1 -1
- package/plugins/forgedock-splash/.claude-plugin/plugin.json +1 -1
- package/plugins/forgedock-splash/README.md +1 -1
- package/plugins/forgedock-splash/hooks/scene.ts +142 -8
- package/pool/README.md +6 -0
- package/pool/image/entrypoint.sh +1 -0
- package/scripts/check-spec-size.sh +3 -1
- package/scripts/gen-splash-scene.mjs +24 -0
- package/scripts/review-staging-pre.sh +8 -3
- package/scripts/review-staging-pre.test.sh +2 -0
|
@@ -34,6 +34,9 @@ let EMBER = DARK.ember
|
|
|
34
34
|
let WHITE = DARK.hot
|
|
35
35
|
let BG = DARK.bg
|
|
36
36
|
const CLAUDE = '#d97757'
|
|
37
|
+
const HEART = '#ff6f91'
|
|
38
|
+
const STEAM = '#d8d3cb'
|
|
39
|
+
const FLAME_RED = '#c8200a'
|
|
37
40
|
|
|
38
41
|
/** Pick the palette for the terminal's theme (Claude Code's `theme` setting). */
|
|
39
42
|
export function setTheme(light: boolean) {
|
|
@@ -60,6 +63,12 @@ const P = {
|
|
|
60
63
|
crouch: [' ', ' ▐▛███▜▌ ', '▀▀█████▀▀'],
|
|
61
64
|
jump: ['▗▐▀███▀▌▖', ' ▜█████▛ ', ' ▝▘ ▝▘ '],
|
|
62
65
|
cheer: ['▗▐▛███▜▌▖', ' ▜█████▛ ', ' ▘▘ ▝▝ '],
|
|
66
|
+
// one claw up, swinging: a wave hello / goodbye
|
|
67
|
+
waveA: [' ▐▛███▜▌▗', '▝▜█████▛ ', ' ▘▘ ▝▝ '],
|
|
68
|
+
waveB: [' ▐▛███▜▌▝', '▝▜█████▛▖', ' ▘▘ ▝▝ '],
|
|
69
|
+
// dizzy wobble after the bonk
|
|
70
|
+
dizzyL: ['▐▀███▀▌ ', '▜█████▛▘ ', ' ▘▘ ▝▝ '],
|
|
71
|
+
dizzyR: [' ▐▀███▀▌', ' ▝▜█████▛', ' ▘▘ ▝▝ '],
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
// Beats (frame numbers).
|
|
@@ -69,6 +78,7 @@ const LOOK_END = WALK_END + 5 // looks up at the bar
|
|
|
69
78
|
const CROUCH_END = LOOK_END + 2
|
|
70
79
|
const BONK = CROUCH_END + 3 // head meets the bar
|
|
71
80
|
const LAND = BONK + 3
|
|
81
|
+
const DIZZY_END = LAND + 8 // stars circle Clawd's head, then it shakes it off
|
|
72
82
|
const SHINE_END = BONK + 18 // shine ring expands from the impact
|
|
73
83
|
const TYPE_START = BONK + 6
|
|
74
84
|
const TYPE_END = TYPE_START + WORD.length
|
|
@@ -91,9 +101,26 @@ const ramp = (stops: string[], t: number) => {
|
|
|
91
101
|
return mix(stops[i] ?? WHITE, stops[i + 1] ?? WHITE, u - i)
|
|
92
102
|
}
|
|
93
103
|
const easeOut = (t: number) => 1 - (1 - t) * (1 - t)
|
|
104
|
+
// Deterministic flicker noise in [0, 1).
|
|
105
|
+
const noise = (a: number, b: number) => {
|
|
106
|
+
const x = Math.sin(a * 127.1 + b * 311.7) * 43758.5453
|
|
107
|
+
return x - Math.floor(x)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Light comes from the upper left: faces open to the sky catch it, faces open to the floor fall into shade.
|
|
111
|
+
const blank = (r: number, c: number) => (MARK[r]?.[c] ?? ' ') === ' '
|
|
112
|
+
function lit(r: number, c: number, base: string): string {
|
|
113
|
+
const grain = (noise(c * 0.7, r * 3.1) - 0.5) * 0.08 // brushed steel: faint horizontal streaks
|
|
114
|
+
base = mix(base, CHROME[0] ?? WHITE, 0.3) // polished: lift the whole face toward the brightest stop
|
|
115
|
+
let col = grain > 0 ? mix(base, CHROME[0] ?? WHITE, grain) : mix(base, CHROME[3] ?? WHITE, -grain)
|
|
116
|
+
if (blank(r - 1, c)) col = mix(col, CHROME[0] ?? WHITE, 0.55) // top bevel highlight
|
|
117
|
+
else if (blank(r, c - 1)) col = mix(col, CHROME[0] ?? WHITE, 0.3) // left bevel
|
|
118
|
+
if (blank(r + 1, c)) col = mix(col, CHROME[3] ?? WHITE, 0.18) // underside in shade
|
|
119
|
+
return col
|
|
120
|
+
}
|
|
94
121
|
|
|
95
122
|
function markColor(r: number, c: number, f: number): string | null {
|
|
96
|
-
const chrome = ramp(CHROME, c / MW + r * 0.06)
|
|
123
|
+
const chrome = lit(r, c, ramp(CHROME, c / MW + r * 0.06))
|
|
97
124
|
if (f < FORGE + 6) {
|
|
98
125
|
const age = (f / FORGE) * (MW + 6) - r * 0.6 - c
|
|
99
126
|
if (age < 0) return null
|
|
@@ -117,7 +144,72 @@ function markColor(r: number, c: number, f: number): string | null {
|
|
|
117
144
|
if (d < 1.2) return WHITE
|
|
118
145
|
if (d < 3) return mix(WHITE, chrome, (d - 1.2) / 1.8)
|
|
119
146
|
}
|
|
120
|
-
|
|
147
|
+
// Still warm: the underside keeps a faint, slowly breathing ember glow.
|
|
148
|
+
const warm = Math.max(0, (r - 3) / 5) * (0.24 + 0.1 * Math.sin(f / 4 + c / 3))
|
|
149
|
+
const settle = Math.min(1, (f - FORGE - 6) / 8)
|
|
150
|
+
return warm > 0 && settle > 0 ? mix(chrome, EMBER[0] ?? WHITE, warm * settle) : chrome
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
// Upward-facing edges of the F: the blank cell just above each top surface is where flames lick.
|
|
155
|
+
const EDGES: Array<{ r: number; c: number; age0: number }> = []
|
|
156
|
+
MARK.forEach((line, r) => [...line].forEach((ch, c) => {
|
|
157
|
+
if (ch !== ' ' && (r === 0 || (MARK[r - 1]?.[c] ?? ' ') === ' ')) EDGES.push({ r: r - 1, c, age0: r * 0.6 + c })
|
|
158
|
+
}))
|
|
159
|
+
|
|
160
|
+
// How hot the fire is along an edge cell at frame f (0 = none, 1 = roaring).
|
|
161
|
+
function heat(e: { r: number; c: number; age0: number }, f: number): number {
|
|
162
|
+
let h = 0
|
|
163
|
+
if (f < FORGE + 10) {
|
|
164
|
+
const age = (f / FORGE) * (MW + 6) - e.age0 // same front that forges the mark
|
|
165
|
+
if (age > 0) h = age < 6 ? 1 : Math.max(0, 1 - (age - 6) / 10)
|
|
166
|
+
}
|
|
167
|
+
const t = f - BONK
|
|
168
|
+
if (t >= 0 && t < 6) h = Math.max(h, (1 - t / 6) * Math.max(0, 1 - Math.abs(e.c - IMPACT.c) / 7))
|
|
169
|
+
if (f >= FORGE + 10) h = Math.max(h, 0.26) // a low, living flame once settled
|
|
170
|
+
return h
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function fire(f: number, put: (r: number, c: number, cell: Cell) => void) {
|
|
174
|
+
const LV = ['░', '░', '▒', '▒', '▓', '▄']
|
|
175
|
+
for (const e of EDGES) {
|
|
176
|
+
const h = heat(e, f) * (0.55 + 0.45 * noise(e.c, Math.floor(f / 2)))
|
|
177
|
+
if (h < 0.12) continue
|
|
178
|
+
const i = Math.min(LV.length - 1, Math.floor(h * LV.length))
|
|
179
|
+
// deep red at the base of the range, orange through the body, yellow only in the hottest core
|
|
180
|
+
const color = h > 0.95 ? (EMBER[2] ?? WHITE) : ramp([FLAME_RED, EMBER[0] ?? WHITE, EMBER[1] ?? WHITE, EMBER[2] ?? WHITE], h * 0.8)
|
|
181
|
+
put(e.r + TOP, e.c, { ch: LV[i] ?? '▁', color })
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Fresh off the anvil: a puff of quench steam as the metal cools.
|
|
186
|
+
function steam(f: number, put: (r: number, c: number, cell: Cell) => void) {
|
|
187
|
+
const t = f - (FORGE + 3)
|
|
188
|
+
if (t < 0 || t > 12) return
|
|
189
|
+
for (let i = 0; i < 6; i++) {
|
|
190
|
+
const start = i * 1.5
|
|
191
|
+
const a = t - start
|
|
192
|
+
if (a < 0 || a > 7) continue
|
|
193
|
+
const c = 13 + i * 3 + Math.round(Math.sin(a / 1.3 + i) * 1.2)
|
|
194
|
+
const r = TOP - 1 + (a < 3 ? 1 : 0) // hugs the bar, then lifts into the headroom
|
|
195
|
+
put(r, c, { ch: a < 5 ? '~' : '·', color: mix(STEAM, BG, a / 8) })
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Embers drifting up off the mark.
|
|
200
|
+
function embers(f: number, put: (r: number, c: number, cell: Cell) => void) {
|
|
201
|
+
if (f < FORGE + 4) return
|
|
202
|
+
for (let i = 0; i < 9; i++) {
|
|
203
|
+
const period = 16 + (i % 4) * 3
|
|
204
|
+
const a = (f + i * 7) % period
|
|
205
|
+
if (a > 9) continue
|
|
206
|
+
const e = EDGES[Math.floor(noise(i, Math.floor((f + i * 7) / period)) * EDGES.length)]
|
|
207
|
+
if (!e) continue
|
|
208
|
+
const r = e.r + TOP - Math.floor(a / 2)
|
|
209
|
+
const c = e.c + Math.round(Math.sin(a / 2 + i) * 1.4)
|
|
210
|
+
const color = mix(EMBER[1] ?? WHITE, FLAME_RED, a / 9)
|
|
211
|
+
put(r, c, { ch: a < 5 ? '•' : '·', color, bold: a < 5 })
|
|
212
|
+
}
|
|
121
213
|
}
|
|
122
214
|
|
|
123
215
|
function clawd(f: number): { x: number; lift: number; pose: string[] } | null {
|
|
@@ -125,7 +217,8 @@ function clawd(f: number): { x: number; lift: number; pose: string[] } | null {
|
|
|
125
217
|
if (f < WALK_END) {
|
|
126
218
|
const t = (f - FORGE) / (WALK_END - FORGE)
|
|
127
219
|
const x = Math.round(START_X + (CLAWD_X - START_X) * easeOut(t))
|
|
128
|
-
|
|
220
|
+
const step = Math.floor(f / 2) % 2
|
|
221
|
+
return { x, lift: step, pose: step ? P.stepA : P.stepB } // a bouncy trot
|
|
129
222
|
}
|
|
130
223
|
if (f < LOOK_END) return { x: CLAWD_X, lift: 0, pose: P.look }
|
|
131
224
|
if (f < CROUCH_END) return { x: CLAWD_X, lift: 0, pose: P.crouch }
|
|
@@ -133,15 +226,18 @@ function clawd(f: number): { x: number; lift: number; pose: string[] } | null {
|
|
|
133
226
|
if (f === BONK) return { x: CLAWD_X, lift: 2, pose: P.jump }
|
|
134
227
|
if (f < LAND) return { x: CLAWD_X, lift: LAND - f, pose: P.jump }
|
|
135
228
|
if (f === LAND) return { x: CLAWD_X, lift: 0, pose: P.crouch }
|
|
229
|
+
if (f < DIZZY_END) return { x: CLAWD_X, lift: 0, pose: Math.floor((f - LAND) / 2) % 2 ? P.dizzyL : P.dizzyR }
|
|
136
230
|
if (f < HOLD_START) {
|
|
137
|
-
const k = (f -
|
|
231
|
+
const k = (f - DIZZY_END) % 6
|
|
138
232
|
return { x: CLAWD_X, lift: k === 2 || k === 3 ? 1 : 0, pose: P.cheer }
|
|
139
233
|
}
|
|
140
|
-
|
|
234
|
+
if (f >= FADE_START) return { x: CLAWD_X, lift: 0, pose: Math.floor(f / 2) % 2 ? P.waveA : P.waveB } // bye!
|
|
235
|
+
// Idle: glance at the wordmark, wave hello, a happy hop, then a blink.
|
|
141
236
|
const k = f - HOLD_START
|
|
142
|
-
if (k >=
|
|
143
|
-
if (k >=
|
|
144
|
-
return { x: CLAWD_X, lift:
|
|
237
|
+
if (k >= 2 && k < 9) return { x: CLAWD_X, lift: 0, pose: P.side }
|
|
238
|
+
if (k >= 10 && k < 20) return { x: CLAWD_X, lift: 0, pose: Math.floor(k / 2) % 2 ? P.waveA : P.waveB }
|
|
239
|
+
if (k >= 21 && k < 25) return { x: CLAWD_X, lift: k === 22 || k === 23 ? 1 : 0, pose: P.cheer }
|
|
240
|
+
return { x: CLAWD_X, lift: 0, pose: k === 27 || k === 28 ? P.blink : P.stand }
|
|
145
241
|
}
|
|
146
242
|
|
|
147
243
|
// Sparks thrown from the impact: analytic paths with a little gravity.
|
|
@@ -161,6 +257,29 @@ function sparks(f: number, put: (r: number, c: number, cell: Cell) => void) {
|
|
|
161
257
|
}
|
|
162
258
|
}
|
|
163
259
|
|
|
260
|
+
// Little extras that make Clawd feel alive: a "!" when it spots the bar, dizzy stars, floating hearts.
|
|
261
|
+
function cute(f: number, put: (r: number, c: number, cell: Cell, over?: boolean) => void) {
|
|
262
|
+
const head = H - 4 // the row just above Clawd's head when standing
|
|
263
|
+
if (f >= WALK_END && f < LOOK_END) put(head, CLAWD_X + 4, { ch: '!', color: EMBER[2] ?? WHITE, bold: true }, true)
|
|
264
|
+
if (f > LAND && f < DIZZY_END) {
|
|
265
|
+
const a = (f - LAND) * 1.1
|
|
266
|
+
for (const off of [0, Math.PI]) {
|
|
267
|
+
const c = Math.round(CLAWD_X + 4 + Math.cos(a + off) * 3.5)
|
|
268
|
+
put(head - (Math.sin(a + off) > 0.3 ? 1 : 0), c, { ch: '*', color: EMBER[2] ?? WHITE, bold: true }, true)
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
// hearts float up and wobble out from Clawd while it cheers and waves
|
|
272
|
+
for (let i = 0; i < 6; i++) {
|
|
273
|
+
const born = DIZZY_END + 1 + i * 5
|
|
274
|
+
const age = f - born
|
|
275
|
+
if (age < 0 || age > 7 || born >= FADE_START) continue
|
|
276
|
+
const r = head - Math.floor(age * 0.7)
|
|
277
|
+
const c = CLAWD_X + 7 + (i % 2) + Math.round(Math.sin(age / 1.4 + i))
|
|
278
|
+
const color = mix(HEART, BG, Math.max(0, (age - 4) / 4))
|
|
279
|
+
put(r, c, { ch: age < 6 ? '♥' : '·', color, bold: age < 3 })
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
164
283
|
export function scene(f: number): Run[][] {
|
|
165
284
|
const grid: Cell[][] = Array.from({ length: H }, () => Array.from({ length: CW }, () => ({ ch: ' ' })))
|
|
166
285
|
const put = (r: number, c: number, cell: Cell, over = false) => {
|
|
@@ -178,6 +297,17 @@ export function scene(f: number): Run[][] {
|
|
|
178
297
|
}),
|
|
179
298
|
)
|
|
180
299
|
|
|
300
|
+
// 2.5D depth: each forged cell casts a solid face to its right and below (light from the upper left).
|
|
301
|
+
const depth = mix(CHROME[3] ?? WHITE, BG, 0.3)
|
|
302
|
+
MARK.forEach((line, r) =>
|
|
303
|
+
[...line].forEach((ch, c) => {
|
|
304
|
+
if (ch === ' ' || !markColor(r, c, f)) return
|
|
305
|
+
const face = f < FORGE + 6 ? mix(EMBER[0] ?? WHITE, BG, 0.5) : depth
|
|
306
|
+
if (blank(r, c + 1)) put(r + TOP, c + 1, { ch: '▌', color: face })
|
|
307
|
+
if (blank(r + 1, c) && (ch === '█' || ch === '▄')) put(r + TOP + 1, c + 1, { ch: '▀', color: face })
|
|
308
|
+
}),
|
|
309
|
+
)
|
|
310
|
+
|
|
181
311
|
// Wordmark block: letters land white-hot and cool to ember.
|
|
182
312
|
if (f >= TYPE_START) {
|
|
183
313
|
const n = Math.min(WORD.length, f - TYPE_START + 1)
|
|
@@ -202,7 +332,11 @@ export function scene(f: number): Run[][] {
|
|
|
202
332
|
}),
|
|
203
333
|
)
|
|
204
334
|
}
|
|
335
|
+
fire(f, put)
|
|
336
|
+
steam(f, put)
|
|
205
337
|
sparks(f, put)
|
|
338
|
+
embers(f, put)
|
|
339
|
+
cute(f, put)
|
|
206
340
|
|
|
207
341
|
// Fade everything to the background over the last beat.
|
|
208
342
|
const fade = f >= FADE_START ? (f - FADE_START + 1) / (LAST - FADE_START + 1) : 0
|
package/pool/README.md
CHANGED
|
@@ -15,6 +15,12 @@ Claude login choice (#5165): among the router host's logins with 30+ minutes lef
|
|
|
15
15
|
|
|
16
16
|
Disk reporting (#5535, all fields optional; absent from an old agent means unknown): the agent's `GET /capacity` carries `disk_free_gb` (free space under its state dir) and `sandbox_disk_mb` (`{sandbox id: MB}`, refreshed at most every 60s). The router's `GET /agents` passes `disk_free_gb` through in `agents[]` and adds `disk_used_mb` to each `sandboxes[id]`. `forgedock gc` prints the disk used per pool entry (`unknown` when absent) and `forgedock doctor` shows each agent's free disk, warning below `hygiene.min_free_gb`.
|
|
17
17
|
|
|
18
|
+
Host-disk admission (#5733, WSL agents only): on WSL the lane disk is a vhdx that grows on the Windows drive, which `disk_free_gb` (statfs inside the VM) cannot see. A WSL agent's `GET /capacity` and `GET /health` also carry `host_disk_free_gb` (free GB on the drive behind the distro: agent config `host_disk_path` when set, else the drive of the distro's `BasePath` under `HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss`, else `/mnt/c`; read at most every 60s) and `host_disk_low`. Non-WSL agents, or a drive that cannot be read, report neither field and apply no gate. A launch is refused with 503 `code: pool.disk_low` (`host_disk_free_gb`, `floor_gb`, `Retry-After`) before anything starts when free space is below `min_host_disk_free_gb` (default 25) or when free minus `sandbox_disk_growth_gb` (default 3.5) × (running sandboxes + 1) is below it; `host_disk_low` uses the same test. Warm sandboxes launch through the same gate. The router skips agents reporting `host_disk_low` without posting to them; when that leaves no host it answers 503 `code: pool.disk_low` (`agents` = the skipped hosts). Both use `disk_low_retry_after_s` (default 300) for `Retry-After`, and the lane treats the 503 as a capacity deferral (`SANDBOX_CAPACITY`), not a failure.
|
|
19
|
+
|
|
18
20
|
The `forgedock pool` CLI wiring is tracked separately (#4544).
|
|
19
21
|
|
|
20
22
|
Per-repo lane tools (#5650): forge.yaml `execution.lane_tools` (`name` or `name@version`) rides in the launch spec as `lane_tools`. The agent resolves the image in `launch` (`bin/pool/lane-tools.mjs`): no tools keeps the base `forgedock-lane:<version>`; otherwise it uses `<base>-t<sha256 of the sorted list, 12 hex>`, building it once `FROM` the base with one recipe per tool (warm sandboxes keep `lane_tools` in their stored spec, so they use the same image). A tool with no recipe fails before any build (`lane_tools.unknown_recipe`, naming the tool and the known recipes); a failed or timed-out build is `lane_tools.build_failed` and the launch records the error. To add a recipe, add an entry to `RECIPES` in `bin/pool/lane-tools.mjs`: `{versioned, steps(version) -> Dockerfile instructions}` for the Debian/Ubuntu lane image; tool names appear nowhere else.
|
|
23
|
+
|
|
24
|
+
Priority and reservations (#5856): a host's leftover compute can run lanes while its own workload keeps priority. Agent config `agent.json`: `reservations: [{"name":"marcode","cpus":10,"mem_gb":20}]`, `idle_only: true` (for a box with no reservations: borrow lanes run only while owner load and free memory are above the floor). Sandboxes carry `spec.priority` (`reserved` with `spec.reservation`, `normal`, `borrow`; lanes are `borrow`). Admission: reserved is always admitted up to its reservation (borrowed lanes are throttled via `--cpu-shares`, then SIGTERMed with `drain_grace_s`, and rescheduled by the dispatcher); borrow may use reserved-but-idle capacity; normal stays outside reservations. `/capacity` adds `cpus_free_unreserved`, `cpus_borrowable` and `reservations[]` so the router prefers hosts with free non-reserved capacity. Run one agent per docker daemon (a second agent would reap the first one's sandboxes).
|
|
25
|
+
|
|
26
|
+
Tunnel-only hosts (no Tailscale): `forgedock pool enroll --agent-url http://127.0.0.1:<port> [--cpus N --mem GB]` prints `AGENT_URL=... pool/install/install-agent-linux.sh --router ... --token CODE`; the router then reaches the agent at that URL (for example a reverse SSH tunnel).
|
package/pool/image/entrypoint.sh
CHANGED
|
@@ -13,6 +13,7 @@ if [ -n "${CS_WORK_DIR:-}" ]; then
|
|
|
13
13
|
rm -rf /work
|
|
14
14
|
ln -s "$CS_WORK_DIR" /work
|
|
15
15
|
fi
|
|
16
|
+
date +%s > /cache/.last-used 2>/dev/null || true # #5757: the agent evicts cache volumes idle for cache_idle_days
|
|
16
17
|
exec > >(tee -a /csout/lane.log) 2>&1
|
|
17
18
|
|
|
18
19
|
export HOME=/root
|
|
@@ -29,7 +29,9 @@ BASE="${1:-${BASE_REF:-origin/staging}}"
|
|
|
29
29
|
PCT_NUM=2 # 2%
|
|
30
30
|
ABS_MAX=4096 # bytes; also the size cap for a new spec
|
|
31
31
|
# Per-file hard ceilings, one path:max_bytes per line (a spec converted to a script stub stays small).
|
|
32
|
-
|
|
32
|
+
# #5824: orchestrate.md capped at its size before the DAG moved to code (bin/lean/dag.mjs): it never regrows past it.
|
|
33
|
+
CEILINGS="commands/issue.md:15360
|
|
34
|
+
commands/orchestrate.md:17399"
|
|
33
35
|
|
|
34
36
|
SUMMARY="${GITHUB_STEP_SUMMARY:-/dev/stdout}"
|
|
35
37
|
out() { printf '%s\n' "$*" >> "$SUMMARY"; }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios
|
|
3
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
4
|
+
// Regenerate bin/splash-scene.mjs from the plugin's scene.ts (types stripped). The installer plays this copy:
|
|
5
|
+
// Node refuses to strip types under node_modules, and engines allows Node 18. Needs Node >= 22.13 to run.
|
|
6
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { stripTypeScriptTypes } from "node:module";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const root = (p) => fileURLToPath(new URL(`../${p}`, import.meta.url));
|
|
11
|
+
const src = readFileSync(root("plugins/forgedock-splash/hooks/scene.ts"), "utf8");
|
|
12
|
+
const body = stripTypeScriptTypes(src, { mode: "strip" })
|
|
13
|
+
.replace(/^\/\/ SPDX[^\n]*\n\/\/ SPDX[^\n]*\n/, "")
|
|
14
|
+
.split("\n").map((l) => l.trimEnd()).join("\n")
|
|
15
|
+
.replace(/\n{3,}/g, "\n\n");
|
|
16
|
+
writeFileSync(root("bin/splash-scene.mjs"), [
|
|
17
|
+
"// SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios",
|
|
18
|
+
"// SPDX-License-Identifier: AGPL-3.0-or-later",
|
|
19
|
+
"// GENERATED from plugins/forgedock-splash/hooks/scene.ts (types stripped) so `npx forgedock` can play the",
|
|
20
|
+
"// startup-splash scene on any supported Node, including from node_modules where Node refuses to strip types.",
|
|
21
|
+
"// Do not edit by hand: change scene.ts, then run: node scripts/gen-splash-scene.mjs",
|
|
22
|
+
"// bin/tests/splash-scene-parity.test.mjs fails if the two drift.",
|
|
23
|
+
body,
|
|
24
|
+
].join("\n"));
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# gh read blocks (TYPE=gate-read-failure, never waived by an override): no GATE_PASS without real reads (forge#4470).
|
|
15
15
|
# scope 0B.1: writes DIR/<N>_scope.env (printf %q, read by 7A), DIR/<N>_bundle-pr-files.txt and DIR/<N>_scope.json
|
|
16
16
|
# {scope_mode, reviewed_pr_count, reviewed_commits, unreviewed_commits, unreviewed_files, cross_pr_files,
|
|
17
|
-
# deploy_wiring_files, degraded_prs}; prints the one-line SCOPE_MODE summary. Per-PR reads run FORGE_SCOPE_PARALLELISM (default 8) at a time
|
|
17
|
+
# deploy_wiring_files, degraded_prs, ci_net}; prints the one-line SCOPE_MODE summary and the CI_NET line (forge#5760). Per-PR reads run FORGE_SCOPE_PARALLELISM (default 8) at a time
|
|
18
18
|
# and retry; a PR whose read still fails is degraded (its commits stay unreviewed) and the rest stay scoped. Global failures widen to full.
|
|
19
19
|
# Exit: 2 on a usage error.
|
|
20
20
|
#
|
|
@@ -454,15 +454,20 @@ fi
|
|
|
454
454
|
# Deploy/runtime readiness files are always in scope: migrations, env, workflows, compose/infra, dependency manifests.
|
|
455
455
|
_DW=$(git diff origin/$DEFAULT_BRANCH...origin/$STAGING_BRANCH --name-only) || { SCOPE_MODE=full; _DW=""; }
|
|
456
456
|
DEPLOY_WIRING_FILES=$(printf '%s\n' "$_DW" | grep -E '(^|/)(migrations?/|\.github/workflows/|infra/|deploy/|docker-compose[^/]*\.ya?ml$|\.env[^/]*$|Dockerfile[^/]*$|package(-lock)?\.json$|pnpm-lock\.yaml$|yarn\.lock$|requirements[^/]*\.txt$|pyproject\.toml$|poetry\.lock$|go\.(mod|sum)$|Cargo\.(toml|lock)$)' || true)
|
|
457
|
+
# forge#5760: the bundle's net CI change (workflows, jobs, annotated minutes); fail-soft, never blocks the scope step.
|
|
458
|
+
_CIG="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." 2>/dev/null && pwd -P)/bin/lean/ci-gate.mjs"
|
|
459
|
+
CI_NET=$( [ -f "$_CIG" ] && node "$_CIG" net --base "origin/$DEFAULT_BRANCH" --head "origin/$STAGING_BRANCH" 2>/dev/null | grep '^CI_NET:' | head -n 1 )
|
|
460
|
+
[ -n "$CI_NET" ] || CI_NET="CI_NET: unknown (ci-gate not runnable)"
|
|
457
461
|
# Persist the results for 7A (a later Bash call is a fresh shell). %q keeps multi-line file lists intact.
|
|
458
462
|
printf 'SCOPE_MODE=%q\nCROSS_PR_FILES=%q\nUNREVIEWED_FILES=%q\nDEPLOY_WIRING_FILES=%q\n' "$SCOPE_MODE" "${CROSS_PR_FILES:-}" "${UNREVIEWED_FILES:-}" "${DEPLOY_WIRING_FILES:-}" > "$_SD/${PR_NUMBER}_scope.env"
|
|
459
463
|
echo "SCOPE_MODE=$SCOPE_MODE reviewed_prs=$REVIEWED_PR_COUNT unreviewed_commits=$(echo $UNREVIEWED_COMMITS | wc -w) unreviewed_files=$(echo "$UNREVIEWED_FILES" | grep -c .) cross_pr_files=$(echo "$CROSS_PR_FILES" | grep -c .)"
|
|
464
|
+
echo "$CI_NET"
|
|
460
465
|
# JSON twin of scope.env for the CLI: commit lists are space separated, file lists newline separated.
|
|
461
466
|
_jw() { printf '%s\n' "${1:-}" | tr ' ' '\n' | sed '/^$/d' | jq -R . | jq -s .; }
|
|
462
467
|
_jn() { printf '%s\n' "${1:-}" | sed '/^$/d' | jq -R . | jq -s .; }
|
|
463
468
|
jq -n --arg mode "$SCOPE_MODE" --argjson n "${REVIEWED_PR_COUNT:-0}" \
|
|
464
469
|
--argjson rc "$(_jw "$REVIEWED_COMMITS")" --argjson uc "$(_jw "$UNREVIEWED_COMMITS")" \
|
|
465
|
-
--argjson uf "$(_jn "${UNREVIEWED_FILES:-}")" --argjson cf "$(_jn "${CROSS_PR_FILES:-}")" --argjson dw "$(_jn "${DEPLOY_WIRING_FILES:-}")" --argjson dp "$(_jw "$DEGRADED_PRS" | jq -c "map(tonumber)")" \
|
|
466
|
-
'{scope_mode: $mode, reviewed_pr_count: $n, reviewed_commits: $rc, unreviewed_commits: $uc, unreviewed_files: $uf, cross_pr_files: $cf, deploy_wiring_files: $dw, degraded_prs: $dp}' \
|
|
470
|
+
--argjson uf "$(_jn "${UNREVIEWED_FILES:-}")" --argjson cf "$(_jn "${CROSS_PR_FILES:-}")" --argjson dw "$(_jn "${DEPLOY_WIRING_FILES:-}")" --argjson dp "$(_jw "$DEGRADED_PRS" | jq -c "map(tonumber)")" --arg cinet "$CI_NET" \
|
|
471
|
+
'{scope_mode: $mode, reviewed_pr_count: $n, reviewed_commits: $rc, unreviewed_commits: $uc, unreviewed_files: $uf, cross_pr_files: $cf, deploy_wiring_files: $dw, degraded_prs: $dp, ci_net: $cinet}' \
|
|
467
472
|
> "$_SD/${PR_NUMBER}_scope.json" || { echo "review-staging-pre: could not write ${PR_NUMBER}_scope.json" >&2; exit 1; }
|
|
468
473
|
exit 0
|
|
@@ -170,6 +170,8 @@ jq -e '.deploy_wiring_files | index(".github/workflows/ci.yml")' "$J" >/dev/null
|
|
|
170
170
|
jq -e '.reviewed_pr_count == 1' "$J" >/dev/null 2>&1 && ok || bad "reviewed_pr_count must be 1"
|
|
171
171
|
grep -q '^SCOPE_MODE=scoped$' "$TMP/sd/9_scope.env" && grep -q '^5 a.js$' "$TMP/sd/9_bundle-pr-files.txt" && ok || bad "scope.env and bundle-pr-files.txt keep the spec's format"
|
|
172
172
|
case "$OUT" in *"SCOPE_MODE=scoped reviewed_prs=1"*) ok ;; *) bad "scope must print the one-line summary" ;; esac
|
|
173
|
+
case "$OUT" in *"CI_NET: workflows "*) ok ;; *) bad "scope must print the CI_NET line (forge#5760; got $OUT)" ;; esac
|
|
174
|
+
jq -e '.ci_net | startswith("CI_NET: workflows ")' "$J" >/dev/null 2>&1 && ok || bad "scope.json must carry ci_net (got $(jq -c .ci_net "$J" 2>/dev/null))"
|
|
173
175
|
newfix scopefail
|
|
174
176
|
run scope --repo o/r --default main --staging staging --pr 9 --prs-file "$TMP/prs" --sd "$TMP/sd" >/dev/null 2>&1
|
|
175
177
|
J="$TMP/sd/9_scope.json"
|