Skip to content

Harden runtime release guardrails and require notes-only GitHub releases - #34

Open
Alperen Cetin (hacetin) wants to merge 8 commits into
mainfrom
alperen/node-github-release-policy
Open

Alperen Cetin (hacetin) wants to merge 8 commits into
mainfrom
alperen/node-github-release-policy

Conversation

@hacetin

@hacetin Alperen Cetin (hacetin) commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Align the prior manual-release policy with the developer-directed practice: every new SDK version tag requires notes-only GitHub release notes, before or after npm publication according to the developer's request. Existing tags/releases are unaffected; registry publication remains exclusively in Microsoft's internal release pipeline.
  • Keep the common policy generic and durable: package manifests define the runtime floor, breaking floor increases require at least the next minor version on 0.x, and maintenance releases need a separate approved plan. Concrete runtime/version guidance remains in the user guide and changelog, not shared policy exceptions.
  • Address runtime-support feedback and review corrections: published-package-only loader advice, safe manifest reads, preserved original cause/code/requireStack, and unchanged errors for unpublished targets.
  • Check all six GitHub-built tarball manifests for matching engines.node values explicitly >=22; use cwd-relative tar paths and test CLI success/nonzero failure. Keep floating smoke Node versions on current patches. This check does not validate internal-pipeline artifacts.
  • Keep release mechanics in the preparation skill: separate exact-commit tag authorization, --verify-tag and SHA/CI checks, no duplicate releases, explicit notes approval, developer-controlled timing, latest/prerelease flags, and pending/abandoned publication status. No uploaded package assets or tag moves/deletions.

Validation and review

  • Reviewed the complete aggregate PR diff and commit history against the original release-policy intent and authorized runtime follow-ups. The latest correction changes only RELEASE_POLICY.md and the release-preparation skill; implementation and tests are unchanged, with no further code regression identified.
  • All 26 focused loader/packaging tests passed on Node.js 22.21.1, including unpublished targets, error compatibility, all-six-wrong engines, and CLI subprocess checks. Six actual offline-packed manifests also passed the corrected CLI.
  • Build & Smoke passed on implementation commit b9a6370, including five native builds, the full test suite, packed-manifest validation, and all 15 smoke jobs. This precedes the latest documentation-only correction.
  • Shared-doc wording and diff checks passed; versions, tags, manifests, generated loader, and functional behavior remain unchanged by the latest correction.

No new release, historical release edit, registry publication, or merge is performed. Keep the PR open and non-draft. Maintenance-pipeline work and broader full-suite runtime expansion are outside scope.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
Require the Node 22 floor to ship in 0.4.0, validate all six packed engines declarations, and explain missing optional native packages without losing the original error. Keep floating smoke runners on current patches.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
@hacetin Alperen Cetin (hacetin) changed the title docs: allow explicitly requested notes-only GitHub releases Harden runtime release guardrails and allow notes-only GitHub releases Dec 1, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
@hacetin Alperen Cetin (hacetin) changed the title Harden runtime release guardrails and allow notes-only GitHub releases Harden runtime release guardrails and require notes-only GitHub releases Dec 1, 2026
Let developer requests control timing independently of npm publication, retaining explicit tag authorization and internal registry publishing boundaries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
@ChrisKrawczyk

Copy link
Copy Markdown
Contributor

Review notes on the #33 follow-ups

Thanks. This covers most of the #33 follow-ups:

  • the packed engines check runs over all six tarballs;
  • the user guide states the Node 22 minimum;
  • smoke tests use check-latest;
  • the loader hint works correctly on the five published platforms.

