@icebreakers/monorepo 6.1.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{baseline-Dpdng8Pw.mjs → baseline-BQu4IKz4.mjs} +1 -1
  2. package/dist/{catalog-A1_tGyBz.mjs → catalog-CCIOouaT.mjs} +3 -3
  3. package/dist/cli.mjs +340 -68
  4. package/dist/{commands-C8PiGh9h.mjs → commands-CWJn-_PI.mjs} +4383 -1788
  5. package/dist/{config-CtnhpveO.mjs → config-DnZHBngA.mjs} +3 -3
  6. package/dist/{create-flow-CqtNwZs7.mjs → create-flow-C0CPG04P.mjs} +3 -3
  7. package/dist/{deps-CFZftEq2.mjs → deps-8UyoQQd6.mjs} +3 -3
  8. package/dist/{execute-DE3pJ4nx.mjs → execute-BYzX0pIK.mjs} +2 -2
  9. package/dist/{execute-Brlvq-TY.mjs → execute-CiqUeURT.mjs} +2 -2
  10. package/dist/{format-BXQ2yRvk.mjs → format-B059MkpS.mjs} +1 -1
  11. package/dist/{index-BJaI8Sig.d.mts → index-B80WWXOe.d.mts} +28 -1
  12. package/dist/index.d.mts +457 -41
  13. package/dist/index.mjs +10 -10
  14. package/dist/{inputs-DRWom7Va.mjs → inputs-DfmfV3ft.mjs} +1 -1
  15. package/dist/{npm-CrQi6Gci.mjs → npm-DO0l0ypv.mjs} +1 -1
  16. package/dist/{plan-DT1Gz8tE.mjs → plan-Cnl_s1t5.mjs} +1 -1
  17. package/dist/{run-BBf92Scj.mjs → run-BO8ggtNx.mjs} +4 -4
  18. package/dist/{save-CCCUswjG.mjs → save-DJijxFFK.mjs} +3 -3
  19. package/dist/{scan-KcMaJTx2.mjs → scan-BBXEVepK.mjs} +2 -2
  20. package/dist/{template-drift-BKCMx9vC.mjs → template-drift-BD8maCoP.mjs} +3 -3
  21. package/dist/tooling-entry.d.mts +1 -1
  22. package/dist/tooling-entry.mjs +2 -2
  23. package/dist/{transaction-CTFrGYJO.mjs → transaction-CglLPcZ_.mjs} +2 -2
  24. package/dist/{tsconfig-CO_6DRDo.mjs → tsconfig-DCmFfA6W.mjs} +11 -3
  25. package/dist/{vitest-Deitv0TQ.mjs → vitest-D8nnSzlj.mjs} +1 -1
  26. package/dist/{workspace-tasks-CbetXdoh.mjs → workspace-tasks-BK8EQ2x4.mjs} +6 -6
  27. package/package.json +9 -7
  28. package/resources/release-auto-changeset/workflow.yml +93 -0
  29. package/resources/release-snapshot/build.yml +127 -0
  30. package/resources/release-snapshot/publish.yml +180 -0
  31. package/resources/release-validation/README.md +52 -0
  32. package/resources/release-validation/policy.json +3 -0
  33. package/resources/release-validation/workflow.yml +43 -0
  34. package/resources/skills/repoctl/references/commands.md +15 -0
