Skip to content

Certify pm CLI 2026.9.21 and adopt the canonical pm-ops lint, duplication and merge-driver gates - #89

Merged
unbraind merged 2 commits into
mainfrom
pm-cli-2026-9-21-canonical-pm-ops-gates
Sep 22, 2026
Merged

unbraind merged 2 commits into
mainfrom
pm-cli-2026-9-21-canonical-pm-ops-gates

Conversation

@unbraind

@unbraind unbraind commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

What

pm-slack-standup moves to pm CLI 2026.9.21 and adopts the canonical pm-ops gates:

  • Lint: scripts/lint.ts wraps pm-ops/eslint. npm run lint runs in CI and in release:check. All 34 existing errors are fixed, most of them any in tests, which now use SDK types.
  • Duplication: scripts/duplication-gate.ts wraps pm-ops/duplication at a 0% threshold. The 0.62% of clones were removed by extracting shared test fixtures (test/test-helpers.ts, list-envelope reuse in the canonical-reader acceptance script).
  • Merge driver: scripts/prepare-merge-driver.ts wraps pm-ops/merge-driver, replacing the vendored .mjs.

Evidence

  • npm run release:check: exit 0. I reran it independently after the agent's run.
  • 199 tests before and after. No test was removed or skipped. There are no lint suppressions or coverage ignores, and no threshold was changed.
  • pm health --strict-exit: exit 0.

Coverage is still below the fleet's 100% mandate: 90.42% statements, 88.38% branches, 91.79% functions, against the existing 83/87/87 floors. That gap predates this PR and is tracked in pm-slack-standup-7t31 and the hub's coverage epic.

pm items

Summary by Sourcery

Certify pm-slack-standup for pm CLI 2026.9.21 and enforce the canonical quality gates without reducing existing test coverage.

New Features:

  • Certify the extension against pm CLI 2026.9.21 with expanded public Slack Block Kit types and shared command/exporter flag definitions.

Bug Fixes:

  • Preserve nullish option handling and maintain consistent parsing and local-date behavior while satisfying the stricter lint policy.

Enhancements:

  • Replace duplicated parsing, date-formatting, test fixtures, and error assertions with shared helpers while retaining all existing behavior.

Build:

  • Adopt canonical pm-ops lint, zero-tolerance duplication, and merge-driver gates through project scripts and update related development dependencies.

CI:

  • Run lint and duplication checks as part of the release validation workflow.

Tests:

  • Retain and update the full test suite with SDK-typed assertions and compile-time compatibility coverage for public Slack payload types.

Chores:

  • Record the certification task and coverage follow-up in project metadata.

Summary by cubic

Certifies the standup extension against pm CLI 2026.9.21 and replaces the vendored merge driver plus missing lint and duplication gates with the canonical pm-ops implementations.

  • Pins @unbrained/pm-cli 2026.9.21 with pm-changelog and pm-ops at 2026.9.18.
  • Lint, duplication, and merge-driver checks now run through thin pm-ops launchers instead of the vendored .mjs script.
  • Fixes all 34 lint errors (mostly any in tests, now using SDK types) and removes the 0.62% duplication clones by extracting shared test fixtures.
  • Reopens the public SlackBlock type and widens Poster to a Record payload so the lint refactor doesn't break consumer code; a compile-time test pins both contracts.
  • All 199 tests still pass; none were removed or skipped.
  • Coverage stays below the fleet's 100% mandate (90.42% statements, 88.38% branches, 91.79% functions) and remains tracked in the existing coverage issue.

Written for commit 6da9b98. Summary will update on new commits.

Review in cubic

…, fix all lint errors and clone pairs

- Pin @unbrained/pm-cli 2026.9.21, pm-changelog 2026.9.18, pm-ops 2026.9.18
- Replace vendored merge-driver with thin pm-ops/merge-driver launcher
- Add scripts/lint.ts and scripts/duplication-gate.ts as thin pm-ops launchers
- Fix 33 ESLint errors: merge duplicate import, replace all explicit any
  with precise types (SlackContextBlock/SlackHeaderBlock/SlackSectionBlock,
  ExtensionApi, CommandError via expectCommandError helper)
- Fix 2 typecheck errors: SlackMrkdwn[] footer elements, SlackPostPayload param
- Remove all 7 jscpd clone pairs (0.62% to 0%): extract shared test helpers
  (expectCommandError, yesterdayTodayFixture, bucketingItems, teamItems,
  trendFixture, setupBothShims) and reuse completeListEnvelope fixture
- npm run release:check exit 0 (199 tests, coverage above thresholds)
- pm health --strict-exit exit 0

@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.

Sorry @unbraind, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 17 hours and 3 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: 3baac788-4020-42de-82c8-71dc6c9d9224

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@unbraind

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@unbraind

