@xn-intenton-z2a/agentic-lib 7.4.21 → 7.4.23
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.
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (C) 2025-2026 Polycode Limited
|
|
3
|
+
# .github/workflows/agentic-lib-flow.yml
|
|
4
|
+
#
|
|
5
|
+
# Uber workflow: runs the full pipeline end-to-end.
|
|
6
|
+
# Pattern: update → init → (test + bot + N×workflow) × 4 → test + bot → verify → report
|
|
7
|
+
# Each sub-workflow dispatches at HEAD of main at dispatch time (not at uber job start).
|
|
8
|
+
# Mission-complete/failed checks before each workflow run to skip remaining iterations.
|
|
9
|
+
|
|
10
|
+
name: agentic-lib-flow
|
|
11
|
+
run-name: "agentic-lib-flow [${{ github.ref_name }}] ${{ inputs.mission-seed }} (${{ inputs.workflow-runs }} runs)"
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
inputs:
|
|
16
|
+
mode:
|
|
17
|
+
description: "Init mode (update/reseed/purge/skip)"
|
|
18
|
+
type: choice
|
|
19
|
+
required: false
|
|
20
|
+
default: "purge"
|
|
21
|
+
options:
|
|
22
|
+
- skip
|
|
23
|
+
- update
|
|
24
|
+
- reseed
|
|
25
|
+
- purge
|
|
26
|
+
mission-seed:
|
|
27
|
+
description: "Mission seed name (purge/reseed only)"
|
|
28
|
+
type: choice
|
|
29
|
+
required: false
|
|
30
|
+
default: "7-kyu-understand-fizz-buzz"
|
|
31
|
+
options:
|
|
32
|
+
- 8-kyu-remember-empty
|
|
33
|
+
- 8-kyu-remember-hello-world
|
|
34
|
+
- 7-kyu-understand-fizz-buzz
|
|
35
|
+
- 6-kyu-understand-hamming-distance
|
|
36
|
+
- 6-kyu-understand-roman-numerals
|
|
37
|
+
- 5-kyu-apply-ascii-face
|
|
38
|
+
- 5-kyu-apply-string-utils
|
|
39
|
+
- 4-kyu-apply-cron-engine
|
|
40
|
+
- 4-kyu-apply-dense-encoding
|
|
41
|
+
- 4-kyu-analyze-json-schema-diff
|
|
42
|
+
- 4-kyu-apply-owl-ontology
|
|
43
|
+
- 3-kyu-analyze-lunar-lander
|
|
44
|
+
- 3-kyu-evaluate-time-series-lab
|
|
45
|
+
- 2-kyu-create-markdown-compiler
|
|
46
|
+
- 2-kyu-create-plot-code-lib
|
|
47
|
+
- 1-kyu-create-ray-tracer
|
|
48
|
+
- 1-dan-create-c64-emulator
|
|
49
|
+
- 1-dan-create-planning-engine
|
|
50
|
+
- 2-dan-create-self-hosted
|
|
51
|
+
model:
|
|
52
|
+
description: "Copilot SDK model"
|
|
53
|
+
type: choice
|
|
54
|
+
required: false
|
|
55
|
+
default: "gpt-5-mini"
|
|
56
|
+
options:
|
|
57
|
+
- gpt-5-mini
|
|
58
|
+
- claude-sonnet-4
|
|
59
|
+
- gpt-4.1
|
|
60
|
+
profile:
|
|
61
|
+
description: "Tuning profile"
|
|
62
|
+
type: choice
|
|
63
|
+
required: false
|
|
64
|
+
default: "max"
|
|
65
|
+
options:
|
|
66
|
+
- min
|
|
67
|
+
- recommended
|
|
68
|
+
- max
|
|
69
|
+
workflow-runs:
|
|
70
|
+
description: "Number of workflow iterations (1-16)"
|
|
71
|
+
type: choice
|
|
72
|
+
required: false
|
|
73
|
+
default: "4"
|
|
74
|
+
options:
|
|
75
|
+
- "1"
|
|
76
|
+
- "2"
|
|
77
|
+
- "4"
|
|
78
|
+
- "8"
|
|
79
|
+
- "12"
|
|
80
|
+
- "16"
|
|
81
|
+
schedule:
|
|
82
|
+
description: "Supervisor schedule after flow"
|
|
83
|
+
type: choice
|
|
84
|
+
required: false
|
|
85
|
+
default: "off"
|
|
86
|
+
options:
|
|
87
|
+
- "off"
|
|
88
|
+
- "weekly"
|
|
89
|
+
- "daily"
|
|
90
|
+
- "hourly"
|
|
91
|
+
|
|
92
|
+
permissions: write-all
|
|
93
|
+
|
|
94
|
+
jobs:
|
|
95
|
+
# ── Phase 0: Update agentic-lib package ────────────────────────────
|
|
96
|
+
update:
|
|
97
|
+
if: inputs.mode != 'skip'
|
|
98
|
+
uses: ./.github/workflows/agentic-lib-update.yml
|
|
99
|
+
secrets: inherit
|
|
100
|
+
|
|
101
|
+
# ── Phase 0b: Init (purge/reseed/update) ───────────────────────────
|
|
102
|
+
init:
|
|
103
|
+
needs: [update]
|
|
104
|
+
if: always() && inputs.mode != 'skip' && (needs.update.result == 'success' || needs.update.result == 'skipped')
|
|
105
|
+
uses: ./.github/workflows/agentic-lib-init.yml
|
|
106
|
+
with:
|
|
107
|
+
mode: ${{ inputs.mode }}
|
|
108
|
+
mission-seed: ${{ inputs.mission-seed }}
|
|
109
|
+
model: ${{ inputs.model }}
|
|
110
|
+
profile: ${{ inputs.profile }}
|
|
111
|
+
schedule: ${{ inputs.schedule }}
|
|
112
|
+
secrets: inherit
|
|
113
|
+
|
|
114
|
+
# ── Round 1: test + bot + up to 4 workflow runs ────────────────────
|
|
115
|
+
test-1:
|
|
116
|
+
needs: [init]
|
|
117
|
+
if: always() && (needs.init.result == 'success' || needs.init.result == 'skipped')
|
|
118
|
+
uses: ./.github/workflows/agentic-lib-test.yml
|
|
119
|
+
secrets: inherit
|
|
120
|
+
|
|
121
|
+
bot-1:
|
|
122
|
+
needs: [test-1]
|
|
123
|
+
if: always() && needs.test-1.result == 'success'
|
|
124
|
+
uses: ./.github/workflows/agentic-lib-bot.yml
|
|
125
|
+
secrets: inherit
|
|
126
|
+
|
|
127
|
+
check-1:
|
|
128
|
+
needs: [bot-1]
|
|
129
|
+
if: always() && needs.bot-1.result == 'success' && inputs.workflow-runs >= 1
|
|
130
|
+
runs-on: ubuntu-latest
|
|
131
|
+
outputs:
|
|
132
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
133
|
+
steps:
|
|
134
|
+
- uses: actions/checkout@v6
|
|
135
|
+
with:
|
|
136
|
+
ref: main
|
|
137
|
+
fetch-depth: 1
|
|
138
|
+
- id: check
|
|
139
|
+
run: |
|
|
140
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
141
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
142
|
+
echo "Mission is over — skipping remaining workflow runs"
|
|
143
|
+
else
|
|
144
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
workflow-1:
|
|
148
|
+
needs: [check-1]
|
|
149
|
+
if: always() && needs.check-1.result == 'success' && needs.check-1.outputs.mission-over != 'true' && inputs.workflow-runs >= 1
|
|
150
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
151
|
+
secrets: inherit
|
|
152
|
+
|
|
153
|
+
check-2:
|
|
154
|
+
needs: [workflow-1]
|
|
155
|
+
if: always() && needs.workflow-1.result == 'success' && inputs.workflow-runs >= 2
|
|
156
|
+
runs-on: ubuntu-latest
|
|
157
|
+
outputs:
|
|
158
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
159
|
+
steps:
|
|
160
|
+
- uses: actions/checkout@v6
|
|
161
|
+
with:
|
|
162
|
+
ref: main
|
|
163
|
+
fetch-depth: 1
|
|
164
|
+
- id: check
|
|
165
|
+
run: |
|
|
166
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
167
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
168
|
+
else
|
|
169
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
workflow-2:
|
|
173
|
+
needs: [check-2]
|
|
174
|
+
if: always() && needs.check-2.result == 'success' && needs.check-2.outputs.mission-over != 'true' && inputs.workflow-runs >= 2
|
|
175
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
176
|
+
secrets: inherit
|
|
177
|
+
|
|
178
|
+
check-3:
|
|
179
|
+
needs: [workflow-2]
|
|
180
|
+
if: always() && needs.workflow-2.result == 'success' && inputs.workflow-runs >= 3
|
|
181
|
+
runs-on: ubuntu-latest
|
|
182
|
+
outputs:
|
|
183
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
184
|
+
steps:
|
|
185
|
+
- uses: actions/checkout@v6
|
|
186
|
+
with:
|
|
187
|
+
ref: main
|
|
188
|
+
fetch-depth: 1
|
|
189
|
+
- id: check
|
|
190
|
+
run: |
|
|
191
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
192
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
193
|
+
else
|
|
194
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
195
|
+
fi
|
|
196
|
+
|
|
197
|
+
workflow-3:
|
|
198
|
+
needs: [check-3]
|
|
199
|
+
if: always() && needs.check-3.result == 'success' && needs.check-3.outputs.mission-over != 'true' && inputs.workflow-runs >= 3
|
|
200
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
201
|
+
secrets: inherit
|
|
202
|
+
|
|
203
|
+
check-4:
|
|
204
|
+
needs: [workflow-3]
|
|
205
|
+
if: always() && needs.workflow-3.result == 'success' && inputs.workflow-runs >= 4
|
|
206
|
+
runs-on: ubuntu-latest
|
|
207
|
+
outputs:
|
|
208
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
209
|
+
steps:
|
|
210
|
+
- uses: actions/checkout@v6
|
|
211
|
+
with:
|
|
212
|
+
ref: main
|
|
213
|
+
fetch-depth: 1
|
|
214
|
+
- id: check
|
|
215
|
+
run: |
|
|
216
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
217
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
218
|
+
else
|
|
219
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
220
|
+
fi
|
|
221
|
+
|
|
222
|
+
workflow-4:
|
|
223
|
+
needs: [check-4]
|
|
224
|
+
if: always() && needs.check-4.result == 'success' && needs.check-4.outputs.mission-over != 'true' && inputs.workflow-runs >= 4
|
|
225
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
226
|
+
secrets: inherit
|
|
227
|
+
|
|
228
|
+
# ── Round 2: test + bot + up to 4 more workflow runs ───────────────
|
|
229
|
+
test-2:
|
|
230
|
+
needs: [workflow-4]
|
|
231
|
+
if: always() && inputs.workflow-runs >= 5 && (needs.workflow-4.result == 'success' || needs.workflow-4.result == 'skipped')
|
|
232
|
+
uses: ./.github/workflows/agentic-lib-test.yml
|
|
233
|
+
secrets: inherit
|
|
234
|
+
|
|
235
|
+
bot-2:
|
|
236
|
+
needs: [test-2]
|
|
237
|
+
if: always() && needs.test-2.result == 'success'
|
|
238
|
+
uses: ./.github/workflows/agentic-lib-bot.yml
|
|
239
|
+
secrets: inherit
|
|
240
|
+
|
|
241
|
+
check-5:
|
|
242
|
+
needs: [bot-2]
|
|
243
|
+
if: always() && needs.bot-2.result == 'success' && inputs.workflow-runs >= 5
|
|
244
|
+
runs-on: ubuntu-latest
|
|
245
|
+
outputs:
|
|
246
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
247
|
+
steps:
|
|
248
|
+
- uses: actions/checkout@v6
|
|
249
|
+
with:
|
|
250
|
+
ref: main
|
|
251
|
+
fetch-depth: 1
|
|
252
|
+
- id: check
|
|
253
|
+
run: |
|
|
254
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
255
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
256
|
+
else
|
|
257
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
258
|
+
fi
|
|
259
|
+
|
|
260
|
+
workflow-5:
|
|
261
|
+
needs: [check-5]
|
|
262
|
+
if: always() && needs.check-5.result == 'success' && needs.check-5.outputs.mission-over != 'true' && inputs.workflow-runs >= 5
|
|
263
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
264
|
+
secrets: inherit
|
|
265
|
+
|
|
266
|
+
check-6:
|
|
267
|
+
needs: [workflow-5]
|
|
268
|
+
if: always() && needs.workflow-5.result == 'success' && inputs.workflow-runs >= 6
|
|
269
|
+
runs-on: ubuntu-latest
|
|
270
|
+
outputs:
|
|
271
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
272
|
+
steps:
|
|
273
|
+
- uses: actions/checkout@v6
|
|
274
|
+
with:
|
|
275
|
+
ref: main
|
|
276
|
+
fetch-depth: 1
|
|
277
|
+
- id: check
|
|
278
|
+
run: |
|
|
279
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
280
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
281
|
+
else
|
|
282
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
283
|
+
fi
|
|
284
|
+
|
|
285
|
+
workflow-6:
|
|
286
|
+
needs: [check-6]
|
|
287
|
+
if: always() && needs.check-6.result == 'success' && needs.check-6.outputs.mission-over != 'true' && inputs.workflow-runs >= 6
|
|
288
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
289
|
+
secrets: inherit
|
|
290
|
+
|
|
291
|
+
check-7:
|
|
292
|
+
needs: [workflow-6]
|
|
293
|
+
if: always() && needs.workflow-6.result == 'success' && inputs.workflow-runs >= 7
|
|
294
|
+
runs-on: ubuntu-latest
|
|
295
|
+
outputs:
|
|
296
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
297
|
+
steps:
|
|
298
|
+
- uses: actions/checkout@v6
|
|
299
|
+
with:
|
|
300
|
+
ref: main
|
|
301
|
+
fetch-depth: 1
|
|
302
|
+
- id: check
|
|
303
|
+
run: |
|
|
304
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
305
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
306
|
+
else
|
|
307
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
308
|
+
fi
|
|
309
|
+
|
|
310
|
+
workflow-7:
|
|
311
|
+
needs: [check-7]
|
|
312
|
+
if: always() && needs.check-7.result == 'success' && needs.check-7.outputs.mission-over != 'true' && inputs.workflow-runs >= 7
|
|
313
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
314
|
+
secrets: inherit
|
|
315
|
+
|
|
316
|
+
check-8:
|
|
317
|
+
needs: [workflow-7]
|
|
318
|
+
if: always() && needs.workflow-7.result == 'success' && inputs.workflow-runs >= 8
|
|
319
|
+
runs-on: ubuntu-latest
|
|
320
|
+
outputs:
|
|
321
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
322
|
+
steps:
|
|
323
|
+
- uses: actions/checkout@v6
|
|
324
|
+
with:
|
|
325
|
+
ref: main
|
|
326
|
+
fetch-depth: 1
|
|
327
|
+
- id: check
|
|
328
|
+
run: |
|
|
329
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
330
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
331
|
+
else
|
|
332
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
333
|
+
fi
|
|
334
|
+
|
|
335
|
+
workflow-8:
|
|
336
|
+
needs: [check-8]
|
|
337
|
+
if: always() && needs.check-8.result == 'success' && needs.check-8.outputs.mission-over != 'true' && inputs.workflow-runs >= 8
|
|
338
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
339
|
+
secrets: inherit
|
|
340
|
+
|
|
341
|
+
# ── Round 3: test + bot + up to 4 more workflow runs ───────────────
|
|
342
|
+
test-3:
|
|
343
|
+
needs: [workflow-8]
|
|
344
|
+
if: always() && inputs.workflow-runs >= 9 && (needs.workflow-8.result == 'success' || needs.workflow-8.result == 'skipped')
|
|
345
|
+
uses: ./.github/workflows/agentic-lib-test.yml
|
|
346
|
+
secrets: inherit
|
|
347
|
+
|
|
348
|
+
bot-3:
|
|
349
|
+
needs: [test-3]
|
|
350
|
+
if: always() && needs.test-3.result == 'success'
|
|
351
|
+
uses: ./.github/workflows/agentic-lib-bot.yml
|
|
352
|
+
secrets: inherit
|
|
353
|
+
|
|
354
|
+
check-9:
|
|
355
|
+
needs: [bot-3]
|
|
356
|
+
if: always() && needs.bot-3.result == 'success' && inputs.workflow-runs >= 9
|
|
357
|
+
runs-on: ubuntu-latest
|
|
358
|
+
outputs:
|
|
359
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
360
|
+
steps:
|
|
361
|
+
- uses: actions/checkout@v6
|
|
362
|
+
with:
|
|
363
|
+
ref: main
|
|
364
|
+
fetch-depth: 1
|
|
365
|
+
- id: check
|
|
366
|
+
run: |
|
|
367
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
368
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
369
|
+
else
|
|
370
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
371
|
+
fi
|
|
372
|
+
|
|
373
|
+
workflow-9:
|
|
374
|
+
needs: [check-9]
|
|
375
|
+
if: always() && needs.check-9.result == 'success' && needs.check-9.outputs.mission-over != 'true' && inputs.workflow-runs >= 9
|
|
376
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
377
|
+
secrets: inherit
|
|
378
|
+
|
|
379
|
+
check-10:
|
|
380
|
+
needs: [workflow-9]
|
|
381
|
+
if: always() && needs.workflow-9.result == 'success' && inputs.workflow-runs >= 10
|
|
382
|
+
runs-on: ubuntu-latest
|
|
383
|
+
outputs:
|
|
384
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
385
|
+
steps:
|
|
386
|
+
- uses: actions/checkout@v6
|
|
387
|
+
with:
|
|
388
|
+
ref: main
|
|
389
|
+
fetch-depth: 1
|
|
390
|
+
- id: check
|
|
391
|
+
run: |
|
|
392
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
393
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
394
|
+
else
|
|
395
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
396
|
+
fi
|
|
397
|
+
|
|
398
|
+
workflow-10:
|
|
399
|
+
needs: [check-10]
|
|
400
|
+
if: always() && needs.check-10.result == 'success' && needs.check-10.outputs.mission-over != 'true' && inputs.workflow-runs >= 10
|
|
401
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
402
|
+
secrets: inherit
|
|
403
|
+
|
|
404
|
+
check-11:
|
|
405
|
+
needs: [workflow-10]
|
|
406
|
+
if: always() && needs.workflow-10.result == 'success' && inputs.workflow-runs >= 11
|
|
407
|
+
runs-on: ubuntu-latest
|
|
408
|
+
outputs:
|
|
409
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
410
|
+
steps:
|
|
411
|
+
- uses: actions/checkout@v6
|
|
412
|
+
with:
|
|
413
|
+
ref: main
|
|
414
|
+
fetch-depth: 1
|
|
415
|
+
- id: check
|
|
416
|
+
run: |
|
|
417
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
418
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
419
|
+
else
|
|
420
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
421
|
+
fi
|
|
422
|
+
|
|
423
|
+
workflow-11:
|
|
424
|
+
needs: [check-11]
|
|
425
|
+
if: always() && needs.check-11.result == 'success' && needs.check-11.outputs.mission-over != 'true' && inputs.workflow-runs >= 11
|
|
426
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
427
|
+
secrets: inherit
|
|
428
|
+
|
|
429
|
+
check-12:
|
|
430
|
+
needs: [workflow-11]
|
|
431
|
+
if: always() && needs.workflow-11.result == 'success' && inputs.workflow-runs >= 12
|
|
432
|
+
runs-on: ubuntu-latest
|
|
433
|
+
outputs:
|
|
434
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
435
|
+
steps:
|
|
436
|
+
- uses: actions/checkout@v6
|
|
437
|
+
with:
|
|
438
|
+
ref: main
|
|
439
|
+
fetch-depth: 1
|
|
440
|
+
- id: check
|
|
441
|
+
run: |
|
|
442
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
443
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
444
|
+
else
|
|
445
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
446
|
+
fi
|
|
447
|
+
|
|
448
|
+
workflow-12:
|
|
449
|
+
needs: [check-12]
|
|
450
|
+
if: always() && needs.check-12.result == 'success' && needs.check-12.outputs.mission-over != 'true' && inputs.workflow-runs >= 12
|
|
451
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
452
|
+
secrets: inherit
|
|
453
|
+
|
|
454
|
+
# ── Round 4: test + bot + up to 4 more workflow runs ───────────────
|
|
455
|
+
test-4:
|
|
456
|
+
needs: [workflow-12]
|
|
457
|
+
if: always() && inputs.workflow-runs >= 13 && (needs.workflow-12.result == 'success' || needs.workflow-12.result == 'skipped')
|
|
458
|
+
uses: ./.github/workflows/agentic-lib-test.yml
|
|
459
|
+
secrets: inherit
|
|
460
|
+
|
|
461
|
+
bot-4:
|
|
462
|
+
needs: [test-4]
|
|
463
|
+
if: always() && needs.test-4.result == 'success'
|
|
464
|
+
uses: ./.github/workflows/agentic-lib-bot.yml
|
|
465
|
+
secrets: inherit
|
|
466
|
+
|
|
467
|
+
check-13:
|
|
468
|
+
needs: [bot-4]
|
|
469
|
+
if: always() && needs.bot-4.result == 'success' && inputs.workflow-runs >= 13
|
|
470
|
+
runs-on: ubuntu-latest
|
|
471
|
+
outputs:
|
|
472
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
473
|
+
steps:
|
|
474
|
+
- uses: actions/checkout@v6
|
|
475
|
+
with:
|
|
476
|
+
ref: main
|
|
477
|
+
fetch-depth: 1
|
|
478
|
+
- id: check
|
|
479
|
+
run: |
|
|
480
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
481
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
482
|
+
else
|
|
483
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
484
|
+
fi
|
|
485
|
+
|
|
486
|
+
workflow-13:
|
|
487
|
+
needs: [check-13]
|
|
488
|
+
if: always() && needs.check-13.result == 'success' && needs.check-13.outputs.mission-over != 'true' && inputs.workflow-runs >= 13
|
|
489
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
490
|
+
secrets: inherit
|
|
491
|
+
|
|
492
|
+
check-14:
|
|
493
|
+
needs: [workflow-13]
|
|
494
|
+
if: always() && needs.workflow-13.result == 'success' && inputs.workflow-runs >= 14
|
|
495
|
+
runs-on: ubuntu-latest
|
|
496
|
+
outputs:
|
|
497
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
498
|
+
steps:
|
|
499
|
+
- uses: actions/checkout@v6
|
|
500
|
+
with:
|
|
501
|
+
ref: main
|
|
502
|
+
fetch-depth: 1
|
|
503
|
+
- id: check
|
|
504
|
+
run: |
|
|
505
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
506
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
507
|
+
else
|
|
508
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
509
|
+
fi
|
|
510
|
+
|
|
511
|
+
workflow-14:
|
|
512
|
+
needs: [check-14]
|
|
513
|
+
if: always() && needs.check-14.result == 'success' && needs.check-14.outputs.mission-over != 'true' && inputs.workflow-runs >= 14
|
|
514
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
515
|
+
secrets: inherit
|
|
516
|
+
|
|
517
|
+
check-15:
|
|
518
|
+
needs: [workflow-14]
|
|
519
|
+
if: always() && needs.workflow-14.result == 'success' && inputs.workflow-runs >= 15
|
|
520
|
+
runs-on: ubuntu-latest
|
|
521
|
+
outputs:
|
|
522
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
523
|
+
steps:
|
|
524
|
+
- uses: actions/checkout@v6
|
|
525
|
+
with:
|
|
526
|
+
ref: main
|
|
527
|
+
fetch-depth: 1
|
|
528
|
+
- id: check
|
|
529
|
+
run: |
|
|
530
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
531
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
532
|
+
else
|
|
533
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
534
|
+
fi
|
|
535
|
+
|
|
536
|
+
workflow-15:
|
|
537
|
+
needs: [check-15]
|
|
538
|
+
if: always() && needs.check-15.result == 'success' && needs.check-15.outputs.mission-over != 'true' && inputs.workflow-runs >= 15
|
|
539
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
540
|
+
secrets: inherit
|
|
541
|
+
|
|
542
|
+
check-16:
|
|
543
|
+
needs: [workflow-15]
|
|
544
|
+
if: always() && needs.workflow-15.result == 'success' && inputs.workflow-runs >= 16
|
|
545
|
+
runs-on: ubuntu-latest
|
|
546
|
+
outputs:
|
|
547
|
+
mission-over: ${{ steps.check.outputs.mission-over }}
|
|
548
|
+
steps:
|
|
549
|
+
- uses: actions/checkout@v6
|
|
550
|
+
with:
|
|
551
|
+
ref: main
|
|
552
|
+
fetch-depth: 1
|
|
553
|
+
- id: check
|
|
554
|
+
run: |
|
|
555
|
+
if [ -f MISSION_COMPLETE.md ] || [ -f MISSION_FAILED.md ]; then
|
|
556
|
+
echo "mission-over=true" >> "$GITHUB_OUTPUT"
|
|
557
|
+
else
|
|
558
|
+
echo "mission-over=false" >> "$GITHUB_OUTPUT"
|
|
559
|
+
fi
|
|
560
|
+
|
|
561
|
+
workflow-16:
|
|
562
|
+
needs: [check-16]
|
|
563
|
+
if: always() && needs.check-16.result == 'success' && needs.check-16.outputs.mission-over != 'true' && inputs.workflow-runs >= 16
|
|
564
|
+
uses: ./.github/workflows/agentic-lib-workflow.yml
|
|
565
|
+
secrets: inherit
|
|
566
|
+
|
|
567
|
+
# ── Final: test + bot (always runs) ────────────────────────────────
|
|
568
|
+
test-final:
|
|
569
|
+
needs: [workflow-4, workflow-8, workflow-12, workflow-16]
|
|
570
|
+
if: always()
|
|
571
|
+
uses: ./.github/workflows/agentic-lib-test.yml
|
|
572
|
+
secrets: inherit
|
|
573
|
+
|
|
574
|
+
bot-final:
|
|
575
|
+
needs: [test-final]
|
|
576
|
+
if: always() && needs.test-final.result == 'success'
|
|
577
|
+
uses: ./.github/workflows/agentic-lib-bot.yml
|
|
578
|
+
secrets: inherit
|
|
579
|
+
|
|
580
|
+
# ── Verify: MISSION_COMPLETE.md must exist ─────────────────────────
|
|
581
|
+
verify-mission-complete:
|
|
582
|
+
needs: [bot-final]
|
|
583
|
+
if: always()
|
|
584
|
+
runs-on: ubuntu-latest
|
|
585
|
+
steps:
|
|
586
|
+
- uses: actions/checkout@v6
|
|
587
|
+
with:
|
|
588
|
+
ref: main
|
|
589
|
+
fetch-depth: 1
|
|
590
|
+
- name: Check MISSION_COMPLETE.md
|
|
591
|
+
id: check
|
|
592
|
+
run: |
|
|
593
|
+
if [ -f MISSION_COMPLETE.md ]; then
|
|
594
|
+
echo "✅ Mission complete!"
|
|
595
|
+
cat MISSION_COMPLETE.md
|
|
596
|
+
echo "mission_complete=true" >> "$GITHUB_OUTPUT"
|
|
597
|
+
else
|
|
598
|
+
echo "❌ MISSION_COMPLETE.md not found after ${{ inputs.workflow-runs }} workflow runs"
|
|
599
|
+
echo "mission_complete=false" >> "$GITHUB_OUTPUT"
|
|
600
|
+
fi
|
|
601
|
+
|
|
602
|
+
# ── Generate benchmark report ──────────────────────────────────────
|
|
603
|
+
generate-report:
|
|
604
|
+
needs: [verify-mission-complete]
|
|
605
|
+
if: always()
|
|
606
|
+
runs-on: ubuntu-latest
|
|
607
|
+
steps:
|
|
608
|
+
- uses: actions/checkout@v6
|
|
609
|
+
with:
|
|
610
|
+
ref: main
|
|
611
|
+
fetch-depth: 1
|
|
612
|
+
|
|
613
|
+
- name: Fetch state and logs from logs branch
|
|
614
|
+
run: |
|
|
615
|
+
git fetch origin agentic-lib-logs --depth=1 2>/dev/null || true
|
|
616
|
+
git show origin/agentic-lib-logs:agentic-lib-state.toml > /tmp/state.toml 2>/dev/null || echo "# no state" > /tmp/state.toml
|
|
617
|
+
git ls-tree origin/agentic-lib-logs --name-only 2>/dev/null | grep '^agent-log-' | sort > /tmp/log-files.txt || true
|
|
618
|
+
|
|
619
|
+
- name: Read source and mission
|
|
620
|
+
run: |
|
|
621
|
+
wc -l src/lib/main.js 2>/dev/null | awk '{print $1}' > /tmp/source-lines.txt || echo "0" > /tmp/source-lines.txt
|
|
622
|
+
cat MISSION.md > /tmp/mission.txt 2>/dev/null || echo "No MISSION.md" > /tmp/mission.txt
|
|
623
|
+
ls tests/unit/*.test.js 2>/dev/null | wc -l > /tmp/test-files.txt || echo "0" > /tmp/test-files.txt
|
|
624
|
+
|
|
625
|
+
- name: Generate report
|
|
626
|
+
run: |
|
|
627
|
+
REPORT_NUM=$(printf "%03d" $(( $(ls BENCHMARK_REPORT_FLOW_*.md 2>/dev/null | wc -l) + 1 )))
|
|
628
|
+
MISSION_SEED="${{ inputs.mission-seed }}"
|
|
629
|
+
MODEL="${{ inputs.model || 'default' }}"
|
|
630
|
+
PROFILE="${{ inputs.profile || 'default' }}"
|
|
631
|
+
WORKFLOW_RUNS="${{ inputs.workflow-runs }}"
|
|
632
|
+
SOURCE_LINES=$(cat /tmp/source-lines.txt)
|
|
633
|
+
TEST_FILES=$(cat /tmp/test-files.txt)
|
|
634
|
+
MISSION_COMPLETE="NO"
|
|
635
|
+
MISSION_FAILED="NO"
|
|
636
|
+
if [ -f MISSION_COMPLETE.md ]; then MISSION_COMPLETE="YES"; fi
|
|
637
|
+
if [ -f MISSION_FAILED.md ]; then MISSION_FAILED="YES"; fi
|
|
638
|
+
|
|
639
|
+
cat > "BENCHMARK_REPORT_FLOW_${REPORT_NUM}.md" << REPORT_EOF
|
|
640
|
+
# Flow Benchmark Report ${REPORT_NUM}
|
|
641
|
+
|
|
642
|
+
**Date**: $(date -u +%Y-%m-%d)
|
|
643
|
+
**Operator**: agentic-lib-flow (automated)
|
|
644
|
+
**agentic-lib version**: $(node -e "console.log(require('./package.json').version)" 2>/dev/null || echo "unknown")
|
|
645
|
+
**Run**: [${GITHUB_RUN_ID}](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})
|
|
646
|
+
|
|
647
|
+
---
|
|
648
|
+
|
|
649
|
+
## Configuration
|
|
650
|
+
|
|
651
|
+
| Parameter | Value |
|
|
652
|
+
|-----------|-------|
|
|
653
|
+
| Mission seed | ${MISSION_SEED} |
|
|
654
|
+
| Model | ${MODEL} |
|
|
655
|
+
| Profile | ${PROFILE} |
|
|
656
|
+
| Workflow runs | ${WORKFLOW_RUNS} |
|
|
657
|
+
| Init mode | ${{ inputs.mode }} |
|
|
658
|
+
|
|
659
|
+
## State File
|
|
660
|
+
|
|
661
|
+
\`\`\`toml
|
|
662
|
+
$(cat /tmp/state.toml)
|
|
663
|
+
\`\`\`
|
|
664
|
+
|
|
665
|
+
## Results
|
|
666
|
+
|
|
667
|
+
| Metric | Value |
|
|
668
|
+
|--------|-------|
|
|
669
|
+
| Mission complete | ${MISSION_COMPLETE} |
|
|
670
|
+
| Mission failed | ${MISSION_FAILED} |
|
|
671
|
+
| Source lines | ${SOURCE_LINES} |
|
|
672
|
+
| Test files | ${TEST_FILES} |
|
|
673
|
+
| Agent log files | $(wc -l < /tmp/log-files.txt) |
|
|
674
|
+
|
|
675
|
+
## Mission
|
|
676
|
+
|
|
677
|
+
\`\`\`
|
|
678
|
+
$(head -20 /tmp/mission.txt)
|
|
679
|
+
\`\`\`
|
|
680
|
+
|
|
681
|
+
## Agent Log Files
|
|
682
|
+
|
|
683
|
+
$(cat /tmp/log-files.txt | while read f; do echo "- ${f}"; done)
|
|
684
|
+
REPORT_EOF
|
|
685
|
+
|
|
686
|
+
echo "Generated BENCHMARK_REPORT_FLOW_${REPORT_NUM}.md"
|
|
687
|
+
cat "BENCHMARK_REPORT_FLOW_${REPORT_NUM}.md"
|
|
688
|
+
|
|
689
|
+
- name: Commit report
|
|
690
|
+
run: |
|
|
691
|
+
git config user.name "github-actions[bot]"
|
|
692
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
693
|
+
git add BENCHMARK_REPORT_FLOW_*.md
|
|
694
|
+
git diff --staged --quiet && echo "No report to commit" && exit 0
|
|
695
|
+
git commit -m "flow: benchmark report for ${{ inputs.mission-seed }} (${{ inputs.workflow-runs }} runs) [skip ci]"
|
|
696
|
+
git push origin main || echo "Push failed — report saved as artifact"
|
|
697
|
+
|
|
698
|
+
- name: Upload report artifact
|
|
699
|
+
uses: actions/upload-artifact@v4
|
|
700
|
+
with:
|
|
701
|
+
name: benchmark-report
|
|
702
|
+
path: BENCHMARK_REPORT_FLOW_*.md
|
|
@@ -558,11 +558,12 @@ jobs:
|
|
|
558
558
|
const summary = JSON.stringify(telemetry);
|
|
559
559
|
core.setOutput('telemetry', summary.slice(0, maxTelemetryChars));
|
|
560
560
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
561
|
+
- name: Output telemetry summary
|
|
562
|
+
shell: bash
|
|
563
|
+
run: |
|
|
564
|
+
echo "=== Telemetry Summary ==="
|
|
565
|
+
cat /tmp/telemetry.json 2>/dev/null || echo "No telemetry file"
|
|
566
|
+
echo "=== End Telemetry ==="
|
|
566
567
|
|
|
567
568
|
outputs:
|
|
568
569
|
telemetry: ${{ steps.gather.outputs.telemetry }}
|
package/package.json
CHANGED