@theholocron/astromech 5.0.0-alpha.253 → 5.0.0-alpha.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -73,7 +73,7 @@ documents, not a naming convention repos need to follow.
73
73
  | `platform.notifyCheck` | _(none — manual workflow)_ | posts a labelled test message to every notification channel; fails per channel that does not work |
74
74
  | `platform.repoSync` | `holocron repo sync` | keeps generated files current |
75
75
  | `platform.commitStandards` | commitlint | no local equivalent — enforced by the `commit-msg` hook locally, over the PR's commit range in CI |
76
- | `platform.repoValidation` | `scripts/validate-adrs.mjs`, `scripts/validate-registry.mjs`, `scripts/validate-docs-presence.mjs` | a job-bearing task — spec/ADR frontmatter, registry-doc completeness, and docs-presence, not linters |
76
+ | `platform.repoValidation` | `scripts/validate-adrs.mjs`, `scripts/validate-docs-presence.mjs` | a job-bearing task — spec/ADR frontmatter and docs-presence, not linters |
77
77
  | `knowledge.wiki` | Fern | publishes `docs/wiki/*.md` — not a sync, a publish; carries `preview` |
78
78
  | `knowledge.docs` | Astro build | the docs site itself; carries `preview` (defaults on) |
79
79
  | `knowledge.components` | Storybook build | a browsable component catalog — "Storybook" is the tool, not the intent; carries `preview` (defaults on) |
@@ -1,4 +1,4 @@
1
- import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-CHShKm-U.mjs";
1
+ import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-DThrbvO2.mjs";
2
2
  import { Loaded } from "@theholocron/datapad";
3
3
  /**
4
4
  * The `tasks` config shape — the single manifest of what a repo runs.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as TasksConfig } from "./schema.type-CHShKm-U.mjs";
1
+ import { r as TasksConfig } from "./schema.type-DThrbvO2.mjs";
2
2
  import { ListWorkspacePackagesOptions, WorkspacePackageEntry } from "@theholocron/pkg-utils";
3
3
  interface WorkspacePackage$1 {
4
4
  slug: string;
@@ -609,19 +609,24 @@ interface JobDef {
609
609
  local: LocalRunner | null;
610
610
  /**
611
611
  * The CI status-check context this job reports as (e.g.
612
- * `platform.repoValidation / Validate registry consistency`) — every sub-job is a CI job.
612
+ * `platform.repoValidation / Validate docs presence`) — every sub-job is a CI job.
613
613
  * `holocron run <task>` and `holocron run ci` label each job line with it;
614
614
  * the task-level `… / Conclusion` context (only for tasks with several
615
615
  * jobs) lives in `WORKFLOW_CHECK_CONTEXTS`.
616
616
  */
617
617
  checkContext: string;
618
618
  /**
619
- * The name a repo's config uses to switch this job off (`jobs: { packageRegistry: false }`),
619
+ * The name a repo's config uses to switch this job off (`jobs: { docsEnforcement: false }`),
620
620
  * where the job's own key is vague or fixed by the reusable workflow. The key itself works too.
621
621
  */
622
622
  alias?: string;
623
623
  }
