Skip to content

Commit f6cb68e

Browse files
Fix stale comments in release-pipeline scaffolding
Three documentation-drift findings from Copilot reviewer on PR #160, all in code introduced earlier in the same PR: - scripts/verify-changelog.ts: header comment claimed the TypeScript client had no per-tag GitHub Actions workflow and verify-changelog was the only enforcement. That was true mid-PR; the final PR adds publish-typescript.yml (GHA -> ADO bridge) plus verify steps in the ADO pipeline.yml itself. Replace the comment with the actual defense-in-depth picture: every per-tag workflow + the ADO pipeline + ci.yml all re-run this script. - .github/workflows/publish-spec.yml: comment said a re-pushed tag cancels the in-flight run, but cancel-in-progress is set to false precisely so we don't abort a half-finished GitHub Release upload. Rewrite the comment to explain the actual queueing behaviour and why it's deliberate. - scripts/read-protocol-versions.ts: JSDoc described a hard-coded fallback when the registry source file isn't in the project. The implementation throws instead. Rewrite the JSDoc to match: throws on missing source file, missing constants, or order-invariant violations, and callers building a partial ts-morph project must include types/version/registry.ts. No behaviour change. typecheck, lint, verify:release-metadata, and verify:changelog all still green; YAML still parses. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8e1f18c commit f6cb68e

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/publish-spec.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ on:
2020
permissions:
2121
contents: read
2222

23-
# Only one spec publish per tag may run at a time. A re-pushed tag (or a
24-
# manual re-trigger) cancels the in-flight run before publishing.
23+
# Only one spec publish per tag may run at a time. `cancel-in-progress:
24+
# false` is deliberate — a re-pushed tag (or a manual re-trigger) queues
25+
# behind the in-flight run rather than aborting it, so we never interrupt
26+
# a half-finished GitHub Release upload.
2527
concurrency:
2628
group: publish-spec-${{ github.ref }}
2729
cancel-in-progress: false

scripts/read-protocol-versions.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ export interface ProtocolVersions {
2626

2727
/**
2828
* Read the protocol version constants from `types/version/registry.ts`.
29-
* Falls back to a single hard-coded version only when the source file
30-
* cannot be located in `project` (e.g. unit tests with a partial
31-
* project), so callers don't need a runtime null-check.
29+
* Throws if the registry source file is not present in `project`, or if
30+
* either constant is missing, malformed, or violates the ordering
31+
* invariant. Callers building a partial ts-morph project must include
32+
* `types/version/registry.ts` among the source files.
3233
*/
3334
export function readProtocolVersions(project: Project): ProtocolVersions {
3435
const sf = project

scripts/verify-changelog.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
* - `verify-release-metadata` cross-checks the *current* package
1010
* version against the generated constants and the metadata file.
1111
* - `verify-changelog` checks that whenever someone bumps a version
12-
* they also rotate the CHANGELOG. Most useful for the TypeScript
13-
* client which publishes through an ADO pipeline (no per-tag
14-
* GitHub Actions workflow), so this CI check is the only enforcement
15-
* of the "no release without a changelog entry" invariant.
12+
* they also rotate the CHANGELOG. Every per-tag publish workflow
13+
* (`publish-spec.yml`, `publish-rust.yml`, `publish-kotlin.yml`,
14+
* `publish-swift.yml`, `publish-typescript.yml`) and the TypeScript
15+
* ADO `pipeline.yml` re-run this script as a release-time gate, on
16+
* top of the same check in `ci.yml` for every PR. Defense in depth:
17+
* a release artifact can't ship with a missing CHANGELOG heading
18+
* regardless of which entry path triggered the publish.
1619
*
1720
* The check is intentionally lenient about the rest of the heading line
1821
* (e.g. ` — YYYY-MM-DD` or ` — Unreleased`) — only the version-bracket

0 commit comments

Comments
 (0)