Skip to content

Certify pm CLI 2026.9.21, move merge drivers onto the canonical pm-ops launcher, and fix release visibility - #113

Merged
unbraind merged 6 commits into
mainfrom
pm-cli-2026-9-21-canonical-merge-driver-release-window
Sep 22, 2026
Merged

unbraind merged 6 commits into
mainfrom
pm-cli-2026-9-21-canonical-merge-driver-release-window

Conversation

@unbraind

@unbraind unbraind commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fleet wave of 2026-09-22 (companion epic pm-cli-website-5s6z), applied by the fleet's deterministic wave script and verified by this repository's own gates.

  • Certify pm CLI 2026.9.21, with exact pins in package.json and package-lock.json: @unbrained/pm-cli 2026.9.17 -> 2026.9.21, pm-changelog 2026.9.16 -> 2026.9.18, pm-ops 2026.9.13 -> 2026.9.18.
  • Canonical merge driver: scripts/prepare-merge-driver.ts is a thin launcher over pm-ops/merge-driver (removed: scripts/prepare-merge-driver.mjs). CI runs pm health --strict-exit --require-merge-drivers right after npm ci, with no separate install step, so the gate proves that the prepare hook installed the drivers. A broken launcher fails CI instead of silently leaving clones that hard-conflict .toon/history files on the next multi-agent merge.
  • Release workflow: 10-minute npm visibility window and a GitHub Release decoupled from bun mirror lag, with a visible gate step for bun failures (companion pm-cli-website-3y5d). The backfill step first proposed here was removed after review; see Review follow-ups.

pm items

Review follow-ups

  • d2852a4: State the real install contract of the canonical merge-driver launcher
  • 69cb657: Let CI prove that npm ci's prepare hook installs the merge drivers
  • 2a60655: Drop the release backfill step until it can verify provenance ancestry
  • 5c3248e: Declare max_attempts before use and correct the wave's pm records
  • cc17fce: Make every closure field of the release Issue match the final scope