@@ -0,0 +1,180 @@
1
+ name: __PUBLISHER_WORKFLOW_NAME__
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: [__BUILDER_WORKFLOW_NAME__]
6
+ types: [completed]
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ defaults:
12
+ run:
13
+ shell: bash
14
+
15
+ env:
16
+ SNAPSHOT_BUILDER_SHA256: __BUILDER_SHA256__
17
+ SNAPSHOT_BUILDER_WORKFLOW: __BUILDER_WORKFLOW_PATH__
18
+ SNAPSHOT_PUBLISHER_WORKFLOW: __PUBLISHER_WORKFLOW_PATH__
19
+ SNAPSHOT_BUILD_ENVIRONMENT: __ENVIRONMENT__
20
+
21
+ jobs:
22
+ verify:
23
+ name: Verify approved snapshot artifact
24
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
25
+ runs-on: ubuntu-latest
26
+ timeout-minutes: 10
27
+ permissions:
28
+ contents: read
29
+ actions: read
30
+ pull-requests: read
31
+ outputs:
32
+ pull_request: ${{ steps.verify.outputs.pull_request }}
33
+ artifact_id: ${{ steps.verify.outputs.artifact_id }}
34
+ steps:
35
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
36
+ with:
37
+ node-version: 24.22.1
38
+ - name: Install the pinned verifier without candidate code
39
+ working-directory: ${{ runner.temp }}
40
+ run: npm install --prefix "$RUNNER_TEMP/repoctl-tools" --ignore-scripts --no-audit --no-fund --package-lock=false repoctl@__VERSION__ pnpm@__PNPM_VERSION__
41
+ - name: Verify GitHub approval, frozen plan, current revision and artifact bytes
42
+ id: verify
43
+ env:
44
+ GITHUB_TOKEN: ${{ github.token }}
45
+ SOURCE_RUN_ID: ${{ github.event.workflow_run.id }}
46
+ SOURCE_RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
47
+ working-directory: ${{ runner.temp }}
48
+ run: |
49
+ "$RUNNER_TEMP/repoctl-tools/node_modules/.bin/repo" release snapshot verify --run-id "$SOURCE_RUN_ID" --run-attempt "$SOURCE_RUN_ATTEMPT" --builder-workflow "$SNAPSHOT_BUILDER_WORKFLOW" --builder-sha256 "$SNAPSHOT_BUILDER_SHA256" --environment "$SNAPSHOT_BUILD_ENVIRONMENT" --out "$RUNNER_TEMP/snapshot-verified.json" --json
50
+ node --input-type=module <<'NODE'
51
+ import fs from 'node:fs';
52
+ const result = JSON.parse(fs.readFileSync(`${process.env.RUNNER_TEMP}/snapshot-verified.json`, 'utf8'));
53
+ fs.appendFileSync(process.env.GITHUB_OUTPUT, `pull_request=${result.plan.source.pullRequest}\nartifact_id=${result.evidence.buildArtifact.id}\n`);
54
+ NODE
55
+
56
+ publish:
57
+ name: Publish the verified prepared tarballs
58
+ needs: verify
59
+ runs-on: ubuntu-latest
60
+ timeout-minutes: 30
61
+ concurrency:
62
+ group: repoctl-snapshot-${{ github.repository }}-pr-${{ needs.verify.outputs.pull_request }}
63
+ cancel-in-progress: false
64
+ permissions:
65
+ contents: read
66
+ actions: read
67
+ pull-requests: read
68
+ id-token: write
69
+ outputs:
70
+ report_artifact: ${{ steps.report.outputs.artifact-id }}
71
+ steps:
72
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
73
+ with:
74
+ node-version: 24.22.1
75
+ - name: Install only the pinned trusted publisher
76
+ working-directory: ${{ runner.temp }}
77
+ run: |
78
+ npm install --prefix "$RUNNER_TEMP/repoctl-tools" --ignore-scripts --no-audit --no-fund --package-lock=false repoctl@__VERSION__ pnpm@__PNPM_VERSION__
79
+ echo "$RUNNER_TEMP/repoctl-tools/node_modules/.bin" >> "$GITHUB_PATH"
80
+ - name: Recheck all evidence, audit npm OIDC and publish without package scripts
81
+ env:
82
+ GITHUB_TOKEN: ${{ github.token }}
83
+ SOURCE_RUN_ID: ${{ github.event.workflow_run.id }}
84
+ SOURCE_RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
85
+ SOURCE_ARTIFACT_ID: ${{ needs.verify.outputs.artifact_id }}
86
+ working-directory: ${{ runner.temp }}
87
+ run: |
88
+ "$RUNNER_TEMP/repoctl-tools/node_modules/.bin/repo" release snapshot publish-prepared --run-id "$SOURCE_RUN_ID" --run-attempt "$SOURCE_RUN_ATTEMPT" --artifact-id "$SOURCE_ARTIFACT_ID" --builder-workflow "$SNAPSHOT_BUILDER_WORKFLOW" --builder-sha256 "$SNAPSHOT_BUILDER_SHA256" --environment "$SNAPSHOT_BUILD_ENVIRONMENT" --publisher-workflow "$SNAPSHOT_PUBLISHER_WORKFLOW" --output "$RUNNER_TEMP/snapshot-publication" --out "$RUNNER_TEMP/snapshot-publication.json" --json
89
+ - name: Retain the trusted publication report
90
+ id: report
91
+ if: always()
92
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
93
+ with:
94
+ name: snapshot-publication-${{ github.run_id }}-${{ github.run_attempt }}
95
+ path: ${{ runner.temp }}/snapshot-publication.json
96
+ if-no-files-found: error
97
+ retention-days: 14
98
+
99
+ consumer:
100
+ name: Verify the exact published packages in isolation
101
+ needs: publish
102
+ runs-on: ubuntu-latest
103
+ timeout-minutes: 30
104
+ permissions:
105
+ contents: read
106
+ outputs:
107
+ report_artifact: ${{ steps.report.outputs.artifact-id }}
108
+ steps:
109
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
110
+ with:
111
+ node-version: 24.22.1
112
+ - name: Install the pinned consumer verifier
113
+ working-directory: ${{ runner.temp }}
114
+ run: |
115
+ npm install --prefix "$RUNNER_TEMP/repoctl-tools" --ignore-scripts --no-audit --no-fund --package-lock=false repoctl@__VERSION__ pnpm@__PNPM_VERSION__
116
+ echo "$RUNNER_TEMP/repoctl-tools/node_modules/.bin" >> "$GITHUB_PATH"
117
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
118
+ with:
119
+ artifact-ids: ${{ needs.publish.outputs.report_artifact }}
120
+ path: ${{ runner.temp }}/publication
121
+ merge-multiple: true
122
+ - name: Install exact versions and exercise their consumer entrypoints without publishing permissions
123
+ working-directory: ${{ runner.temp }}
124
+ run: |
125
+ "$RUNNER_TEMP/repoctl-tools/node_modules/.bin/repo" release snapshot verify-consumer --report "$RUNNER_TEMP/publication/snapshot-publication.json" --output "$RUNNER_TEMP/snapshot-consumer" --out "$RUNNER_TEMP/snapshot-consumer.json" --json
126
+ - name: Retain consumer evidence
127
+ id: report
128
+ if: always()
129
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
130
+ with:
131
+ name: snapshot-consumer-${{ github.run_id }}-${{ github.run_attempt }}
132
+ path: ${{ runner.temp }}/snapshot-consumer.json
133
+ if-no-files-found: error
134
+ retention-days: 14
135
+
136
+ report:
137
+ name: Report the confirmed snapshot installation
138
+ needs: [verify, publish, consumer]
139
+ if: ${{ !cancelled() && needs.publish.result == 'success' }}
140
+ runs-on: ubuntu-latest
141
+ timeout-minutes: 5
142
+ concurrency:
143
+ group: repoctl-snapshot-report-${{ github.repository }}-pr-${{ needs.verify.outputs.pull_request }}
144
+ cancel-in-progress: false
145
+ permissions:
146
+ contents: read
147
+ actions: read
148
+ pull-requests: write
149
+ steps:
150
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
151
+ with:
152
+ artifact-ids: ${{ needs.publish.outputs.report_artifact }}
153
+ path: ${{ runner.temp }}/publication
154
+ merge-multiple: true
155
+ - name: Update the PR with exact versions and consumer status
156
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
157
+ env:
158
+ PR_NUMBER: ${{ needs.verify.outputs.pull_request }}
159
+ CONSUMER_RESULT: ${{ needs.consumer.result }}
160
+ with:
161
+ script: |
162
+ const fs = require('node:fs');
163
+ const report = JSON.parse(fs.readFileSync(`${process.env.RUNNER_TEMP}/publication/snapshot-publication.json`, 'utf8'));
164
+ const number = Number(process.env.PR_NUMBER);
165
+ const source = report.manifest.plan.source;
166
+ if (report.status !== 'published' || source.pullRequest !== number || source.repository !== `${context.repo.owner}/${context.repo.repo}`) throw new Error('Publication report identity mismatch');
167
+ const { data: pr } = await github.rest.pulls.get({ ...context.repo, pull_number: number });
168
+ if (pr.state !== 'open' || pr.head.sha !== source.headSha || pr.base.sha !== source.baseSha || pr.merge_commit_sha !== source.mergeSha) throw new Error('PR revision changed after publication');
169
+ const marker = '<!-- repoctl-pr-snapshot -->';
170
+ const comments = await github.paginate(github.rest.issues.listComments, { ...context.repo, issue_number: number });
171
+ const existing = comments.find(comment => comment.user?.login === 'github-actions[bot]' && comment.body?.startsWith(marker));
172
+ const previous = existing?.body?.match(/<!-- repoctl-pr-snapshot-build:(\d+):(\d+) -->/);
173
+ if (previous && (Number(previous[1]) > source.runId || (Number(previous[1]) === source.runId && Number(previous[2]) > source.runAttempt))) {
174
+ await core.summary.addRaw('A newer snapshot already owns the PR installation comment.').write();
175
+ return;
176
+ }
177
+ const body = [marker, `<!-- repoctl-pr-snapshot-build:${source.runId}:${source.runAttempt} -->`, `Snapshot for ${source.headSha}`, '', `\`\`\`sh\n${report.installCommand}\n\`\`\``, '', `Consumer verification: ${process.env.CONSUMER_RESULT}.`, '', `Build: ${source.runId}/${source.runAttempt}; publisher: ${context.runId}.`].join('\n');
178
+ if (existing) await github.rest.issues.updateComment({ ...context.repo, comment_id: existing.id, body });
179
+ else await github.rest.issues.createComment({ ...context.repo, issue_number: number, body });
180
+ await core.summary.addRaw(body).write();
@@ -0,0 +1,52 @@
1
+ # Frozen Release PR validation
2
+
3
+ Copy `workflow.yml` into a reusable workflow and `policy.json` to
4
+ `.github/release-validation.json`. Replace both version placeholders with exact
5
+ published repoctl and pnpm versions containing `release validate-preparation`.
6
+ Use the same native pnpm version for preparation and validation. Do not assume an
7
+ older published repoctl version contains this command.
8
+
9
+ The caller freezes full base/head commit IDs and supplies any required CI
10
+ approval before invoking the workflow. Branch names can select this validation
11
+ path, but only a `valid` report exempts a version-preparation PR from ordinary
12
+ release-intent admission. Invalid results must fail admission rather than fall
13
+ back to accepting deleted changeset paths.
14
+
15
+ The command reads policy JSON from the frozen base Git blob, and reads no
16
+ executable repository configuration. The base supplies workspace definitions,
17
+ native versioning settings, manifests, existing changelogs, pending intents and
18
+ ledger. Only inert metadata is copied to a disposable directory. Native pnpm
19
+ solves and applies versions there with scripts and pnpmfile disabled. No package
20
+ installation, candidate module, release hook or configuration dependency runs;
21
+ the source checkout, index and Git refs remain untouched.
22
+
23
+ The schema-versioned report lists each native package's versions, lane, native
24
+ reasons and validation status, plus expected, missing, mismatched or unexpected
25
+ files. Fixed groups and indirect dependency releases use the native result even
26
+ when no independent ledger entry or version increment exists. Historical
27
+ changelog content must match the native replay exactly. Native pnpm currently
28
+ leaves the lockfile unchanged; a lockfile edit cannot claim this exemption.
29
+
30
+ Additional outputs require an exact path and SHA-256 in trusted policy:
31
+
32
+ ```json
33
+ {
34
+ "branch": "main",
35
+ "generatedFiles": [
36
+ { "path": "generated/release.txt", "sha256": "REPLACE_WITH_64_HEX_DIGITS" }
37
+ ]
38
+ }
39
+ ```
40
+
41
+ For content derived from planned versions, trusted API callers may instead
42
+ supply `validate(context)`, returning a boolean or promise. The context contains
43
+ read-only copies of before/after bytes, frozen SHAs and planned packages. Never
44
+ load that callback from the candidate checkout. Callbacks and digests cannot
45
+ override manifests, changelogs, intents, ledger, workspace configuration or the
46
+ lockfile. Duplicate paths, traversal paths and unverified outputs fail closed.
47
+
48
+ Registry settings come from the trusted execution environment and frozen base
49
+ `publishConfig`. The candidate `.npmrc` is excluded. A validation runner must have the pinned pnpm available;
50
+ Corepack downloads and automatic pinning are disabled during replay. Network
51
+ registry reads used by the native solver can still occur. No publishing token
52
+ is needed.
@@ -0,0 +1,3 @@
1
+ {
2
+ "branch": "main"
3
+ }
@@ -0,0 +1,43 @@
1
+ name: Validate release preparation
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ base_sha:
7
+ required: true
8
+ type: string
9
+ head_sha:
10
+ required: true
11
+ type: string
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ validate:
18
+ runs-on: ubuntu-latest
19
+ timeout-minutes: 10
20
+ steps:
21
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
22
+ with:
23
+ node-version: 24.22.1
24
+ - name: Install pinned trusted tools outside the candidate checkout
25
+ working-directory: ${{ runner.temp }}
26
+ run: |
27
+ npm install --prefix "$RUNNER_TEMP/release-validation-tools" --ignore-scripts --no-audit --no-fund --package-lock=false repoctl@__REPOCTL_VERSION__ pnpm@__PNPM_VERSION__
28
+ echo "$RUNNER_TEMP/release-validation-tools/node_modules/.bin" >> "$GITHUB_PATH"
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ with:
31
+ ref: ${{ inputs.head_sha }}
32
+ fetch-depth: 0
33
+ persist-credentials: false
34
+ - name: Replay native version preparation from frozen metadata
35
+ env:
36
+ BASE_SHA: ${{ inputs.base_sha }}
37
+ HEAD_SHA: ${{ inputs.head_sha }}
38
+ shell: bash
39
+ run: |
40
+ set -euo pipefail
41
+ "$RUNNER_TEMP/release-validation-tools/node_modules/.bin/repo" release validate-preparation \
42
+ --base "$BASE_SHA" --head "$HEAD_SHA" \
43
+ --policy .github/release-validation.json --json
@@ -485,6 +485,12 @@ Automatic maintenance can complete the built-in Changesets migration and update
485
485
 
486
486
  `--publish` requires `REPOCTL_SNAPSHOT_PUBLISH=1` in a trusted same-repository GitHub Actions event whose SHA matches HEAD: `pull_request` for PRs; `schedule` or `workflow_dispatch` for nightly. Fork and `pull_request_target` publication is rejected. Only snapshot tags are used; no GitHub Releases or Git tags are created. Repeat the same identity only for identical artifacts; metadata and tarball integrity are checked before skipping existing versions. Unknown registry state fails closed. Reports retain exact install instructions, artifact paths and validation errors.
487
487
 
488
+ For a separate trusted PR publisher, preview `repo release snapshot workflow --out .github/workflows --pnpm-version 12.14.0 --dry-run --json`, then export without dry-run. Match the workspace's exact pnpm 12 pin. Export protects both destinations before writing and is idempotent for identical files. Review and merge the generated `repoctl-snapshot-build.yml` / `repoctl-snapshot-publish.yml` together; publisher policy contains the exact builder SHA256 and both use the installed repoctl version. To refresh, export to an empty directory and review both replacements. Do not automatically enable the recipe or change npm publisher settings merely because files were exported.
489
+
490
+ Configure required reviewers and disable admin bypass on `pr-snapshot`; npm Trusted Publisher must match the repository and `repoctl-snapshot-publish.yml`. Dispatch the builder on the default branch for an open ready same-repository PR. Protected freeze reads GitHub facts and plans checked-out metadata without candidate hooks, uploads `snapshot-plan.json`, then seals its ID/digest in the freeze job log. Read-only build checks out the exact merge and runs `snapshot prepare --plan <file> --output <external-directory>`, producing only `snapshot-manifest.json` and its tarballs. Public APIs are `freezeSnapshotSource`, `createSnapshotBuildPlan`, `prepareSnapshot`, `verifySnapshotRun`, `publishPreparedSnapshot`, `verifyPreparedSnapshotConsumer` and `getSnapshotWorkflows`.
491
+
492
+ `snapshot publish-prepared --run-id <id> --run-attempt <attempt> --builder-sha256 <trusted-hash> --output <external-directory>` verifies GitHub workflow/approval/current revision, same-attempt freeze and build jobs, the freeze log anchor, immutable artifact ID/digest, package inventory, exact dependency closure and tarball integrity before OIDC or upload. Never execute candidate code/configuration in the publisher; never fake GitHub event/SHA for provenance. Only public npm and `snapshot-pr-N` are supported. Keep `latest`, reject older-build tag rollback, and reuse identical artifacts for partial-publish recovery. A changed PR revision or failed builder requires fresh approval and a complete new builder attempt. Consumer imports/types run in a separate job without OIDC or write permissions; a trusted job reports the exact published versions and GitHub consumer result. No GitHub App/PAT, formal version/changelog/changeset/ledger changes, or candidate checkout in the publisher.
493
+
488
494
  ## Build contexts and production directories
