dorfl 0.14.1 → 0.14.3
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/dist/advance-ci-template.d.ts.map +1 -1
- package/dist/advance-ci-template.js +10 -4
- package/dist/advance-ci-template.js.map +1 -1
- package/dist/advance-lifecycle-template.d.ts.map +1 -1
- package/dist/advance-lifecycle-template.js +78 -25
- package/dist/advance-lifecycle-template.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/close-job-template.d.ts +1 -1
- package/dist/close-job-template.d.ts.map +1 -1
- package/dist/close-job-template.js +17 -3
- package/dist/close-job-template.js.map +1 -1
- package/dist/install-ci-action-pins.d.ts +98 -0
- package/dist/install-ci-action-pins.d.ts.map +1 -0
- package/dist/install-ci-action-pins.js +165 -0
- package/dist/install-ci-action-pins.js.map +1 -0
- package/dist/install-ci-core.d.ts +84 -0
- package/dist/install-ci-core.d.ts.map +1 -1
- package/dist/install-ci-core.js +120 -14
- package/dist/install-ci-core.js.map +1 -1
- package/dist/install-ci-github.d.ts +15 -1
- package/dist/install-ci-github.d.ts.map +1 -1
- package/dist/install-ci-github.js +32 -0
- package/dist/install-ci-github.js.map +1 -1
- package/dist/install-ci.d.ts.map +1 -1
- package/dist/install-ci.js +21 -0
- package/dist/install-ci.js.map +1 -1
- package/dist/intake-trigger-template.d.ts.map +1 -1
- package/dist/intake-trigger-template.js +24 -7
- package/dist/intake-trigger-template.js.map +1 -1
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +10 -5
- package/dist/intake.js.map +1 -1
- package/dist/mint-adr.d.ts.map +1 -1
- package/dist/mint-adr.js +4 -1
- package/dist/mint-adr.js.map +1 -1
- package/dist/slug-namespace.d.ts +4 -3
- package/dist/slug-namespace.d.ts.map +1 -1
- package/dist/slug-namespace.js +28 -3
- package/dist/slug-namespace.js.map +1 -1
- package/dist/slug-safety.d.ts +55 -0
- package/dist/slug-safety.d.ts.map +1 -0
- package/dist/slug-safety.js +76 -0
- package/dist/slug-safety.js.map +1 -0
- package/dist/triage-persist.d.ts.map +1 -1
- package/dist/triage-persist.js +12 -3
- package/dist/triage-persist.js.map +1 -1
- package/dist/verify-workflow-template.d.ts +1 -1
- package/dist/verify-workflow-template.d.ts.map +1 -1
- package/dist/verify-workflow-template.js +16 -3
- package/dist/verify-workflow-template.js.map +1 -1
- package/package.json +3 -2
- package/src/advance-ci-template.ts +12 -4
- package/src/advance-lifecycle-template.ts +80 -25
- package/src/cli.ts +2 -2
- package/src/close-job-template.ts +17 -3
- package/src/install-ci-action-pins.ts +184 -0
- package/src/install-ci-core.ts +166 -14
- package/src/install-ci-github.ts +40 -1
- package/src/install-ci.ts +25 -0
- package/src/intake-trigger-template.ts +28 -7
- package/src/intake.ts +10 -5
- package/src/mint-adr.ts +4 -1
- package/src/slug-namespace.ts +33 -5
- package/src/slug-safety.ts +83 -0
- package/src/triage-persist.ts +13 -7
- package/src/verify-workflow-template.ts +16 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance-ci-template.d.ts","sourceRoot":"","sources":["../src/advance-ci-template.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,yDAAyD;AACzD,MAAM,WAAW,wBAAwB;IACxC,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,uDAAuD;AACvD,MAAM,WAAW,2BAA2B;IAC3C,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,iDAAiD;IACjD,QAAQ,EAAE,wBAAwB,EAAE,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA2BtE;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,MAAM,GACV,2BAA2B,
|
|
1
|
+
{"version":3,"file":"advance-ci-template.d.ts","sourceRoot":"","sources":["../src/advance-ci-template.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,yDAAyD;AACzD,MAAM,WAAW,wBAAwB;IACxC,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,uDAAuD;AACvD,MAAM,WAAW,2BAA2B;IAC3C,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,iDAAiD;IACjD,QAAQ,EAAE,wBAAwB,EAAE,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA2BtE;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,MAAM,GACV,2BAA2B,CAmG7B"}
|
|
@@ -62,13 +62,19 @@ export function validateAdvanceCiTemplate(text) {
|
|
|
62
62
|
'+ `cwd.repo.specs[]` pools), so a ready ungated SPEC becomes one auto-task ' +
|
|
63
63
|
'matrix leg alongside the eligible-task legs ' +
|
|
64
64
|
'(`ci-propose-matrix-must-enumerate-sliceable-prds-not-only-slices`).');
|
|
65
|
-
require('propose-one-advance-per-item', /dorfl advance "
|
|
66
|
-
'(one PR per item).');
|
|
65
|
+
require('propose-one-advance-per-item', /WORK_ITEM:\s*\$\{\{\s*matrix\.item\s*\}\}[\s\S]*?dorfl advance "\$\{WORK_ITEM\}"/.test(text), 'each matrix leg must run one `dorfl advance <matrix item>` ' +
|
|
66
|
+
'(one PR per item), reading the item from the step env (`WORK_ITEM`).');
|
|
67
|
+
// The item id is a slug that may be hand-written, so it must reach the shell
|
|
68
|
+
// as DATA through `env:`, never as `${{ }}` text spliced into the `run:` script
|
|
69
|
+
// (GitHub Actions script injection).
|
|
70
|
+
require('matrix-item-not-spliced-into-run', !/dorfl advance "?\$\{\{/.test(text), 'the matrix item must NOT be interpolated into the `run:` script as ' +
|
|
71
|
+
'`${{ matrix.item }}` (script injection): pass it through the step `env:` ' +
|
|
72
|
+
'as `WORK_ITEM` and quote it as `"${WORK_ITEM}"`.');
|
|
67
73
|
// The matrix leg must carry `--propose` so the integration mode is TIED to the
|
|
68
74
|
// matrix shape (it cannot desync from the dispatch `integrationMode` input nor
|
|
69
75
|
// fall back to a repo config default of `merge`). Scoped to the `advance-propose`
|
|
70
76
|
// job so it is the LEG that carries it, not merely the file somewhere.
|
|
71
|
-
require('propose-leg-carries-propose-flag', /advance-propose:[\s\S]*?dorfl advance "
|
|
77
|
+
require('propose-leg-carries-propose-flag', /advance-propose:[\s\S]*?dorfl advance "\$\{WORK_ITEM\}"[^\n]*--propose\b/.test(text), 'each `propose` matrix leg must pass `--propose` so the integration mode is ' +
|
|
72
78
|
'TIED to the matrix shape (a leg can never merge to main / desync from the ' +
|
|
73
79
|
'dispatch mode).');
|
|
74
80
|
// --- merge ⇒ a MATRIX per item (parallel build/gate/review, serialised land) -
|
|
@@ -84,7 +90,7 @@ export function validateAdvanceCiTemplate(text) {
|
|
|
84
90
|
// scoped to the `advance-merge:` job so the `--merge` flag is TIED to its leg
|
|
85
91
|
// (cannot desync from the dispatch `integrationMode` input nor fall back to a
|
|
86
92
|
// repo config default of `propose`).
|
|
87
|
-
require('merge-leg-carries-merge-flag', /advance-merge:[\s\S]*?dorfl advance "
|
|
93
|
+
require('merge-leg-carries-merge-flag', /advance-merge:[\s\S]*?dorfl advance "\$\{WORK_ITEM\}"[^\n]*--merge\b/.test(text), 'each `merge` matrix leg must pass `--merge` so the integration mode is ' +
|
|
88
94
|
'TIED to the matrix shape (a leg can never propose-only / desync from the ' +
|
|
89
95
|
'dispatch mode).');
|
|
90
96
|
// The merge fan-out is the SAFETY-FLOOR shape: no `concurrency:` group on the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance-ci-template.js","sourceRoot":"","sources":["../src/advance-ci-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AA6DvC;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAAC,QAAiB;IAC7D,IAAI,QAAQ,EAAE,CAAC;QACd,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,sEAAsE;IACtE,sEAAsE;IACtE,MAAM,UAAU,GAAG;QAClB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,CAAC;QAC1E,OAAO,CACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,2BAA2B,CAC3B;KACD,CAAC;IACF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3B,OAAO,SAAS,CAAC;QAClB,CAAC;IACF,CAAC;IACD,yEAAyE;IACzE,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,qBAAqB,CAAC,QAAiB;IACtD,OAAO,YAAY,CAAC,4BAA4B,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AACrE,CAAC;AAED;;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AEpB,gFAAgF;IAChF,6EAA6E;IAC7E,qFAAqF;IACrF,yEAAyE;IACzE,8EAA8E;IAC9E,+EAA+E;IAC/E,OAAO,CAAC,cAAc,EAAE,mDAAmD,CAAC,IAAI,CAC/E,IAAI,CACJ,EAAE,0EAA0E;QAC5E,uEAAuE;QACvE,yCAAyC,CAAC,CAAC;IAC5C,4EAA4E;IAC5E,8EAA8E;IAC9E,8EAA8E;IAC9E,qCAAqC;IACrC,OAAO,CAAC,8BAA8B,EAAE,sEAAsE,CAAC,IAAI,CAClH,IAAI,CACJ,EAAE,yEAAyE;QAC3E,2EAA2E;QAC3E,iBAAiB,CAAC,CAAC;IACpB,8EAA8E;IAC9E,2EAA2E;IAC3E,8EAA8E;IAC9E,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,OAAO,CAAC,sCAAsC,EAAE,CAAC,2CAA2C,CAAC,IAAI,CAChG,IAAI,CACJ,EAAE,yEAAyE;QAC3E,6EAA6E;QAC7E,uEAAuE;QACvE,QAAQ,CAAC,CAAC;IAEX,gFAAgF;IAChF,OAAO,CAAC,wBAAwB,EAAE,iBAAiB,CAAC,IAAI,CACvD,IAAI,CACJ,EAAE,yDAAyD,CAAC,CAAC;IAE9D,OAAO,EAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,QAAQ,EAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance-lifecycle-template.d.ts","sourceRoot":"","sources":["../src/advance-lifecycle-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;
|
|
1
|
+
{"version":3,"file":"advance-lifecycle-template.d.ts","sourceRoot":"","sources":["../src/advance-lifecycle-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAGH,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAG3D,6EAA6E;AAC7E,eAAO,MAAM,+BAA+B,sBAAsB,CAAC;AAEnE,oEAAoE;AACpE,eAAO,MAAM,kCAAkC,uJACsG,CAAC;AAEtJ,8EAA8E;AAC9E,eAAO,MAAM,+BAA+B,oCACV,CAAC;AAEnC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gCAAgC,CAC/C,MAAM,EAAE,gBAAgB,GACtB,MAAM,CAsdR;AAED,mEAAmE;AACnE,MAAM,WAAW,uBAAuB;IACvC,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,8DAA8D;AAC9D,MAAM,WAAW,0BAA0B;IAC1C,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,iDAAiD;IACjD,QAAQ,EAAE,uBAAuB,EAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC/C,IAAI,EAAE,MAAM,GACV,0BAA0B,CAmV5B"}
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
* parses + carries the right discipline" the task's acceptance criteria require;
|
|
60
60
|
* the test generates this artifact under `--fake` and asserts every invariant.
|
|
61
61
|
*/
|
|
62
|
+
import { ACTION_PINS, pinnedUses } from './install-ci-action-pins.js';
|
|
62
63
|
import { providerSecretsWithBlock } from './install-ci-core.js';
|
|
63
64
|
/** The capability id (the registry key + the emitted workflow file stem). */
|
|
64
65
|
export const ADVANCE_LIFECYCLE_CAPABILITY_ID = 'advance-lifecycle';
|
|
@@ -286,7 +287,7 @@ jobs:
|
|
|
286
287
|
# re-run, no baked-in YAML number.
|
|
287
288
|
githubTimeout: \${{ steps.timeout.outputs.githubTimeout }}
|
|
288
289
|
steps:
|
|
289
|
-
- uses:
|
|
290
|
+
- uses: ${pinnedUses(ACTION_PINS.checkout)}
|
|
290
291
|
with:
|
|
291
292
|
fetch-depth: 0
|
|
292
293
|
- uses: ./.github/actions/dorfl-setup
|
|
@@ -296,13 +297,26 @@ jobs:
|
|
|
296
297
|
# surfaceBlockers), so an override that does not reach this job produces an
|
|
297
298
|
# empty matrix and is silently inert. \`if:\` + the inner \`[ -n ... ]\` guard
|
|
298
299
|
# keep schedule/push (and a blank dispatch field) exporting NOTHING — an
|
|
299
|
-
# empty DORFL_* would make env-config coercion throw.
|
|
300
|
+
# empty DORFL_* would make env-config coercion throw. The inputs reach the
|
|
301
|
+
# shell through \`env:\` as DATA, never as \`\${{ }}\` text spliced into the
|
|
302
|
+
# script (GitHub's script-injection guidance), and the \`case\` guard stops a
|
|
303
|
+
# value from appending its own lines to $GITHUB_ENV. Both only matter if an
|
|
304
|
+
# input ever stops being a fixed \`type: choice\`; for the choices below the
|
|
305
|
+
# step writes exactly what it always did.
|
|
300
306
|
if: \${{ github.event_name == 'workflow_dispatch' }}
|
|
307
|
+
env:
|
|
308
|
+
DISPATCH_AUTO_BUILD: \${{ github.event.inputs.autoBuild }}
|
|
309
|
+
DISPATCH_AUTO_TASK: \${{ github.event.inputs.autoTask }}
|
|
310
|
+
DISPATCH_OBSERVATION_TRIAGE: \${{ github.event.inputs.observationTriage }}
|
|
311
|
+
DISPATCH_SURFACE_BLOCKERS: \${{ github.event.inputs.surfaceBlockers }}
|
|
301
312
|
run: |
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
[ -n "\${
|
|
313
|
+
case "\${DISPATCH_AUTO_BUILD}\${DISPATCH_AUTO_TASK}\${DISPATCH_OBSERVATION_TRIAGE}\${DISPATCH_SURFACE_BLOCKERS}" in
|
|
314
|
+
*$'\\n'*|*$'\\r'*) echo "::error::a dispatch gate override contains a line break"; exit 1 ;;
|
|
315
|
+
esac
|
|
316
|
+
[ -n "\${DISPATCH_AUTO_BUILD}" ] && echo "DORFL_AUTO_BUILD=\${DISPATCH_AUTO_BUILD}" >> "$GITHUB_ENV"
|
|
317
|
+
[ -n "\${DISPATCH_AUTO_TASK}" ] && echo "DORFL_AUTO_TASK=\${DISPATCH_AUTO_TASK}" >> "$GITHUB_ENV"
|
|
318
|
+
[ -n "\${DISPATCH_OBSERVATION_TRIAGE}" ] && echo "DORFL_OBSERVATION_TRIAGE=\${DISPATCH_OBSERVATION_TRIAGE}" >> "$GITHUB_ENV"
|
|
319
|
+
[ -n "\${DISPATCH_SURFACE_BLOCKERS}" ] && echo "DORFL_SURFACE_BLOCKERS=\${DISPATCH_SURFACE_BLOCKERS}" >> "$GITHUB_ENV"
|
|
306
320
|
true
|
|
307
321
|
- id: scan
|
|
308
322
|
# Enumerate eligible items as namespaced ids, one matrix leg per id. CI
|
|
@@ -383,7 +397,7 @@ jobs:
|
|
|
383
397
|
matrix:
|
|
384
398
|
item: \${{ fromJson(needs.enumerate.outputs.items) }}
|
|
385
399
|
steps:
|
|
386
|
-
- uses:
|
|
400
|
+
- uses: ${pinnedUses(ACTION_PINS.checkout)}
|
|
387
401
|
with:
|
|
388
402
|
fetch-depth: 0
|
|
389
403
|
- uses: ./.github/actions/dorfl-setup${setupWith}
|
|
@@ -392,11 +406,19 @@ jobs:
|
|
|
392
406
|
# DORFL_* ONLY on a workflow_dispatch with a non-blank input, so the
|
|
393
407
|
# one-shot override also reaches the \`advance\` leg that builds the item.
|
|
394
408
|
if: \${{ github.event_name == 'workflow_dispatch' }}
|
|
409
|
+
env:
|
|
410
|
+
DISPATCH_AUTO_BUILD: \${{ github.event.inputs.autoBuild }}
|
|
411
|
+
DISPATCH_AUTO_TASK: \${{ github.event.inputs.autoTask }}
|
|
412
|
+
DISPATCH_OBSERVATION_TRIAGE: \${{ github.event.inputs.observationTriage }}
|
|
413
|
+
DISPATCH_SURFACE_BLOCKERS: \${{ github.event.inputs.surfaceBlockers }}
|
|
395
414
|
run: |
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
[ -n "\${
|
|
415
|
+
case "\${DISPATCH_AUTO_BUILD}\${DISPATCH_AUTO_TASK}\${DISPATCH_OBSERVATION_TRIAGE}\${DISPATCH_SURFACE_BLOCKERS}" in
|
|
416
|
+
*$'\\n'*|*$'\\r'*) echo "::error::a dispatch gate override contains a line break"; exit 1 ;;
|
|
417
|
+
esac
|
|
418
|
+
[ -n "\${DISPATCH_AUTO_BUILD}" ] && echo "DORFL_AUTO_BUILD=\${DISPATCH_AUTO_BUILD}" >> "$GITHUB_ENV"
|
|
419
|
+
[ -n "\${DISPATCH_AUTO_TASK}" ] && echo "DORFL_AUTO_TASK=\${DISPATCH_AUTO_TASK}" >> "$GITHUB_ENV"
|
|
420
|
+
[ -n "\${DISPATCH_OBSERVATION_TRIAGE}" ] && echo "DORFL_OBSERVATION_TRIAGE=\${DISPATCH_OBSERVATION_TRIAGE}" >> "$GITHUB_ENV"
|
|
421
|
+
[ -n "\${DISPATCH_SURFACE_BLOCKERS}" ] && echo "DORFL_SURFACE_BLOCKERS=\${DISPATCH_SURFACE_BLOCKERS}" >> "$GITHUB_ENV"
|
|
400
422
|
true
|
|
401
423
|
- name: advance one item in-place (propose ⇒ opens a PR)
|
|
402
424
|
# In-place in this checkout (no --isolated/--remote): the CI container IS
|
|
@@ -411,13 +433,19 @@ jobs:
|
|
|
411
433
|
# works zero-config; the job's \`pull-requests: write\` scopes that token.
|
|
412
434
|
env:
|
|
413
435
|
GH_TOKEN: \${{ secrets.DORFL_GH_TOKEN || secrets.GITHUB_TOKEN }}
|
|
436
|
+
# The item id is a slug read from work/ (frontmatter \`slug:\` or the
|
|
437
|
+
# file name). dorfl sanitises the slugs it mints, but a hand-written
|
|
438
|
+
# one is only checked when \`advance\` resolves it, so it reaches the
|
|
439
|
+
# shell as DATA through env, never as \`\${{ matrix.item }}\` text
|
|
440
|
+
# spliced into the script.
|
|
441
|
+
WORK_ITEM: \${{ matrix.item }}
|
|
414
442
|
# \`--watch\` streams the build agent's high-signal turns (assistant text,
|
|
415
443
|
# tool calls, finish) into THIS job log live, so the run shows the agent
|
|
416
444
|
# working instead of freezing after "Start work". A read-only observer (no
|
|
417
445
|
# outcome/gate/git effect). It fits because each matrix leg names ONE item
|
|
418
446
|
# (one pi session to tail) — the merge job is now a per-item matrix too
|
|
419
447
|
# (see below) and streams the same way.
|
|
420
|
-
run: dorfl advance "\${
|
|
448
|
+
run: dorfl advance "\${WORK_ITEM}" --propose --watch --arbiter origin
|
|
421
449
|
|
|
422
450
|
# ── MERGE: a MATRIX of independent jobs (parallel build/gate/review, serialised land) ──
|
|
423
451
|
# SPEC \`land-time-reverify-and-parallel-merge-ceiling\` (stories 4 + 6): each item
|
|
@@ -448,7 +476,7 @@ jobs:
|
|
|
448
476
|
matrix:
|
|
449
477
|
item: \${{ fromJson(needs.enumerate.outputs.items) }}
|
|
450
478
|
steps:
|
|
451
|
-
- uses:
|
|
479
|
+
- uses: ${pinnedUses(ACTION_PINS.checkout)}
|
|
452
480
|
with:
|
|
453
481
|
fetch-depth: 0
|
|
454
482
|
- uses: ./.github/actions/dorfl-setup${setupWith}
|
|
@@ -458,11 +486,19 @@ jobs:
|
|
|
458
486
|
# merge job re-scans the pool inside \`advance -n\`, so it needs the override
|
|
459
487
|
# too for the lifecycle/task pools to reflect it.
|
|
460
488
|
if: \${{ github.event_name == 'workflow_dispatch' }}
|
|
489
|
+
env:
|
|
490
|
+
DISPATCH_AUTO_BUILD: \${{ github.event.inputs.autoBuild }}
|
|
491
|
+
DISPATCH_AUTO_TASK: \${{ github.event.inputs.autoTask }}
|
|
492
|
+
DISPATCH_OBSERVATION_TRIAGE: \${{ github.event.inputs.observationTriage }}
|
|
493
|
+
DISPATCH_SURFACE_BLOCKERS: \${{ github.event.inputs.surfaceBlockers }}
|
|
461
494
|
run: |
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
[ -n "\${
|
|
495
|
+
case "\${DISPATCH_AUTO_BUILD}\${DISPATCH_AUTO_TASK}\${DISPATCH_OBSERVATION_TRIAGE}\${DISPATCH_SURFACE_BLOCKERS}" in
|
|
496
|
+
*$'\\n'*|*$'\\r'*) echo "::error::a dispatch gate override contains a line break"; exit 1 ;;
|
|
497
|
+
esac
|
|
498
|
+
[ -n "\${DISPATCH_AUTO_BUILD}" ] && echo "DORFL_AUTO_BUILD=\${DISPATCH_AUTO_BUILD}" >> "$GITHUB_ENV"
|
|
499
|
+
[ -n "\${DISPATCH_AUTO_TASK}" ] && echo "DORFL_AUTO_TASK=\${DISPATCH_AUTO_TASK}" >> "$GITHUB_ENV"
|
|
500
|
+
[ -n "\${DISPATCH_OBSERVATION_TRIAGE}" ] && echo "DORFL_OBSERVATION_TRIAGE=\${DISPATCH_OBSERVATION_TRIAGE}" >> "$GITHUB_ENV"
|
|
501
|
+
[ -n "\${DISPATCH_SURFACE_BLOCKERS}" ] && echo "DORFL_SURFACE_BLOCKERS=\${DISPATCH_SURFACE_BLOCKERS}" >> "$GITHUB_ENV"
|
|
466
502
|
true
|
|
467
503
|
- name: advance one item in-place (merge ⇒ rebase + CAS land on main)
|
|
468
504
|
# In-place (no --isolated/--remote). \`--merge\` ties the integration mode
|
|
@@ -473,10 +509,16 @@ jobs:
|
|
|
473
509
|
# \`GH_TOKEN\` from the env.
|
|
474
510
|
env:
|
|
475
511
|
GH_TOKEN: \${{ secrets.DORFL_GH_TOKEN || secrets.GITHUB_TOKEN }}
|
|
512
|
+
# The item id is a slug read from work/ (frontmatter \`slug:\` or the
|
|
513
|
+
# file name). dorfl sanitises the slugs it mints, but a hand-written
|
|
514
|
+
# one is only checked when \`advance\` resolves it, so it reaches the
|
|
515
|
+
# shell as DATA through env, never as \`\${{ matrix.item }}\` text
|
|
516
|
+
# spliced into the script.
|
|
517
|
+
WORK_ITEM: \${{ matrix.item }}
|
|
476
518
|
# \`--watch\` streams the build agent's high-signal turns into THIS job
|
|
477
519
|
# log live; each leg names ONE item, so it fits the same way it does on
|
|
478
520
|
# the propose legs.
|
|
479
|
-
run: dorfl advance "\${
|
|
521
|
+
run: dorfl advance "\${WORK_ITEM}" --merge --watch --arbiter origin
|
|
480
522
|
|
|
481
523
|
# ── REAP merged remote work/* branches (capability F, the hygiene sweep) ─────
|
|
482
524
|
# PRESERVED from the seed (NOT a separate gc-sweep workflow): the provider-
|
|
@@ -498,7 +540,7 @@ jobs:
|
|
|
498
540
|
if: \${{ (github.event.inputs.sweepMergedBranches || 'true') == 'true' }}
|
|
499
541
|
runs-on: ubuntu-latest
|
|
500
542
|
steps:
|
|
501
|
-
- uses:
|
|
543
|
+
- uses: ${pinnedUses(ACTION_PINS.checkout)}
|
|
502
544
|
with:
|
|
503
545
|
fetch-depth: 0
|
|
504
546
|
- uses: ./.github/actions/dorfl-setup
|
|
@@ -555,9 +597,15 @@ export function validateAdvanceLifecycleWorkflow(text) {
|
|
|
555
597
|
require('propose-matrix', /strategy:\s*[\s\S]*?matrix:/.test(text), '`propose` mode must emit a MATRIX of jobs (`strategy.matrix`).');
|
|
556
598
|
require('propose-enumerates-via-scan', /dorfl scan --json/.test(text), 'the matrix items must be ENUMERATED via the eligible-pool scan ' +
|
|
557
599
|
'(`dorfl scan --json`).');
|
|
558
|
-
require('propose-one-advance-per-item', /dorfl advance "
|
|
559
|
-
'(one PR per item).');
|
|
560
|
-
|
|
600
|
+
require('propose-one-advance-per-item', /WORK_ITEM:\s*\$\{\{\s*matrix\.item\s*\}\}[\s\S]*?dorfl advance "\$\{WORK_ITEM\}"/.test(text), 'each matrix leg must run one `dorfl advance <matrix item>` ' +
|
|
601
|
+
'(one PR per item), reading the item from the step env (`WORK_ITEM`).');
|
|
602
|
+
// The item id is a slug that may be hand-written (only minted slugs are
|
|
603
|
+
// sanitised), so it must reach the shell as DATA through `env:`, never as `${{ }}` text
|
|
604
|
+
// spliced into the `run:` script (GitHub Actions script injection).
|
|
605
|
+
require('matrix-item-not-spliced-into-run', !/dorfl advance "?\$\{\{/.test(operative), 'the matrix item must NOT be interpolated into the `run:` script as ' +
|
|
606
|
+
'`${{ matrix.item }}` (script injection): pass it through the step `env:` ' +
|
|
607
|
+
'as `WORK_ITEM` and quote it as `"${WORK_ITEM}"`.');
|
|
608
|
+
require('propose-leg-carries-propose-flag', /advance-propose:[\s\S]*?dorfl advance "\$\{WORK_ITEM\}"[^\n]*--propose\b/.test(text), 'each `propose` matrix leg must pass `--propose` so the integration mode is ' +
|
|
561
609
|
'TIED to the matrix shape (a leg can never merge to main / desync from the ' +
|
|
562
610
|
'dispatch mode).');
|
|
563
611
|
// --- merge ⇒ a MATRIX per item (parallel build/gate/review, serialised land) -
|
|
@@ -567,7 +615,7 @@ export function validateAdvanceLifecycleWorkflow(text) {
|
|
|
567
615
|
require('merge-matrix', /advance-merge:[\s\S]*?strategy:\s*[\s\S]*?matrix:/.test(text), 'the `merge` job must use a MATRIX (parallel build/gate/review per item; ' +
|
|
568
616
|
"the land tail is serialised by the engine's `mergeRetries` CAS-retry " +
|
|
569
617
|
"loop, not by the workflow's job shape).");
|
|
570
|
-
require('merge-leg-carries-merge-flag', /advance-merge:[\s\S]*?dorfl advance "
|
|
618
|
+
require('merge-leg-carries-merge-flag', /advance-merge:[\s\S]*?dorfl advance "\$\{WORK_ITEM\}"[^\n]*--merge\b/.test(text), 'each `merge` matrix leg must pass `--merge` so the integration mode is ' +
|
|
571
619
|
'TIED to the matrix shape (a leg can never propose-only / desync from the ' +
|
|
572
620
|
'dispatch mode).');
|
|
573
621
|
// No host-specific cross-job serialiser on the merge job: a GitHub Actions
|
|
@@ -616,8 +664,13 @@ export function validateAdvanceLifecycleWorkflow(text) {
|
|
|
616
664
|
['observationTriage', 'DORFL_OBSERVATION_TRIAGE'],
|
|
617
665
|
['surfaceBlockers', 'DORFL_SURFACE_BLOCKERS'],
|
|
618
666
|
]) {
|
|
619
|
-
// The override is a guarded shell write
|
|
620
|
-
|
|
667
|
+
// The override is a guarded shell write of a step-env copy of the input:
|
|
668
|
+
// `env: DISPATCH_<X>: ${{ inputs.<x> }}` then
|
|
669
|
+
// `[ -n "${DISPATCH_<X>}" ] && echo "<ENV>=${DISPATCH_<X>}" >> $GITHUB_ENV`.
|
|
670
|
+
// The input never appears as `${{ }}` text inside the `run:` script.
|
|
671
|
+
const dispatchVar = envVar.replace(/^DORFL_/, 'DISPATCH_');
|
|
672
|
+
const guardedWrite = new RegExp(`${dispatchVar}:\\s*\\$\\{\\{ github\\.event\\.inputs\\.${input} \\}\\}` +
|
|
673
|
+
`[\\s\\S]*?\\[ -n "\\$\\{${dispatchVar}\\}" \\] && echo "${envVar}=\\$\\{${dispatchVar}\\}"`);
|
|
621
674
|
require(`dispatch-${input}-guarded-write`, guardedWrite.test(text), `the \`${input}\` override must be a blank-guarded write of \`${envVar}\` ` +
|
|
622
675
|
'to `$GITHUB_ENV` (blank dispatch input / schedule / push emit nothing).');
|
|
623
676
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance-lifecycle-template.js","sourceRoot":"","sources":["../src/advance-lifecycle-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;
|
|
1
|
+
{"version":3,"file":"advance-lifecycle-template.js","sourceRoot":"","sources":["../src/advance-lifecycle-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAC;AAE9D,6EAA6E;AAC7E,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAAC;AAEnE,oEAAoE;AACpE,MAAM,CAAC,MAAM,kCAAkC,GAC9C,oJAAoJ,CAAC;AAEtJ,8EAA8E;AAC9E,MAAM,CAAC,MAAM,+BAA+B,GAC3C,iCAAiC,CAAC;AAEnC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gCAAgC,C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,IAAI,CACpK,IAAI,CACJ,EAAE,2DAA2D;QAC7D,0EAA0E;QAC1E,mEAAmE,CAAC,CAAC;IACtE,OAAO,CAAC,mCAAmC,EAAE,+GAA+G,CAAC,IAAI,CAChK,IAAI,CACJ,EAAE,yDAAyD;QAC3D,0EAA0E;QAC1E,4CAA4C,CAAC,CAAC;IAC/C,wEAAwE;IACxE,yEAAyE;IACzE,kEAAkE;IAClE,OAAO,CAAC,6BAA6B,EAAE,CAAC,iEAAiE,CAAC,IAAI,CAC7G,IAAI,CACJ,EAAE,gEAAgE;QAClE,mEAAmE;QACnE,+CAA+C,CAAC,CAAC;IAElD,8EAA8E;IAC9E,OAAO,CAAC,0BAA0B,EAAE,8CAA8C,CAAC,IAAI,CACtF,IAAI,CACJ,EAAE,wDAAwD;QAC1D,8DAA8D,CAAC,CAAC;IAEjE,OAAO,EAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,QAAQ,EAAC,CAAC;AAC9C,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -581,8 +581,8 @@ export function formatSyncReport(result, dryRun) {
|
|
|
581
581
|
* it prints the error to stderr and exits 1 (the task-only commands never act on
|
|
582
582
|
* a spec). An OMITTED slug (`start`/`complete`/`prompt` infer it from the branch)
|
|
583
583
|
* passes through untouched. (The legacy ''prd:'' prefix is a DEAD namespace token
|
|
584
|
-
* after the hard cutover
|
|
585
|
-
*
|
|
584
|
+
* after the hard cutover: it is not special-cased here; a ''prd:<slug>'' arg
|
|
585
|
+
* is refused by the shared safe-slug check, since `:` is not a slug character.)
|
|
586
586
|
*
|
|
587
587
|
* `do` is the ONE command that spans both namespaces; it consumes the full
|
|
588
588
|
* `resolveSlug` (with the cross-namespace collision check) in the `do-in-place`
|
|
@@ -46,7 +46,7 @@ export declare const CLOSE_JOB_WORKFLOW_PATH = "workflows/close-job.yml";
|
|
|
46
46
|
* and future per-config wiring, but the close-job shape itself is
|
|
47
47
|
* config-independent.
|
|
48
48
|
*/
|
|
49
|
-
export declare function generateCloseJobWorkflow(
|
|
49
|
+
export declare function generateCloseJobWorkflow(config: ResolvedCIConfig): string;
|
|
50
50
|
/** A single structural problem found in the generated workflow. */
|
|
51
51
|
export interface CloseJobProblem {
|
|
52
52
|
/** A short, stable id for the violated invariant (for tests/assertions). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-job-template.d.ts","sourceRoot":"","sources":["../src/close-job-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;
|
|
1
|
+
{"version":3,"file":"close-job-template.d.ts","sourceRoot":"","sources":["../src/close-job-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAG3D,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,cAAc,CAAC;AAEnD,4DAA4D;AAC5D,eAAO,MAAM,0BAA0B,2EACkC,CAAC;AAE1E,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAmFzE;AAED,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC/B,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IAClC,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,iDAAiD;IACjD,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAuFzE"}
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
* parses + carries the right discipline" the task's acceptance criteria require;
|
|
33
33
|
* the test generates this artifact under `--fake` and asserts every invariant.
|
|
34
34
|
*/
|
|
35
|
+
import { ACTION_PINS, pinnedUses } from './install-ci-action-pins.js';
|
|
36
|
+
import { shouldDropCheckoutCredentials } from './install-ci-core.js';
|
|
35
37
|
/** The capability id (the registry key + the emitted workflow file stem). */
|
|
36
38
|
export const CLOSE_JOB_CAPABILITY_ID = 'close-job';
|
|
37
39
|
/** The wizard-facing label for the close-job capability. */
|
|
@@ -45,7 +47,19 @@ export const CLOSE_JOB_WORKFLOW_PATH = 'workflows/close-job.yml';
|
|
|
45
47
|
* and future per-config wiring, but the close-job shape itself is
|
|
46
48
|
* config-independent.
|
|
47
49
|
*/
|
|
48
|
-
export function generateCloseJobWorkflow(
|
|
50
|
+
export function generateCloseJobWorkflow(config) {
|
|
51
|
+
// `persist-credentials: false` ONLY on a repo KNOWN to be public (see
|
|
52
|
+
// {@link shouldDropCheckoutCredentials}): this job has `contents: read`, so
|
|
53
|
+
// the persisted token can only ever read, and on a public repo reads need
|
|
54
|
+
// no token. Unknown / private / internal ⇒ today's checkout, unchanged.
|
|
55
|
+
const checkoutCredentials = shouldDropCheckoutCredentials(config)
|
|
56
|
+
? `
|
|
57
|
+
# Public repository: every git read works without a token, and this
|
|
58
|
+
# job cannot push, so do not leave the token in .git/config for later
|
|
59
|
+
# steps (the setup action, including any project-setup hook, and
|
|
60
|
+
# close-merged-issues) to read.
|
|
61
|
+
persist-credentials: false`
|
|
62
|
+
: '';
|
|
49
63
|
return `\
|
|
50
64
|
# dorfl — the ISSUE CLOSE-JOB in CI (capability E, spec runner-in-ci).
|
|
51
65
|
# EMITTED by \`dorfl install-ci\`; the human commits it. DO NOT hand-edit a
|
|
@@ -103,9 +117,9 @@ jobs:
|
|
|
103
117
|
close-merged-issues:
|
|
104
118
|
runs-on: ubuntu-latest
|
|
105
119
|
steps:
|
|
106
|
-
- uses:
|
|
120
|
+
- uses: ${pinnedUses(ACTION_PINS.checkout)}
|
|
107
121
|
with:
|
|
108
|
-
fetch-depth: 0
|
|
122
|
+
fetch-depth: 0${checkoutCredentials}
|
|
109
123
|
- uses: ./.github/actions/dorfl-setup
|
|
110
124
|
- name: close issues whose work has landed on main
|
|
111
125
|
# In-place in this checkout (no --isolated/--remote): the CI container IS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-job-template.js","sourceRoot":"","sources":["../src/close-job-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;
|
|
1
|
+
{"version":3,"file":"close-job-template.js","sourceRoot":"","sources":["../src/close-job-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EAAC,6BAA6B,EAAC,MAAM,sBAAsB,CAAC;AAEnE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;AAEnD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,0BAA0B,GACtC,wEAAwE,CAAC;AAE1E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAwB;IAChE,sEAAsE;IACtE,4EAA4E;IAC5E,0EAA0E;IAC1E,wEAAwE;IACxE,MAAM,mBAAmB,GAAG,6BAA6B,CAAC,MAAM,CAAC;QAChE,CAAC,CAAC;;;;;qCAKiC;QACnC,CAAC,CAAC,EAAE,CAAC;IACN,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAyDQ,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC;;0BAEtB,mBAAmB;;;;;;;;;;CAU5C,CAAC;AACF,CAAC;AAkBD;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CA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E;IAC/E,+DAA+D;IAC/D,OAAO,CAAC,0BAA0B,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAC3D,SAAS,CACT,EAAE,sEAAsE;QACxE,uDAAuD,CAAC,CAAC;IAC1D,2EAA2E;IAC3E,OAAO,CAAC,gBAAgB,EAAE,CAAC,+BAA+B,CAAC,IAAI,CAC9D,SAAS,CACT,EAAE,yEAAyE;QAC3E,qDAAqD,CAAC,CAAC;IAExD,8EAA8E;IAC9E,OAAO,CAAC,kBAAkB,EAAE,CAAC,cAAc,CAAC,IAAI,CAC/C,SAAS,CACT,EAAE,0EAA0E,CAAC,CAAC;IAC/E,OAAO,CAAC,gBAAgB,EAAE,CAAC,YAAY,CAAC,IAAI,CAC3C,SAAS,CACT,EAAE,gEAAgE,CAAC,CAAC;IAErE,8EAA8E;IAC9E,OAAO,CAAC,mBAAmB,EAAE,iCAAiC,CAAC,IAAI,CAClE,IAAI,CACJ,EAAE,+EAA+E,CAAC,CAAC;IAEpF,+EAA+E;IAC/E,OAAO,CAAC,yBAAyB,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAChE,IAAI,CACJ,EAAE,wEAAwE;QAC1E,gEAAgE,CAAC,CAAC;IACnE,OAAO,CAAC,kCAAkC,EAAE,CAAC,uBAAuB,CAAC,IAAI,CACxE,SAAS,CACT,EAAE,+DAA+D,CAAC,CAAC;IACpE,gFAAgF;IAChF,kFAAkF;IAClF,mFAAmF;IACnF,OAAO,CAAC,yBAAyB,EAAE,qBAAqB,CAAC,IAAI,CAC5D,SAAS,CACT,EAAE,8EAA8E,CAAC,CAAC;IAEnF,OAAO,EAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,QAAQ,EAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE table of third-party GitHub Actions that `dorfl install-ci` emits,
|
|
3
|
+
* each pinned to a full 40-character commit SHA, plus the regeneration rule that
|
|
4
|
+
* keeps a consumer repository's own pins.
|
|
5
|
+
*
|
|
6
|
+
* WHY SHAS. A tag such as `@v5` can be moved by whoever controls the action's
|
|
7
|
+
* repository, so a compromised or careless release reaches every job that uses
|
|
8
|
+
* it, including dorfl's jobs that hold `contents: write` and a provider API key.
|
|
9
|
+
* A commit SHA cannot move. This is GitHub's own hardening guidance ("Using
|
|
10
|
+
* third-party actions", Security hardening for GitHub Actions).
|
|
11
|
+
*
|
|
12
|
+
* THE FORMAT. Every reference is emitted as `owner/repo@<40-hex-sha> # vX.Y.Z`,
|
|
13
|
+
* the exact shape Dependabot writes and rewrites, so a consumer that enables
|
|
14
|
+
* Dependabot's `github-actions` ecosystem (with `/.github/actions/*` in
|
|
15
|
+
* `directories` for the composite action) gets reviewable bump PRs.
|
|
16
|
+
*
|
|
17
|
+
* HOW EACH SHA WAS RESOLVED (2026-09-26). For each tag:
|
|
18
|
+
* 1. `git ls-remote --tags https://github.com/<owner>/<repo>.git`, reading the
|
|
19
|
+
* peeled `refs/tags/<tag>^{}` line when the tag is annotated (that line is
|
|
20
|
+
* the COMMIT; the unpeeled line is the tag OBJECT and must never be used),
|
|
21
|
+
* else the tag line itself for a lightweight tag;
|
|
22
|
+
* 2. cross-checked with `gh api repos/<owner>/<repo>/git/ref/tags/<tag>`
|
|
23
|
+
* (object type) and `gh api repos/<owner>/<repo>/commits/<sha>` (the SHA is
|
|
24
|
+
* a commit that exists in the repository).
|
|
25
|
+
*
|
|
26
|
+
* actions/checkout v7.0.1: lightweight tag, `git/ref` type `commit`,
|
|
27
|
+
* 3d3c42e5aac5ba805825da76410c181273ba90b1 ("prep v7.0.1 release (#2531)").
|
|
28
|
+
* The floating `v7` tag points at the same commit. v7 is the current major
|
|
29
|
+
* and adds the fork-PR checkout block for `pull_request_target` /
|
|
30
|
+
* `workflow_run` that v5 lacks; the inputs dorfl passes (`fetch-depth`,
|
|
31
|
+
* `persist-credentials`) are unchanged.
|
|
32
|
+
* actions/setup-node v7.0.0: lightweight tag, `git/ref` type `commit`,
|
|
33
|
+
* 820762786026740c76f36085b0efc47a31fe5020 ("Migrate to ESM and upgrade
|
|
34
|
+
* dependencies (#1574)"). The floating `v7` tag points at the same commit.
|
|
35
|
+
* `node-version` and `package-manager-cache` are still inputs (see the
|
|
36
|
+
* comment on the setup-node step in `generateSetupAction`).
|
|
37
|
+
* pnpm/action-setup v6.1.0: ANNOTATED tag. `git/ref` type `tag` with object
|
|
38
|
+
* d9184bf108216479bc5a137cc391f4d7b14c870b (the tag object, NOT usable);
|
|
39
|
+
* peeled `^{}` and `gh api .../git/tags/d9184bf...` both give the commit
|
|
40
|
+
* ea17c68df8912ef543352723c149a84f56e3d413 ("feat: support pnpm v12
|
|
41
|
+
* (#288)"). With no `version` input it still reads `packageManager` from
|
|
42
|
+
* package.json, which is how dorfl's workspace mode uses it.
|
|
43
|
+
*
|
|
44
|
+
* To bump a pin: resolve the new tag the same way, update the entry, and record
|
|
45
|
+
* the resolution above. `install-ci-actions-pinned.test.ts` fails on any
|
|
46
|
+
* emitted `uses:` that is not a full SHA.
|
|
47
|
+
*/
|
|
48
|
+
/** One pinned third-party action. */
|
|
49
|
+
export interface ActionPin {
|
|
50
|
+
/** `owner/repo`, or `owner/repo/path` for an action in a subdirectory. */
|
|
51
|
+
readonly action: string;
|
|
52
|
+
/** The full 40-character lowercase commit SHA (never a tag object). */
|
|
53
|
+
readonly sha: string;
|
|
54
|
+
/** The release tag the SHA was resolved from, for the trailing comment. */
|
|
55
|
+
readonly version: string;
|
|
56
|
+
}
|
|
57
|
+
/** Every third-party action dorfl's generators emit. */
|
|
58
|
+
export declare const ACTION_PINS: {
|
|
59
|
+
readonly checkout: {
|
|
60
|
+
readonly action: "actions/checkout";
|
|
61
|
+
readonly sha: "3d3c42e5aac5ba805825da76410c181273ba90b1";
|
|
62
|
+
readonly version: "v7.0.1";
|
|
63
|
+
};
|
|
64
|
+
readonly setupNode: {
|
|
65
|
+
readonly action: "actions/setup-node";
|
|
66
|
+
readonly sha: "820762786026740c76f36085b0efc47a31fe5020";
|
|
67
|
+
readonly version: "v7.0.0";
|
|
68
|
+
};
|
|
69
|
+
readonly pnpmSetup: {
|
|
70
|
+
readonly action: "pnpm/action-setup";
|
|
71
|
+
readonly sha: "ea17c68df8912ef543352723c149a84f56e3d413";
|
|
72
|
+
readonly version: "v6.1.0";
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* The value to put after `uses: ` for a pinned action:
|
|
77
|
+
* `owner/repo@<sha> # vX.Y.Z` (the Dependabot format).
|
|
78
|
+
*/
|
|
79
|
+
export declare function pinnedUses(pin: ActionPin): string;
|
|
80
|
+
/**
|
|
81
|
+
* Collect the SHA pins an existing file already carries, keyed by action
|
|
82
|
+
* (`owner/repo[/path]`). The value is the whole `uses:` value with its trailing
|
|
83
|
+
* comment, exactly as written. When the file pins the same action to several
|
|
84
|
+
* different SHAs, the one whose `# vX.Y.Z` comment is highest wins (ties: the
|
|
85
|
+
* first in the file), so a partial manual bump is never undone.
|
|
86
|
+
*/
|
|
87
|
+
export declare function existingPins(existing: string): Map<string, string>;
|
|
88
|
+
/**
|
|
89
|
+
* Rewrite a freshly generated workflow / composite action so every `uses:` of an
|
|
90
|
+
* action that `existing` already pins to a full SHA keeps the consumer's
|
|
91
|
+
* reference and trailing comment. Matching is by action (`owner/repo`, plus the
|
|
92
|
+
* path for an action in a subdirectory), never by position. An existing TAG is
|
|
93
|
+
* not a pin: the generated reference (dorfl's SHA) stays. So the result never
|
|
94
|
+
* swaps a SHA for a tag. Only the value after `uses: ` changes; indentation and
|
|
95
|
+
* every other line are the generated ones.
|
|
96
|
+
*/
|
|
97
|
+
export declare function preserveExistingPins(generated: string, existing: string | undefined): string;
|
|
98
|
+
//# sourceMappingURL=install-ci-action-pins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-ci-action-pins.d.ts","sourceRoot":"","sources":["../src/install-ci-action-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,qCAAqC;AACrC,MAAM,WAAW,SAAS;IACzB,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,wDAAwD;AACxD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;CAgBsB,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAEjD;AA8CD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC1B,MAAM,CAcR"}
|