Findings tracked centrally rather than fixed per repository (one pm-ops release moves the whole fleet):

  • companion pm-cli-website-xy19: a guarded launcher so that npm ci --omit=dev in a clone no-ops instead of failing
  • companion pm-cli-website-mxrp: the release-workflow recovery harness as a checked-in pm-ops verifier run by every release:check, plus the backfill with provenance-ancestry verification (the attested commit must be an ancestor of the tag; this fleet's provenance names the trigger commit, pm-cli-website-nodo)

Verification

Check Result
git config --get-regexp '^merge\.pm' after npm ci drivers registered
pm health --strict-exit --require-merge-drivers exit 0
npm run release:check exit 0 (verify-release-publish-attestation: every publish invocation is attested.)
changelog:full then changelog:check regenerated after the pm writes, consistent

Dependabot PRs are not absorbed here and will rebase onto this change.

Summary by Sourcery

Certify the updated pm toolchain, enforce canonical merge-driver setup, and make releases resilient to npm and Bun propagation delays.

Bug Fixes:

  • Ensure npm publishes that become visible late are still treated as successful releases instead of skipping tagging and GitHub Release creation.
  • Create GitHub Releases independently of Bun mirror verification while keeping Bun failures visible and job-failing.

Enhancements:

  • Move merge-driver installation to the canonical pm-ops launcher and require CI to verify the drivers are installed.
  • Certify the repository against pm CLI 2026.9.21 and update the related pm-changelog and pm-ops dependencies.
  • Document the merge-driver install contract for development and production clone installs.

CI:

  • Strengthen the CI health gate to require registered merge drivers.

Deployment:

  • Extend npm and Bun propagation checks to a 10-minute visibility window and preserve release creation when Bun verification fails.

Documentation:

  • Update the README and changelog with the canonical merge-driver setup and release visibility fixes.

Chores:

  • Add and release the associated project-management task and issue records.

Summary by cubic

Certifies pm CLI 2026.9.21, moves merge-driver setup onto the canonical pm-ops launcher, and makes GitHub Release creation resilient to npm/Bun propagation delays so a late-visible publish no longer skips the Release.

Merge drivers

  • Pins @unbrained/pm-cli 2026.9.21, pm-changelog 2026.9.18, and pm-ops 2026.9.18 in package.json and package-lock.json.
  • Replaces the vendored scripts/prepare-merge-driver.mjs with a thin launcher over pm-ops/merge-driver.
  • CI's health gate now runs pm health --strict-exit --require-merge-drivers with no explicit pm merge install, so a broken npm ci prepare hook fails CI instead of masking itself.
  • The README notes the launcher statically imports the pm-ops devDependency, so a production install of a clone must pass --ignore-scripts.

Release workflow

  • Extends the npm visibility window to 10 minutes with --prefer-online reads, and declares max_attempts before use, so a publish the registry accepts late is treated as success rather than failure.
  • Decouples the GitHub Release from Bun verification: the Release is created whenever publish and tag push succeed, and a Bun failure is surfaced by a gate step that fails the job visibly.
  • The best-effort Release backfill was dropped until the verifier can prove the tag's commit produced the attested artifact.

Written for commit cc17fce. Summary will update on new commits.

Review in cubic

…cal pm-ops launcher

- Pins @unbrained/pm-cli 2026.9.21, pm-ops 2026.9.18 and pm-changelog 2026.9.18 exactly
  (package.json and package-lock.json).
- scripts/prepare-merge-driver.ts is now a thin launcher over pm-ops/merge-driver, replacing
  the untyped prepare-merge-driver.mjs; one
  canonical, tested installer instead of a private copy per repository.
- CI installs the drivers before `pm health --strict-exit --require-merge-drivers`, so a clone
  without them fails the gate instead of hard-conflicting tracker files on the next merge.
- Release workflow: 10-minute npm visibility window, GitHub Release decoupled from bun mirror lag with a visible gate step, and a best-effort backfill of missing Releases (companion pm-cli-website-3y5d).

pm items: pm-starter-8vta, pm-starter-4tq9.
Companion epic pm-cli-website-5s6z. release:check exits 0.
@sourcery-ai

sourcery-ai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR upgrades and certifies the pm toolchain, makes merge-driver installation canonical and mandatory in CI, and restructures release automation to recover missing GitHub Releases while separating npm publication, Bun mirror verification, and release visibility.

Sequence diagram for release publication and visibility gates

sequenceDiagram
    participant Workflow as Release workflow
    participant NPM as npm registry
    participant Git as Git tags
    participant Bun as Bun mirror
    participant GitHub as GitHub Releases

    Workflow->>NPM: Publish npm package
    loop Up to 20 reads over 10 minutes
        Workflow->>NPM: npm view version and dist.attestations --prefer-online
    end
    Workflow->>Git: Push release tag
    Workflow->>Bun: bun add published version
    alt Publish and tag succeeded
        Workflow->>GitHub: gh release create --verify-tag
    end
    alt Bun verification fails
        Workflow->>Workflow: Fail job visibly
    end
Loading

Flow diagram for backfilling missing GitHub Releases

flowchart TD
    A[Fetch release tags] --> B{GitHub Release exists?}
    B -->|Yes| A
    B -->|No| C[Convert tag to npm version]
    C --> D[npm view version attestations --prefer-online]
    D --> E{Published and attested?}
    E -->|No| F[Warn and skip tag]
    E -->|Yes| G[Generate tag-scoped release notes]
    G --> H{Notes generated?}
    H -->|No| I[Warn and continue]
    H -->|Yes| J[Create GitHub Release]
    F --> A
    I --> A
    J --> A
Loading

File-Level Changes

Change Details Files
Certified the repository against newer pinned pm tooling and moved merge-driver setup to the canonical pm-ops implementation.
  • Pinned pm CLI, changelog, and ops packages to the 2026.9.21/2026.9.18 fleet versions.
  • Replaced the standalone merge-driver implementation with a TypeScript launcher importing pm-ops/merge-driver.
  • Updated npm prepare metadata and documentation for the new launcher.
  • Installed merge drivers explicitly in CI and required them in strict pm health validation.
package.json
package-lock.json
scripts/prepare-merge-driver.ts
scripts/prepare-merge-driver.mjs
.github/workflows/ci.yml
README.md
Reworked release recovery and publication sequencing so npm visibility and GitHub Release creation are independently observable and resilient to Bun mirror lag.
  • Added a best-effort workflow pass that backfills missing GitHub Releases only for valid release tags with attested npm versions.
  • Extended npm reconciliation and Bun installation checks to a 10-minute online visibility window.
  • Decoupled GitHub Release creation from Bun verification while adding a visible failure gate for Bun mirror problems.
  • Added step IDs and outcome-based conditions so publish/tag failures still block release creation.
.github/workflows/release.yml
Recorded the certified tooling and release-visibility fixes in project tracking and changelog metadata.
  • Added the task and issue records with their history entries.
  • Added Unreleased changelog entries linked to the corresponding pm items.
.agents/pm/tasks/pm-starter-8vta.toon
.agents/pm/issues/pm-starter-4tq9.toon
.agents/pm/history/pm-starter-8vta.jsonl
.agents/pm/history/pm-starter-4tq9.jsonl
CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 472b869a-a53d-4080-9acc-e7ba25bfcf54


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="package.json" line_range="38" />
<code_context>
     "prepublishOnly": "npm run release:check",
     "release:notes": "pm-changelog --pm-root .agents/pm --stdout --since-previous-tag --until-release-tag --release-version-from-package --date-from-version --item-url-base https://github.com/unbraind/pm-starter/blob/main/.agents/pm --respect-item-release --pm-bin ./node_modules/.bin/pm --pm-arg=--output-budget --pm-arg=unbounded --pm-arg=--output-limit --pm-arg=unbounded --github-step-summary",
-    "prepare": "node scripts/prepare-merge-driver.mjs",
+    "prepare": "node scripts/prepare-merge-driver.ts",
     "merge:install": "pm merge install",
     "coverage": "npm run build && npm run build:test && node scripts/coverage-gate.ts",
</code_context>
<issue_to_address>
**issue (bug_risk):** The `prepare` hook unconditionally imports the devDependency `pm-ops`, so an install using `--omit=dev` fails with `ERR_MODULE_NOT_FOUND` before the hook can no-op. This breaks the README's documented production/`--omit=dev` installation path.

**Triggers:** When consumers install the package with development dependencies omitted.

**Suggested fix:** Keep the launcher dependency-free by dynamically importing `pm-ops` only when its CLI is available, or move the required implementation to a runtime dependency while preserving the no-op behavior for production installs.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and the release workflow can create externally visible GitHub Releases and backfill historical tags based on npm visibility and attestations, while also changing the publish and verification gates. Reverting the change would not undo a mistakenly created release or the visibility and downstream effects it already caused.

Blocking findings: package.json:38


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread package.json
@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness, security, or repository-rule findings.

Summary

This PR certifies updated pm tooling, delegates merge-driver installation to the canonical pm-ops launcher, strengthens CI verification of driver registration, and makes GitHub Release creation independent of Bun registry-mirror lag.

  • Pins @unbrained/pm-cli, pm-changelog, and pm-ops to the certified versions.
  • Replaces the vendored merge-driver installer with a thin canonical launcher.
  • Requires merge-driver registration during the CI health check.
  • Extends npm reconciliation to ten minutes while preserving provenance checks.
  • Creates the GitHub Release after successful publication and tagging even if Bun verification fails, while retaining a visible job failure.
  • Corrects project records to document that the proposed release backfill was removed.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Validated main commit] --> B[Publish attested npm package]
  B --> C[Reconcile npm visibility]
  C --> D[Push matching release tag]
  D --> E[Verify through Bun]
  D --> F[Create GitHub Release]
  E -->|Success| G[Release job succeeds]
  E -->|Failure| H[Visible failure gate]
  F --> H
