Skip to content

Certify pm CLI 2026.9.23 and adopt the guarded pm-ops merge-driver launcher - #97

Merged
unbraind merged 2 commits into
mainfrom
certify-pm-cli-2026-9-23-and-roll-out-guarded-merge-driver-launcher
Sep 25, 2026
Merged

unbraind merged 2 commits into
mainfrom
certify-pm-cli-2026-9-23-and-roll-out-guarded-merge-driver-launcher

Conversation

@unbraind

@unbraind unbraind commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fleet wave of 2026-09-25 (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.23, exact pins in package.json and package-lock.json: @unbrained/pm-cli 2026.9.21 -> 2026.9.23, pm-ops 2026.9.18 -> 2026.9.23, pm-changelog 2026.9.18 -> 2026.9.23, @types/node ^26.1.1 -> ^26.6.2. Absorbs Dependabot chore(deps-dev): bump @types/node from 26.5.1 to 26.6.2 #95, which will be closed as superseded.
  • Guarded merge-driver launcher (companion pm-cli-website-xy19): scripts/prepare-merge-driver.ts is now the template pm-ops 2026.9.23 ships, copied unchanged (it replaces the static-import launcher). It imports nothing from pm-ops, so a production install of a clone (npm ci --omit=dev) skips with one notice instead of dying on ERR_MODULE_NOT_FOUND, while a stale or broken pm-ops still fails the install. prepare-merge-driver.test.ts compares the file byte-for-byte with node_modules/pm-ops/templates/prepare-merge-driver.ts (pm-ops covers every branch of that template with real fixtures) and runs it to prove the drivers register.

pm items

Verification

Check Result
git config --get-regexp '^merge\.pm' after npm ci drivers registered
CI health block (pm health ... --require-merge-drivers), executed from ci.yml 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

Summary by Sourcery

Certify the pm toolchain at 2026.9.23 and adopt the guarded merge-driver launcher for reliable clone installation behavior.

Bug Fixes:

  • Allow production clone installs without devDependencies to skip merge-driver setup cleanly while still failing on stale or broken pm-ops installations.

Enhancements:

  • Adopt the canonical guarded pm-ops merge-driver launcher and verify it remains byte-for-byte aligned with the pinned template.
  • Certify the pm toolchain and Node.js type definitions at the 2026.9.23 release versions.

Documentation:

  • Update the README to document the guarded merge-driver installation behavior across full and production installs.

Tests:

  • Add coverage for launcher template parity, successful driver registration, omitted pm-ops, stale pm-ops, installer failures, and signal termination.

Chores:

  • Record the associated project-management chore and history metadata.

Summary by cubic

Certifies the pm toolchain to 2026.9.23 and swaps the prepare merge-driver launcher for the canonical pm-ops template, so npm ci --omit=dev skips merge-driver setup with a notice instead of failing.

  • Pins @unbrained/pm-cli, pm-ops, pm-changelog, and @types/node to the new versions in package.json and package-lock.json.
  • The launcher imports nothing from pm-ops; a stale or broken pm-ops still fails the install, while an omit-dev install no-ops with one notice.
  • A test runs the launcher in fresh git init checkouts and asserts the full driver set .gitattributes declares, plus the skip, stale, and failing-installer branches.
  • README now describes the guarded launcher's behavior across full and production installs.

Written for commit 541b9de. Summary will update on new commits.

Review in cubic

…uncher

- Pins @unbrained/pm-cli 2026.9.21 -> 2026.9.23, pm-ops 2026.9.18 -> 2026.9.23, pm-changelog 2026.9.18 -> 2026.9.23, @types/node ^26.1.1 -> ^26.6.2 exactly (package.json and package-lock.json); absorbs Dependabot #95.
- scripts/prepare-merge-driver.ts is now the launcher template pm-ops ships, copied unchanged: it
  imports nothing from pm-ops, so `npm ci --omit=dev` in a clone skips with one notice instead of
  failing, while a stale or broken pm-ops still fails. A test keeps it byte-identical to the pinned
  template and proves it registers the drivers.

pm items: pm-github-d2az. Companion epic pm-cli-website-5s6z. release:check exits 0.
@sourcery-ai

sourcery-ai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR upgrades and certifies the pm toolchain at 2026.9.23, adopts pm-ops’ guarded merge-driver launcher to make omit-dev installs safe without hiding stale-tool failures, and adds documentation, provenance, and tests covering template fidelity and driver registration.

Sequence diagram for the guarded merge-driver prepare hook

sequenceDiagram
    participant NPM
    participant Launcher as prepare-merge-driver.ts
    participant Resolver as Node module resolver
    participant PMOps as pm-ops installer
    participant Git as Git config

    NPM->>Launcher: execute prepare hook
    Launcher->>Resolver: resolve pm-ops/merge-driver/prepare
    alt pm-ops is absent
        Resolver-->>Launcher: MODULE_NOT_FOUND
        Launcher->>Resolver: resolve pm-ops/package.json
        Resolver-->>Launcher: package absent
        Launcher-->>NPM: print notice and skip
    else pm-ops is installed
        Resolver-->>Launcher: installer path
        Launcher->>PMOps: spawn installer
        PMOps->>Git: register merge drivers
        Git-->>PMOps: drivers registered
        PMOps-->>Launcher: exit status
        Launcher-->>NPM: propagate status
    end
    alt pm-ops is stale or installer fails
        Resolver-->>Launcher: resolution error
        Launcher-->>NPM: fail installation
    end
Loading

File-Level Changes

Change Details Files
Certify the 2026.9.23 pm toolchain with synchronized dependency pins and lockfile updates.
  • Upgrade pm CLI, pm-ops, pm-changelog, and Node.js type definitions.
  • Refresh resolved dependency metadata and integrity entries.
  • Record the fleet chore and generated changelog entry.
package.json
package-lock.json
CHANGELOG.md
.agents/pm/chores/pm-github-d2az.toon
.agents/pm/history/pm-github-d2az.jsonl
Replace the direct pm-ops import with a guarded, canonical launcher that handles production installs safely while preserving failures for stale or broken tooling.
  • Resolve the pm-ops installer from the package root without importing it into the launcher.
  • Skip only when pm-ops is absent, with a notice; propagate resolution and installer failures otherwise.
  • Execute the installer as a child Node process and retain cross-platform behavior.
  • Update documentation to describe the canonical template and omit-dev behavior.
scripts/prepare-merge-driver.ts
README.md
Protect the launcher contract and verify merge-driver registration during tests.
  • Compare the repository launcher byte-for-byte with the installed pm-ops template.
  • Run the launcher and assert that pm merge-driver Git configuration is registered.
test/prepare-merge-driver.test.ts

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 25, 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: b7c5de1c-a454-4a11-903f-5774c41e3201


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="test/prepare-merge-driver.test.ts" line_range="24-27" />
<code_context>
+});
+
+test("the prepare launcher registers pm's merge drivers in this checkout", () => {
+  const run = spawnSync(process.execPath, [launcher], { cwd: root, encoding: "utf8" });
+  assert.equal(run.status, 0, run.stderr);
+  const drivers = spawnSync("git", ["config", "--get-regexp", "^merge\\.pm"], { cwd: root, encoding: "utf8" });
+  assert.match(drivers.stdout, /^merge\.pm/m);
+});
</code_context>
<issue_to_address>
**issue (testing):** The registration test can pass without the launcher registering any drivers because it never clears the repository's existing `merge.pm` configuration and only checks whether `git config` returns a matching line. A prior `npm install`/`prepare` run or developer-global repository configuration can satisfy the assertion even if the current launcher invocation did nothing.

