@theholocron/astromech 5.1.2 → 5.1.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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -28
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -538,7 +538,7 @@ var deploy_default$1 = "name: Deploy\n\non: # yamllint disable-line rule:truthy\
538
538
  var doctor_tokens_default$1 = "name: Doctor Tokens\n\n# Runs `holocron doctor tokens` on a schedule (#2158, epic #2147): for each layer and each token a configured plugin\n# declares, it reads the layer's 1Password Environment in memory and runs the provider's `token` probe against the token\n# held there, so a token that gained a permission it must not have, lost one it needs, is past its rotation age or is near\n# its expiry fails this job. A failed run reaches #alerts through `platform.notifications.yml`; there is no other channel.\n#\n# Only what the runner can read is checked. The job reads Environments through a 1Password service account\n# (`HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN`); it reads the `ci` Environment and nothing else, never `prod`. A layer the\n# account cannot read (`local`, `dev`) is a `skip` row with the reason, never a failure, so the run proves what CI\n# itself can reach and says what it did not look at. `doctor tokens` has no flag to limit the layers: a layer the account\n# can read is checked, and its fail rules are unchanged. Without the secret every row is a skip and the run passes, which\n# the job notes with a warning.\n#\n# Daily, a little after `check-tokens`, so a token near its expiry stays in view until it is renewed. Values are never\n# printed: the probes scrub every token they use from their output.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `ci` layer Environment.\n required: false\n HOLOCRON_HEARTBEAT_DOCTOR_TOKENS:\n description: The ping URL of the `doctor-tokens` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n doctor-tokens:\n name: Run holocron doctor tokens\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n # The Axiom probe names the dataset it reads; the workflows read each organization variable as HOLOCRON_X || X.\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET || vars.AXIOM_DATASET }}\n steps:\n - name: Warn when no Environment can be read\n if: ${{ env.OP_SERVICE_ACCOUNT_TOKEN == '' }}\n run: echo \"::warning::HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN is not set, so no Environment can be read and every row is a skip.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run holocron doctor tokens\n with:\n task: doctor-tokens\n\n # Tells Checkly this run finished (#2359, the `doctor-tokens` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_DOCTOR_TOKENS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_DOCTOR_TOKENS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
539
539
  var greet_default$1 = "name: Greetings\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n\njobs:\n greeting:\n name: Greet first-time contributors\n permissions:\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n # Group by the issue/PR number so duplicate events don't race each other.\n steps:\n - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0\n name: Greet on first contribution\n with:\n script: |\n // Only greet on the initial open — ignore synchronize, reopened, etc.\n if (context.payload.action !== 'opened') return;\n\n const actor = context.actor;\n const { owner, repo } = context.repo;\n\n // Payload inspection is more reliable than context.eventName for detecting\n // whether this is an issue vs. PR event — works regardless of how GitHub\n // propagates event names through workflow_call chains.\n const isIssue = !!context.payload.issue && !context.payload.pull_request;\n // listForRepo returns both issues and PRs (GitHub treats PRs as issues),\n // sorted newest-first. Filter by type to track first-issue and first-PR\n // independently, and avoid search-index eventual-consistency lag.\n const { data: recent } = await github.rest.issues.listForRepo({\n owner, repo,\n creator: actor,\n state: 'all',\n per_page: 100\n });\n\n const sameType = recent.filter(item =>\n isIssue ? !item.pull_request : !!item.pull_request\n );\n\n if (sameType.length !== 1) return;\n const body = isIssue\n ? `Hey @${actor}!\\n\\nWe really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we are a limited number of volunteers, so it is possible that this will not be addressed as swiftly.\\n\\nYour patience is much appreciated and we will get back to you as quickly as possible.`\n : `Hey @${actor}!\\n\\nWe really appreciate you taking the time to help out with this PR. The collaborators on this project attempt to help as many people as possible, but we are a limited number of volunteers, so it is possible that this will not be addressed as swiftly.\\n\\nYour patience is much appreciated and we will get back to you as quickly as possible.`;\n\n await github.rest.issues.createComment({\n owner,\n repo,\n issue_number: context.issue.number,\n body\n });\n";
540
540
  var label_default$1 = "name: Bookkeeping\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n configuration-path:\n description: Path to the labeler configuration file in the calling repo\n type: string\n required: false\n default: .github/labeler.yml\n\njobs:\n label:\n name: Apply Labels\n permissions:\n contents: read\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n with:\n sparse-checkout: ${{ inputs.configuration-path || '.github/labeler.yml' }}\n sparse-checkout-cone-mode: false\n\n - uses: github/issue-labeler@ccca1e16fcb66762200e616fc29b57b940c1cb67 # v3.5\n if: ${{ github.event_name == 'pull_request' && hashFiles(inputs.configuration-path || '.github/labeler.yml') != '' }}\n # v3.4 bundles Node 20; allow it to run under Actions' current default.\n env:\n ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true\n with:\n # Fall back to default path when triggered directly (not via workflow_call)\n # because inputs.* defaults only apply on workflow_call events.\n configuration-path: ${{ inputs.configuration-path || '.github/labeler.yml' }}\n include-title: 1\n include-body: 0\n sync-labels: 1\n enable-versioned-regex: 0\n repo-token: ${{ github.token }}\n";
541
- var code_default$1$1 = "name: Static Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n static-analysis:\n name: Run eslint, actionlint and prettier\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # actionlint has no npm distribution — install the prebuilt binary via\n # the maintainer's own documented download script.\n # NOTE: unverified against a live CI run at authoring time (D12) — flag\n # here if this needs adjustment.\n - name: Install actionlint\n run: |\n bash <(curl -sSf https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)\n sudo mv ./actionlint /usr/local/bin/actionlint\n\n - name: Check for merge-conflict markers\n # No package distributes this as a standalone tool — a plain grep for\n # the marker lines (the same check the old bundled linter ran, D12).\n run: |\n if grep -rlnE '^(<{7}|={7}|>{7})( |$)' \\\n --exclude-dir=.git --exclude-dir=node_modules .; then\n echo \"::error::merge-conflict markers found\"\n exit 1\n fi\n\n # Problem matchers turn the tools' own output into inline annotations on the pull request's diff (the job the\n # old `annotate` task did with ReviewDog, on a second checkout). They are files of this repo, so a copy of this\n # workflow that runs where they are missing skips them. `ci/matchers/eslint.json` reads stylish output, whose\n # paths are absolute, so turbo's `<package>:<task>:` prefix does not hide them.\n - name: Annotate eslint and actionlint findings\n run: |\n for matcher in eslint actionlint; do\n if [ -f \"ci/matchers/$matcher.json\" ]; then\n echo \"::add-matcher::ci/matchers/$matcher.json\"\n fi\n done\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run eslint and actionlint\n with:\n task: lint:code\n\n # `holocron run lint:code` runs turbo, which runs each package's eslint and nothing else, so actionlint (installed\n # above) is run here, on the repo's workflows. It ran in the old `annotate` job; `!cancelled()` runs it even when\n # eslint failed, so one run shows both.\n - name: Run actionlint\n if: ${{ !cancelled() }}\n run: actionlint\n\n # prettier's check is the `format` action, not a workflow\n # of its own. It is called by the hosted reference, like the other actions; the repo that serves it runs its own\n # copy from the checkout (`./ci/actions/format`), see `hostedReusableWorkflows` in astromech.\n - uses: theholocron/.github/.github/actions/format@main\n name: Run prettier\n";
541
+ var code_default$1$1 = "name: Static Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n static-analysis:\n name: Run eslint, actionlint and prettier\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # actionlint has no npm distribution — install the prebuilt binary via\n # the maintainer's own documented download script.\n # NOTE: unverified against a live CI run at authoring time (D12) — flag\n # here if this needs adjustment.\n - name: Install actionlint\n run: |\n bash <(curl -sSf https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)\n sudo mv ./actionlint /usr/local/bin/actionlint\n\n - name: Check for merge-conflict markers\n # No package distributes this as a standalone tool — a plain grep for\n # the marker lines (the same check the old bundled linter ran, D12).\n run: |\n if grep -rlnE '^(<{7}|={7}|>{7})( |$)' \\\n --exclude-dir=.git --exclude-dir=node_modules .; then\n echo \"::error::merge-conflict markers found\"\n exit 1\n fi\n\n # Problem matchers turn the tools' own output into inline annotations on the pull request's diff (the job the\n # old `annotate` task did with ReviewDog, on a second checkout). They are files of this repo, so a copy of this\n # workflow that runs where they are missing skips them. `ci/matchers/eslint.json` reads stylish output, whose\n # paths are absolute, so turbo's `<package>:<task>:` prefix does not hide them.\n - name: Annotate eslint and actionlint findings\n run: |\n for matcher in eslint actionlint; do\n if [ -f \"ci/matchers/$matcher.json\" ]; then\n echo \"::add-matcher::ci/matchers/$matcher.json\"\n fi\n done\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run eslint and actionlint\n with:\n task: lint:code\n\n # `holocron run lint:code` runs turbo, which runs each package's eslint and nothing else, so actionlint (installed\n # above) is run here, on the repo's workflows. It ran in the old `annotate` job; `!cancelled()` runs it even when\n # eslint failed, so one run shows both.\n - name: Run actionlint\n if: ${{ !cancelled() }}\n run: actionlint\n\n # prettier's check is the `format` action, not a workflow\n # of its own. It is called by the hosted reference, like the other actions (a `./` path would resolve in the\n # caller's checkout, which only holocron has).\n - uses: theholocron/.github/.github/actions/format@main\n name: Run prettier\n";
542
542
  var commits_default$1 = "name: Commit Standards\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n commit-standards:\n name: Run commitlint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # No local equivalent (linters.ts: commitlint has no localBin — enforced\n # only at commit time via the commit-msg hook, and here in CI over the\n # PR's commit range). Not run through the holocron composite action.\n #\n # --config <resolved shared path> (config-resolution workstream, #676)\n # — falls back to commitlint's own auto-discovery of a local\n # commitlint.config.ts when the shared package's built dist/ isn't\n # present, same guard as the commit-msg hook.\n - name: Run commitlint over the PR range\n if: github.event_name == 'pull_request'\n run: |\n COMMITLINT_CONFIG=\"node_modules/@theholocron/commitlint-config/dist/index.js\"\n if [ -f \"$COMMITLINT_CONFIG\" ]; then\n pnpm exec commitlint --config \"$COMMITLINT_CONFIG\" --from \"${{ github.event.pull_request.base.sha }}\" --to \"${{ github.sha }}\"\n else\n pnpm exec commitlint --from \"${{ github.event.pull_request.base.sha }}\" --to \"${{ github.sha }}\"\n fi\n";
543
543
  var data_default$1 = "name: Structured Data Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n structured-data-validation:\n name: Run yamllint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # yamllint has no npm distribution — Python ships preinstalled on\n # ubuntu-latest runners.\n - name: Install yamllint\n run: pip install --user yamllint\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run yamllint\n with:\n task: lint:data\n";
544
544
  var editorconfig_default$2 = "name: lint:editorconfig\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n lint-editorconfig:\n name: Run editorconfig-checker\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # editorconfig-checker has no npm distribution — install the prebuilt\n # binary from its release tarball (v4.0.1+ ships the binary at the\n # tarball root as `editorconfig-checker`, not `bin/ec-<os>-<arch>` —\n # confirmed against a live CI run; the old asset name/path 404s now).\n - name: Install editorconfig-checker\n run: |\n curl -sSL https://github.com/editorconfig-checker/editorconfig-checker/releases/latest/download/editorconfig-checker-linux-amd64.tar.gz \\\n | tar xz -C /usr/local/bin editorconfig-checker\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run editorconfig-checker\n with:\n task: lint:editorconfig\n";
@@ -551,9 +551,9 @@ var open_incident_default$1 = "name: Open incident\n\n# Opens an incident on the
551
551
  var preview_specs_default$1 = "#\n# Makes the forum post for a spec or ADR while its pull request is still open (#1600, spec\n# `tech-specs-discussion-threads`), instead of waiting for the file to land on `alpha`. It runs `holocron sync specs` with\n# `--files` (only the spec and ADR files this pull request changes, so a stale branch cannot retag the posts of files it\n# does not touch) and `--pr` (the post names this pull request). Everything the command edits stays in this checkout and\n# is thrown away: the post's address reaches the file after the merge, when the `sync-specs` task finds the post\n# by the path it records and links it through its sync pull request.\n#\n# - Only for a pull request from this repository: a post carries text the author wrote, and a fork gets no secrets.\n# - Only when the pull request changes a spec or an ADR.\n# - When the pull request is CLOSED WITHOUT MERGING, its posts are tagged `withdrawn` and closed (#1653,\n# `sync specs --withdraw`); reopening it, or the same file coming back in a new pull request, puts the file's own status\n# back on the post and reopens it. A merged pull request does nothing here. Nothing from a closed pull request's head\n# runs with the bot token: that event checks out and builds the BASE branch, and takes only the list of paths from the\n# pull request through the API.\n# - It shares the `spec-discussions` concurrency group with the `sync-specs` task, so a post is never made twice\n# by two runs at once; the post is also found by its path before it is made, so a rerun is safe.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN`; without it the job warns and does nothing.\n\nname: Preview Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n\njobs:\n preview-specs:\n name: Sync spec discussions for the pull request\n permissions:\n contents: read\n pull-requests: read\n # Shared with `sync-specs`, so a post is never made twice by two runs at once.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n if: github.repository == format('{0}/holocron', github.repository_owner) && github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged == false)\n runs-on: ubuntu-latest\n timeout-minutes: 20\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n BASE_REF: ${{ github.event.pull_request.base.sha }}\n PR_NUMBER: ${{ github.event.pull_request.number }}\n WITHDRAW: ${{ github.event.action == 'closed' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussion was made for this pull request. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the pull request (the base branch, when it was closed)\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n # A closed pull request is never checked out: its head is not needed beyond the list of paths, and the bot token\n # must not run its code. The base branch's tip is trusted code.\n ref: ${{ github.event.action == 'closed' && github.event.pull_request.base.ref || '' }}\n # The whole history: a spec is numbered by when its file was first committed, and the base is needed to see\n # which files this pull request changes.\n fetch-depth: 0\n\n - name: List the specs and ADRs this pull request changes\n id: files\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n env:\n GH_TOKEN: ${{ github.token }}\n REPO: ${{ github.repository }}\n run: |\n # Added or modified, not deleted: a file that is gone has nothing to post.\n if [ \"$WITHDRAW\" = \"true\" ]; then\n # The head is not checked out, so the pull request's paths come from the API (names only, and only those of a\n # plain shape, since the list becomes arguments).\n files=$(gh api --paginate \"repos/$REPO/pulls/$PR_NUMBER/files\" --jq '.[] | select(.status != \"removed\") | .filename' \\\n | grep -E '^(\\.notes/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/specifications/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/decisions/[A-Za-z0-9._-]+\\.md)$' \\\n | tr '\\n' ' ' || true)\n else\n files=$(git diff --name-only --diff-filter=AM \"$BASE_REF\"...HEAD -- '.notes/*.spec.md' 'docs/wiki/specifications/*.spec.md' 'docs/wiki/decisions/*.md' | tr '\\n' ' ')\n fi\n echo \"list=$files\" >> \"$GITHUB_OUTPUT\"\n if [ -z \"$files\" ]; then echo \"No spec or ADR is added or changed here.\"; fi\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions for these files (withdraw them, when it was closed)\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n env:\n FILES: ${{ steps.files.outputs.list }}\n run: |\n # The list is file names from this repository's own pull request; word splitting is what turns it into arguments.\n # shellcheck disable=SC2086\n if [ \"$WITHDRAW\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --withdraw --files $FILES\n else\n node cli/cli/dist/cli.mjs sync specs --pr \"$PR_NUMBER\" --files $FILES\n fi\n";
