Skip to content

feat(sdk): add extension version compatibility preflight - #350

Merged
unbraind merged 3 commits into
mainfrom
feat/sdk-extension-version-compat-preflight
Jun 23, 2026
Merged

unbraind merged 3 commits into
mainfrom
feat/sdk-extension-version-compat-preflight

Conversation

@unbraind

@unbraind unbraind commented Jun 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Extract shared extension version-bound evaluation for pm_min_version and pm_max_version so runtime loader behavior and SDK author-time checks use one source of truth.
  • Add checkExtensionManifestCompatibility to the SDK and assertExtensionManifestCompatible to the SDK testing surface.
  • Document the author-time compatibility workflow and update pm-changelog output with pm item evidence.

PM lineage

Verification

  • npm install -g .
  • pm --version
  • node -v
  • pnpm -v
  • pnpm build
  • node scripts/run-tests.mjs test -- tests/unit/extensions/version-compat.spec.ts tests/unit/sdk/sdk-compose.spec.ts tests/unit/sdk/sdk-index.spec.ts (168 tests)
  • pnpm quality:static
  • pnpm security:scan
  • pnpm audit --audit-level moderate
  • pnpm contracts:check
  • pnpm changelog:pm:check (pm-changelog@2026.6.20, CHANGELOG.md unchanged under --check)
  • pm validate --check-resolution --check-history-drift (history drift ok; existing historical resolution warnings remain)
  • node scripts/run-tests.mjs coverage (248 files, 4949 tests, 100/100/100/100)
  • isolated temp-directory smoke with sandboxed PM_PATH/PM_GLOBAL_PATH against built dist SDK helpers and real loader version-gate warning

GitHub/release/observability

  • No open PRs before this PR.
  • Nightly Validation failed: windows-latest / Node 20 #348 remains open and tracked separately as pm-2kkl; current main CI Windows regression job is green.
  • GitHub Dependabot and CodeQL APIs returned only fixed alerts; secret scanning returned no alerts.
  • GitHub release v2026.6.23 is published; npm @unbrained/pm-cli is 2026.6.23; npm pm-changelog latest is 2026.6.20.
  • Sentry/telemetry gate passed: critical=0 high=0 blocking=0, telemetry finish_error_rate_pct=1.03, failures_without_error_code_rows=0.

Summary by Sourcery

Introduce shared extension manifest version-compatibility core and expose SDK helpers for author-time compatibility checks and CI guards.

New Features:

  • Add checkExtensionManifestCompatibility SDK helper for evaluating extension pm_min_version/pm_max_version bounds against a target pm CLI version.
  • Add assertExtensionManifestCompatible testing helper to enforce extension manifest version compatibility in CI while still returning structured findings.

Enhancements:

  • Refactor extension loader to delegate pm_min_version/pm_max_version evaluation to a shared core/extensions/version-compat module, aligning runtime behavior with SDK checks.

Documentation:

  • Document the SDK author-time compatibility workflow and testing helpers in SDK and extensions documentation, including usage examples.

Tests:

  • Add unit tests for the version-compat core, new SDK compatibility helper, and testing assertion to cover key compatibility outcomes and error cases.

Chores:

  • Update changelog and internal PM feature/task lineage metadata for the new version-compatibility workflow.

Add a shared extension version-compatibility core for pm_min_version and pm_max_version evaluation, wire the loader to it, and expose checkExtensionManifestCompatibility plus assertExtensionManifestCompatible for package authors.

Document the author-time compatibility guard, update the pm-changelog output, and include pm evidence for pm-1w0d/pm-sjea/pm-knma/pm-hng2 plus the GH-348 separation note on pm-2kkl.

Verification: pnpm build; focused SDK/version tests (168 tests); pnpm quality:static; pnpm security:scan; pnpm audit --audit-level moderate; pnpm contracts:check; pnpm changelog:pm:check; node scripts/run-tests.mjs coverage (4949 tests, 100/100/100/100); isolated temp PM_PATH/PM_GLOBAL_PATH SDK+loader smoke.
@sourcery-ai

sourcery-ai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Introduces a shared core module for extension-manifest pm version bound evaluation and exposes new SDK helpers for author-time and test-time compatibility checks, while refactoring the runtime loader to delegate to the shared logic and documenting the new workflow.

Sequence diagram for assertExtensionManifestCompatible author-time check