Copy link
Copy Markdown
Owner Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Pull request base or head changed.

@sourcery-ai

sourcery-ai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR upgrades pm-slack-standup to pm CLI 2026.9.21, delegates lint, duplication, and merge-driver enforcement to canonical pm-ops launchers, and refactors production and test code to meet the stricter typed quality gates while preserving the existing 199-test suite; coverage remains above current floors but below the separately tracked 100% mandate.

Flow diagram for shared CLI and exporter flag definitions

flowchart LR
    Window["sharedWindowFlags()"] --> Standup["pm standup command"]
    Window --> Exporter["standup exporter"]
    Labels["sectionLabelsFlag()"] --> Standup
    Labels --> Exporter
    Presentation["sharedPresentationFlags()"] --> Standup
    Presentation --> Exporter
Loading

File-Level Changes

Change Details Files
Certify the extension against pm CLI 2026.9.21 and replace local quality tooling with canonical pm-ops gates.
  • Upgrade pm CLI, pm-ops, and related release tooling dependencies.
  • Add thin TypeScript launchers for lint, zero-threshold duplication, and merge-driver preparation.
  • Run lint and duplication gates from release:check and configure the duplication threshold.
  • Replace the vendored merge-driver implementation with pm-ops/merge-driver.
package.json
package-lock.json
scripts/lint.ts
scripts/duplication-gate.ts
scripts/prepare-merge-driver.ts
scripts/prepare-merge-driver.mjs
Make the implementation satisfy the stricter lint policy through stronger typing and explicit nullish handling.
  • Replace loose equality checks with a shared type-narrowing nullish predicate.
  • Replace broad Slack payload/block types with explicit Block Kit unions and payload interfaces.
  • Type command and exporter flag definitions against the SDK and share flag definitions between registrations.
  • Replace test any-casts and repeated error matchers with SDK types and shared typed helpers.
index.ts
dist/index.js
dist/index.d.ts
test/fetch-all-items.test.ts
test/smoke.test.ts
test/units.test.ts
test/test-helpers.ts
Eliminate duplication findings without changing test coverage or behavior.
  • Extract reusable list-spec parsing and local-day formatting helpers.
  • Reuse shared test fixtures and the canonical complete-list envelope.
  • Extract repeated test data and trend fixtures.
index.ts
test/complete-list-fixture.ts
test/test-helpers.ts
test/units.test.ts
scripts/accept-canonical-reader.ts
Record the certification task and pre-existing coverage shortfall in pm metadata.
  • Add task history and task metadata for the CLI certification and canonical gates.
  • Update the tracked coverage issue to document the remaining 100% mandate gap.
.agents/pm/history/pm-slack-standup-add0.jsonl
.agents/pm/history/pm-slack-standup-7t31.jsonl
.agents/pm/tasks/pm-slack-standup-add0.toon
.agents/pm/issues/pm-slack-standup-7t31.toon

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

@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the previous public Slack type regression is fully fixed and no new actionable failures remain.

Summary

Certifies the package against pm CLI 2026.9.21 and adopts the canonical pm-ops quality gates.

  • Adds canonical lint and zero-threshold duplication checks to the release workflow.
  • Replaces the vendored merge-driver preparation script with the pm-ops launcher.
  • Refactors tests and fixtures to satisfy lint and duplication requirements.
  • Restores the open public Slack block and poster type contracts after the previous review.
  • Updates generated distribution artifacts and project-tracking records.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  RC["npm run release:check"] --> TC["Type checking"]
  RC --> T["Tests"]
  RC --> C["Coverage gate"]
  RC --> L["pm-ops lint gate"]
  RC --> D["pm-ops duplication gate"]
  P["npm prepare"] --> M["pm-ops merge-driver launcher"]
Loading

Reviews (2) · Last reviewed commit: "Keep the public SlackBlock and Poster ty..."

Comment thread package.json
Comment thread index.ts Outdated
The lint refactor narrowed the exported SlackBlock to a closed four-member
union and Poster to a SlackPostPayload parameter. Both break consumer code
built on the 2026.9.19 declarations (an actions block, a poster typed on a
Record payload). SlackBlock is the open interface again, the emitted block
shapes extend it, and Poster takes Record<string, unknown>; SlackPostPayload
extends Record so it stays assignable. A compile-time test pins both
contracts and fails with three type errors against the narrowed version
(Greptile review on #89).
@unbraind

Copy link
Copy Markdown
Owner Author

@greptileai review

@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.

Sourcery assessment

Approved.

@unbraind
unbraind merged commit ee7ce18 into main Sep 22, 2026
9 checks passed
@unbraind
unbraind deleted the pm-cli-2026-9-21-canonical-pm-ops-gates branch September 22, 2026 20:47
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