**Triggers:** When merge-driver configuration already exists in the checkout before this test runs.

**Suggested fix:** Use an isolated temporary Git config for the launcher and verification, or remove/assert the relevant `merge.pm` entries before invoking the launcher, and also assert that the `git config` command itself succeeds.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and if the launcher or upgraded pm tooling is wrong, installs can fail or Git can register incorrect merge-driver commands. Reverting restores the prior code, but merge-driver settings already written to a clone's local Git config can outlive the revert and must be repaired or reinstalled.

Blocking findings: test/prepare-merge-driver.test.ts:27


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

Comment thread test/prepare-merge-driver.test.ts Outdated
@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Updates build toolchain and merge-driver launcher implementation.

The PR appears safe to merge, with a non-blocking gap remaining in the merge-driver registration test.

Summary

The PR certifies the 2026.9.23 pm toolchain and adopts a guarded merge-driver launcher. Since the previous review, it adds fresh-checkout tests for driver registration and launcher failure paths, and records the review follow-up in the tracker.

Reviews (2) · Last reviewed commit: "Test the prepare launcher in isolated ch..."

Comment thread test/prepare-merge-driver.test.ts Outdated
…d driver

Review round 1 (Sourcery, Greptile): the first test could pass on merge drivers this repository's own
npm ci had already registered, and it accepted any single driver. Each case now runs the launcher as
npm's prepare hook would, inside a fresh git-init checkout with this repository's .gitattributes and
tracker settings, and asserts the exact driver set .gitattributes declares. It also covers the
omit-dev skip, a stale pm-ops, and failing and signal-killed installers.

The README now describes the guarded launcher as it behaves (Greptile): it hands over to
pm-ops's installer, skips with one notice when pm-ops is absent, and fails on a stale or broken pm-ops.

pm item: pm-github-d2az.
@unbraind

Copy link
Copy Markdown
Owner Author

Review round complete before merge. All 2 inline bot threads were answered in-thread, and each was either fixed in this PR or tracked on the companion hub (launcher template: pm-cli-website-dqg7; release-workflow verifier: pm-cli-website-mxrp). Greptile's latest review covers the current head 541b9de with Confidence Score: 5/5. Sourcery skipped this head (its weekly diff allowance), so its earlier findings on this PR are the last it gave, and all were answered. CodeRabbit posted only its free-plan notice: this repository has fewer than 10 stars, so it doesn't review automatically, and its one-review-per-hour allowance is kept for PRs that need it. Every required check is green on 541b9de.

@unbraind
unbraind merged commit 29f3560 into main Sep 25, 2026
9 checks passed
@unbraind
unbraind deleted the certify-pm-cli-2026-9-23-and-roll-out-guarded-merge-driver-launcher branch September 25, 2026 09:19
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