Skip to content

Handle AstroJS rsync - #49

Merged
keypair34 merged 2 commits into
developmentfrom
feature/astro-js-rsync
Aug 17, 2026
Merged

Handle AstroJS rsync#49
keypair34 merged 2 commits into
developmentfrom
feature/astro-js-rsync

Conversation

@keypair34

@keypair34 keypair34 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

Fixes #

Description

Type of Change

  • Bug fix
  • New feature
  • Refactor (no functional change)
  • Documentation update
  • CI / tooling change

How Has This Been Tested?

  • cargo test --all-features
  • Manual testing (smb <command>)

Checklist

  • cargo check --workspace passes
  • cargo clippy --workspace --tests -- -D warnings passes
  • cargo fmt --all -- --check passes
  • No new unwrap() or expect() calls in production code
  • No new mod.rs files introduced
  • New dependencies added to root Cargo.toml and inherited with { workspace = true }
  • Error messages are user-friendly and surfaced to the terminal

Release Notes

  • Handle AstroJS app deployment.

@keypair34 keypair34 self-assigned this Aug 14, 2026

@sigit-code sigit-code 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.

Adds an optional rsync_host override on Project that lets AstroJS (and other non-static-tier) deployments target a specific pinned smbCloud host. rsync_transport now resolves the host via new resolve_rsync_host, which validates the host against known_hosts::is_pinned_host before use. is_pinned_host is a new helper listing the two pinned hosts; strip_project is updated to include the new field.

Reviewers should confirm the pinned-host list in is_pinned_host stays in sync with for_host, and that unpinned runner defaults are still accepted.


Automated review by siGit Code · commit e22401e

Comment thread crates/cli/src/cloud-deploy/mod.rs
Comment thread crates/smbcloud-deploy/src/known_hosts.rs

Copilot AI left a comment

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.

Pull request overview

Adds support for an explicit, server-approved rsync host override on a per-project basis, while ensuring the CLI only connects to hosts with pinned SSH keys (to preserve the deploy security model).

Changes:

  • Added rsync_host to the shared Project model so config/server data can carry an override host.
  • Updated CLI rsync transport construction to resolve an override host (or fall back to the runner default) and reject unpinned hosts.
  • Added an allow-list helper in smbcloud-deploy and adjusted Vite SPA deploy docs to reflect the configurable host.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/smbcloud-model/src/project.rs Adds rsync_host to the project data model for carrying an approved override.
crates/smbcloud-deploy/src/known_hosts.rs Introduces is_pinned_host to support validating host overrides against pinned keys.
crates/cli/src/cloud-deploy/process_migrate.rs Updates project stripping to include the new field.
crates/cli/src/cloud-deploy/process_deploy_vite_spa.rs Updates documentation/comments to reflect “configured host” rsync behavior.
crates/cli/src/cloud-deploy/mod.rs Implements resolve_rsync_host and uses it when building RsyncTransport.
Suppressed comments (1)

crates/cli/src/cloud-deploy/mod.rs:81

  • resolve_rsync_host has tests for override and rejection, but it doesn’t test the default (no configured host) path. Adding a test for None helps prevent regressions when the runner-to-host mapping changes.
    #[test]
    fn unpinned_rsync_host_is_rejected() {
        let result = resolve_rsync_host(Some("example.com"), &Runner::NodeJs);

        assert!(result.is_err());
    }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/smbcloud-deploy/src/known_hosts.rs
Comment thread crates/cli/src/cloud-deploy/mod.rs

@sigit-code sigit-code 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.

This PR adds an optional rsync_host field to Project that lets AstroJS (and future) deployments override the default runner-derived rsync host. A new resolve_rsync_host helper validates the override against a hard-coded allowlist (is_pinned_host) before accepting it. The for_host function already does a similar lookup; is_pinned_host duplicates that list as a separate matches! pattern. strip_project is updated to include the new field, and comment copy in the Vite SPA deploy path is refreshed.


Automated review by siGit Code Review · commit 901b182

Comment thread crates/smbcloud-deploy/src/known_hosts.rs
Comment thread crates/cli/src/cloud-deploy/mod.rs
Comment thread crates/cli/src/cloud-deploy/mod.rs
@keypair34
keypair34 merged commit b22ddce into development Aug 17, 2026
6 checks passed
@keypair34
keypair34 deleted the feature/astro-js-rsync branch August 17, 2026 04:41
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.

4 participants