552
552
  var preview_default$1 = "name: Preview\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n type:\n description: \"Type of deployment: docs or storybook\"\n required: true\n type: string\n name:\n description: Repo name prefix used to filter the docs site package (<name>-site); omit to run pnpm -C docs run build-docs\n required: false\n type: string\n default: \"\"\n storybook-projects:\n description: >\n JSON array of { \"name\"?, \"workingDir\", \"outputDir\"? } objects for storybook deploys.\n Each is built via `pnpm -C <workingDir> build:storybook`. If \"name\" is provided the\n output is placed under `sandbox/<name>/`; omit \"name\" for single-repo deploys and the\n output lands directly in `sandbox/`.\n type: string\n required: false\n default: \"[]\"\n build-script:\n description: pnpm script that builds the Storybook static output (single storybook, type:storybook only)\n type: string\n required: false\n default: build:storybook\n output-dir:\n description: Directory where Storybook writes its static output (single storybook, type:storybook only)\n type: string\n required: false\n default: storybook-static\n cloudflare-project:\n description: >\n Cloudflare Pages project name. Falls back to the CLOUDFLARE_PAGES_PROJECT\n org variable (filled from the 1Password sync) when omitted — set that variable once and all repos get previews\n without per-repo config.\n required: false\n type: string\n default: \"\"\n\njobs:\n deploy-preview:\n name: Preview\n if: ${{ github.event.action != 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Build workspace dependencies\n # The docs site imports workspace packages (e.g. a shared theme) via\n # `workspace:*` — its exports map points at dist/, which doesn't\n # exist until something builds it. Nothing else in this job does,\n # so without this step Vite fails to resolve the import entirely.\n if: ${{ inputs.type == 'docs' }}\n run: pnpm run build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name != '' }}\n env:\n SITE_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$SITE_NAME\"-site build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name == '' }}\n run: pnpm -C docs run build-docs\n\n - name: Build Storybook projects\n if: ${{ inputs.storybook-projects != '[]' }}\n env:\n PROJECTS: ${{ inputs.storybook-projects }}\n run: |\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n pnpm -C \"$workingDir\" build:storybook\n done\n\n - name: Build Storybook\n if: ${{ inputs.type == 'storybook' && inputs.storybook-projects == '[]' }}\n env:\n BUILD_SCRIPT: ${{ inputs.build-script }}\n run: pnpm run \"$BUILD_SCRIPT\"\n\n - name: Assemble site\n env:\n DEPLOY_TYPE: ${{ inputs.type }}\n SITE_NAME: ${{ inputs.name }}\n PROJECTS: ${{ inputs.storybook-projects }}\n STORYBOOK_OUTPUT_DIR: ${{ inputs.output-dir }}\n run: |\n mkdir -p _site\n if [ \"$DEPLOY_TYPE\" = \"docs\" ]; then\n if [ -n \"$SITE_NAME\" ]; then\n # Site built with base: /<name>/ — nest under _site/<name>/ so asset\n # paths match (/name/_astro/... → served at /name/_astro/...).\n mkdir -p \"_site/${SITE_NAME}\"\n cp -r docs/dist/. \"_site/${SITE_NAME}/\"\n # Redirect root to the base path so the preview URL lands correctly.\n printf \"/ /%s/ 301\\n\" \"$SITE_NAME\" > _site/_redirects\n else\n cp -r docs/dist/. _site/\n fi\n fi\n if [ \"$PROJECTS\" != \"[]\" ]; then\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n name=$(echo \"$project\" | jq -r '.name // \"\"')\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n outputDir=$(echo \"$project\" | jq -r '.outputDir // \"storybook-static\"')\n if [ -n \"$name\" ]; then\n target=\"_site/sandbox/${name}\"\n else\n target=\"_site/sandbox\"\n fi\n mkdir -p \"$target\"\n cp -r \"${workingDir}/${outputDir}/.\" \"$target/\"\n done\n elif [ \"$DEPLOY_TYPE\" = \"storybook\" ]; then\n mkdir -p _site/sandbox\n cp -r \"${STORYBOOK_OUTPUT_DIR}/.\" _site/sandbox/\n fi\n\n - name: Install Wrangler\n # The action's install step runs npm/pnpm in the repo root; pnpm fails\n # because it rejects adding to a workspace root without -w, and npm fails\n # because package.json contains pnpm catalog: references it cannot parse.\n # Pre-installing from /tmp (no package.json) lets the action find wrangler\n # already on PATH and skip its own install entirely.\n working-directory: /tmp\n run: npm install -g wrangler@4\n\n - name: Warn when the Cloudflare account id is missing\n # The deploy below needs it. It is an organization variable that `holocron sync secrets` writes from\n # the 1Password Environment named by `repo.variables.sync` in .holocron/repo.ts.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The Pages deploy needs it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3\n id: deploy\n name: Deploy to Cloudflare Pages\n # Skip when neither the per-repo input nor the org variable is set.\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n with:\n apiToken: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n accountId: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n packageManager: npm\n command: >-\n pages deploy _site\n --project-name ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n --branch ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n --commit-dirty=true\n\n - name: Report preview URL\n if: ${{ steps.deploy.outputs.pages-deployment-alias-url != '' }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n ALIAS: ${{ steps.deploy.outputs.pages-deployment-alias-url }}\n SITE_NAME: ${{ inputs.name }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n run: |\n PREVIEW_URL=\"${ALIAS%/}${SITE_NAME:+/${SITE_NAME}}/\"\n # GITHUB_HEAD_REF is the PR branch name — links the deployment to this PR's sidebar widget.\n PAYLOAD=$(printf '{\"ref\":\"%s\",\"environment\":\"%s\",\"description\":\"Cloudflare Pages\",\"production_environment\":false,\"auto_merge\":false,\"required_contexts\":[]}' \\\n \"$GITHUB_HEAD_REF\" \"${PROJECT} (Preview)\")\n DEPLOY_ID=$(echo \"$PAYLOAD\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n --method POST --input - | jq -r '.id')\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${DEPLOY_ID}/statuses\" \\\n --method POST --field state=success --field environment_url=\"${PREVIEW_URL}\"\n\n cleanup:\n name: Clean up Preview\n if: ${{ github.event.action == 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - name: Warn when the Cloudflare account id is missing\n # Without it the request below cannot find the preview deployments, so closing the PR leaves them behind.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The preview deployments cannot be deleted without it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - name: Delete Cloudflare Pages deployments for branch\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n env:\n CLOUDFLARE_API_TOKEN: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n CLOUDFLARE_ACCOUNT_ID: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n BRANCH: ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: |\n DEPLOYMENTS=$(curl -s \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n | jq -r --arg b \"$BRANCH\" \\\n '.result[] | select(.deployment_trigger.metadata.branch == $b) | .id')\n\n if [ -z \"$DEPLOYMENTS\" ]; then\n echo \"No deployments found for branch ${BRANCH} — nothing to clean up.\"\n exit 0\n fi\n\n for id in $DEPLOYMENTS; do\n echo \"Deleting CF Pages deployment: $id\"\n curl -s -X DELETE \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments/${id}?force=true\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" | jq -r 'if .success then \" ✓ deleted\" else \" ✗ \\(.errors[0].message)\" end'\n done\n\n # Mark the GitHub Deployment environment as inactive.\n ENV_NAME=\"${PROJECT} (Preview)\"\n gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n | jq -r \".[] | select(.environment == \\\"${ENV_NAME}\\\") | .id\" \\\n | while read -r deploy_id; do\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=inactive 2>/dev/null || true\n done\n";
553
553
  var publish_wiki_default$1 = "name: Wiki\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n fern-version:\n description: >\n Fern CLI version to install. Pin this to avoid breaking changes when\n Fern updates their config schema.\n type: string\n required: false\n default: \"5.114.1\"\n preview:\n description: >\n When true, publishes a preview instead of production.\n Requires preview-id to be set.\n type: boolean\n required: false\n default: false\n preview-id:\n description: >\n Stable ID for the preview build. Use the PR number (e.g. \"pr-123\")\n so the same preview URL is reused on every push to the branch.\n type: string\n required: false\n default: \"\"\n fern-org:\n description: >\n DEPRECATED — the preview URL is now read from Fern's own output.\n Kept as a fallback for building the URL when that parse fails, and so\n existing callers do not error.\n type: string\n required: false\n default: \"\"\n base-path:\n description: >\n DEPRECATED — see fern-org. Basepath appended to the fallback preview\n URL (e.g. \"holocron\" for multi-source routing).\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_FERN_TOKEN:\n required: false\n FERN_TOKEN:\n required: false\n\njobs:\n publish:\n name: Publish to Fern\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n deployments: write\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - name: Install Fern CLI\n run: npm install -g \"fern-api@$FERN_VERSION\"\n env:\n FERN_VERSION: ${{ inputs.fern-version }}\n\n - name: Publish docs\n if: ${{ !inputs.preview }}\n run: fern generate --docs\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN || secrets.FERN_TOKEN }}\n\n - name: Preview docs\n id: preview\n if: ${{ inputs.preview && inputs.preview-id != '' }}\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN || secrets.FERN_TOKEN }}\n PREVIEW_ID: ${{ inputs.preview-id }}\n run: |\n out=$(fern generate --docs --preview --id \"$PREVIEW_ID\" 2>&1) || { printf '%s\\n' \"$out\"; exit 1; }\n printf '%s\\n' \"$out\"\n # Fern prints \"Published docs to https://<org>-preview-<id>.docs.buildwithfern.com/<path>\"\n url=$(printf '%s\\n' \"$out\" | grep -oiE 'https://[a-z0-9.-]+\\.docs\\.buildwithfern\\.com[^ )]*' | head -n1)\n echo \"url=$url\" >> \"$GITHUB_OUTPUT\"\n\n - name: Report preview URL\n if: ${{ inputs.preview && inputs.preview-id != '' }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n CAPTURED_URL: ${{ steps.preview.outputs.url }}\n FERN_ORG: ${{ inputs.fern-org }}\n PREVIEW_ID: ${{ inputs.preview-id }}\n BASE_PATH: ${{ inputs.base-path }}\n run: |\n PREVIEW_URL=\"$CAPTURED_URL\"\n if [ -z \"$PREVIEW_URL\" ] && [ -n \"$FERN_ORG\" ]; then\n PREVIEW_URL=\"https://${FERN_ORG}-preview-${PREVIEW_ID}.docs.buildwithfern.com${BASE_PATH:+/${BASE_PATH}}\"\n fi\n if [ -z \"$PREVIEW_URL\" ]; then\n echo \"::warning::no preview URL parsed from Fern output and no fern-org fallback — skipping the deployment widget\"\n exit 0\n fi\n PAYLOAD=$(printf '{\"ref\":\"%s\",\"environment\":\"wiki (Preview)\",\"description\":\"Wiki\",\"production_environment\":false,\"auto_merge\":false,\"required_contexts\":[]}' \\\n \"$GITHUB_HEAD_REF\")\n DEPLOY_ID=$(printf '%s\\n' \"$PAYLOAD\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n --method POST --input - | jq -r '.id')\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${DEPLOY_ID}/statuses\" \\\n --method POST --field state=success --field environment_url=\"$PREVIEW_URL\"\n";