sequenceDiagram
  actor Author
  participant Test as assertExtensionManifestCompatible
  participant SDK as checkExtensionManifestCompatibility
  participant Core as version_compat_core

  Author->>Test: assertExtensionManifestCompatible(manifest, target)
  Test->>SDK: checkExtensionManifestCompatibility(manifest, target)
  SDK->>Core: evaluatePmMinVersionBound(pm_min_version, pmVersion)
  SDK->>Core: evaluatePmMaxVersionBound(pm_max_version, pmVersion, pmMaxVersionExceededMode)
  Core-->>SDK: PmVersionBoundEvaluation(min, max)
  SDK-->>Test: ExtensionManifestCompatibilityResult
  alt blocking_incompatibility
    Test-->>Author: throw Error("Extension manifest is not compatible…")
  else compatible_or_warnings_only
    Test-->>Author: return ExtensionManifestCompatibilityResult
  end
Loading

File-Level Changes

Change Details Files
Introduce shared core for pm_min_version/pm_max_version evaluation and refactor loader to use it.
  • Add core/extensions/version-compat module encapsulating version parsing, comparison, and bound evaluation for pm_min_version and pm_max_version.
  • Expose pure helpers to evaluate lower and upper version bounds with structured status and allow/deny decisions.
  • Update the extension loader to replace inline version parsing and comparison with calls to the shared evaluation helpers, preserving existing warning semantics and exceeded-mode behavior.
src/core/extensions/version-compat.ts
src/core/extensions/loader.ts
tests/unit/extensions/version-compat.spec.ts
Add SDK author-time compatibility checker and test assertion for extension-manifest version bounds.
  • Extend sdk/compose with ExtensionManifestCompatibility* types and the checkExtensionManifestCompatibility helper that wraps core bound evaluation into structured findings and a compatible flag.
  • Add assertExtensionManifestCompatible to the SDK testing surface to throw on blocking incompatibilities while returning the full compatibility result on success.
  • Re-export the new helpers from the main SDK barrel and testing barrel, and add targeted unit tests covering re-exports, behavior for all outcomes, and message composition.
src/sdk/compose.ts
src/sdk/testing.ts
src/sdk/index.ts
tests/unit/sdk/sdk-compose.spec.ts
tests/unit/sdk/sdk-index.spec.ts
Document the new compatibility workflow and record it in changelog and PM lineage metadata.
  • Update SDK and EXTENSIONS documentation to describe author-time compatibility checking, its relationship to runtime loader behavior, and usage examples for the new helpers.
  • Amend the changelog with entries for the shared version-compat core and the new SDK helpers.
  • Add PM feature/task/issue history artifacts to track the new functionality and link it into existing lineage.
docs/SDK.md
docs/EXTENSIONS.md
CHANGELOG.md
.agents/pm/features/pm-1w0d.toon
.agents/pm/tasks/pm-hng2.toon
.agents/pm/tasks/pm-knma.toon
.agents/pm/tasks/pm-sjea.toon
.agents/pm/history/pm-1w0d.jsonl
.agents/pm/history/pm-hng2.jsonl
.agents/pm/history/pm-knma.jsonl
.agents/pm/history/pm-sjea.jsonl
.agents/pm/history/pm-2kkl.jsonl
.agents/pm/issues/pm-2kkl.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

@unbraind

Copy link
Copy Markdown
Owner Author

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@unbraind, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 46 minutes and 16 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: d6cb7581-1bfe-4f8b-a011-ac7ba9c1b6dd

📥 Commits

Reviewing files that changed from the base of the PR and between 8c8d1c3 and a9ed3b3.

📒 Files selected for processing (21)
  • .agents/pm/features/pm-1w0d.toon
  • .agents/pm/history/pm-1w0d.jsonl
  • .agents/pm/history/pm-2kkl.jsonl
  • .agents/pm/history/pm-hng2.jsonl
  • .agents/pm/history/pm-knma.jsonl
  • .agents/pm/history/pm-sjea.jsonl
  • .agents/pm/issues/pm-2kkl.toon
  • .agents/pm/tasks/pm-hng2.toon
  • .agents/pm/tasks/pm-knma.toon
  • .agents/pm/tasks/pm-sjea.toon
  • CHANGELOG.md
  • docs/EXTENSIONS.md
  • docs/SDK.md
  • src/core/extensions/loader.ts
  • src/core/extensions/version-compat.ts
  • src/sdk/compose.ts
  • src/sdk/index.ts
  • src/sdk/testing.ts
  • tests/unit/extensions/version-compat.spec.ts
  • tests/unit/sdk/sdk-compose.spec.ts
  • tests/unit/sdk/sdk-index.spec.ts
📝 Walkthrough

Walkthrough

Adds an author-time version-compatibility preflight feature: extracts shared parseComparableVersion/compareComparableVersions/bound-evaluator logic into src/core/extensions/version-compat.ts, refactors loader.ts to delegate to it, adds checkExtensionManifestCompatibility and assertExtensionManifestCompatible to the SDK, covers both with unit tests, and updates docs and agent PM tracking records.

