Skip to content

Four#270

Merged
Nanle-code merged 4 commits into
Nanle-code:masterfrom
Maxwell316:four
Jun 1, 2026
Merged

Four#270
Nanle-code merged 4 commits into
Nanle-code:masterfrom
Maxwell316:four

Conversation

@Maxwell316
Copy link
Copy Markdown
Contributor

Pull Request: Feature Batch — Issues #240, #245, #248, #251

Summary

  • Deploy dry-run mode (--dry-run) validates the full deployment path without submitting any transaction, printing an actionable deployment plan with fee estimates and warnings.
  • Template metadata fields adds license, repository, homepage, and documentation URL fields to template entries, exposed via CLI publish flags and shown in template show.
  • Plugin update command adds starforge plugin update [name] to upgrade installed plugins from their registered sources without manual reinstalls.
  • Template publish auditing requires README.md, validates semver strings for version and version constraints, and checks that cli_version_min <= cli_version_max — all with actionable error messages.

Changes

src/commands/deploy.rscloses #240

  • Added --dry-run flag to DeployArgs
  • Added run_dry_run() function that runs 4 sequential checks:
    1. WASM artifact path + magic-byte validation
    2. Wallet existence in local config
    3. Network connectivity and account XLM balance via Horizon
    4. Soroban fee estimation via RPC simulation
  • Prints a deployment plan summary with warnings and the exact stellar contract deploy command to run

src/utils/templates.rs + src/commands/template.rscloses #251, #248

  • Added license, repository, homepage, documentation optional fields to TemplateEntry (serde-defaulted for backward compatibility)
  • Exposed all four as --license, --repository, --homepage, --documentation flags on starforge template publish
  • Displayed in template show and template publish output
  • Added validate_template_structure_with_constraints() — the full audit entry-point used by publish_template_versioned:
    • Requires README.md (actionable error)
    • Validates version, cli_version_min, cli_version_max as valid semver
    • Rejects cli_version_min > cli_version_max
    • Error messages name the exact field and explain the fix
  • make_valid_template() test helper now creates README.md
  • New tests: missing README, bad version semver, bad constraint semver, min > max

src/plugins/registry.rs + src/commands/plugin.rscloses #245

  • Added version: Option<String> and installed_at: Option<String> to InstalledPlugin (serde-defaulted)
  • install_plugin() now records installed_at timestamp (ISO-8601 UTC)
  • Added Update { name: Option<String>, yes: bool } variant to PluginCommands
  • update() function:
    • For crates.io sources: runs cargo install --force
    • For other trusted sources: compares library mtime to installed_at and refreshes registry if newer
    • Local-path plugins: reported as unupdatable with guidance
    • Unknown sources: blocked unless --yes is passed
    • Reports updated / skipped / failed counts

Test Plan

  • cargo build succeeds without warnings
  • cargo test — all tests pass (no regressions)
  • starforge deploy --wasm <file> --dry-run — prints plan, no transaction submitted
  • starforge template publish <path> --name t --description d --author a --license MIT --repository https://github.com/org/repo — stores and displays metadata
  • starforge template show <name> — displays license/repository/homepage/docs
  • starforge template publish <path> --name t --description d --author a with no README.md — fails with actionable error
  • starforge plugin update — checks all plugins and reports status
  • starforge plugin update <name> — updates single named plugin

closes #240
closes #245
closes #248
closes #251

Maxwell316 and others added 4 commits June 1, 2026 15:37
Add --dry-run flag to deploy command that validates WASM artifact path,
wallet existence, network connectivity via Horizon, and estimates Soroban
fees via RPC simulation — all without submitting any transaction.

Prints a numbered 4-step deployment plan with pass/fail indicators,
estimated fee, XLM balance, WASM hash, and actionable warnings. Exits
cleanly so users can review before going live, reducing accidental
mainnet deployments.

Closes Nanle-code#240

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…data (Nanle-code#251)

Extend TemplateEntry with optional license (SPDX identifier), repository,
homepage, and documentation URL fields. All fields are serde-defaulted for
backward compatibility with existing registries.

Expose all four as CLI flags on `starforge template publish`. Display them
in `template show` and the publish confirmation output so users can quickly
assess template transparency and trustworthiness.

Closes Nanle-code#251

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add `starforge plugin update [name]` subcommand that detects whether
installed plugins need updating and upgrades them without a manual
reinstall.

- Adds optional `version` and `installed_at` fields to InstalledPlugin
  (serde-defaulted for backward compatibility)
- For crates.io sources: runs `cargo install --force`
- For other trusted sources: compares library mtime to last-install
  timestamp and refreshes the registry entry when newer
- Local-path plugins are reported as unupdatable with guidance
- Unknown/untrusted sources require --yes to proceed
- Preserves trust level and source configuration across updates
- Reports updated / skipped / failed counts with actionable messages

Closes Nanle-code#245

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Maxwell316 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Nanle-code Nanle-code merged commit f91d7ef into Nanle-code:master Jun 1, 2026
0 of 4 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

2 participants