554
- var reconcile_ci_default$1 = "name: Reconcile ci\n\n# The safety net of the `ci` aggregate (spec `process-sentinel-posts-ci`, SPEC-0099): runs `holocron reconcile ci`, which\n# reads each open pull request's check runs and statuses and makes `ci / Required checks` say what they call for. A\n# healthy run writes nothing. A check that was missing or wrong for longer than ten minutes means a webhook was missed:\n# the run fails, and a failed run reaches #alerts through `platform.notifications.yml`.\n#\n# It posts as Sentinel's GitHub App, with an installation token narrowed to the three permissions it needs (checks:\n# write, pull_requests: read, statuses: read), never as `GITHUB_TOKEN`: a check run belongs to the app that posted it, and\n# the ruleset will be pinned to Sentinel's app. The App's id and private key reach the job as the secrets below (`secrets:\n# inherit` passes them from the caller). The App must hold Commit statuses: read, which a person grants.\n#\n# In a repo whose `ci.aggregate` is `actions` (the default) the command posts nothing and the run is green: the Actions job\n# is the poster there. Scheduled every 15 minutes by the caller; GitHub delays and drops scheduled runs, so the heartbeat\n# is more lenient than the cron.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_ID:\n description: The id of the GitHub App whose installation token posts the check.\n required: false\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of that GitHub App.\n required: false\n SENTINEL_APP_ID:\n description: The old name of SENTINEL_GITHUB_APP_ID, read when the new one is not set.\n required: false\n SENTINEL_APP_PRIVATE_KEY:\n description: The old name of SENTINEL_GITHUB_APP_PRIVATE_KEY, read when the new one is not set.\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_CI:\n description: The ping URL of the `reconcile-ci` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-ci:\n name: Bring the ci check up to date\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Two runs could post the same check twice, so a second waits for the first.\n concurrency:\n group: reconcile-ci\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY || secrets.SENTINEL_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n repositories: ${{ github.event.repository.name }}\n permission-checks: write\n permission-pull-requests: read\n permission-statuses: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # The token goes in the environment, never on the command line. The `source` provider reads it as its token.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Reconcile the ci check\n id: reconcile\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile ci --max-age 10\n\n - name: List what was done\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### ci reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # Tells Checkly this run finished (#2359, the `reconcile-ci` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_CI }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_CI is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
555
- var reconcile_projects_default$1 = "name: Reconcile Projects\n\n# Keeps the project boards true to their rules (SPEC-0020, #1744): runs `holocron reconcile project`, which sets an item's\n# status from the issue's state and its \"blocked by\" links (an open blocker means blocked, no blocker left means planned,\n# a closed issue means done), then `holocron doctor project`, which reports what reconcile cannot fix.\n#\n# `GITHUB_TOKEN` cannot write an organization project, so the job mints an installation token from a GitHub App. The App\n# needs the organization permission Projects (read and write), which a person grants; its id and private key reach the job\n# as the secrets below (`secrets: inherit` passes them from the caller). The boards a repo keeps come from its own\n# `providers.projects` in holocron.config.ts, so a repo that declares none passes `doctor project` as a skip.\n#\n# Scheduled hourly by the caller. A failed run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_ID:\n description: The id of the GitHub App whose installation token writes the boards.\n required: false\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of that GitHub App.\n required: false\n SENTINEL_APP_ID:\n description: The old name of SENTINEL_GITHUB_APP_ID, read when the new one is not set.\n required: false\n SENTINEL_APP_PRIVATE_KEY:\n description: The old name of SENTINEL_GITHUB_APP_PRIVATE_KEY, read when the new one is not set.\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS:\n description: The ping URL of the `reconcile-projects` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-projects:\n name: Reconcile and check the boards\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n # Two runs could set the same item twice, so a second waits for the first.\n concurrency:\n group: reconcile-projects\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY || secrets.SENTINEL_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n permission-organization-projects: write\n permission-issues: read\n permission-pull-requests: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # The token goes in the environment, never on the command line.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Reconcile the boards\n id: reconcile\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile project\n\n - name: List what changed\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### Project reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # What reconcile cannot fix: a board that differs from its template, a rule that is off, a missing App permission.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Check the boards\n if: ${{ !cancelled() }}\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: doctor project\n\n # Tells Checkly this run finished (#2359, the `reconcile-projects` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
556
- var release_default$1 = "name: Release\n\n# Semantic-release with OIDC Trusted Publishing.\n# actions/setup-node writes a default NODE_AUTH_TOKEN=${{ github.token }}\n# which shadows OIDC auth. We explicitly clear it so npm falls through to\n# the Trusted Publisher OIDC exchange.\n# The calling repo must have a .releaserc.json that configures branches,\n# plugins, and any publish options. npm@11+ is installed to support OIDC.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: >\n When true, runs semantic-release --dry-run: analyzes commits and\n previews the next release without git writes or publish. Only\n meaningful for workflow_dispatch triggers; push-triggered runs\n always run fully.\n type: boolean\n required: false\n default: false\n group:\n description: >\n Version group to release: a folder of the repo (`clients`,\n `observability`). Passed to the release config as RELEASE_GROUP, and\n scopes every tag lookup below to that group's `<group>-v*` tags, so\n releasing one group never reads another's. Empty releases the whole\n repo, with plain `v*` tags. Groups push release commits to the same\n branch, so release them one at a time (a matrix with `max-parallel: 1`);\n each run starts from the branch's current tip, not the commit that\n triggered the workflow.\n type: string\n required: false\n default: \"\"\n from-branch-tip:\n description: >\n When true, an ungrouped release starts from the branch's current tip\n instead of the commit that triggered the workflow. Set it when the\n repo-wide release runs after the version groups, whose release\n commits have moved the branch (semantic-release refuses to run\n behind its remote). A group always starts from the tip.\n type: boolean\n required: false\n default: false\n post-release:\n description: >\n When true, dispatches a readme sync broadcast after a successful\n release. Enable for packages consumed by other repos via the\n registry-doc system so downstream README installation blocks\n stay current.\n type: boolean\n required: false\n default: false\n run-build:\n description: Run `pnpm build` before releasing\n type: boolean\n required: false\n default: true\n deploy-on-release:\n description: >\n When true, runs a separate `deploy` job after a successful release\n (holocron#930): `holocron deploy on-release` deploys every workspace\n package whose `delivery.deploy` task is `with: { on: release }`, when\n the release is on its channel and changes its paths. The job is its\n own check, re-runnable on its own, and gets VERCEL_TOKEN; the release\n job never sees it. Off by default, so a repo that doesn't deploy from\n its release never exposes the token.\n type: boolean\n required: false\n default: false\n republish-tag:\n description: >\n Publish what npm lacks for an existing release instead of releasing\n (holocron#1387): the tag of the release, `<group>-v<version>` for a\n version group or `v<version>` for the rest. Set, the `release` job is\n skipped (no semantic-release, no tag, no release commit) and the\n `republish` job checks the tag out and runs `publish package\n --skip-already-published` for it. The tag must be on a release branch.\n The caller sets it from a manual run only. Empty is a normal release.\n type: string\n required: false\n default: \"\"\n exclude-groups:\n description: >\n Space-separated version groups that release on their own, left out of\n a republish of the repo-wide tag (`v<version>`). Ignored otherwise.\n type: string\n required: false\n default: \"\"\n sentry-project:\n description: >\n Sentry project slug for sourcemap upload and release creation after\n publishing. Omit to skip the Sentry release step entirely.\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_RELEASE_TOKEN:\n description: >\n Fine-grained PAT (Contents + Issues + Pull requests: write) owned by\n an admin. Required when the default branch is protected by a ruleset —\n github.token cannot push through rulesets, but an admin PAT can.\n Takes priority over HOLOCRON_SYNC_TOKEN. Falls back to github.token.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: >\n Legacy alias for HOLOCRON_RELEASE_TOKEN — kept for backward compatibility.\n Prefer HOLOCRON_RELEASE_TOKEN for new repos.\n required: false\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to github.token.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when\n HOLOCRON_READ_TOKEN is not set.\n required: false\n HOLOCRON_SENTRY_RELEASE_TOKEN:\n description: The Sentry release token (sourcemaps and release creation). Read first; the SENTRY_AUTH_TOKEN secret is the fallback.\n required: false\n SENTRY_AUTH_TOKEN:\n description: >\n Sentry auth token for sourcemap upload and release creation.\n Required when sentry-project is set. Use the org-level secret.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n description: >\n Vercel token for the deploy job. Only used when deploy-on-release is\n true, and only by that job.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: >\n The Holonet bot's token, for the announce job: it finds its earlier post and starts the thread. With\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES unset too, the release is not announced.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: The webhook of the `releases` channel, the announce job's post. Only used by that job.\n required: false\n\njobs:\n release:\n name: Semantic release\n if: ${{ inputs.republish-tag == '' }}\n permissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n outputs:\n # Read by the deploy job (holocron#930). Empty unless semantic-release\n # published: `commit` is the release commit, `previous` the commit of\n # the release before it (to diff against), `channel` the new version's\n # prerelease identifier (`alpha`), empty for a stable release (`main`).\n commit: ${{ steps.release.outputs.commit }}\n previous: ${{ steps.release.outputs.previous }}\n channel: ${{ steps.release.outputs.channel }}\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Do not cancel in-progress releases — a partial release is worse than a slow one.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n persist-credentials: false\n # A group's release commit moves the branch, so a later group's run must\n # release from the branch's current tip, not the commit that triggered the\n # workflow (semantic-release refuses to run behind its remote). Ungrouped,\n # the default (the triggering commit) is unchanged, unless `from-branch-tip`\n # says the groups ran first.\n ref: ${{ (inputs.group != '' || inputs.from-branch-tip) && github.ref || github.sha }}\n # Use HOLOCRON_RELEASE_TOKEN when available: the built-in github.token cannot push through\n # branch protection rulesets. The checkout keeps no credential (persist-credentials: false), so\n # semantic-release pushes its tags and release commits with GITHUB_TOKEN from the step's env, and\n # `publish tag` sends that same token with its own push of the major tag (ci-v1).\n token: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n\n # semantic-release 26 needs Node 26.13 or later. The frozen setup action ignores `.node-version` (its expression\n # always falls through to this input, default 22.x), so the version is passed here.\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n with:\n node-version: \"26.x\"\n\n # By path: the action is new and `theholocron/.github` is frozen (see the `format` action in lint/code.yml).\n - uses: ./ci/actions/git-identity\n name: Configure git identity\n with:\n scope: global\n resolve: \"true\"\n signoff: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n # sigstore is required by libnpmpublish/provenance.js at module parse\n # time — before any config takes effect. Some npm 11.x builds stopped\n # bundling it; installing it globally into the same prefix ensures it\n # resolves regardless of npm version. (Discovered 2026-07-09.)\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n - name: Release\n id: release\n run: |\n BEFORE=$(git rev-parse HEAD)\n # A group's tags are `<group>-v<version>`; without one, the repo-wide `v<version>` tags only: a\n # `deployed/<package>` tag (the deploy step's marker) is nearer after a deploy and is not a release.\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n PREVIOUS_TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || true)\n PREVIOUS=\"\"\n if [ -n \"$PREVIOUS_TAG\" ]; then PREVIOUS=$(git rev-list -n 1 \"$PREVIOUS_TAG\"); fi\n if [ \"$DRY_RUN\" = \"true\" ]; then\n npx semantic-release --dry-run\n else\n npx semantic-release\n fi\n AFTER=$(git rev-parse HEAD)\n # semantic-release only commits (`chore(release): … [skip ci]`) when it\n # actually publishes. That commit gets no CI (and so no coverage\n # upload), which makes the next PR's `codecov/project` compare a full\n # report against a stale ancestor — a phantom drop (holocron#644).\n # Emit the new SHA so the steps below upload coverage for it.\n if [ \"$BEFORE\" != \"$AFTER\" ]; then\n echo \"commit=$AFTER\" >> \"$GITHUB_OUTPUT\"\n echo \"previous=$PREVIOUS\" >> \"$GITHUB_OUTPUT\"\n # The new version's channel: the prerelease identifier of its tag\n # (v5.0.0-alpha.108 or cli-v5.0.0-alpha.108 -> alpha), empty for a stable release.\n VERSION=$(git describe --tags --abbrev=0 \"${MATCH[@]}\")\n VERSION=${VERSION#\"$PREFIX\"}\n CHANNEL=\"\"\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n echo \"channel=$CHANNEL\" >> \"$GITHUB_OUTPUT\"\n fi\n env:\n DRY_RUN: ${{ inputs.dry-run }}\n # Read by the repo's release config to release one version group.\n RELEASE_GROUP: ${{ inputs.group }}\n # Prefer HOLOCRON_RELEASE_TOKEN (fine-grained PAT, Contents+Issues+PRs write,\n # owned by an admin with ruleset bypass) so @semantic-release/git can\n # push the version-bump commit through branch protection. Falls back to\n # HOLOCRON_SYNC_TOKEN (legacy) then github.token for unprotected repos.\n GITHUB_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n HUSKY: \"0\"\n NPM_CONFIG_PROVENANCE: true\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Coverage for the release commit\n if: ${{ steps.release.outputs.commit != '' }}\n with:\n task: test:unit\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload release-commit coverage to Codecov\n if: ${{ steps.release.outputs.commit != '' }}\n # fail_ci_if_error makes a failed upload fail this step, so it is visible, but\n # continue-on-error keeps it from failing the job: the release has already\n # published, and the Sentry release steps below must still run (holocron#934).\n continue-on-error: true\n with:\n use_oidc: true\n fail_ci_if_error: true\n override_commit: ${{ steps.release.outputs.commit }}\n override_branch: ${{ github.ref_name }}\n\n - name: Get release version\n id: release_version\n if: ${{ inputs.sentry-project != '' && inputs.dry-run != true }}\n env:\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || echo \"\")\n if [ -n \"$TAG\" ]; then\n echo \"release=${SENTRY_PROJECT}@${TAG#\"$PREFIX\"}\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - name: Create Sentry release\n if: ${{ inputs.sentry-project != '' && steps.release_version.outputs.release != '' && inputs.dry-run != true }}\n uses: getsentry/action-release@2e505a70ff06dac263413242aa3617fec90134e5 # v3\n env:\n SENTRY_AUTH_TOKEN: ${{ secrets.HOLOCRON_SENTRY_RELEASE_TOKEN || secrets.SENTRY_AUTH_TOKEN }}\n SENTRY_ORG: ${{ vars.HOLOCRON_SENTRY_ORG || vars.SENTRY_ORG }}\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n with:\n environment: production\n version: ${{ steps.release_version.outputs.release }}\n sourcemaps: \"**/dist\"\n\n republish:\n name: Republish\n # Publishes what npm lacks for a tag that already exists (holocron#1387). Never tags, never makes a release or a\n # release commit, never moves a branch: it reads the tag and publishes. It holds no write token for the repository.\n if: ${{ inputs.republish-tag != '' }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - name: Check the tag\n id: tag\n env:\n TAG: ${{ inputs.republish-tag }}\n RELEASE_GROUP: ${{ inputs.group }}\n EXCLUDED_GROUPS: ${{ inputs.exclude-groups }}\n DRY_RUN: ${{ inputs.dry-run }}\n run: |\n # A group's tags are `<group>-v<version>`; the rest of the repo's are `v<version>`.\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then PREFIX=\"${RELEASE_GROUP}-v\"; fi\n case \"$TAG\" in\n \"$PREFIX\"[0-9]*) ;;\n *) echo \"::error::$TAG is not a ${PREFIX}<version> tag\"; exit 1 ;;\n esac\n VERSION=${TAG#\"$PREFIX\"}\n # The channel is the prerelease identifier (5.0.0-alpha.9 -> alpha), `latest` for a stable version.\n CHANNEL=latest\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n ARGS=\"--skip-already-published --tag $CHANNEL\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n ARGS=\"$ARGS --group $RELEASE_GROUP\"\n else\n for g in $EXCLUDED_GROUPS; do ARGS=\"$ARGS --exclude-group $g\"; done\n fi\n # A manual run defaults to a dry run, so a republish is previewed before it publishes.\n if [ \"$DRY_RUN\" = \"true\" ]; then ARGS=\"$ARGS --dry-run\"; fi\n echo \"args=$ARGS\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the tag\n with:\n ref: refs/tags/${{ inputs.republish-tag }}\n fetch-depth: 0\n persist-credentials: false\n\n # Only a tag on a release branch is republished: a tag pushed to some other branch is not a release.\n - name: Require a release branch\n env:\n TAG: ${{ inputs.republish-tag }}\n run: |\n git fetch --no-tags origin '+refs/heads/main:refs/remotes/origin/main' '+refs/heads/alpha:refs/remotes/origin/alpha' || true\n for branch in main alpha; do\n if git rev-parse --verify --quiet \"refs/remotes/origin/$branch\" >/dev/null && git merge-base --is-ancestor HEAD \"refs/remotes/origin/$branch\"; then\n echo \"$TAG is on $branch\"\n exit 0\n fi\n done\n echo \"::error::$TAG is not on main or alpha, so it is not republished\"\n exit 1\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n # Writes the packages left unpublished to the job summary and fails when one is.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Publish what npm lacks\n env:\n NPM_CONFIG_PROVENANCE: true\n with:\n command: publish package\n args: ${{ steps.tag.outputs.args }}\n\n deploy:\n name: Deploy\n needs: release\n # Only after a release that actually published (`commit` is empty on a dry\n # run or when nothing was released). A failed deploy fails only this job:\n # the release is already on npm, and this job re-runs on its own.\n if: ${{ inputs.deploy-on-release == true && inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n # No credential is left in .git/config: the deploy script below runs with VERCEL_TOKEN and must not find a\n # write token. Only the record step at the end is given one (holocron#2330).\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Deploy packages that deploy on release\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n with:\n command: deploy on-release\n args: >-\n --channel=${{ needs.release.outputs.channel }}\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --record-file=${{ runner.temp }}/deployed.json\n\n # Records each package that deployed as a `deployed/<package>` tag, so a later release can make up a deploy this\n # one missed (holocron#2330). It runs even after a failed deploy (for the packages that did deploy), deploys\n # nothing, and is the only step that gets the job's token, in its own environment and never in .git/config.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Record the deploys\n if: ${{ !cancelled() }}\n env:\n GITHUB_TOKEN: ${{ github.token }}\n with:\n command: deploy on-release\n args: >-\n --record\n --record-file=${{ runner.temp }}/deployed.json\n\n announce:\n name: Announce release\n needs: release\n # Posts the release to #releases with a thread of its packages (holocron#2777, `holocron sync releases`). Only after\n # a release that actually published, never on a dry run. Like the deploy job, a failure fails only this job: the\n # release is already on npm. A repo without the two secrets gets a warning and no post.\n if: ${{ inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n # The `releases` channel's webhook (the layout's `webhook: true` stores it as this org secret); the Discord\n # provider reads HOLOCRON_DISCORD_WEBHOOK as its default webhook.\n HOLOCRON_DISCORD_WEBHOOK: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_RELEASES }}\n steps:\n - name: Warn that the release is not announced\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN == '' || env.HOLOCRON_DISCORD_WEBHOOK == '' }}\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN or HOLOCRON_NOTIFY_WEBHOOK_RELEASES is not set, so the release was not announced.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n\n # The release's tag, the way the release job names it: `<group>-v<version>` for a group, `v<version>` otherwise.\n - name: Find the release tag\n id: tag\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n env:\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=\"v[0-9]*\"\n if [ -n \"$RELEASE_GROUP\" ]; then MATCH=\"${RELEASE_GROUP}-v*\"; fi\n echo \"tag=$(git describe --tags --abbrev=0 --match \"$MATCH\" HEAD 2>/dev/null || true)\" >> \"$GITHUB_OUTPUT\"\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Announce the release\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n command: sync releases\n args: >-\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --tag=${{ steps.tag.outputs.tag }}\n --yes\n\n sync-readme:\n name: Post-release readme sync\n needs: release\n if: ${{ inputs.post-release == true && inputs.dry-run != true }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - name: Trigger broadcast readme sync\n run: |\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=readme\"\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n";
554
+ var reconcile_ci_default$1 = "name: Reconcile ci\n\n# The safety net of the `ci` aggregate (spec `process-sentinel-posts-ci`, SPEC-0099): runs `holocron reconcile ci`, which\n# reads each open pull request's check runs and statuses and makes `ci / Required checks` say what they call for. A\n# healthy run writes nothing. A check that was missing or wrong for longer than ten minutes means a webhook was missed:\n# the run fails, and a failed run reaches #alerts through `platform.notifications.yml`.\n#\n# It posts as Sentinel's GitHub App, with an installation token narrowed to the three permissions it needs (checks:\n# write, pull_requests: read, statuses: read), never as `GITHUB_TOKEN`: a check run belongs to the app that posted it, and\n# the ruleset will be pinned to Sentinel's app. The App's id and private key reach the job as the secrets below (`secrets:\n# inherit` passes them from the caller). The App must hold Commit statuses: read, which a person grants.\n#\n# In a repo whose `ci.aggregate` is `actions` (the default) the command posts nothing and the run is green: the Actions job\n# is the poster there. Scheduled every 15 minutes by the caller; GitHub delays and drops scheduled runs, so the heartbeat\n# is more lenient than the cron.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of the GitHub App whose installation token posts the check (its id is the variable SENTINEL_GITHUB_APP_ID).\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_CI:\n description: The ping URL of the `reconcile-ci` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-ci:\n name: Bring the ci check up to date\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Two runs could post the same check twice, so a second waits for the first.\n concurrency:\n group: reconcile-ci\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n repositories: ${{ github.event.repository.name }}\n permission-checks: write\n permission-pull-requests: read\n permission-statuses: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # The token goes in the environment, never on the command line. The `source` provider reads it as its token.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Reconcile the ci check\n id: reconcile\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile ci --max-age 10\n\n - name: List what was done\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### ci reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # Tells Checkly this run finished (#2359, the `reconcile-ci` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_CI }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_CI is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
555
+ var reconcile_projects_default$1 = "name: Reconcile Projects\n\n# Keeps the project boards true to their rules (SPEC-0020, #1744): runs `holocron reconcile project`, which sets an item's\n# status from the issue's state and its \"blocked by\" links (an open blocker means blocked, no blocker left means planned,\n# a closed issue means done), then `holocron doctor project`, which reports what reconcile cannot fix.\n#\n# `GITHUB_TOKEN` cannot write an organization project, so the job mints an installation token from a GitHub App. The App\n# needs the organization permission Projects (read and write), which a person grants; its id and private key reach the job\n# as the secrets below (`secrets: inherit` passes them from the caller). The boards a repo keeps come from its own\n# `providers.projects` in holocron.config.ts, so a repo that declares none passes `doctor project` as a skip.\n#\n# Scheduled hourly by the caller. A failed run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of the GitHub App whose installation token writes the boards (its id is the variable SENTINEL_GITHUB_APP_ID).\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS:\n description: The ping URL of the `reconcile-projects` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-projects:\n name: Reconcile and check the boards\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n # Two runs could set the same item twice, so a second waits for the first.\n concurrency:\n group: reconcile-projects\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n permission-organization-projects: write\n permission-issues: read\n permission-pull-requests: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # The token goes in the environment, never on the command line.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Reconcile the boards\n id: reconcile\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile project\n\n - name: List what changed\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### Project reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # What reconcile cannot fix: a board that differs from its template, a rule that is off, a missing App permission.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Check the boards\n if: ${{ !cancelled() }}\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: doctor project\n\n # Tells Checkly this run finished (#2359, the `reconcile-projects` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
556
+ var release_default$1 = "name: Release\n\n# Semantic-release with OIDC Trusted Publishing.\n# actions/setup-node writes a default NODE_AUTH_TOKEN=${{ github.token }}\n# which shadows OIDC auth. We explicitly clear it so npm falls through to\n# the Trusted Publisher OIDC exchange.\n# The calling repo must have a .releaserc.json that configures branches,\n# plugins, and any publish options. npm@11+ is installed to support OIDC.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: >\n When true, runs semantic-release --dry-run: analyzes commits and\n previews the next release without git writes or publish. Only\n meaningful for workflow_dispatch triggers; push-triggered runs\n always run fully.\n type: boolean\n required: false\n default: false\n group:\n description: >\n Version group to release: a folder of the repo (`clients`,\n `observability`). Passed to the release config as RELEASE_GROUP, and\n scopes every tag lookup below to that group's `<group>-v*` tags, so\n releasing one group never reads another's. Empty releases the whole\n repo, with plain `v*` tags. Groups push release commits to the same\n branch, so release them one at a time (a matrix with `max-parallel: 1`);\n each run starts from the branch's current tip, not the commit that\n triggered the workflow.\n type: string\n required: false\n default: \"\"\n from-branch-tip:\n description: >\n When true, an ungrouped release starts from the branch's current tip\n instead of the commit that triggered the workflow. Set it when the\n repo-wide release runs after the version groups, whose release\n commits have moved the branch (semantic-release refuses to run\n behind its remote). A group always starts from the tip.\n type: boolean\n required: false\n default: false\n post-release:\n description: >\n When true, dispatches a readme sync broadcast after a successful\n release. Enable for packages consumed by other repos via the\n registry-doc system so downstream README installation blocks\n stay current.\n type: boolean\n required: false\n default: false\n run-build:\n description: Run `pnpm build` before releasing\n type: boolean\n required: false\n default: true\n deploy-on-release:\n description: >\n When true, runs a separate `deploy` job after a successful release\n (holocron#930): `holocron deploy on-release` deploys every workspace\n package whose `delivery.deploy` task is `with: { on: release }`, when\n the release is on its channel and changes its paths. The job is its\n own check, re-runnable on its own, and gets VERCEL_TOKEN; the release\n job never sees it. Off by default, so a repo that doesn't deploy from\n its release never exposes the token.\n type: boolean\n required: false\n default: false\n republish-tag:\n description: >\n Publish what npm lacks for an existing release instead of releasing\n (holocron#1387): the tag of the release, `<group>-v<version>` for a\n version group or `v<version>` for the rest. Set, the `release` job is\n skipped (no semantic-release, no tag, no release commit) and the\n `republish` job checks the tag out and runs `publish package\n --skip-already-published` for it. The tag must be on a release branch.\n The caller sets it from a manual run only. Empty is a normal release.\n type: string\n required: false\n default: \"\"\n exclude-groups:\n description: >\n Space-separated version groups that release on their own, left out of\n a republish of the repo-wide tag (`v<version>`). Ignored otherwise.\n type: string\n required: false\n default: \"\"\n sentry-project:\n description: >\n Sentry project slug for sourcemap upload and release creation after\n publishing. Omit to skip the Sentry release step entirely.\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_RELEASE_TOKEN:\n description: >\n Fine-grained PAT (Contents + Issues + Pull requests: write) owned by\n an admin. Required when the default branch is protected by a ruleset —\n github.token cannot push through rulesets, but an admin PAT can.\n Takes priority over HOLOCRON_SYNC_TOKEN. Falls back to github.token.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: >\n Legacy alias for HOLOCRON_RELEASE_TOKEN — kept for backward compatibility.\n Prefer HOLOCRON_RELEASE_TOKEN for new repos.\n required: false\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to github.token.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when\n HOLOCRON_READ_TOKEN is not set.\n required: false\n HOLOCRON_SENTRY_RELEASE_TOKEN:\n description: The Sentry release token (sourcemaps and release creation). Read first; the SENTRY_AUTH_TOKEN secret is the fallback.\n required: false\n SENTRY_AUTH_TOKEN:\n description: >\n Sentry auth token for sourcemap upload and release creation.\n Required when sentry-project is set. Use the org-level secret.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n description: >\n Vercel token for the deploy job. Only used when deploy-on-release is\n true, and only by that job.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: >\n The Holonet bot's token, for the announce job: it finds its earlier post and starts the thread. With\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES unset too, the release is not announced.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: The webhook of the `releases` channel, the announce job's post. Only used by that job.\n required: false\n\njobs:\n release:\n name: Semantic release\n if: ${{ inputs.republish-tag == '' }}\n permissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n outputs:\n # Read by the deploy job (holocron#930). Empty unless semantic-release\n # published: `commit` is the release commit, `previous` the commit of\n # the release before it (to diff against), `channel` the new version's\n # prerelease identifier (`alpha`), empty for a stable release (`main`).\n commit: ${{ steps.release.outputs.commit }}\n previous: ${{ steps.release.outputs.previous }}\n channel: ${{ steps.release.outputs.channel }}\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Do not cancel in-progress releases — a partial release is worse than a slow one.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n persist-credentials: false\n # A group's release commit moves the branch, so a later group's run must\n # release from the branch's current tip, not the commit that triggered the\n # workflow (semantic-release refuses to run behind its remote). Ungrouped,\n # the default (the triggering commit) is unchanged, unless `from-branch-tip`\n # says the groups ran first.\n ref: ${{ (inputs.group != '' || inputs.from-branch-tip) && github.ref || github.sha }}\n # Use HOLOCRON_RELEASE_TOKEN when available: the built-in github.token cannot push through\n # branch protection rulesets. The checkout keeps no credential (persist-credentials: false), so\n # semantic-release pushes its tags and release commits with GITHUB_TOKEN from the step's env, and\n # `publish tag` sends that same token with its own push of the major tag (ci-v1).\n token: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n\n # semantic-release 26 needs Node 26.13 or later. The frozen setup action ignores `.node-version` (its expression\n # always falls through to this input, default 22.x), so the version is passed here.\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n with:\n node-version: \"26.x\"\n\n # The hosted reference, like the other actions: the action is new, so `theholocron/.github` has no copy and the reference\n # is rewritten to `theholocron/holocron/ci/actions/git-identity@ci-v1` (a `./` path would resolve in the caller's checkout).\n - uses: theholocron/.github/.github/actions/git-identity@main\n name: Configure git identity\n with:\n scope: global\n resolve: \"true\"\n signoff: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n # sigstore is required by libnpmpublish/provenance.js at module parse\n # time — before any config takes effect. Some npm 11.x builds stopped\n # bundling it; installing it globally into the same prefix ensures it\n # resolves regardless of npm version. (Discovered 2026-07-09.)\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n - name: Release\n id: release\n run: |\n BEFORE=$(git rev-parse HEAD)\n # A group's tags are `<group>-v<version>`; without one, the repo-wide `v<version>` tags only: a\n # `deployed/<package>` tag (the deploy step's marker) is nearer after a deploy and is not a release.\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n PREVIOUS_TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || true)\n PREVIOUS=\"\"\n if [ -n \"$PREVIOUS_TAG\" ]; then PREVIOUS=$(git rev-list -n 1 \"$PREVIOUS_TAG\"); fi\n if [ \"$DRY_RUN\" = \"true\" ]; then\n npx semantic-release --dry-run\n else\n npx semantic-release\n fi\n AFTER=$(git rev-parse HEAD)\n # semantic-release only commits (`chore(release): … [skip ci]`) when it\n # actually publishes. That commit gets no CI (and so no coverage\n # upload), which makes the next PR's `codecov/project` compare a full\n # report against a stale ancestor — a phantom drop (holocron#644).\n # Emit the new SHA so the steps below upload coverage for it.\n if [ \"$BEFORE\" != \"$AFTER\" ]; then\n echo \"commit=$AFTER\" >> \"$GITHUB_OUTPUT\"\n echo \"previous=$PREVIOUS\" >> \"$GITHUB_OUTPUT\"\n # The new version's channel: the prerelease identifier of its tag\n # (v5.0.0-alpha.108 or cli-v5.0.0-alpha.108 -> alpha), empty for a stable release.\n VERSION=$(git describe --tags --abbrev=0 \"${MATCH[@]}\")\n VERSION=${VERSION#\"$PREFIX\"}\n CHANNEL=\"\"\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n echo \"channel=$CHANNEL\" >> \"$GITHUB_OUTPUT\"\n fi\n env:\n DRY_RUN: ${{ inputs.dry-run }}\n # Read by the repo's release config to release one version group.\n RELEASE_GROUP: ${{ inputs.group }}\n # Prefer HOLOCRON_RELEASE_TOKEN (fine-grained PAT, Contents+Issues+PRs write,\n # owned by an admin with ruleset bypass) so @semantic-release/git can\n # push the version-bump commit through branch protection. Falls back to\n # HOLOCRON_SYNC_TOKEN (legacy) then github.token for unprotected repos.\n GITHUB_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n HUSKY: \"0\"\n NPM_CONFIG_PROVENANCE: true\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Coverage for the release commit\n if: ${{ steps.release.outputs.commit != '' }}\n with:\n task: test:unit\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload release-commit coverage to Codecov\n if: ${{ steps.release.outputs.commit != '' }}\n # fail_ci_if_error makes a failed upload fail this step, so it is visible, but\n # continue-on-error keeps it from failing the job: the release has already\n # published, and the Sentry release steps below must still run (holocron#934).\n continue-on-error: true\n with:\n use_oidc: true\n fail_ci_if_error: true\n override_commit: ${{ steps.release.outputs.commit }}\n override_branch: ${{ github.ref_name }}\n\n - name: Get release version\n id: release_version\n if: ${{ inputs.sentry-project != '' && inputs.dry-run != true }}\n env:\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || echo \"\")\n if [ -n \"$TAG\" ]; then\n echo \"release=${SENTRY_PROJECT}@${TAG#\"$PREFIX\"}\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - name: Create Sentry release\n if: ${{ inputs.sentry-project != '' && steps.release_version.outputs.release != '' && inputs.dry-run != true }}\n uses: getsentry/action-release@2e505a70ff06dac263413242aa3617fec90134e5 # v3\n env:\n SENTRY_AUTH_TOKEN: ${{ secrets.HOLOCRON_SENTRY_RELEASE_TOKEN || secrets.SENTRY_AUTH_TOKEN }}\n SENTRY_ORG: ${{ vars.HOLOCRON_SENTRY_ORG || vars.SENTRY_ORG }}\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n with:\n environment: production\n version: ${{ steps.release_version.outputs.release }}\n sourcemaps: \"**/dist\"\n\n republish:\n name: Republish\n # Publishes what npm lacks for a tag that already exists (holocron#1387). Never tags, never makes a release or a\n # release commit, never moves a branch: it reads the tag and publishes. It holds no write token for the repository.\n if: ${{ inputs.republish-tag != '' }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - name: Check the tag\n id: tag\n env:\n TAG: ${{ inputs.republish-tag }}\n RELEASE_GROUP: ${{ inputs.group }}\n EXCLUDED_GROUPS: ${{ inputs.exclude-groups }}\n DRY_RUN: ${{ inputs.dry-run }}\n run: |\n # A group's tags are `<group>-v<version>`; the rest of the repo's are `v<version>`.\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then PREFIX=\"${RELEASE_GROUP}-v\"; fi\n case \"$TAG\" in\n \"$PREFIX\"[0-9]*) ;;\n *) echo \"::error::$TAG is not a ${PREFIX}<version> tag\"; exit 1 ;;\n esac\n VERSION=${TAG#\"$PREFIX\"}\n # The channel is the prerelease identifier (5.0.0-alpha.9 -> alpha), `latest` for a stable version.\n CHANNEL=latest\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n ARGS=\"--skip-already-published --tag $CHANNEL\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n ARGS=\"$ARGS --group $RELEASE_GROUP\"\n else\n for g in $EXCLUDED_GROUPS; do ARGS=\"$ARGS --exclude-group $g\"; done\n fi\n # A manual run defaults to a dry run, so a republish is previewed before it publishes.\n if [ \"$DRY_RUN\" = \"true\" ]; then ARGS=\"$ARGS --dry-run\"; fi\n echo \"args=$ARGS\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the tag\n with:\n ref: refs/tags/${{ inputs.republish-tag }}\n fetch-depth: 0\n persist-credentials: false\n\n # Only a tag on a release branch is republished: a tag pushed to some other branch is not a release.\n - name: Require a release branch\n env:\n TAG: ${{ inputs.republish-tag }}\n run: |\n git fetch --no-tags origin '+refs/heads/main:refs/remotes/origin/main' '+refs/heads/alpha:refs/remotes/origin/alpha' || true\n for branch in main alpha; do\n if git rev-parse --verify --quiet \"refs/remotes/origin/$branch\" >/dev/null && git merge-base --is-ancestor HEAD \"refs/remotes/origin/$branch\"; then\n echo \"$TAG is on $branch\"\n exit 0\n fi\n done\n echo \"::error::$TAG is not on main or alpha, so it is not republished\"\n exit 1\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n # Writes the packages left unpublished to the job summary and fails when one is.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Publish what npm lacks\n env:\n NPM_CONFIG_PROVENANCE: true\n with:\n command: publish package\n args: ${{ steps.tag.outputs.args }}\n\n deploy:\n name: Deploy\n needs: release\n # Only after a release that actually published (`commit` is empty on a dry\n # run or when nothing was released). A failed deploy fails only this job:\n # the release is already on npm, and this job re-runs on its own.\n if: ${{ inputs.deploy-on-release == true && inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n # No credential is left in .git/config: the deploy script below runs with VERCEL_TOKEN and must not find a\n # write token. Only the record step at the end is given one (holocron#2330).\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Deploy packages that deploy on release\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n with:\n command: deploy on-release\n args: >-\n --channel=${{ needs.release.outputs.channel }}\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --record-file=${{ runner.temp }}/deployed.json\n\n # Records each package that deployed as a `deployed/<package>` tag, so a later release can make up a deploy this\n # one missed (holocron#2330). It runs even after a failed deploy (for the packages that did deploy), deploys\n # nothing, and is the only step that gets the job's token, in its own environment and never in .git/config.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Record the deploys\n if: ${{ !cancelled() }}\n env:\n GITHUB_TOKEN: ${{ github.token }}\n with:\n command: deploy on-release\n args: >-\n --record\n --record-file=${{ runner.temp }}/deployed.json\n\n announce:\n name: Announce release\n needs: release\n # Posts the release to #releases with a thread of its packages (holocron#2777, `holocron sync releases`). Only after\n # a release that actually published, never on a dry run. Like the deploy job, a failure fails only this job: the\n # release is already on npm. A repo without the two secrets gets a warning and no post.\n if: ${{ inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n # The `releases` channel's webhook (the layout's `webhook: true` stores it as this org secret); the Discord\n # provider reads HOLOCRON_DISCORD_WEBHOOK as its default webhook.\n HOLOCRON_DISCORD_WEBHOOK: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_RELEASES }}\n steps:\n - name: Warn that the release is not announced\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN == '' || env.HOLOCRON_DISCORD_WEBHOOK == '' }}\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN or HOLOCRON_NOTIFY_WEBHOOK_RELEASES is not set, so the release was not announced.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n\n # The release's tag, the way the release job names it: `<group>-v<version>` for a group, `v<version>` otherwise.\n - name: Find the release tag\n id: tag\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n env:\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=\"v[0-9]*\"\n if [ -n \"$RELEASE_GROUP\" ]; then MATCH=\"${RELEASE_GROUP}-v*\"; fi\n echo \"tag=$(git describe --tags --abbrev=0 --match \"$MATCH\" HEAD 2>/dev/null || true)\" >> \"$GITHUB_OUTPUT\"\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Announce the release\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n command: sync releases\n args: >-\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --tag=${{ steps.tag.outputs.tag }}\n --yes\n\n sync-readme:\n name: Post-release readme sync\n needs: release\n if: ${{ inputs.post-release == true && inputs.dry-run != true }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - name: Trigger broadcast readme sync\n run: |\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=readme\"\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n";
557
557
  var remind_doctor_default$1 = "name: Remind Doctor\n\n# A weekly nudge to run the drift check by hand (#1585). `holocron doctor notifications` compares the layout with the\n# live server and reads the Worker, the tracker and the secrets with provider tokens, which stay on a maintainer's\n# machine rather than in CI. This posts one line to #alerts, no ping, naming the command that checks and shares the\n# result. A missing webhook secret skips the post and never fails the run.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: The #alerts webhook the reminder posts to. Without it the post is skipped.\n required: false\n\njobs:\n remind-doctor:\n name: Remind to run the drift check\n permissions: {}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: \"Remind #alerts\"\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n message: \"🩺 ${{ github.repository }}: time for the weekly drift check. Run `holocron doctor notifications --built-only --post` to compare the server with the layout and post the result here.\"\n";
558
558
  var code_default$2 = "name: Security\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n language:\n description: CodeQL language to analyze\n type: string\n required: false\n default: javascript-typescript\n\njobs:\n analyze:\n name: Analyze (${{ inputs.language }})\n permissions:\n actions: read\n contents: read\n security-events: write\n runs-on: ubuntu-latest\n timeout-minutes: 45\n # Do not cancel in-progress security scans.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Initialize CodeQL\n with:\n languages: ${{ inputs.language }}\n\n - uses: github/codeql-action/autobuild@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Autobuild\n\n - uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Analyze\n with:\n category: /language:${{ inputs.language }}\n";
559
559
  var secrets_default$1 = "name: Secret Detection\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n secret-detection:\n name: Run gitleaks\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # gitleaks has no npm distribution. Install one pinned release and check\n # the tarball against the SHA-256 written here, not one fetched beside it.\n # The maintainer's install.sh is gone (404), and piping curl into sh hid\n # that: the step passed with no binary and the scan never ran (#2452).\n - name: Install gitleaks\n env:\n GITLEAKS_VERSION: 8.30.1\n GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb\n run: |\n archive=\"gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz\"\n curl -sSfL -o \"${RUNNER_TEMP}/${archive}\" \\\n \"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${archive}\"\n echo \"${GITLEAKS_SHA256} ${RUNNER_TEMP}/${archive}\" | sha256sum --check --strict\n tar -xzf \"${RUNNER_TEMP}/${archive}\" -C \"${RUNNER_TEMP}\" gitleaks\n install -m 0755 \"${RUNNER_TEMP}/gitleaks\" /usr/local/bin/gitleaks\n\n # `holocron run scan:secrets` passes when gitleaks is not on PATH, so\n # fail here if it is not.\n - name: Check gitleaks is installed\n run: gitleaks version\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run gitleaks\n with:\n task: scan:secrets\n\n # Advisory (#1573): betterleaks v2 is still a release candidate, so this job\n # never fails the run (each step has `continue-on-error`, so the job ends\n # green) and gitleaks above stays the required check. A finding or a failed\n # install shows as a warning. It runs only in a repo that has a\n # `betterleaks.toml`. When v2 is stable, bump the pin, drop `continue-on-error`\n # and retire the gitleaks job.\n betterleaks:\n name: Run betterleaks (advisory)\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # Betterleaks has no GitHub Action. Install one pinned release and check\n # the tarball against the SHA-256 written here, not one fetched beside it.\n - name: Install betterleaks\n id: install\n if: ${{ hashFiles('betterleaks.toml') != '' }}\n continue-on-error: true\n env:\n BETTERLEAKS_VERSION: 2.0.0-rc.9\n BETTERLEAKS_SHA256: 772a1a2e2d13a5bd80ef4bc900ad90942ac4383ac79fb6cdfcc7df542434f2f8\n run: |\n archive=\"betterleaks_${BETTERLEAKS_VERSION}_linux_x64.tar.gz\"\n curl -sSfL -o \"${RUNNER_TEMP}/${archive}\" \\\n \"https://github.com/betterleaks/betterleaks/releases/download/v${BETTERLEAKS_VERSION}/${archive}\"\n echo \"${BETTERLEAKS_SHA256} ${RUNNER_TEMP}/${archive}\" | sha256sum --check --strict\n tar -xzf \"${RUNNER_TEMP}/${archive}\" -C \"${RUNNER_TEMP}\" betterleaks\n install -m 0755 \"${RUNNER_TEMP}/betterleaks\" /usr/local/bin/betterleaks\n\n # Medium confidence and up: the low-confidence generic rules flag test\n # fixtures. Betterleaks reads `.betterleaksignore` (exact secret values\n # to skip) from the checkout itself.\n - name: Run betterleaks\n if: ${{ steps.install.outcome == 'success' }}\n continue-on-error: true\n run: |\n set -o pipefail\n if ! betterleaks git --no-banner --config betterleaks.toml --confidence=medium --redact .; then\n echo \"::warning title=betterleaks::Advisory scan found something or failed. Gitleaks is the required check; see the log.\"\n exit 1\n fi\n";
