Skip to content

release - #2316

Merged
charlietlamb merged 5 commits into
mainfrom
dev
Jul 20, 2026
Merged

release#2316
charlietlamb merged 5 commits into
mainfrom
dev

Conversation

@charlietlamb

@charlietlamb charlietlamb commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Fixes catalog plan versioning for renamed plans and prevents crashes when products lack entitlements. Also updates Python deps.

  • Bug Fixes

    • Track renamed plan versions under their target id in sorting/validation to avoid invalid version errors during catalog sync.
    • Tolerate missing product.entitlements when checking feature usage.
  • Dependencies

    • Bump idna to 3.15 in others/python-sdk and others/python-test.
    • Update autumn-sdk lock entry to 0.4.18 in tests.

Written for commit 3824b97. Summary will update on new commits.

Review in cubic

Greptile Summary

This PR fixes version-sequencing logic for renamed catalog plans and adds a defensive null-check for product entitlements. Both changes are targeted bug fixes with accompanying tests.

  • [Bug fixes] catalogPlanDependencies.ts: Introduces a targetId helper (new_plan_id ?? plan_id) and applies it consistently to all byReference map keys, so versioned lookups (e.g. "current@2") and previous-version chain traversal correctly resolve to the canonical plan ID rather than the old source ID when a plan is renamed.
  • [Bug fixes] previewUpdateCatalog.ts: Guards product.entitlements with ?? [] before calling .some(), preventing a runtime crash when entitlements are absent on a FullProduct.
  • [Improvements] New unit test covers the renamed-plan scenario end-to-end through validateCatalogPlanVersionTargets; lock files updated with an idna patch bump (3.11 → 3.15).

Confidence Score: 4/5

The TypeScript logic changes are correct and well-tested; the only open question is the autumn-sdk version going from 1.0.0 to 0.4.18 in the Python test lock file.

Both server-side fixes are narrow, well-reasoned, and backed by new unit tests that pass through the critical paths. The version drop in the Python test lock file (1.0.0 → 0.4.18) is unexplained from the diff alone — if unintentional it could affect consumers of the SDK, but it has no impact on server behavior.

others/python-test/uv.lock — confirm the autumn-sdk version change is deliberate.

Important Files Changed

Filename Overview
server/src/internal/catalog/actions/catalogPlanDependencies.ts Introduces targetId helper (new_plan_id ?? plan_id) and uses it consistently for all map keys, fixing version-sequencing logic for renamed plans.
server/src/internal/catalog/actions/previewUpdateCatalog/previewUpdateCatalog.ts Defensive null-coalesce on product.entitlements prevents a runtime crash when entitlements is undefined.
server/tests/unit/catalog/catalog-plan-dependencies.test.ts Adds new_plan_id to the plan factory and a new concurrent test validating that renamed plans sequence versions under their target ID.
others/python-sdk/uv.lock Updates idna dependency from 3.11 to 3.15; routine patch bump.
others/python-test/uv.lock Updates idna from 3.11 to 3.15 and reflects autumn-sdk version as 0.4.18 (previously 1.0.0) — worth confirming the version change is intentional.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["CatalogPlanParams\nplan_id, new_plan_id?, version"] --> B["targetId\nnew_plan_id ?? plan_id"]
    B --> C["byReference key\nid@version"]
    C --> D{version gt 1?}
    D -- Yes --> E["Lookup id@version-1"]
    E --> F["visit previous"]
    D -- No --> G["Resolve license deps"]
    F --> G
    G --> H["Sorted topological output"]
    H --> I["validateVersionTargets\nid = targetId"]
    I --> J{already exists?}
    J -- Yes --> K["Skip"]
    J -- No --> L["expected = latestById + 1"]
    L --> M{version matches?}
    M -- No --> N["Throw RecaseError"]
    M -- Yes --> O["Update existing and latestById"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["CatalogPlanParams\nplan_id, new_plan_id?, version"] --> B["targetId\nnew_plan_id ?? plan_id"]
    B --> C["byReference key\nid@version"]
    C --> D{version gt 1?}
    D -- Yes --> E["Lookup id@version-1"]
    E --> F["visit previous"]
    D -- No --> G["Resolve license deps"]
    F --> G
    G --> H["Sorted topological output"]
    H --> I["validateVersionTargets\nid = targetId"]
    I --> J{already exists?}
    J -- Yes --> K["Skip"]
    J -- No --> L["expected = latestById + 1"]
    L --> M{version matches?}
    M -- No --> N["Throw RecaseError"]
    M -- Yes --> O["Update existing and latestById"]
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
others/python-test/uv.lock:27
**SDK version appears to decrease**

`autumn-sdk` version goes from `1.0.0` to `0.4.18` in this lock file. Since the version in an editable lock entry is derived from the package's own `pyproject.toml`, this means `others/python-sdk/pyproject.toml` now declares `0.4.18`. Given the PR is titled "release", was `1.0.0` an accidental forward-bump that is being corrected here, or is this an unintended downgrade?

Reviews (1): Last reviewed commit: "Merge pull request #2315 from useautumn/..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

dependabot Bot and others added 5 commits July 20, 2026 19:20
Bumps [idna](https://github.com/kjd/idna) from 3.11 to 3.15.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](kjd/idna@v3.11...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [idna](https://github.com/kjd/idna) from 3.11 to 3.15.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](kjd/idna@v3.11...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fix: support versioned Mobbin catalog sync
@capy-ai

capy-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@@ -25,7 +25,7 @@ wheels = [

[[package]]
name = "autumn-sdk"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 SDK version appears to decrease

autumn-sdk version goes from 1.0.0 to 0.4.18 in this lock file. Since the version in an editable lock entry is derived from the package's own pyproject.toml, this means others/python-sdk/pyproject.toml now declares 0.4.18. Given the PR is titled "release", was 1.0.0 an accidental forward-bump that is being corrected here, or is this an unintended downgrade?

Prompt To Fix With AI
This is a comment left during a code review.
Path: others/python-test/uv.lock
Line: 27

Comment:
**SDK version appears to decrease**

`autumn-sdk` version goes from `1.0.0` to `0.4.18` in this lock file. Since the version in an editable lock entry is derived from the package's own `pyproject.toml`, this means `others/python-sdk/pyproject.toml` now declares `0.4.18`. Given the PR is titled "release", was `1.0.0` an accidental forward-bump that is being corrected here, or is this an unintended downgrade?

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@charlietlamb
charlietlamb merged commit 924e59e into main Jul 20, 2026
19 of 21 checks 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.

1 participant