Please address these before this leaves draft:

  1. The loader hint gives wrong advice on platforms we don't publish.
    • lib/duroxide.js:16 matches any missing duroxide-* module.
    • The generated index.js also tries 12 packages that are never published, including musl/Alpine, Windows ARM64, ARMv7 and FreeBSD.
    • So an Alpine user on Node 22 is told to upgrade Node and reinstall. Neither helps.
    • Suggested fix:
      • Show the hint only when the missing name is in package.json optionalDependencies. Read package.json inside its own try/catch.
      • For any other name, rethrow the original error, or say there is no prebuilt package for this platform.
      • Add a test for an unpublished target that asserts the Node-version advice is absent.
  2. The GitHub Release step can create the version tag on the wrong commit.
    • SKILL.md:76-78 allows creating a tag "with explicit developer authorization" but gives no procedure.
    • If the tag doesn't exist, gh release create vX.Y.Z creates it on the latest commit of main. If other PRs merged after the release PR, the tag lands on the wrong commit. Tags are immutable, so that version number is lost.
    • duroxide-python#33 already forbids creating a tag in the notes step, and has a full tag procedure that checks the exact merge commit.
    • Suggested fix:
      • Adopt the same rule: the notes step never creates a tag.
      • Use gh release create vX.Y.Z --verify-tag.
      • Check that the tag's commit matches the approved release commit, and that no release already exists.
  3. The documented 0.3.x patch path can't be released.
    • SKILL.md:22-25 and RELEASE_POLICY.md:23-27 say to prepare 0.3.x from a branch off v0.3.0. But:
      • the same skill requires a PR to main and a >=22 check (SKILL.md:38-42,61, check-engines.js:32);
      • CI at v0.3.0 doesn't test Node 18 or 20;
      • the internal release pipeline only releases from main.
    • If someone forced it through, the pipeline publishes with the latest dist-tag, so default installs would move back to 0.3.x.
    • Suggested fix: say "No further 0.3.x releases are planned from the current release pipeline." Alternatively, list what a maintenance release would need:
      • pipeline support for a maintenance branch;
      • a non-latest dist-tag;
      • --latest=false on the GitHub Release;
      • Node 18/20 CI.
  4. Release-notes timing has no default and no failure path.
    • Add "If timing is unspecified, ask which order to use". duroxide-python#33 has this line.
    • Default to a draft release. If notes go public before npm because the developer asked for that, include a "npm publication pending" line.
    • If npm publication is abandoned, edit the notes to say the version was not published. Don't move or delete the tag.
    • Ask for explicit approval before publishing the release. Approval to tag is not enough, and the notifications that publishing sends can't be recalled.

Smaller items:

  • "Latest" badge: pass --latest=false for any version below the highest stable release, and --prerelease for -rc versions. Otherwise gh marks every new published release as Latest.
  • Error shape: the wrapped loader error keeps code: 'MODULE_NOT_FOUND' and requireStack only on cause, so err.code checks stop matching. The changelog says the original error is preserved. Copy both fields onto the wrapper, and assert error.code in the test.
  • Hardcoded "22": the hint and its test hardcode the floor, so the test would stay green after a floor bump while the advice becomes wrong. Build the floor from engines.node, or add the hint to the floor-bump checklist (SKILL.md:41-42).
  • End-of-life rule: fec3c8a removed the end-of-life review rule that Python keeps. Restore it so the two policies match.
  • Scope of the notes rule: "Every release tag must have a notes-only GitHub Release" can't be met by history: v0.1.29 and v0.1.30 have no release, and v0.2.x releases have assets. Scope it to version tags created from now on. Say that existing releases stay as they are, and that npm-v* tags are not release tags.
  • Engines check coverage: the check only covers tarballs built by GitHub CI. Say so, and add Python's step to confirm Build & Smoke passes.
  • CLI test: no test runs node ci/smoke/check-engines.js <dir>. Removing the checker call from the CLI block still passes every test. Add one subprocess test that expects a nonzero exit.
  • Windows tar: with GNU tar first in PATH (Git Bash), tar -xOf C:\… reads the drive letter as a remote host. Run tar with cwd: directory and a relative file name.
  • Assets notice: add one line saying GitHub Release package assets ended with 0.2.4, and to install from npm.
  • Version-relative wording: CHANGELOG.md:12 says "The next minor release (0.4.0)", which reads wrong once 0.4.0 ships. Use "Starting with 0.4.0, …". Our earlier comment suggested that wording, sorry.
  • PR scope: the notes-only release policy wasn't one of the Require Node.js 22+ for SDK 0.4.0 #33 follow-ups, and it reverses the earlier policy. State the reason in the PR description, which is aligning the docs with existing practice. Alternatively, split it out of this PR and duroxide-python#33 together.

Prepared with an AI-assisted multi-model review (GitHub Copilot CLI). Key claims were checked against the code and CI runs.

@hacetin
Alperen Cetin (hacetin) marked this pull request as ready for review December 2, 2026 09:01
Limit native load advice to published packages, preserve error fields, and cover the engines CLI with relative tar paths. Document exact-tag verification, publication timing and historical release boundaries without unsupported maintenance release guidance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
Remove version-specific exceptions and historical details from shared release guidance; retain generic runtime guardrails and concise verified-tag publication steps.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cae1c384-1978-45b6-b0a5-593e18503225
@hacetin

Copy link
Copy Markdown
Contributor Author

Thanks ChrisKrawczyk. Addressed the loader and packaging issues, added regression tests, and tightened tag verification and release-note handling. Kept the shared policy generic and the runtime guidance concise, while preserving the requested notes-only release practice. Focused tests and implementation CI passed.

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