624
624
  interface TaskDef {
625
+ /**
626
+ * Sub-job slugs that no longer exist but that a reusable workflow synced earlier may still pass:
627
+ * `holocron run <task> <retired>` is a clean skip instead of an unknown-job failure.
628
+ */
629
+ retiredJobs?: string[];
625
630
  /**
626
631
  * `null` — the registry has no built-in runner (CodeQL, deploys, the
627
632
  * bundle-size job). An explicit turbo task or `package.json` script still
package/dist/index.mjs CHANGED
@@ -301,7 +301,7 @@ var platform_notifyCheck_default$1 = "name: Notify Check\n\n# Proves the notific
301
301
  // src/templates/reusable/platform.repoSync.yml
302
302
  var platform_repoSync_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 notifications setup`; 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 repo 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 || vars.AXIOM_DATASET }}\n 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\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 repo 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: repo 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 repo 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 - 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 }}${{ 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 theholocron/.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 }}: repo 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";
303
303
  // src/templates/reusable/platform.repoValidation.yml
304
- var platform_repoValidation_default$1 = "name: Repo Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n TURBO_TOKEN:\n required: false\n\njobs:\n adrs:\n name: Validate ADRs and specs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Validate ADR and spec frontmatter\n with:\n task: platform.repoValidation\n job: adrs\n\n registry:\n name: Validate registry consistency\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Validate registry consistency\n with:\n task: platform.repoValidation\n job: registry\n\n docs-presence:\n name: Validate docs presence\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Validate docs presence for new packages\n with:\n task: platform.repoValidation\n job: docsPresence\n env:\n BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [adrs, registry, docs-presence]\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";
304
+ var platform_repoValidation_default$1 = "name: Repo Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n TURBO_TOKEN:\n required: false\n\njobs:\n adrs:\n name: Validate ADRs and specs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Validate ADR and spec frontmatter\n with:\n task: platform.repoValidation\n job: adrs\n\n docs-presence:\n name: Validate docs presence\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Validate docs presence for new packages\n with:\n task: platform.repoValidation\n job: docsPresence\n env:\n BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [adrs, docs-presence]\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";
305
305
  // src/templates/reusable/platform.syncTemplates.yml
306
306
  var platform_syncTemplates_default$1 = "name: Sync Templates\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_SYNC_TOKEN:\n description: >\n Fine-grained PAT (resource owner org) with BOTH contents:write and\n workflows:write on theholocron/.github — contents:write alone is\n rejected for anything under .github/workflows/, a GitHub\n fine-grained-PAT restriction independent of repo permissions.\n required: false\n GH_TOKEN:\n description: >\n Fallback PAT with the same two permissions, used only when\n HOLOCRON_SYNC_TOKEN is not set. The default GITHUB_TOKEN is never\n an acceptable fallback here — it cannot write to a different repo\n no matter what this job's own `permissions:` block grants, so it\n is deliberately not offered as a third fallback; the CLI's own\n token resolver already fails with a clear, actionable message\n when both secrets above are unset.\n required: false\n\njobs:\n sync-templates:\n name: Run holocron sync github\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync github\n # No local commit, no branch, no PR — pushes directly to\n # theholocron/.github's own default branch.\n #\n # HOLOCRON_SYNC_TOKEN is scoped to ONLY this step, not the job —\n # \"Setup\" (above) runs this ref's own pnpm install, and the\n # \"Build the workspace\" step this composite action may run (an\n # unbuilt workspace checkout — the holocron repo itself) runs this\n # ref's own build, including any postinstall/build-time script a\n # malicious push could carry. Neither sees a write credential.\n uses: theholocron/.github/.github/actions/holocron@main\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n with:\n command: sync github\n";
307
307
  // src/templates/reusable/preview.yml
@@ -631,6 +631,49 @@ const WORKFLOW_CHECK_CONTEXTS = {
631
631
  "delivery.bundleSize": "Audit the Bundle Size / Upload bundle stats to Codecov"
632
632
  };
633
633
  /**
634
+ * Triggers actionlint treats as low-trust: their runs default to read-only
635
+ * cache access, so a reusable-workflow call must cap what the callee may ask
636
+ * for (`cache-call-unrestricted`).
637
+ */
638
+ const LOW_TRUST_TRIGGERS = /* @__PURE__ */ new Set([
639
+ "branch_protection_rule",
640
+ "check_run",
641
+ "check_suite",
642
+ "deployment",
643
+ "deployment_status",
644
+ "discussion",
645
+ "discussion_comment",
646
+ "fork",
647
+ "gollum",
648
+ "image_version",
649
+ "issue_comment",
650
+ "issues",
651
+ "label",
652
+ "milestone",
653
+ "public",
654
+ "pull_request_target",
655
+ "status",
656
+ "watch",
657
+ "workflow_run"
658
+ ]);
659
+ /** Top-level event names of a workflow's `on:` (scalar, flow list, or block mapping). */
660
+ function workflowTriggers(yaml) {
661
+ const onMatch = yaml.match(/^on:[^\S\n]*([^#\n]*)(?:#[^\n]*)?\n((?:[ \t]+[^\n]*\n|\n)*)/m);
662
+ if (!onMatch) return [];
663
+ const inline = onMatch[1].trim();
664
+ if (inline) return inline.replace(/[[\]{}]/g, "").split(",").map((t) => t.trim());
665
+ return [...onMatch[2].matchAll(/^ {2}([a-z_]+):/gm)].map((m) => m[1]);
666
+ }
667
+ /**
668
+ * Cap callee cache access on callers with a low-trust trigger: adds
669
+ * `cache-mode: read` to every reusable-workflow job. Without it the callee
670
+ * could request cache writes despite the trigger's read-only default.
671
+ */
672
+ function withCacheMode(yaml) {
673
+ if (!workflowTriggers(yaml).some((t) => LOW_TRUST_TRIGGERS.has(t))) return yaml;
674
+ return yaml.replace(/^( {4}uses: [^\n]+\n)(?! {4}cache-mode:)/gm, "$1 cache-mode: read\n");
675
+ }
676
+ /**
634
677
  * Generate the thin caller content for a workflow, optionally injecting or
635
678
  * merging `with:` overrides into the jobs block.
636
679
  *
@@ -644,8 +687,9 @@ const WORKFLOW_CHECK_CONTEXTS = {
644
687
  * base template is returned unchanged.
645
688
  */
646
689
  function generateThinCallerContent(name, withOverrides, additionalPaths, logger, comments) {
647
- const base = WORKFLOW_TEMPLATES[name];
648
- if (!base) return "";
690
+ const template = WORKFLOW_TEMPLATES[name];
691
+ if (!template) return "";
692
+ const base = withCacheMode(template);
649
693
  if (name === "delivery.publish" && withOverrides && "groups" in withOverrides) {
650
694
  const { groups, ungrouped, ...shared } = withOverrides;
651
695
  return groupedPublishCaller(base, groups, shared, ungrouped);
@@ -1099,6 +1143,7 @@ const TASKS = {
1099
1143
  },
1100
1144
  "platform.repoValidation": {
1101
1145
  local: null,
1146
+ retiredJobs: ["registry"],
1102
1147
  jobs: {
1103
1148
  adrs: {
1104
1149
  local: {
@@ -1107,14 +1152,6 @@ const TASKS = {
1107
1152
  },
1108
1153
  checkContext: "platform.repoValidation / Validate ADRs and specs"
1109
1154
  },
1110
- registry: {
1111
- local: {
1112
- tool: "node",
1113
- args: ["scripts/validate-registry.mjs"]
1114
- },
1115
- checkContext: "platform.repoValidation / Validate registry consistency",
1116
- alias: "packageRegistry"
1117
- },
1118
1155
  docsPresence: {
1119
1156
  local: {
1120
1157
  tool: "node",
@@ -1924,6 +1961,19 @@ function runTask(input) {
1924
1961
  }
1925
1962
  if (job !== void 0) {
1926
1963
  const jobDef = def.jobs[job];
1964
+ if (!jobDef && def.retiredJobs?.includes(job)) {
1965
+ const message = `${task} ${job} was retired — nothing to run (re-sync the reusable workflows)`;
1966
+ print(`· ${message}`);
1967
+ logger.debug({
1968
+ task,
1969
+ job,
1970
+ status: "skip"
1971
+ }, `run: ${task} ${job}`);
1972
+ return {
1973
+ status: "skip",
1974
+ message
1975
+ };
1976
+ }
1927
1977
  if (!jobDef) {
1928
1978
  const known = Object.keys(def.jobs).join(", ");
1929
1979
  print(`✗ unknown job "${job}" for "${task}" (known: ${known})`);
@@ -1,4 +1,4 @@
1
- import { r as TasksConfig } from "../schema.type-CHShKm-U.mjs";
1
+ import { r as TasksConfig } from "../schema.type-DThrbvO2.mjs";
2
2
  import { defineConfig } from "@theholocron/semantic-release-config";
3
3
  /** Runs `git` with `args` in `cwd`, feeding it `input` on stdin, and returns stdout. */
4
4
  export type GitRun = (args: string[], input: string, cwd: string) => string;
@@ -22,7 +22,7 @@ interface TaskEntry {
22
22
  with?: Record<string, unknown>;
23
23
  /**
24
24
  * Switch individual sub-jobs of a task off for this repo (`false`), by their registry key or alias:
25
- * `{ name: "platform.repoValidation", jobs: { packageRegistry: false } }`. A job left out runs. The job's CI
25
+ * `{ name: "platform.repoValidation", jobs: { docsEnforcement: false } }`. A job left out runs. The job's CI
26
26
  * check still reports (green, "off in this repo's config"), so a required check never goes missing.
27
27
  */
28
28
  jobs?: Record<string, boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "5.0.0-alpha.253",
3
+ "version": "5.0.0-alpha.255",
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",
@@ -50,10 +50,10 @@
50
50
  "@commitlint/lint": "^21.2.3",
51
51
  "@commitlint/load": "^21.2.3",
52
52
  "@commitlint/types": "^21.2.3",
53
- "@theholocron/datapad": "5.0.0-alpha.253",
54
- "@theholocron/pkg-utils": "^1.16.1-alpha.1",
55
53
  "@theholocron/json-utils": "^1.16.1-alpha.1",
56
- "@theholocron/fs-utils": "^1.16.1-alpha.1"
54
+ "@theholocron/fs-utils": "^1.16.1-alpha.1",
55
+ "@theholocron/datapad": "5.0.0-alpha.255",
56
+ "@theholocron/pkg-utils": "^1.16.1-alpha.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@commitlint/config-conventional": "^21.2.3",
@@ -72,8 +72,8 @@
72
72
  "typescript": "^5.9.3",
73
73
  "vitest": "^5.0.5",
74
74
  "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.3",
75
- "@theholocron/tsconfig": "^8.9.0-alpha.3",
76
75
  "@theholocron/tsdown-config": "^8.9.0-alpha.3",
76
+ "@theholocron/tsconfig": "^8.9.0-alpha.3",
77
77
  "@theholocron/vitest-config": "^8.9.0-alpha.3"
78
78
  },
79
79
  "peerDependencies": {