Repository navigation
Stop local setup when another kcap is at or below 1.3.0 - #1666
Conversation
The floor is "newer than 1.3.0", so prereleases toward the next release are admitted. Hub negotiation now carries the version header, which the local server needs to refuse an old watcher or daemon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoEnforce the local installation client version floor
AI Description
Diagram
High-Level Assessment
Files changed (24)
|
Code Review by Qodo
1.
|
| Directory.CreateDirectory(Tmp.PathTo("bin")); | ||
| File.CreateSymbolicLink(Tmp.PathTo("bin", "kcap"), self); |
There was a problem hiding this comment.
3. Tests bypass tempdir filesystem helpers 📘 Rule violation ⚙ Maintainability
LocalClientCopiesTests creates directories and symbolic links with Directory.CreateDirectory and File.CreateSymbolicLink beneath Tmp.PathTo(...) instead of using the TempDir helper methods. These test-created paths are therefore maintained through ad-hoc filesystem calls rather than the helper's supported creation and cleanup API.
Agent Prompt
## Issue description
The tests create temporary directories and symbolic links directly beneath `TempDir` paths, bypassing the required temporary filesystem helper abstraction.
## Fix Focus Areas
- test/Capacitor.Cli.Tests.Unit/LocalEdition/LocalClientCopiesTests.cs[46-47]
- test/Capacitor.Cli.Tests.Unit/LocalEdition/LocalClientCopiesTests.cs[59-60]
## Recommended Fix
Replace direct `Directory.CreateDirectory` and `File.CreateSymbolicLink` calls under `Tmp.Path`/`Tmp.PathTo(...)` with equivalent `TempDir` helper operations, adding a helper for symbolic links if the shared helper does not provide one.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Directories now come from Tmp.CreateDir. TempDir has no symlink helper, so File.CreateSymbolicLink stays.
A server reads a version without the opt-out as the update check being on. An old kcap no longer blocks recovery of an interrupted setup; it is refused once recovery has run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-3495 (Linear only; there is no GitHub issue)
What & why
A local installation needs every kcap that talks to it to be newer than 1.3.0, the last release without the local destination check.
kcap setup --localasks thekcaponPATHand the desktop app's bundled one for their versions and stops withclient_below_floorwhen either is 1.3.0 or older, or reports none. The watcher, daemon and desktop app also sendX-Kcap-Cli-Versionon hub negotiation, which the local server needs in order to refuse a hub client below the floor.Ships with kurrent-io/kcap-server#2505. Merge this PR first: the server refuses a hub negotiation that names no version, and only clients built with this change name one.
Where to look
The floor is "newer than 1.3.0" rather than "at least X", so main's 1.3.1-alpha builds and whatever the next release is called are admitted without knowing its number.
LocalClientFloor.NewestRefusedand the server'sClientFloorMiddleware.NewestRefusedmust move together.Verification
PATHlink to the app's kcap counted once, the running kcap skipped, and a real process printing its version.received "").dotnet publish src/Capacitor.Cli/Capacitor.Cli.csproj -c Releaseprints no IL2xxx/IL3xxx warnings.🤖 Generated with Claude Code
Summary by CodeRabbit
kcapcopies onPATHand in the desktop app. Setup is blocked if a copy is version 1.3.0 or older, or cannot report its version, with guidance on updating it.