@@ -563,8 +563,8 @@ var sync_issues_default$1 = "name: Sync Issues\n\n# Keeps the issues of one trac
563
563
  var sync_prs_default$1 = "name: Sync PRs\n\n# Keeps the pull request forum's posts in step with GitHub (#2853, spec `tech-discord-notifications-v2`, step 3). It runs\n# `holocron sync prs --yes`, which reads state, not events: every open pull request and the forum's posts, and puts each\n# post's tag, title and first message right and archives the post of a pull request that is closed or merged. Sentinel's\n# feed writes a post on each webhook delivery; this catches what a missed delivery, an outage or a hand-changed tag\n# left wrong. Discord does not set a pull request's state: a tag a person changed is set back. A post whose pull request\n# is gone is reported and left alone, and the post of a closed pull request is deleted only when `feeds.prs.retainDays`\n# says so and no person has written in it. It only reads GitHub and only writes to Discord, so it changes no file and\n# opens no pull request.\n#\n# Its caller runs it every fifteen minutes and on demand, with `dry-run` to see what a run would do. Sentinel's cron\n# starts it too (a `SCHEDULED_TASKS` row, #2868), and its `sync-prs` heartbeat tells Checkly each run finished.\n#\n# It needs the `HOLOCRON_DISCORD_BOT_TOKEN` secret (the Holonet bot, which must be able to edit and delete threads in the\n# forum). The pull requests are read with `HOLOCRON_PULLS_TOKEN` when there is one, else with the run's own token. Without\n# the bot token the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be changed; write nothing to Discord.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_PULLS_TOKEN:\n description: Reads the pull requests, their reviews and checks. Without it the run's own token is used.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_PRS:\n description: The ping URL of the `sync-prs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-prs:\n name: Sync pull request posts\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each edit the same post.\n concurrency:\n group: sync-prs\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n pull-requests: read\n checks: read\n statuses: read\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n HOLOCRON_PULLS_TOKEN: ${{ secrets.HOLOCRON_PULLS_TOKEN || github.token }}\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that the Discord token is missing\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no pull request posts were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the pull request posts\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync prs --dry-run\n else\n node cli/cli/dist/cli.mjs sync prs --yes\n fi\n\n # Tells Checkly this run finished (#2868, the `sync-prs` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job. A dry run does not ping.\n - name: Ping the heartbeat\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_PRS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_PRS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
