Skip to content

feat(workflows): facade pattern docs, install model, ts install default#8

Merged
jadb merged 1 commit into
mainfrom
feat/facade-pattern-doc
May 16, 2026
Merged

feat(workflows): facade pattern docs, install model, ts install default#8
jadb merged 1 commit into
mainfrom
feat/facade-pattern-doc

Conversation

@jadb
Copy link
Copy Markdown
Contributor

@jadb jadb commented May 16, 2026

Summary

Four coordinated changes to clarify the secret/env-var contract and make the ts publish flow work out-of-the-box for the canonical hop-top stack.

1. SKILL.md — ## Facade pattern section (new)

Explains the deliberate facade between canonical secret names (what consumers set) and upstream-required env vars (what tools like actions/setup-node, gh CLI, cargo actually read). Maps:

  • NPM_REGISTRY_TOKENNODE_AUTH_TOKEN
  • GH_MIRROR_PATGH_TOKEN
  • CARGO_REGISTRY_TOKENCARGO_REGISTRY_TOKEN (matches by coincidence)
  • Notes GITHUB_TOKEN is auto-injected and unused; release-please needs GH_RELEASE_PLEASE_PAT because GITHUB_TOKEN PRs don't trigger downstream workflows.

2. SKILL.md — env-vars section split

Old single table replaced by two:

  • Adapter mappings (internal facade — FYI only)
  • Plumbing env vars (TEST_CMD, BUILD_CMD, id-token: write permission) available inside test-command / build-command overrides.

3. SKILL.md — ## Install model section (new)

Spells out: publish-{ts,py,rs}.yml install only runner-level deps (toolchain + minimal tooling). Consumer's test-command handles package install. Per-ecosystem patterns + summary table called out. Documents that ts default is the exception — does an implicit install — while py/rs defaults do not.

4. publish-ts.yml — default test-command now installs first

Was pnpm test. Now pnpm install --frozen-lockfile --ignore-scripts && pnpm test. Avoids pnpm 10+ strict-mode failures on ignored build scripts (e.g. esbuild from vitest) and lets typical vitest + lockfile repos use the default with no override. Built-in defaults table updated to match.

Test plan

  • make lint (actionlint) passes
  • All actions/checkout retain persist-credentials: false
  • No inline ${{ inputs.X }} in run: lines (uses env: then $VAR)
  • Live verify in a downstream consumer repo on next tag push (post-merge)

- SKILL.md: add Facade pattern section explaining canonical-secret →
  upstream-env adapter mapping. Split env-vars section into adapter
  mappings + plumbing vars tables.
- SKILL.md: add Install model section. Workflows install runner-level
  deps only; consumer test-command handles package deps. ts default
  now does `pnpm install --frozen-lockfile --ignore-scripts && pnpm test`
  to "just work" for typical vitest + lockfile setups; py/rs unchanged.
- publish-ts.yml: default test-command now installs first.
Copilot AI review requested due to automatic review settings May 16, 2026 02:22
@jadb jadb merged commit 6f3ee00 into main May 16, 2026
4 checks passed
@jadb jadb deleted the feat/facade-pattern-doc branch May 16, 2026 02:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR clarifies the consumer-facing secret/env-var contract for the reusable publish workflows (via explicit “facade” documentation and an “install model” explanation) and adjusts the TypeScript publish workflow’s default test behavior so typical pnpm repos work without overrides.

Changes:

  • Documented the “facade pattern” mapping canonical secret names to upstream tool env vars, and split env-var docs into adapter vs plumbing tables.
  • Added an “install model” section describing what the publish workflows do (toolchain/minimal tooling) vs what the consumer’s test/build commands must do (package install).
  • Updated publish-ts.yml default test-command to run pnpm install ... && pnpm test by default.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
SKILL.md Adds facade/contract docs and install-model guidance; updates TS default test command documentation.
.github/workflows/publish-ts.yml Changes default TS test-command to install dependencies before running tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 49 to 53
- name: Test
working-directory: ${{ inputs.working-directory }}
env:
TEST_CMD: ${{ inputs.test-command || 'pnpm test' }}
TEST_CMD: ${{ inputs.test-command || 'pnpm install --frozen-lockfile --ignore-scripts && pnpm test' }}
run: $TEST_CMD
Comment thread SKILL.md
Comment on lines +132 to +135
`GITHUB_TOKEN` is GitHub's auto-injected per-job token. It is **not**
used by these workflows. release-please needs `GH_RELEASE_PLEASE_PAT`
specifically because PRs opened by `GITHUB_TOKEN` don't trigger
downstream workflows; a real PAT does.
Comment thread SKILL.md
Comment on lines +214 to +220
The `publish-{ts,py,rs}.yml` workflows install only **runner-level
deps** — the language toolchain itself, plus minimal tooling (e.g.
`pip install pytest build` for py). They do **not** install the
consuming package's own dependencies.

That's the consumer's job. Your `test-command` (and `build-command`,
where applicable) is responsible for any package-level install.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants