fix(store): land the install_from_url gate, which never reached main - #511
Conversation
#510 shows as merged, but into fix/gate-git-pull-updates -- #508's branch -- rather than main. #508 reached main first, so the sideload gate was left behind on a branch. Same failure as plugins #350/#351, which merged into each other's bases; worth knowing the pattern, because GitHub reports these as MERGED and `gh pr list` shows nothing outstanding. main today has two of the three routes gated: install_plugin (#431/#433) and update_plugin's git branch (#508). install_from_url validates required manifest fields and then installs whatever it found, never comparing the core version. Cherry-picked unchanged from the orphaned branch -- it applies to main with no conflict. TestSideloadGate pins the three cases the other routes pin: refuses a floor above this core leaving nothing behind, still allows a compatible plugin (the guard against a gate that refuses everything), and does not block a 2.0.0 floor on a core reporting an untrustworthy version. Full suite 3725 passed, 6 skipped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughCustom URL plugin installations now check manifest and core compatibility before moving staged files. Incompatible plugins return an error and are removed. Tests cover incompatible, compatible, and untrustworthy core-version cases. ChangesURL Plugin Compatibility Gate
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change prevents sideloaded plugins that require a newer core from being installed while preserving compatible and uncertain-version cases. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant install_from_url
participant compatibility_check
participant staged_plugin
install_from_url->>compatibility_check: Check manifest against core version
compatibility_check-->>install_from_url: Return compatibility result
alt Incompatible plugin
install_from_url->>staged_plugin: Remove staged plugin
install_from_url-->>install_from_url: Return success: False
else Compatible plugin
install_from_url->>staged_plugin: Move into installed directory
install_from_url-->>install_from_url: Return success: True
end
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Up to standards ✅🟢 Issues
|
#510 shows as merged, but into
fix/gate-git-pull-updates— #508's branch — rather thanmain. #508 reached main first, so the sideload gate was left behind on a branch that is no longer in anyone's way.Same failure as plugins #350/#351, which merged into each other's bases. Worth knowing the pattern: GitHub reports these as
MERGED,gh pr listshows nothing outstanding, and the code simply isn't there.State on main today
install_plugin— every path that re-downloadsupdate_plugin's git branchinstall_from_url— sideloadinginstall_from_urlvalidates required manifest fields, warns on version-field and schema problems, then installs whatever it found — never comparing the core version.Verified on main before opening this:
compatibility.checkappears 0 times insideinstall_from_url, andclass TestSideloadGateis absent from the test file.This PR
Cherry-picked unchanged from the orphaned branch — it applies to
mainwith no conflict.TestSideloadGatepins the same three cases the other two routes pin: refuses a floor above this core and leaves nothing behind; still allows a compatible plugin (the guard against a gate that refuses everything and passes the first test); and does not block a2.0.0floor on a core reporting an untrustworthy version.Full suite: 3725 passed, 6 skipped.
Verified on hardware
The install gate this completes was exercised end-to-end on a live rig (core
v3.2.0-55-g154525be) by attempting to installcalendar, which floors at 3.3.0:Refused after download, with no partial directory left behind, and the operation reported as failed rather than silently succeeding.
🤖 Generated with Claude Code
https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
Summary by CodeRabbit