564
564
  var sync_repo_default$1 = "name: Sync\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n steps:\n description: >\n Sync steps to run (default: all). Valid values:\n labels, properties, teams, topics, keywords, description, homepage, readme, workflows, wiki.\n Pass a space-separated list to run a subset, e.g. \"readme\" or \"readme wiki\".\n type: string\n required: false\n secrets:\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained PAT with admin scopes (labels, properties, teams).\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained PAT for GitHub Pages configuration.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained PAT for issue management.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Org-scoped fine-grained PAT for team sync and org properties.\n required: false\n HOLOCRON_READ_TOKEN:\n description: Fine-grained PAT for read-only GitHub API calls.\n required: false\n HOLOCRON_SYNC_TOKEN:\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: >\n Webhook for the sync channel: a sync PR opened and its\n auto-merge result. Unset = no post.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: >\n Webhook for the alerts channel: a failed sync run, or a sync\n PR that needs a manual merge. Unset = no post. The optional\n HOLOCRON_NOTIFY_ALERT_ROLE secret (a role id) makes these posts\n mention that role.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: >\n Id of the role to mention on alerts. Written by `holocron\n setup notifications`; not sensitive, kept as a secret so the same\n token that writes the webhook secrets can write it. Optional.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for gh CLI calls. Used when\n HOLOCRON_SYNC_TOKEN is not set.\n required: false\n\njobs:\n sync:\n name: Run holocron sync\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Serialise the find-or-create-PR and supersede steps repo-wide: the caller's\n # concurrency key is per ref, so runs from different refs could otherwise\n # interleave and leave several sync PRs open.\n concurrency:\n group: repo-sync-pr-${{ github.repository }}\n cancel-in-progress: false\n permissions:\n contents: write\n pull-requests: write\n # Job-level so the `holocron` composite action's steps inherit them.\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync\n id: sync\n # The `holocron` action resolves @theholocron/cli from node_modules (or\n # builds the workspace when it's an unbuilt checkout — the holocron repo\n # itself). `inputs.steps` is a space-separated list or empty; the\n # `--steps <list>` arg is omitted when empty.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: sync\n args: ${{ inputs.steps != '' && format('--steps {0}', inputs.steps) || '' }}\n\n - name: Format generated files\n run: |\n pnpm exec prettier --write README.md docs/src/content/docs/index.mdx 2>/dev/null || true\n # `holocron sync` writes package.json fields (keywords, description,\n # homepage) with a plain assignment, which appends new keys at the\n # end — re-apply the canonical order the lint config enforces.\n pnpm exec eslint --fix --no-warn-ignored package.json 2>/dev/null || true\n\n - uses: theholocron/.github/.github/actions/auto-commit@main\n id: auto-commit\n name: Commit sync changes\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # One branch per source commit (full SHA, so distinct commits never collide): a PR left unreviewed never blocks the\n # next sync, and a re-run for the same commit updates its own branch.\n branch: ${{ format('chore/auto-sync-{0}', github.sha) }}\n commit-message: \"chore: sync from holocron.config\"\n commit-options: \"--no-verify\"\n\n - name: Open PR and enable auto-merge\n id: pr\n if: steps.auto-commit.outputs.changes-detected == 'true'\n run: |\n # Find or create this run's PR first: older PRs are only closed once\n # a replacement exists, so a failure here never leaves the changes\n # without an open PR.\n url=$(gh pr view \"$BRANCH\" --json url --jq .url 2>/dev/null || gh pr create \\\n --title \"chore: sync README and repo metadata\" \\\n --body \"Automated sync from holocron.config. Auto-merges once required checks pass.\" \\\n --base main \\\n --head \"$BRANCH\")\n created=$(gh pr view \"$url\" --json createdAt --jq .createdAt)\n\n # Supersede older sync PRs: same-repo only, exact generated or legacy\n # branch name, and created before this one (a slow older run can\n # never close a newer PR). --limit covers more than the default page.\n gh pr list --state open --limit 200 --json number,headRefName,isCrossRepository,createdAt \\\n --jq \".[] | select(.isCrossRepository | not) | select(.headRefName == \\\"chore/auto-sync\\\" or (.headRefName | test(\\\"^chore/auto-sync-[0-9a-f]{40}$\\\"))) | select(.headRefName != \\\"$BRANCH\\\") | select(.createdAt < \\\"$created\\\") | .number\" |\n while read -r n; do\n gh pr close \"$n\" --delete-branch --comment \"Superseded by $url.\" || true\n done\n\n # Delete pushed sync branches that never got a PR (e.g. a run\n # cancelled between push and PR creation). The repo-wide concurrency\n # group means no other run is mid-flight here.\n open=$(gh pr list --state open --limit 200 --json headRefName --jq '.[].headRefName')\n git ls-remote --heads origin 'refs/heads/chore/auto-sync-*' | sed 's|.*refs/heads/||' |\n while read -r b; do\n [ \"$b\" = \"$BRANCH\" ] && continue\n echo \"$b\" | grep -Eq '^chore/auto-sync-[0-9a-f]{40}$' || continue\n echo \"$open\" | grep -qxF \"$b\" || git push origin --delete \"$b\" || true\n done\n\n # A PR opened with the default GITHUB_TOKEN does not trigger\n # pull_request workflows, so required checks would never start and\n # auto-merge would wait forever.\n if [ \"$HAS_PAT\" != \"true\" ]; then\n echo \"::warning::Sync PR $url opened with GITHUB_TOKEN: checks will not run and auto-merge is skipped. Set HOLOCRON_SYNC_TOKEN.\"\n echo \"Sync PR $url — needs manual merge (no PAT).\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (no PAT, so checks will not run)\"\n attention=true\n elif gh pr merge \"$url\" --auto --squash; then\n echo \"Sync PR $url — auto-merge enabled.\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n result=\"auto-merge enabled\"\n else\n echo \"::warning::Sync PR $url opened but auto-merge could not be enabled; merge it manually.\"\n echo \"Sync PR $url — needs manual merge.\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (auto-merge could not be enabled)\"\n attention=true\n fi\n {\n echo \"url=$url\"\n echo \"result=$result\"\n echo \"attention=${attention:-false}\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n BRANCH: ${{ format('chore/auto-sync-{0}', github.sha) }}\n HAS_PAT: ${{ secrets.HOLOCRON_SYNC_TOKEN != '' || secrets.GH_TOKEN != '' }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # The closing line of `holocron sync` (\"80 ok, 0 fail, 0 skipped\"), for the run's summary and the posts below. A log\n # with no such line gives an empty count, and the posts leave it out.\n - name: Summarise the sync\n id: summary\n if: ${{ !cancelled() && steps.sync.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.sync.outputs.log-file }}\n run: |\n esc=$(printf '\\033')\n counts=$(sed \"s/${esc}\\[[0-9;]*m//g\" \"$LOG_FILE\" | grep -E '^ *[0-9]+ ok, [0-9]+ fail' | tail -1 | sed 's/^ *//' || true)\n echo \"counts=$counts\" >> \"$GITHUB_OUTPUT\"\n if [ -n \"$counts\" ]; then echo \"Sync: $counts\" >> \"$GITHUB_STEP_SUMMARY\"; fi\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of the sync PR\n if: steps.pr.outputs.url != '' && steps.pr.outputs.attention != 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"🔄 ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ steps.summary.outputs.counts != '' && format(' ({0})', steps.summary.outputs.counts) || '' }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n # A run that changed nothing opens no PR, so without this post a successful sync is silent.\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that the sync had nothing to change\n if: steps.auto-commit.outputs.changes-detected != 'true' && steps.summary.outputs.counts != ''\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"✅ ${{ github.repository }}: sync ran and found nothing to change (${{ steps.summary.outputs.counts }})${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that a sync PR needs attention\n if: steps.pr.outputs.attention == 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"⚠️ ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - name: Broadcast wiki sync if navbar changed\n if: >-\n steps.auto-commit.outputs.changes-detected == 'true' &&\n github.event_name == 'push' &&\n (inputs.steps == '' || contains(inputs.steps, 'wiki'))\n run: |\n if git diff HEAD~1 --name-only | grep -q 'fern/docs.yml'; then\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=wiki\" \\\n || echo \"skipping broadcast — insufficient permissions\"\n fi\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # A separate job, not a final step: a job-level timeout cancels the sync job\n # before any later step in it can run, so an in-job `if: failure()` step would\n # stay silent on exactly the hang we most want to hear about. `!cancelled()` is\n # false when the whole run was cancelled (a newer run superseded this one), so\n # that expected case stays quiet, while a failed or timed-out sync job alerts.\n notify-failure:\n name: Notify of a failed sync\n needs: sync\n if: ${{ !cancelled() && (needs.sync.result == 'failure' || needs.sync.result == 'cancelled') }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of a failed sync\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"❌ ${{ github.repository }}: sync ${{ needs.sync.result == 'cancelled' && 'timed out or was cancelled' || 'failed' }} — <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n";
565
565
  var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's sync secrets (holocron#781, extended per holocron#800): fans the 1Password Environment of the `prod` layer, `theholocron/holocron - prod`\n# (holocron#1671, #2069; it was `Sentinel`, and Doppler's `sentinel`/prd config before that) out to Vercel (only the keys `repo.secrets.deploy` in\n# apps/sentinel/holocron.config.ts names: the `SENTINEL_` prefix and three `HOLOCRON_` names, #2061). It used to write one key,\n# `SENTINEL_AXIOM_INGEST_TOKEN`, to an organization Actions secret as well, for the dispatched check workflow; Sentinel no longer\n# dispatches it (#2263), so nothing in Actions needs a copy and no GitHub token is passed. apps/sentinel/README.md's \"After registration\"\n# section has the equivalent local invocation and says why each flag is there. The caller is manual only: run it once\n# after registration and again when a secret rotates.\n#\n# `--target production` only, deliberately. A prior version also synced `--target preview` (holocron#1010 follow-up,\n# #1024), reasoning that deploy-preview's function needed the 5 env vars; it does not (`handleWebhookRequest` returns\n# 405 on anything but POST before it reads `env`, and the preview monitoring check only sends a GET). That version ran\n# on 2026-10-14 and synced all 5 keys, `GITHUB_APP_PRIVATE_KEY` included, into Vercel's `preview` target, reachable by\n# any PR's own deployed code, since `deploy-preview` builds every PR from that PR's not-yet-reviewed code. `sync\n# secrets`'s `deployment` destination had no per-key allowlist then (it has one now, #2061: only the keys `repo.secrets.deploy`\n# names reach it, and a run with no entry stops with a ConfigError), so keeping production credentials out of a\n# PR-controlled deploy target entirely was the fix, and `--target production` only stays (the\n# class of exposure #1057/#1058 closed for the Deployment Protection bypass secret). The already-synced preview copies\n# were cleared from Vercel by hand.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the sync writes with. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `prod` layer Environment.\n required: true\n\njobs:\n sync-secrets:\n name: Sync 1Password to Vercel\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync secrets\n with:\n command: sync\n args: >-\n secrets --env ${{ inputs.environment }} --cwd apps/sentinel --project-id sentinel\n --target production\n";
566
- var sync_specs_default$1 = "#\n# Keeps a forum post in #ideas for every ADR and spec, in step with the files (#1535, spec\n# `tech-specs-discussion-threads`). It runs `holocron sync specs`, which makes the posts (titled with the document's own title, tagged\n# with the status), writes each post's address into its file as `discussion.url`, and, when a gatekeeper changed a post's\n# tag, changes the file's `status:` line. It also links the id that opens a post to its file once the file is on `alpha` (#1663), which edits the post only. Those are edits to the working tree only: this workflow commits them to the\n# branch `chore/specs-sync` and opens one pull request. The pull request merges itself (auto-merge, once its checks pass)\n# when it only links posts and numbers documents; one that changes a `status:` waits for a review (#1824).\n#\n# Its caller runs it every hour (so a retag becomes a pull request within the hour), when a spec or ADR lands on `alpha`\n# (so its post exists straight away) and on demand, with `dry-run` to see what a run would do. A first run is the\n# backfill: run it as a dry run, then for real.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot) and a forum channel in the layout. Without the\n# token the job warns and does nothing. The pull request is opened with `HOLOCRON_SYNC_TOKEN` when there is one, so its\n# checks run; with the default token they do not, and the pull request needs a push to start them.\n#\n# This replaces the webhook post of #1534: a forum rejects a plain webhook post, and a post per document says more than a\n# line per pull request. A spec in a pull request that has not merged gets its post from the `preview-specs` task (#1600).\n\nname: Sync Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; make and write nothing.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Opens the sync pull request, so that its checks run.\n required: false\n GH_TOKEN:\n description: Fallback for HOLOCRON_SYNC_TOKEN.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_SPECS:\n description: The ping URL of the `sync-specs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-specs:\n name: Sync spec discussions\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same document. The\n # group is shared with `preview-specs`.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: write\n pull-requests: write\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n BRANCH: chore/specs-sync\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussions were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the default branch\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # The whole history: a spec is numbered by when its file was first committed, and its post links the pull\n # request that added it, which the first commit's subject names.\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --dry-run\n else\n node cli/cli/dist/cli.mjs sync specs\n fi\n\n # The command changes the files and never commits. What it changed goes to one branch, force-updated each run, so\n # there is at most one open pull request for it.\n - uses: ./ci/actions/git-identity\n name: Configure git identity\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n\n - name: Commit the edits to the sync branch\n id: commit\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n run: |\n if git diff --quiet; then\n echo \"changed=false\" >> \"$GITHUB_OUTPUT\"\n echo \"Nothing to commit: every post and file is in step.\"\n exit 0\n fi\n git switch -c \"$BRANCH\"\n git add -A .notes docs/wiki\n git commit --no-verify -s -m \"chore(specs): 🔄 sync spec discussions\"\n git push --force origin \"HEAD:refs/heads/$BRANCH\"\n echo \"changed=true\" >> \"$GITHUB_OUTPUT\"\n\n - name: Open the pull request\n if: steps.commit.outputs.changed == 'true'\n run: |\n # An open pull request already carries the new commit: the branch was updated in place.\n if [ \"$(gh pr list --head \"$BRANCH\" --state open --json number --jq length)\" != \"0\" ]; then\n echo \"The sync pull request is open; its branch now has the latest edits.\"\n exit 0\n fi\n cat > \"$RUNNER_TEMP/body.md\" <<'EOF'\n Edits `holocron sync specs` made to the working tree: the address of each spec or ADR discussion post as `discussion.url`, and the `status:` of a document whose post a gatekeeper retagged.\n\n A pull request that only links posts merges itself once its checks pass. One that changes a `status:` waits for a review: the change was asked for by changing the tag on the post in Discord. Merge it to accept the change, or close it and change the tag back. The post is not marked as in step until this merges.\n\n Opened by the Spec discussions workflow (#1535).\n EOF\n gh pr create --base alpha --head \"$BRANCH\" \\\n --title \"chore(specs): 🔄 sync spec discussions\" \\\n --body-file \"$RUNNER_TEMP/body.md\"\n\n # The branch is rebuilt from `alpha` every run, so its one commit is exactly what the pull request changes. A\n # `status:` line in it came from a gatekeeper's retag and waits for a review; links and ids merge themselves.\n # Auto-merge needs the checks to run, which a pull request opened with the default token does not get.\n - name: Merge by itself unless a status changes\n if: steps.commit.outputs.changed == 'true' && env.HOLOCRON_SYNC_TOKEN != ''\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n run: |\n if git diff HEAD~1 HEAD -U0 -- .notes docs/wiki | grep -Eq '^[+-]status:'; then\n echo \"The sync changes a status: it waits for a review.\"\n gh pr merge \"$BRANCH\" --disable-auto || true\n else\n gh pr merge \"$BRANCH\" --auto --squash\n fi\n\n # Tells Checkly this run finished (#2359, the `sync-specs` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. Not for a dry run, nor when there is no Discord token (the job did nothing).\n # A no-op until the secret exists; the URL is a credential: it goes in through `env` only, is masked, and a failed\n # ping never fails the job.\n - name: Ping the heartbeat\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_SPECS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_SPECS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
567
- var sync_templates_default$1 = "name: Sync Templates\n\n# Builds the holocron CLI from source and pushes updated workflow templates\n# and composite actions to downstream .github repos, by pull request. Its caller\n# runs it whenever the template source files change on main or alpha. The\n# consumer repos are found first: every repo of the org with a holocron.config,\n# except `.github` and the repo this runs in.\n#\n# Secrets required:\n# HOLOCRON_SYNC_TOKEN — fine-grained PAT (resource owner: org) with:\n# Actions: Read and write (dispatch workflow runs via gh workflow run)\n# Contents: Read and write (git trees, blobs, refs)\n# Pull requests: Read and write (open sync PR)\n# Workflows: Read and write (write .github/workflows/*.yml)\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n primary-repo:\n description: >\n Primary .github repo — receives composite actions, reusable workflows,\n and thin-caller templates. Requires a PR (branch protection assumed).\n Empty means the `.github` repo of the owner the workflow runs in.\n type: string\n required: false\n default: \"\"\n secondary-repos:\n description: >\n Space-separated list of secondary repos (reusable workflows + thin\n callers only, no composite actions). Changes are delivered via pull\n request, same as the primary repo. Empty means every repo of the\n owner that has a holocron.config, found by code search.\n type: string\n required: false\n default: \"\"\n sync-branch:\n description: Branch name used for the primary and secondary repo PRs\n type: string\n required: false\n default: chore/sync-templates\n secrets:\n HOLOCRON_SYNC_TOKEN:\n required: true\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to HOLOCRON_SYNC_TOKEN.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when neither\n HOLOCRON_READ_TOKEN nor HOLOCRON_SYNC_TOKEN is set.\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n discover-repos:\n name: Discover consumer repos\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n contents: read\n outputs:\n secondary-repos: ${{ steps.find.outputs.secondary-repos }}\n steps:\n - name: Find repos with holocron.config\n id: find\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n OWNER: ${{ github.repository_owner }}\n GIVEN: ${{ inputs.secondary-repos }}\n THIS_REPO: ${{ github.repository }}\n run: |\n if [ -n \"$GIVEN\" ]; then\n echo \"secondary-repos=$GIVEN\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # $ENV.OWNER and $ENV.THIS_REPO are jq's, read from the environment; the single quotes are meant.\n # shellcheck disable=SC2016\n repos=$(gh api \"search/code?q=filename:holocron.config+org:${OWNER}&per_page=100\" \\\n --jq '[.items[].repository.full_name]\n | unique\n | map(select(. != ($ENV.OWNER + \"/.github\") and . != $ENV.THIS_REPO))\n | join(\" \")')\n echo \"secondary-repos=$repos\" >> \"$GITHUB_OUTPUT\"\n\n sync:\n name: Sync templates\n needs: discover-repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n permissions:\n contents: read\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm build\n name: Build CLI\n\n # Resolve the built CLI from node_modules instead of hard-coding where it\n # lives in this repo (the same lookup the `holocron` composite action does).\n - name: Resolve CLI\n run: echo \"HOLOCRON_CLI=$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\" >> \"$GITHUB_ENV\"\n\n - name: Cache actionlint\n id: cache-actionlint\n uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0\n with:\n path: /tmp/actionlint\n key: actionlint-v1.7.7-linux-amd64\n\n - name: Download actionlint\n if: steps.cache-actionlint.outputs.cache-hit != 'true'\n run: |\n curl -fsSL https://github.com/rhysd/actionlint/releases/download/v1.7.7/actionlint_1.7.7_linux_amd64.tar.gz \\\n | tar -xz -C /tmp actionlint\n\n - name: Validate generated workflows\n run: |\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --output-dir /tmp/sync-validate\n /tmp/actionlint /tmp/sync-validate/.github/workflows/*.yml\n env:\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n\n # By path: the action is new and `theholocron/.github` is frozen (see the `format` action in lint/code.yml).\n # `scope: none` leaves git's own config alone: the identity only goes into the Signed-off-by trailer below.\n - uses: ./ci/actions/git-identity\n name: Resolve git identity\n id: identity\n with:\n scope: none\n resolve: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n\n - name: Sync primary repo (PR)\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$PRIMARY_REPO\" \"$SYNC_BRANCH\" 2>/dev/null || true\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n\n - name: Sync secondary repos (PR)\n if: ${{ needs.discover-repos.outputs.secondary-repos != '' }}\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n for repo in $SECONDARY_REPOS; do\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$repo\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$repo\" \"$SYNC_BRANCH\" 2>/dev/null || true\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n SECONDARY_REPOS: ${{ needs.discover-repos.outputs.secondary-repos }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n";
566
+ var sync_specs_default$1 = "#\n# Keeps a forum post in #ideas for every ADR and spec, in step with the files (#1535, spec\n# `tech-specs-discussion-threads`). It runs `holocron sync specs`, which makes the posts (titled with the document's own title, tagged\n# with the status), writes each post's address into its file as `discussion.url`, and, when a gatekeeper changed a post's\n# tag, changes the file's `status:` line. It also links the id that opens a post to its file once the file is on `alpha` (#1663), which edits the post only. Those are edits to the working tree only: this workflow commits them to the\n# branch `chore/specs-sync` and opens one pull request. The pull request merges itself (auto-merge, once its checks pass)\n# when it only links posts and numbers documents; one that changes a `status:` waits for a review (#1824).\n#\n# Its caller runs it every hour (so a retag becomes a pull request within the hour), when a spec or ADR lands on `alpha`\n# (so its post exists straight away) and on demand, with `dry-run` to see what a run would do. A first run is the\n# backfill: run it as a dry run, then for real.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot) and a forum channel in the layout. Without the\n# token the job warns and does nothing. The pull request is opened with `HOLOCRON_SYNC_TOKEN` when there is one, so its\n# checks run; with the default token they do not, and the pull request needs a push to start them.\n#\n# This replaces the webhook post of #1534: a forum rejects a plain webhook post, and a post per document says more than a\n# line per pull request. A spec in a pull request that has not merged gets its post from the `preview-specs` task (#1600).\n\nname: Sync Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; make and write nothing.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Opens the sync pull request, so that its checks run.\n required: false\n GH_TOKEN:\n description: Fallback for HOLOCRON_SYNC_TOKEN.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_SPECS:\n description: The ping URL of the `sync-specs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-specs:\n name: Sync spec discussions\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same document. The\n # group is shared with `preview-specs`.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: write\n pull-requests: write\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n BRANCH: chore/specs-sync\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussions were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the default branch\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # The whole history: a spec is numbered by when its file was first committed, and its post links the pull\n # request that added it, which the first commit's subject names.\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --dry-run\n else\n node cli/cli/dist/cli.mjs sync specs\n fi\n\n # The command changes the files and never commits. What it changed goes to one branch, force-updated each run, so\n # there is at most one open pull request for it.\n - uses: theholocron/.github/.github/actions/git-identity@main\n name: Configure git identity\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n\n - name: Commit the edits to the sync branch\n id: commit\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n run: |\n if git diff --quiet; then\n echo \"changed=false\" >> \"$GITHUB_OUTPUT\"\n echo \"Nothing to commit: every post and file is in step.\"\n exit 0\n fi\n git switch -c \"$BRANCH\"\n git add -A .notes docs/wiki\n git commit --no-verify -s -m \"chore(specs): 🔄 sync spec discussions\"\n git push --force origin \"HEAD:refs/heads/$BRANCH\"\n echo \"changed=true\" >> \"$GITHUB_OUTPUT\"\n\n - name: Open the pull request\n if: steps.commit.outputs.changed == 'true'\n run: |\n # An open pull request already carries the new commit: the branch was updated in place.\n if [ \"$(gh pr list --head \"$BRANCH\" --state open --json number --jq length)\" != \"0\" ]; then\n echo \"The sync pull request is open; its branch now has the latest edits.\"\n exit 0\n fi\n cat > \"$RUNNER_TEMP/body.md\" <<'EOF'\n Edits `holocron sync specs` made to the working tree: the address of each spec or ADR discussion post as `discussion.url`, and the `status:` of a document whose post a gatekeeper retagged.\n\n A pull request that only links posts merges itself once its checks pass. One that changes a `status:` waits for a review: the change was asked for by changing the tag on the post in Discord. Merge it to accept the change, or close it and change the tag back. The post is not marked as in step until this merges.\n\n Opened by the Spec discussions workflow (#1535).\n EOF\n gh pr create --base alpha --head \"$BRANCH\" \\\n --title \"chore(specs): 🔄 sync spec discussions\" \\\n --body-file \"$RUNNER_TEMP/body.md\"\n\n # The branch is rebuilt from `alpha` every run, so its one commit is exactly what the pull request changes. A\n # `status:` line in it came from a gatekeeper's retag and waits for a review; links and ids merge themselves.\n # Auto-merge needs the checks to run, which a pull request opened with the default token does not get.\n - name: Merge by itself unless a status changes\n if: steps.commit.outputs.changed == 'true' && env.HOLOCRON_SYNC_TOKEN != ''\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n run: |\n if git diff HEAD~1 HEAD -U0 -- .notes docs/wiki | grep -Eq '^[+-]status:'; then\n echo \"The sync changes a status: it waits for a review.\"\n gh pr merge \"$BRANCH\" --disable-auto || true\n else\n gh pr merge \"$BRANCH\" --auto --squash\n fi\n\n # Tells Checkly this run finished (#2359, the `sync-specs` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. Not for a dry run, nor when there is no Discord token (the job did nothing).\n # A no-op until the secret exists; the URL is a credential: it goes in through `env` only, is masked, and a failed\n # ping never fails the job.\n - name: Ping the heartbeat\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_SPECS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_SPECS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
567
+ var sync_templates_default$1 = "name: Sync Templates\n\n# Builds the holocron CLI from source and pushes updated workflow templates\n# and composite actions to downstream .github repos, by pull request. Its caller\n# runs it whenever the template source files change on main or alpha. The\n# consumer repos are found first: every repo of the org with a holocron.config,\n# except `.github` and the repo this runs in.\n#\n# Secrets required:\n# HOLOCRON_SYNC_TOKEN — fine-grained PAT (resource owner: org) with:\n# Actions: Read and write (dispatch workflow runs via gh workflow run)\n# Contents: Read and write (git trees, blobs, refs)\n# Pull requests: Read and write (open sync PR)\n# Workflows: Read and write (write .github/workflows/*.yml)\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n primary-repo:\n description: >\n Primary .github repo — receives composite actions, reusable workflows,\n and thin-caller templates. Requires a PR (branch protection assumed).\n Empty means the `.github` repo of the owner the workflow runs in.\n type: string\n required: false\n default: \"\"\n secondary-repos:\n description: >\n Space-separated list of secondary repos (reusable workflows + thin\n callers only, no composite actions). Changes are delivered via pull\n request, same as the primary repo. Empty means every repo of the\n owner that has a holocron.config, found by code search.\n type: string\n required: false\n default: \"\"\n sync-branch:\n description: Branch name used for the primary and secondary repo PRs\n type: string\n required: false\n default: chore/sync-templates\n secrets:\n HOLOCRON_SYNC_TOKEN:\n required: true\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to HOLOCRON_SYNC_TOKEN.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when neither\n HOLOCRON_READ_TOKEN nor HOLOCRON_SYNC_TOKEN is set.\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n discover-repos:\n name: Discover consumer repos\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n contents: read\n outputs:\n secondary-repos: ${{ steps.find.outputs.secondary-repos }}\n steps:\n - name: Find repos with holocron.config\n id: find\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n OWNER: ${{ github.repository_owner }}\n GIVEN: ${{ inputs.secondary-repos }}\n THIS_REPO: ${{ github.repository }}\n run: |\n if [ -n \"$GIVEN\" ]; then\n echo \"secondary-repos=$GIVEN\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # $ENV.OWNER and $ENV.THIS_REPO are jq's, read from the environment; the single quotes are meant.\n # shellcheck disable=SC2016\n repos=$(gh api \"search/code?q=filename:holocron.config+org:${OWNER}&per_page=100\" \\\n --jq '[.items[].repository.full_name]\n | unique\n | map(select(. != ($ENV.OWNER + \"/.github\") and . != $ENV.THIS_REPO))\n | join(\" \")')\n echo \"secondary-repos=$repos\" >> \"$GITHUB_OUTPUT\"\n\n sync:\n name: Sync templates\n needs: discover-repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n permissions:\n contents: read\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm build\n name: Build CLI\n\n # Resolve the built CLI from node_modules instead of hard-coding where it\n # lives in this repo (the same lookup the `holocron` composite action does).\n - name: Resolve CLI\n run: echo \"HOLOCRON_CLI=$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\" >> \"$GITHUB_ENV\"\n\n - name: Cache actionlint\n id: cache-actionlint\n uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0\n with:\n path: /tmp/actionlint\n key: actionlint-v1.7.7-linux-amd64\n\n - name: Download actionlint\n if: steps.cache-actionlint.outputs.cache-hit != 'true'\n run: |\n curl -fsSL https://github.com/rhysd/actionlint/releases/download/v1.7.7/actionlint_1.7.7_linux_amd64.tar.gz \\\n | tar -xz -C /tmp actionlint\n\n - name: Validate generated workflows\n run: |\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --output-dir /tmp/sync-validate\n /tmp/actionlint /tmp/sync-validate/.github/workflows/*.yml\n env:\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n\n # The hosted reference, like the other actions: the action is new, so `theholocron/.github` has no copy and the reference\n # is rewritten to `theholocron/holocron/ci/actions/git-identity@ci-v1` (a `./` path would resolve in the caller's checkout).\n # `scope: none` leaves git's own config alone: the identity only goes into the Signed-off-by trailer below.\n - uses: theholocron/.github/.github/actions/git-identity@main\n name: Resolve git identity\n id: identity\n with:\n scope: none\n resolve: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n\n - name: Sync primary repo (PR)\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$PRIMARY_REPO\" \"$SYNC_BRANCH\" 2>/dev/null || true\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n\n - name: Sync secondary repos (PR)\n if: ${{ needs.discover-repos.outputs.secondary-repos != '' }}\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n for repo in $SECONDARY_REPOS; do\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$repo\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$repo\" \"$SYNC_BRANCH\" 2>/dev/null || true\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n SECONDARY_REPOS: ${{ needs.discover-repos.outputs.secondary-repos }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n";
568
568
  var tag_default = "name: Tag\n\n# Release Please — fully automated tag and GitHub Release from Conventional Commits.\n# No package.json or npm publishing required. Operates in \"simple\" mode by default:\n# analyzes commits since the last tag, maintains a rolling Release PR, and creates\n# a tag + GitHub Release when that PR is merged.\n#\n# The calling repo must have two files at the root:\n# release-please-config.json — declares packages and release-type\n# .release-please-manifest.json — tracks the current version\n\non: # yamllint disable-line rule:truthy\n # Self-trigger: when this workflow lives in theholocron/.github itself,\n # push to main runs Release Please for that repo's own releases.\n push:\n branches:\n - main\n workflow_call:\n inputs:\n release-type:\n description: Release Please release type (simple, node, python, etc.)\n type: string\n required: false\n default: simple\n config-file:\n description: Path to release-please-config.json\n type: string\n required: false\n default: release-please-config.json\n manifest-file:\n description: Path to .release-please-manifest.json\n type: string\n required: false\n default: .release-please-manifest.json\n\njobs:\n tag:\n name: Tag release\n permissions:\n contents: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1\n name: Run Release Please\n with:\n release-type: ${{ inputs.release-type }}\n config-file: ${{ inputs.config-file }}\n manifest-file: ${{ inputs.manifest-file }}\n";
569
569
  var perf_default$1 = "name: Audit the Performance\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n lighthouse-config:\n description: >\n Path to the Lighthouse CI config file, forwarded to `holocron run\n verification.performance -- --config`. Defaults to\n lighthouse.config.cjs (the org standard).\n type: string\n required: false\n default: lighthouse.config.cjs\n secrets:\n HOLOCRON_LIGHTHOUSE_TOKEN:\n description: The Lighthouse CI GitHub App token. Read first; the LHCI_GITHUB_APP_TOKEN secret is the fallback.\n required: false\n LHCI_GITHUB_APP_TOKEN:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n performance:\n name: Run Lighthouse CI\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Read by `lhci autorun` inside `holocron run test:perf`.\n LHCI_GITHUB_APP_TOKEN: ${{ secrets.HOLOCRON_LIGHTHOUSE_TOKEN || secrets.LHCI_GITHUB_APP_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: npm install -g @lhci/cli@0.14.x\n name: Install Lighthouse CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run Lighthouse CI\n with:\n task: test:perf\n args: --config=${{ inputs.lighthouse-config }}\n";
570
570
  var unit_default$1 = "name: Test\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n uploads:\n description: 'JSON list of {\"flag\", \"files\"} to upload one Codecov flag per group, e.g. [{\"flag\":\"utils\",\"files\":\"utils/*/coverage/lcov.info\"}]. Empty uploads all coverage as one report, as before.'\n type: string\n required: false\n default: \"\"\n run-unit:\n description: Run unit tests with coverage (disable for UI-only repos that use Storybook testing exclusively)\n type: boolean\n required: false\n default: true\n run-storybook:\n description: Run Storybook vitest interaction tests (requires .storybook/ setup)\n type: boolean\n required: false\n default: false\n run-interaction:\n description: Run Storybook interaction and accessibility tests with Playwright\n type: boolean\n required: false\n default: false\n run-user-flow:\n description: Run Cypress E2E user-flow tests (requires cypress.config.*)\n type: boolean\n required: false\n default: false\n wait-on-url:\n description: URL to wait for before running Cypress tests (default is Vite dev server; override for non-Vite stacks e.g. http://localhost:3000 for Next.js)\n type: string\n required: false\n default: \"http://localhost:5173\"\n secrets:\n CYPRESS_RECORD_KEY:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n unit:\n name: Run unit tests and collect coverage\n if: ${{ inputs.run-unit }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run tests with coverage\n with:\n task: test:unit\n affected: ${{ inputs.affected }}\n\n # With `affected`, a run that selects nothing (a README-only PR) writes no coverage. The two\n # required Codecov statuses still have to post, so say so with an empty upload instead of\n # failing the upload. Without `affected` a missing report stays an error.\n - id: reports\n name: Look for coverage and test reports\n if: ${{ inputs.affected }}\n shell: bash\n run: |\n # find, not hashFiles('**/…'): hashFiles walks node_modules and can time out in a large workspace.\n has() { [ -n \"$(find . -path ./node_modules -prune -o -path '*/node_modules' -prune -o -name \"$1\" -print -quit)\" ]; }\n has lcov.info && echo \"coverage=true\" >> \"$GITHUB_OUTPUT\" || echo \"coverage=false\" >> \"$GITHUB_OUTPUT\"\n has test-report.junit.xml && echo \"tests=true\" >> \"$GITHUB_OUTPUT\" || echo \"tests=false\" >> \"$GITHUB_OUTPUT\"\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n if: ${{ inputs.uploads == '' && (!inputs.affected || steps.reports.outputs.coverage == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n # One upload per group, each with its own flag, so Codecov can carry the unchanged groups forward.\n - id: flags\n name: Upload coverage to Codecov, one flag per group\n if: ${{ inputs.uploads != '' }}\n # The coverage provider's own command (`providers.coverage`), not the codecov-upload action. It is run\n # from the built CLI the test step above resolved, as the holocron action does, and not through that\n # action, so the JSON list reaches it as one argument (the action splits `args` on spaces) and the\n # `uploaded` output below stays a step output of this job. The job's OIDC token needs `id-token: write`.\n shell: bash\n env:\n UPLOADS: ${{ inputs.uploads }}\n ALLOW_EMPTY: ${{ inputs.affected }}\n run: |\n cli=\"$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\"\n set -- upload coverage --uploads \"$UPLOADS\"\n [ \"$ALLOW_EMPTY\" = \"true\" ] && set -- \"$@\" --allow-empty\n node \"$cli\" \"$@\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test results are Codecov's test analytics; no required status reads them, so a failed upload is logged\n # and the job passes. Coverage above still fails the job: the required statuses depend on it.\n if: ${{ !cancelled() && (!inputs.affected || steps.reports.outputs.tests == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Post the Codecov statuses without a report\n if: ${{ inputs.affected && (inputs.uploads == '' && steps.reports.outputs.coverage != 'true' || inputs.uploads != '' && steps.flags.outputs.uploaded == '0') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n run_command: empty-upload\n\n storybook:\n name: Run Storybook interaction tests\n if: ${{ inputs.run-storybook }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install chromium --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run Storybook tests\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test analytics only, as above: a failed upload is logged, not a failed job.\n if: ${{ !cancelled() }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n interaction-and-accessibility:\n name: Run interactions and accessibility tests\n if: ${{ inputs.run-interaction }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run interaction and accessibility tests\n\n user-flow:\n name: Run user flow tests\n if: ${{ inputs.run-user-flow }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n strategy:\n fail-fast: false\n matrix:\n containers: [1, 2]\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec cypress install\n name: Install Cypress binary\n\n - uses: cypress-io/github-action@0ed14f5d30c4ad6e5e8ffb6f57dbb69150137a3f # v7.4.10\n name: Cypress run\n with:\n start: pnpm dev\n wait-on: ${{ inputs.wait-on-url }}\n record: true\n parallel: true\n env:\n CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [unit, storybook, interaction-and-accessibility, user-flow]\n steps:\n - name: Check job statuses\n run: |\n if [[ \"$RESULTS\" == *\"failure\"* ]] || [[ \"$RESULTS\" == *\"cancelled\"* ]]; then\n exit 1\n fi\n env:\n RESULTS: ${{ join(needs.*.result, ',') }}\n";
@@ -1631,27 +1631,6 @@ function readWorkspacePackages(repoRoot) {
1631
1631
  };
1632
1632
  }).sort((a, b) => packageLocation(a).localeCompare(packageLocation(b)));
