Repository navigation
ci: gate releases on tests, build, docs sync and runnable examples (#13) - #51
Merged
Merged
Conversation
|
The changes in this PR will be included in the next version bump.
|
|
|
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Part of #13. Leave #13 open until #3 settles the package name: its brief says publishing targets
@gcmdev/mdcode, and this PR still publishesmdcode-ts.Summary
The release path already existed (
bumpy-release.yml: bump files open a Version Packages PR, and merging it publishes over npm OIDC). This PR adds agatesjob that both release jobs need:The same docs checks run in
pnpm check(pre-push) and the CI workflow, so drift normally fails the PR that caused it:pnpm docs:checkrunsexamples/ci/check-docs-sync.mjsover README.md, packages/mdcode/README.md, examples/CLI_EXAMPLES.md, TESTING.md and the twotests/examplesREADMEs.pnpm docs:examplesrunsexamples/ci/validate-snippets.mjson therunnable=trueblocks, extracted intopackages/mdcode/.mdcode-tmp. There,import … from 'mdcode-ts'resolves to the builtdist/.scripts/bin/mdcodeputs the workspace build on PATH. pnpm links a workspace bin only ifdist/exists at install time, and CI installs before it builds. Without the shim, my machine picked up a stale globalmdcode.Package README changes needed so the gates can pass:
file=block-N.*attributes left over from an oldextract --update-source(7708299). None of those files exist, somdcode updatefailed on the README withread_failed. Nested illustrative fences are unchanged.runnable=true: the quick start, both transformers, the named imports,parse()andupdate().parse()andupdate()examples were broken. Unescaped backticks inside their template literals made them a SyntaxError for anyone who copied them, andupdate()failed reading afile=test.spec.jsthat doesn't exist. I restored the escaped backticks from before 7708299 and made the transform example self-contained.RELEASING.mdcovers the trigger, the gates, one-time setup (npm trusted publisher,publishenvironment,BUMPY_GH_TOKEN) and recovery. The package is stillmdcode-tsuntil #3 is settled.Evidence
node examples/ci/check-docs-sync.mjs packages/mdcode/README.md→! could not be checked, 96 ×read_failed, exit 2. Runningvalidate-snippetson theparse()/update()examples gaveSyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX].After:
pnpm checkpasses:6 document(s) in sync.,6 runnable block(s) passed.fibonacci.js→✗ …/fibonacci/README.md: out of sync / line 28,pnpm docs:checkexit 1.import { nope } from "mdcode-ts"→✗ … line 1: block-1.ts … exited 1, exit 1.docs-syncstep →::error title=Release blocked::Release gate failed: docs-sync. Nothing was published.act -ljob graph:plan(stage 0) →gates(1) →publish,version-pr(2).bumpy ci plan→mode: publish. That is the recovery path RELEASING.md documents.Merge Danger
Door: two-way
Blast Radius: releases
The first push to
mainafter merge runs the gates before opening the Version Packages PR. If a gate fails in CI and not locally (for example a Node 22 vs local Node difference), releases stop until it's fixed. Nothing is published early.