Skip to content

feat(auto-update): add managed daemon auto-update - #110

Merged
akiojin merged 1 commit into
developfrom
feature/auto-update
Mar 10, 2026
Merged

feat(auto-update): add managed daemon auto-update#110
akiojin merged 1 commit into
developfrom
feature/auto-update

Conversation

@akiojin

@akiojin akiojin commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a shared managed updater for unity-cli and the C# LSP so daemon startup can self-refresh without overwriting user-installed binaries.
  • Route unityd and lspd through the managed unity-cli copy and surface version metadata so update state is diagnosable from status output.
  • Extend the release workflow and docs with unity-cli-manifest.json, unity-cli cli doctor, and unity-cli cli install so the auto-update path is publishable and discoverable.

Changes

  • src/lsp_manager.rs: refactor the LSP-only downloader into a shared managed binary updater, add install/doctor/status APIs for unity-cli and csharp-lsp, and add test-only remote-skip coverage.
  • src/unityd.rs and src/lspd.rs: start daemons from the managed unity-cli copy, unify tools-root usage, and include managed binary metadata in status responses.
  • src/cli.rs and src/main.rs: add typed unity-cli cli install and unity-cli cli doctor commands.
  • .github/workflows/release.yml: generate and upload unity-cli-manifest.json alongside csharp-lsp-manifest.json.
  • README.md, README.ja.md, docs/tools.md, and RELEASE.md: document managed auto-update behavior and the new CLI entrypoints.
  • src/lsp.rs: set a test-only skip flag so unit tests stay hermetic when daemon startup now checks managed updates.

Testing

  • cargo fmt --all — completes successfully after formatting the updated Rust sources.
  • cargo clippy --all-targets -- -D warnings — exits successfully with no warnings.
  • cargo test --all-targets — passes with 205 passed; 0 failed.

Related Issues / Links

  • None

Checklist

  • Tests added/updated
  • Lint/format passed (cargo clippy, cargo fmt, svelte-check) — cargo fmt --all and cargo clippy --all-targets -- -D warnings passed; svelte-check N/A: no Svelte code
  • Documentation updated (if user-facing change)
  • Migration/backfill plan included (if schema/data change) — N/A: no schema or data migration
  • CHANGELOG impact considered (breaking change flagged in commit) — non-breaking feature; next release notes should mention managed auto-update support

Context

  • unityd is bundled inside unity-cli, so supporting automatic daemon updates required a managed-copy strategy for the CLI itself instead of only refreshing the C# LSP payload.
  • The release pipeline needed a published unity-cli-manifest.json before the runtime updater could resolve checksums and asset URLs for each RID.

Risk / Impact

  • Affected areas: daemon startup paths, managed tool storage under UNITY_CLI_TOOLS_ROOT, release asset generation, and daemon status JSON output.
  • Rollback plan: revert this PR and cut a follow-up release without unity-cli-manifest.json; daemon startup will fall back to the pre-existing non-managed behavior.

Notes

  • unity-cli self-update becomes fully active after the first release that includes unity-cli-manifest.json; until then, unity-cli cli doctor will report the manifest as unavailable on current public releases.

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b6182d19-6552-4be2-869e-12e63aa86cc4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/auto-update

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

@akiojin
akiojin merged commit d6fb4f3 into develop Mar 10, 2026
17 checks passed
@akiojin
akiojin deleted the feature/auto-update branch March 10, 2026 14:12
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