1633
1633
  }
1634
- // src/generators/hosted-action-refs/hosted-action-refs.ts
1635
- /**
1636
- * The composite actions the repo that serves them runs from its own checkout, not from the frozen copy in
1637
- * `theholocron/.github`: `format` exists only in `theholocron/holocron` (the frozen repo never got a copy), and
1638
- * `codecov-upload` holds the upload loop, so a change to it (a retry) takes effect on the pull request that makes it
1639
- * (#2124); the frozen copy never changes again.
1640
- */
1641
- const LOCAL_ACTIONS = /* @__PURE__ */ new Set(["format", "codecov-upload"]);
1642
- const escaped = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1643
- /**
1644
- * `text` (a reusable workflow already moved to `home`) with its composite-action references made resolvable in the repo
1645
- * that serves the reusables, before `ci-v1` exists to resolve `theholocron/holocron/ci/actions/<name>@ci-v1`: a local action
1646
- * is called by path from the checkout (`./ci/actions/format`), every other one keeps the frozen
1647
- * copy in `theholocron/.github` at `main`, which is what it ran before the home moved. Only the copies this repo writes
1648
- * to its own `.github/workflows` go through here; the reusables other repos call keep the `home` reference. Once the tag
1649
- * exists the frozen spelling can go (the nested references inside `ci/actions` follow it).
1650
- */
1651
- function hostedActionRefs(text, home = CI_HOME) {
1652
- const reference = new RegExp(`${escaped(home.actions)}/([\\w.-]+)@${escaped(home.ref)}`, "g");
1653
- return text.replace(reference, (_all, name) => LOCAL_ACTIONS.has(name) ? `./ci/actions/${name}` : `${TEMPLATE_HOME.actions}/${name}@${TEMPLATE_HOME.ref}`);
1654
- }
1655
1634
  // src/generators/github-action-reusable-workflows/github-action-reusable-workflows.ts
1656
1635
  /**
1657
1636
  * The **reusable** GitHub Actions surface pushed to `theholocron/.github` by
@@ -1681,7 +1660,7 @@ function hostedReusableWorkflows() {
1681
1660
  return new Map(Object.entries(REUSABLE_WORKFLOWS).filter(([, text]) => {
1682
1661
  const triggers = workflowTriggers(text);
1683
1662
  return triggers.length === 1 && triggers[0] === "workflow_call";
1684
- }).map(([id, text]) => [id, hostedActionRefs(text)]));
1663
+ }));
1685
1664
  }
1686
1665
  /**
1687
1666
  * The path in `theholocron/.github` of the reusable workflow `id`: the old file name, because the frozen copies live
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "5.1.2",
3
+ "version": "5.1.3",
4
4
  "description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
5
5
  "keywords": [
6
6
  "ci",
@@ -55,7 +55,7 @@
55
55
  "@commitlint/lint": "^21.3.0",
56
56
  "@commitlint/load": "^21.3.0",
57
57
  "@commitlint/types": "^21.3.0",
58
- "@theholocron/datapad": "5.1.2",
58
+ "@theholocron/datapad": "5.1.3",
59
59
  "@theholocron/fs-utils": "^2.0.0",
60
60
  "@theholocron/json-utils": "^2.0.0",
61
61
  "@theholocron/misc-utils": "^2.0.0",
@@ -73,7 +73,7 @@
73
73
  "tsdown": "^0.23.7",
74
74
  "typescript": "^6.0.3",
75
75
  "vitest": "^5.1.2",
76
- "@theholocron/ci": "1.0.2",
76
+ "@theholocron/ci": "1.0.3",
77
77
  "@theholocron/commitlint-config": "^9.0.0",
78
78
  "@theholocron/eslint-config": "^9.0.0",
79
79
  "@theholocron/rollup-plugin-transform-template": "^9.0.0",