489
495
 
490
496
  Preview `repo workspace prepare <exact-name-or-./directory> --mode prune|deploy --out ../empty-output --json`; save the plan outside the source workspace. Apply only after review with `repo workspace prepare --apply ../plan.json`. Prune uses local Turbo 2 and optional `--docker`; deploy uses exact pinned pnpm 10/11/12 with production dependencies, frozen lockfile, disabled lifecycle/pnpmfile hooks, optional `--offline`/explicit `--legacy`, and an existing built `--entry` or manifest main/single bin. Native version-specific injection and peer behavior remains authoritative. No application, image publishing or cloud deployment is executed.
@@ -494,3 +500,12 @@ Native commands receive an isolated copy without node_modules, Git/operation/cac
494
500
  ## Documentation build context
495
501
 
496
502
  Use `resolveDocsContext({ channel, url, previewOrigin, stableOrigin })` from `repoctl/docs-context` for public build metadata, plus `docsRobots`, `docsPreviewRobots` and ownership-aware `mergeDocsHeaders`. The pure entrypoint loads no provider, credentials or GitHub state. Default local builds are preview; `REPO_DOCS_CHANNEL=stable pnpm build` is allowed without deployment authorization. Distinct HTTP(S) origins are required and optional `REPO_DOCS_URL` must match. Review cached tasks with `repo env check build lint typecheck test --json`.