Changes

Version-compat preflight feature

Layer / File(s) Summary
Shared version-compat core module
src/core/extensions/version-compat.ts
Introduces PmVersionBoundKind, PmVersionBoundStatus, PmVersionBoundEvaluation, parseComparableVersion, compareComparableVersions, evaluatePmMinVersionBound, and evaluatePmMaxVersionBound as a pure, shared source of truth for min/max bound evaluation.
Loader delegation to shared core
src/core/extensions/loader.ts
Removes local version-parsing implementations and rewrites evaluatePmMinVersionCompatibility / evaluatePmMaxVersionCompatibility to import and branch on status strings returned by the shared evaluators.
SDK author-time manifest compatibility analyzer
src/sdk/compose.ts
Adds exported types (ExtensionManifestCompatibilityTarget, ...Code, ...Finding, ...Result) and checkExtensionManifestCompatibility, which delegates to shared bound evaluators and returns structured findings with error/warning severity plus a compatible boolean.
SDK CI/test throwing guard and barrel re-export
src/sdk/testing.ts, src/sdk/index.ts
Adds assertExtensionManifestCompatible (throws on blocking findings, returns result otherwise) and re-exports it from the SDK barrel.
Unit tests
tests/unit/extensions/version-compat.spec.ts, tests/unit/sdk/sdk-compose.spec.ts, tests/unit/sdk/sdk-index.spec.ts
Covers all four core helpers, checkExtensionManifestCompatibility (multiple bound scenarios, ordering, warn/block modes), and assertExtensionManifestCompatible (throw/non-throw, multi-finding aggregation, barrel identity).
Documentation and changelog
docs/SDK.md, docs/EXTENSIONS.md, CHANGELOG.md
Adds public-export entries and a Testing Helpers explanation block for both new functions, adds pre-publish verification guidance to EXTENSIONS.md, and records new Added/Changed changelog entries.
Agent PM tracking records
.agents/pm/features/pm-1w0d.toon, .agents/pm/tasks/pm-s*, .agents/pm/history/*, .agents/pm/issues/pm-2kkl.toon
Adds/updates feature, task, and history JSONL records documenting the lifecycle of the version-compat preflight feature and its child tasks.

Sequence Diagram(s)

sequenceDiagram
  participant Author as Extension Author
  participant checkFn as checkExtensionManifestCompatibility
  participant assertFn as assertExtensionManifestCompatible
  participant versionCompat as version-compat.ts
  participant loader as loader.ts

  Author->>checkFn: manifest + target pmVersion
  checkFn->>versionCompat: evaluatePmMinVersionBound(pm_min_version, pmVersion)
  versionCompat-->>checkFn: PmVersionBoundEvaluation {status, allowed}
  checkFn->>versionCompat: evaluatePmMaxVersionBound(pm_max_version, pmVersion, mode)
  versionCompat-->>checkFn: PmVersionBoundEvaluation {status, allowed}
  checkFn-->>Author: ExtensionManifestCompatibilityResult {compatible, findings, pmVersion}

  Author->>assertFn: manifest + target pmVersion
  assertFn->>checkFn: delegate
  checkFn-->>assertFn: result
  assertFn-->>Author: throws Error (blocking findings) OR returns result

  loader->>versionCompat: evaluatePmMinVersionBound / evaluatePmMaxVersionBound
  versionCompat-->>loader: PmVersionBoundEvaluation {status, allowed}
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • unbraind/pm-cli#94: Directly related — that PR extends pm_max_version handling in src/core/extensions/loader.ts, which this PR refactors by extracting min/max evaluation into the new shared src/core/extensions/version-compat.ts module.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 64.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(sdk): add extension version compatibility preflight' directly and clearly describes the main change: adding an extension version compatibility preflight feature to the SDK.
Description check ✅ Passed The description comprehensively explains the changeset, covering the shared core extraction, SDK helpers, documentation updates, PM lineage tracking, and detailed verification evidence that align with the actual file modifications.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

@unbraind, I'll kick off a full review of this PR right away!

✅ Action performed

Full review finished.

@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 left some high level feedback:

  • The loader’s evaluatePmMinVersionCompatibility / evaluatePmMaxVersionCompatibility now mirror evaluatePm*VersionBound status mapping via bespoke switch blocks; consider centralizing warning-string formatting in a helper that consumes PmVersionBoundEvaluation to avoid future drift between SDK and loader outcomes.
  • The error message in assertExtensionManifestCompatible concatenates multiple blocking findings with a single space, which may be hard to scan; joining with newlines or a separator token would make multi-finding failures significantly more readable in CI output.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The loader’s `evaluatePmMinVersionCompatibility` / `evaluatePmMaxVersionCompatibility` now mirror `evaluatePm*VersionBound` status mapping via bespoke `switch` blocks; consider centralizing warning-string formatting in a helper that consumes `PmVersionBoundEvaluation` to avoid future drift between SDK and loader outcomes.
- The error message in `assertExtensionManifestCompatible` concatenates multiple blocking findings with a single space, which may be hard to scan; joining with newlines or a separator token would make multi-finding failures significantly more readable in CI output.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces an author-time version-compatibility preflight to the SDK. It extracts core version parsing and comparison logic from the runtime loader into a new shared, pure module src/core/extensions/version-compat.ts. Using this shared core, it implements checkExtensionManifestCompatibility for synchronous manifest version-bound analysis and assertExtensionManifestCompatible as a throwing test guard, exporting both from the SDK. Comprehensive unit tests, documentation, and changelog updates are also included. No review comments were provided, and the implementation is clean and well-tested.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces an author-time version-compatibility preflight feature for the SDK by extracting version-bound evaluation logic into a shared pure module (src/core/extensions/version-compat.ts). The runtime loader now delegates to this module, and new SDK helpers—checkExtensionManifestCompatibility and assertExtensionManifestCompatible—have been added along with comprehensive unit tests and documentation. The review feedback correctly identifies that non-string values for pm_min_version and pm_max_version are coerced to empty strings and treated as absent, which violates the specification in docs/EXTENSIONS.md stating they should make the manifest malformed. Implementing the suggested type checks and updating the unit tests will ensure alignment with the specification and prevent silent bypasses of compatibility checks.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/core/extensions/version-compat.ts Outdated
Comment on lines +132 to +135
const declared = typeof required === "string" ? required : "";
if (declared.trim().length === 0) {
return { kind: "pm_min_version", status: "absent", allowed: true, required: declared, current: currentVersion };
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

According to the package manifest specification in docs/EXTENSIONS.md, a non-string pm_min_version is invalid and should make the manifest malformed. Currently, evaluatePmMinVersionBound coerces non-string values to an empty string, treating them as absent (and thus allowed). Explicitly checking for non-string types and returning an invalid status ensures alignment with the specification and prevents silent bypasses of compatibility checks.

Suggested change
const declared = typeof required === "string" ? required : "";
if (declared.trim().length === 0) {
return { kind: "pm_min_version", status: "absent", allowed: true, required: declared, current: currentVersion };
}
if (required !== undefined && required !== null && typeof required !== "string") {
return { kind: "pm_min_version", status: "invalid", allowed: false, required: String(required), current: currentVersion };
}
const declared = typeof required === "string" ? required : "";
if (declared.trim().length === 0) {
return { kind: "pm_min_version", status: "absent", allowed: true, required: declared, current: currentVersion };
}

Comment thread src/core/extensions/version-compat.ts Outdated
Comment on lines +171 to +174
const declared = typeof required === "string" ? required : "";
if (declared.trim().length === 0) {
return { kind: "pm_max_version", status: "absent", allowed: true, required: declared, current: currentVersion };
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Similarly to pm_min_version, a non-string pm_max_version should be treated as invalid rather than absent to align with the specification in docs/EXTENSIONS.md and prevent silent bypasses of compatibility checks.

Suggested change
const declared = typeof required === "string" ? required : "";
if (declared.trim().length === 0) {
return { kind: "pm_max_version", status: "absent", allowed: true, required: declared, current: currentVersion };
}
if (required !== undefined && required !== null && typeof required !== "string") {
return { kind: "pm_max_version", status: "invalid", allowed: false, required: String(required), current: currentVersion };
}
const declared = typeof required === "string" ? required : "";
if (declared.trim().length === 0) {
return { kind: "pm_max_version", status: "absent", allowed: true, required: declared, current: currentVersion };
}

Comment on lines +42 to +50
it("is absent for an undefined, empty, or non-string bound", () => {
expect(evaluatePmMinVersionBound(undefined, "2026.6.23").status).toBe("absent");
expect(evaluatePmMinVersionBound(" ", "2026.6.23").status).toBe("absent");
expect(evaluatePmMinVersionBound(7 as unknown as string, "2026.6.23")).toMatchObject({
status: "absent",
allowed: true,
required: "",
});
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Update the test assertions to expect an invalid status for non-string bounds, aligning with the corrected behavior of evaluatePmMinVersionBound and the specification in docs/EXTENSIONS.md.

  it("is absent for an undefined or empty bound", () => {
    expect(evaluatePmMinVersionBound(undefined, "2026.6.23").status).toBe("absent");
    expect(evaluatePmMinVersionBound("   ", "2026.6.23").status).toBe("absent");
  });

  it("is invalid for a non-string bound", () => {
    expect(evaluatePmMinVersionBound(7 as unknown as string, "2026.6.23")).toMatchObject({
      status: "invalid",
      allowed: false,
      required: "7",
    });
  });

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/SDK.md`:
- Around line 893-916: Add tracker references to the Testing Helpers section in
the documentation to establish the lineage of the newly introduced functions.
Include a reference to pm-knma for the checkExtensionManifestCompatibility
function and pm-hng2 for the assertExtensionManifestCompatible function. Place
these tracker references near the top of the section (after the section
introduction or as a comment line) to clearly document which pm items created
each function.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3fcd7e1a-c31f-459c-884e-4fa324fe995e

📥 Commits

Reviewing files that changed from the base of the PR and between 8c8d1c3 and 3f3c259.

📒 Files selected for processing (21)
  • .agents/pm/features/pm-1w0d.toon
  • .agents/pm/history/pm-1w0d.jsonl
  • .agents/pm/history/pm-2kkl.jsonl
  • .agents/pm/history/pm-hng2.jsonl
  • .agents/pm/history/pm-knma.jsonl
  • .agents/pm/history/pm-sjea.jsonl
  • .agents/pm/issues/pm-2kkl.toon
  • .agents/pm/tasks/pm-hng2.toon
  • .agents/pm/tasks/pm-knma.toon
  • .agents/pm/tasks/pm-sjea.toon
  • CHANGELOG.md
  • docs/EXTENSIONS.md
  • docs/SDK.md
  • src/core/extensions/loader.ts
  • src/core/extensions/version-compat.ts
  • src/sdk/compose.ts
  • src/sdk/index.ts
  • src/sdk/testing.ts
  • tests/unit/extensions/version-compat.spec.ts
  • tests/unit/sdk/sdk-compose.spec.ts
  • tests/unit/sdk/sdk-index.spec.ts

Comment thread docs/SDK.md Resolved
Address PR review feedback by treating blank and non-string pm version bounds as invalid in the author-time SDK analyzer, matching the loader manifest parser and docs.

Centralize loader warning formatting around PmVersionBoundEvaluation and separate multiple assertExtensionManifestCompatible blocking findings with semicolons for readable CI output.

Verification: pnpm build; focused version/loader/SDK tests (277 tests); pnpm quality:static; isolated temp PM_PATH/PM_GLOBAL_PATH smoke; node scripts/run-tests.mjs coverage (4952 tests, 100/100/100/100).
@unbraind

Copy link
Copy Markdown
Owner Author

Review feedback addressed in 7a6489d. Please review the latest head again.

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

Address CodeRabbit feedback by naming the pm-knma and pm-hng2 lineage beside the SDK compatibility helper documentation.

Verification: pnpm build; pnpm quality:static; pnpm quality:docs-skills.
@unbraind

Copy link
Copy Markdown
Owner Author

CodeRabbit docs feedback addressed in a9ed3b3. Please review the latest head again.

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

@unbraind, I'll kick off a fresh full review of the latest head incorporating your docs feedback addressed in a9ed3b3!

✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

@unbraind Sure! I'll kick off a full review of the latest head right away.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces an author-time version-compatibility preflight primitive to the SDK. It extracts the version parsing and comparison logic from the runtime loader into a new shared core module (src/core/extensions/version-compat.ts) to ensure that author-time and runtime checks share a single source of truth. It adds checkExtensionManifestCompatibility as a pure synchronous analyzer and assertExtensionManifestCompatible as a throwing CI/test guard, complete with comprehensive unit tests and updated documentation. No review comments were provided, so there is no additional feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request extracts a shared version-compatibility core module (src/core/extensions/version-compat.ts) to serve as a single source of truth for both runtime and author-time version-bound checks. The runtime loader (src/core/extensions/loader.ts) is updated to delegate to this core. Additionally, new author-facing SDK primitives are introduced: checkExtensionManifestCompatibility for synchronous compatibility analysis and assertExtensionManifestCompatible as a throwing test/CI guard. These changes are accompanied by comprehensive unit tests, updated documentation, and changelog entries. No review comments were provided, so there is no additional feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@unbraind
unbraind merged commit d2ab679 into main Jun 23, 2026
16 checks passed
@unbraind
unbraind deleted the feat/sdk-extension-version-compat-preflight branch June 23, 2026 16:01
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