Loading

Reviews (6) · Last reviewed commit: "Make every closure field of the release ..."

Comment thread scripts/prepare-merge-driver.ts
Comment thread .github/workflows/release.yml
The prepare launcher statically imports pm-ops, a devDependency, so the
README's promise that production / --omit=dev installs cannot break was
only true for registry installs (npm never runs prepare for a registry
tarball). A production install of a clone omits pm-ops as well and must
pass --ignore-scripts, which is what this fleet's own Dockerfiles do.

Raised by Greptile and Sourcery on pm-starter#113. The canonical guarded
launcher is tracked as companion item pm-cli-website-xy19.
CI ran an explicit pm merge install right before pm health
--require-merge-drivers, so the gate only verified the step before it and
would have passed with a broken prepare hook. Without that step, the
health gate asserts what a fresh clone actually relies on: npm ci runs the
prepare launcher, which installs the drivers through pm-ops/merge-driver.

Verified on a fresh git clone: no merge.pm* keys before npm ci, all of
them after, and pm health --strict-exit --require-merge-drivers exits 1
once they are removed. Raised by Greptile on pm-github#93.
The backfill created a GitHub Release for any fleet-shaped tag whose npm
version carried some attestation, without proving the tag's commit
produced that artifact, so a stale, moved or hand-made tag could get a
misleading Release. Comparing the attested commit with the tag commit is
not the fix either: this fleet's provenance names the workflow trigger
commit, measured as the tag's direct parent on three real releases. The
correct check (same repository and workflow, attested commit an ancestor
of the tag) belongs in the canonical pm-ops release verifier.

The 10-minute npm visibility window and the Release decoupled from bun
mirror lag remain; they fix the root causes. Raised by Greptile on
pm-brief#124 and pm-linear#121.
Comment thread .agents/pm/issues/pm-starter-4tq9.toon
- release.yml: max_attempts is declared before refuse_unattested_or_fail,
  which expands it, so its visibility no longer depends on call-time
  reasoning (the fleet's bindings-before-use rule; Greptile on
  pm-todos#99). Behaviour is unchanged.
- pm records: the release Issue no longer claims the backfill that review
  removed, and the certify Task describes CI as it now is (health gate
  right after npm ci, no separate install step).

The final release.yml is byte-identical to a fresh run of the anchored
applier on origin/main (identical).
The resolution, expected result and close reason still described the
backfill step that review removed, and the close reason cited the
earlier 7-scenario harness run. All three now state the two changes that
ship, the 5 applicable harness scenarios, and that the backfill moved to
companion item pm-cli-website-mxrp. Raised by Greptile on pm-slack#115.
@unbraind
unbraind merged commit 455d77a into main Sep 22, 2026
9 checks passed
@unbraind
unbraind deleted the pm-cli-2026-9-21-canonical-merge-driver-release-window branch September 22, 2026 06:33
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.

1 participant