503
+
504
+ ## Existing workspace release and hooks adoption
505
+
506
+ Use the public APIs and CLI instead of copying repository scripts:
507
+
508
+ - `createAutoChangesetPlan` / `repo release auto-changeset --repository owner/repo --pr N --json` use native pnpm workspace discovery and frozen GitHub data. Put policy in default-branch `.github/repoctl-auto-changeset.json`; it can declare paths, package/dependent links, title/label levels and localized summaries. Handwritten intents win, fork writes are forbidden, edited generated files are protected, and missing/truncated/stale input fails closed. Apply with `applyAutoChangeset({ ...options, expected: plan.revision })` or `--apply --expected plan.json`; protected same-repository approval is required. Writes use GitHub `expectedHeadOid` atomic commits. `--workflow --out <file>` exports the pinned optional workflow. Its built-in token commit does not automatically trigger more Actions runs. Arrange validation of the resulting head through the repository's admission flow.
509
+ - `validateReleasePreparation` / `repo release validate-preparation --base <full SHA> --head <full SHA> --policy .github/release-validation.json --json` validate a formal Release PR using native pnpm replay in inert metadata, without installing or executing candidate scripts/config/hooks. Policy is read from the base. Check `status: valid`; a branch prefix alone grants no exemption. Unexpected source, old changelog edits, changed lockfiles and unverified generated files fail. Custom generated output requires exact trusted SHA256 or API callback contracts; these cannot override native release metadata checks.
510
+ - `installGitHooks` / `repo tooling hooks install --json` can serve as root `prepare`. Disable the dependency's own install script with `allowBuilds.lefthook: false`, retain native `lefthook.yml`, and configure `tooling.hooks.preCommit` domain jobs with `name`, `run`, optional `glob` and `stageFixed`. Keep `pre-commit.piped: true` and final staged typechecking. Preserve custom/local/global/system/included hooksPath values; only recognized repository-owned Husky paths migrate. CI skips before executable configuration is evaluated. Root and package staged typechecks both run once.
511
+ - `snapshot publish-prepared --publisher-workflow` exposes publisher identity. Configure paired `snapshot workflow` exports with `--environment`, `--builder-workflow`, `--publisher-workflow`, `--builder-name` and `--publisher-name`; `getSnapshotWorkflows` has matching camelCase options. Review both files together with the rendered builder digest. Do not enable source publication or alter npm Trusted Publisher settings implicitly.