Skip to content

feat(cli,sdk): add --fs option for filesystem selection#178

Open
h4x3rotab wants to merge 3 commits intomainfrom
feat/deploy-fs-option
Open

feat(cli,sdk): add --fs option for filesystem selection#178
h4x3rotab wants to merge 3 commits intomainfrom
feat/deploy-fs-option

Conversation

@h4x3rotab
Copy link
Contributor

Summary

  • Add --fs CLI flag to phala deploy accepting ext4 or zfs (default: zfs)
  • Add storage_fs to the compose_file object in ProvisionCvmRequestSchema and LooseAppComposeSchema
  • Thread the option through the CLI handler into the app-compose payload, which is the source of truth for filesystem selection in dstack

Files changed

File Change
js/src/types/app_compose.ts Add storage_fs to LooseAppComposeSchema
js/src/actions/cvms/provision_cvm.ts Add storage_fs to provision request compose_file schema
cli/src/commands/deploy/command.ts Add --fs option definition and schema field
cli/src/commands/deploy/handler.ts Thread fs into composeFile.storage_fs in buildProvisionPayload()
cli/src/commands/deploy/handler.test.ts Add 3 tests for storage_fs handling (ext4, zfs, unspecified)

Test plan

  • bun test cli/src/commands/deploy/handler.test.ts — 37 tests pass
  • phala deploy --help shows --fs option
  • Live deploy with --fs ext4 confirmed compose_file.storage_fs: "ext4" in CVM info response

Note: The top-level storage_fs in the GET CVM info response is currently hardcoded to "zfs" on the backend side (known bug). The compose_file.storage_fs field is the actual source of truth and is correctly set.

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

📋 Check Results

✨ JS SDK - Code Formatting

Show format check results
✓ No formatting issues found

🔍 JS SDK - TypeScript Type Check

Show type check output
$ tsc --noEmit

🧪 JS SDK - Test Results

Show test output
$ vitest --run --exclude '**/*.e2e.test.ts'

�[7m�[1m�[36m RUN �[39m�[22m�[27m �[36mv1.6.1�[39m �[90m/home/runner/work/phala-cloud/phala-cloud/js�[39m

 �[32m✓�[39m src/client.test.ts �[2m (�[22m�[2m45 tests�[22m�[2m)�[22m�[90m 38�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/blockchains/deploy_app_auth.test.ts �[2m (�[22m�[2m27 tests�[22m�[2m)�[22m�[90m 43�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/blockchains/add_compose_hash.test.ts �[2m (�[22m�[2m34 tests�[22m�[2m)�[22m�[90m 166�[2mms�[22m�[39m
�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould add compose hash successfully with default parameters�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould handle custom timeout�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould use custom schema when provided�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould return raw data when schema is false�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould throw when custom schema validation fails�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould work with wallet client authentication�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould work with both clients provided�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould skip prerequisite checks when configured�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould use retry mechanism when enabled�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould handle progress callbacks�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould return success result when operation succeeds�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould work with custom schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould return raw data when schema is false�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould work without parameters�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould work with empty parameters object�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSchema Flexibility�[2m > �[22m�[2mshould allow extra fields in transaction receipt for forward compatibility�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSchema Flexibility�[2m > �[22m�[2mshould handle ComposeHashAdded event when present�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mType Inference�[2m > �[22m�[2mshould infer correct types for default schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mType Inference�[2m > �[22m�[2mshould infer correct types for custom schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mType Inference�[2m > �[22m�[2mshould infer unknown type when schema is false�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version Type Inference�[2m > �[22m�[2mshould infer correct SafeResult types for default schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version Type Inference�[2m > �[22m�[2mshould infer correct SafeResult types for custom schema�[22m�[39m
[]

 �[32m✓�[39m src/utils/define-action.test.ts �[2m (�[22m�[2m24 tests�[22m�[2m)�[22m�[90m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/define-action.type.test.ts �[2m (�[22m�[2m20 tests�[22m�[2m)�[22m�[90m 25�[2mms�[22m�[39m
 �[32m✓�[39m src/types/cvm_id.test.ts �[2m (�[22m�[2m53 tests�[22m�[2m)�[22m�[90m 40�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/errors.test.ts �[2m (�[22m�[2m28 tests�[22m�[2m)�[22m�[90m 19�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/hostname.test.ts �[2m (�[22m�[2m53 tests�[22m�[2m)�[22m�[90m 24�[2mms�[22m�[39m
 �[32m✓�[39m src/parse_dotenv.test.ts �[2m (�[22m�[2m71 tests�[22m�[2m)�[22m�[90m 20�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/provision_cvm_compose_file_update.test.ts �[2m (�[22m�[2m29 tests�[22m�[2m)�[22m�[90m 43�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/get_current_user.test.ts �[2m (�[22m�[2m14 tests�[22m�[2m)�[22m�[90m 25�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/commit_cvm_compose_file_update.test.ts �[2m (�[22m�[2m12 tests�[22m�[2m)�[22m�[90m 21�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/watch_cvm_state.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 57�[2mms�[22m�[39m
 �[33m❯�[39m src/actions/cvms/get_cvm_info.test.ts �[2m (�[22m�[2m11 tests�[22m �[2m|�[22m �[31m6 failed�[39m�[2m)�[22m�[90m 64�[2mms�[22m�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with id�[39m
�[31m     → expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with uuid�[39m
�[31m     → expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with app_id (adds prefix)�[39m
�[31m     → expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with instance_id (40-char hex detected as app_id)�[39m
�[31m     → expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with custom instance_id�[39m
�[31m     → expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22msafeGetCvmInfo�[2m > �[22mshould return SafeResult on success�[39m
�[31m     → expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_compose_file.test.ts �[2m (�[22m�[2m10 tests�[22m�[2m)�[22m�[90m 24�[2mms�[22m�[39m
 �[32m✓�[39m src/version-inference.type.test.ts �[2m (�[22m�[2m17 tests�[22m�[2m)�[22m�[90m 75�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/provision_cvm.test.ts �[2m (�[22m�[2m14 tests�[22m�[2m)�[22m�[90m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/client.extend.type.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 7�[2mms�[22m�[39m
 �[32m✓�[39m src/version-inference.runtime.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 21�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/kms/get_app_env_encrypt_pubkey.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 18�[2mms�[22m�[39m
 �[33m❯�[39m src/actions/cvms/get_cvm_list.test.ts �[2m (�[22m�[2m6 tests�[22m �[2m|�[22m �[31m3 failed�[39m�[2m)�[22m�[90m 44�[2mms�[22m�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_list.test.ts�[2m > �[22mgetCvmList�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with query params�[39m
�[31m     → expected { Object (items, total, ...) } to deeply equal { Object (items, total, ...) }�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_list.test.ts�[2m > �[22mgetCvmList�[2m > �[22medge cases�[2m > �[22mshould work without parameters�[39m
�[31m     → expected { Object (items, total, ...) } to deeply equal { Object (items, total, ...) }�[39m
�[31m   �[33m❯�[31m src/actions/cvms/get_cvm_list.test.ts�[2m > �[22mgetCvmList�[2m > �[22msafeGetCvmList�[2m > �[22mshould return SafeResult on success�[39m
�[31m     → expected { Object (items, total, ...) } to deeply equal { Object (items, total, ...) }�[39m
 �[32m✓�[39m src/actions/cvms/commit_cvm_provision.test.ts �[2m (�[22m�[2m7 tests�[22m�[2m)�[22m�[90m 18�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/kms/get_kms_list.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/kms/get_kms_info.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 21�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_stats.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/validate-parameters.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/client.extend.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/ssh_keys/create_ssh_key.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/shutdown_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/get_available_nodes.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 25�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/restart_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/types/app_compose.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/start_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 22�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_containers_stats.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/stop_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/ssh_keys/delete_ssh_key.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 25�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/ssh_keys/sync_github_ssh_keys.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/delete_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 18�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_state.test.ts �[2m (�[22m�[2m4 tests�[22m�[2m)�[22m�[90m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/as-hex.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/refresh_cvm_instance_ids.test.ts �[2m (�[22m�[2m2 tests�[22m�[2m)�[22m�[90m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/refresh_cvm_instance_id.test.ts �[2m (�[22m�[2m2 tests�[22m�[2m)�[22m�[90m 7�[2mms�[22m�[39m

�[31m⎯⎯⎯⎯⎯⎯⎯�[1m�[7m Failed Tests 9 �[27m�[22m⎯⎯⎯⎯⎯⎯⎯�[39m

�[31m�[1m�[7m FAIL �[27m�[22m�[39m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with id
�[31m�[1mAssertionError�[22m: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m

- Expected
+ Received

  Object {
    "app_id": "app-123",
    "base_image": "ubuntu:20.04",
    "contract_address": "0x9876543210987654321098765432109876543210",
    "dapp_dashboard_url": "https://dashboard.example.com",
    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "disk_size": 40,
    "encrypted_env_pubkey": "0x1234567890abcdef",
    "gateway_domain": "gateway.example.com",
    "id": 123,
    "in_progress": false,
    "instance_id": "instance-123",
    "kms_info": Object {
      "chain": Object {
        "blockExplorers": Object {
          "default": Object {
            "apiUrl": "https://api.etherscan.io/api",
            "name": "Etherscan",
            "url": "https://etherscan.io",
          },
        },
        "blockTime": 12000,
        "contracts": Object {
          "ensUniversalResolver": Object {
            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
            "blockCreated": 23085558,
          },
          "multicall3": Object {
            "address": "0xca11bde05977b3631167028862be2a173976ca11",
            "blockCreated": 14353601,
          },
        },
+       "extend": [Function anonymous],
+       "fees": undefined,
+       "formatters": undefined,
        "id": 1,
        "name": "Ethereum",
        "nativeCurrency": Object {
          "decimals": 18,
          "name": "Ether",
          "symbol": "ETH",
        },
        "rpcUrls": Object {
          "default": Object {
            "http": Array [
              "https://eth.merkle.io",
            ],
          },
        },
+       "serializers": undefined,
      },
      "chain_id": 1,
      "gateway_app_id": "gateway-123",
      "id": "kms-123",
      "kms_contract_address": "0x1234567890123456789012345678901234567890",
      "slug": "test-kms",
      "url": "https://kms.example.com",
      "version": "1.0.0",
    },
    "listed": true,
    "memory": 4096,
    "name": "test-cvm",
    "project_id": "project-123",
    "project_type": "webapp",
    "public_logs": true,
    "public_sysinfo": true,
    "public_urls": Array [
      Object {
        "app": "https://app.example.com",
        "instance": "https://instance.example.com",
      },
    ],
    "scheduled_delete_at": "2024-12-31T23:59:59Z",
    "status": "running",
    "syslog_endpoint": "https://syslog.example.com",
    "teepod": Object {
      "id": 456,
      "name": "test-node",
      "region_identifier": "us-west-1",
    },
    "teepod_id": 456,
    "vcpu": 2,
    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",
  }

�[36m �[2m❯�[22m src/actions/cvms/get_cvm_info.test.ts:�[2m113:22�[22m�[39m
    �[90m111| �[39m
    �[90m112| �[39m      �[34mexpect�[39m(mockGet)�[33m.�[39m�[34mtoHaveBeenCalledWith�[39m(�[32m"/cvms/test-cvm-id"�[39m)�[33m;�[39m
    �[90m113| �[39m      �[34mexpect�[39m(result)�[33m.�[39m�[34mtoEqual�[39m(mockCvmInfoData)�[33m;�[39m
    �[90m   | �[39m                     �[31m^�[39m
    �[90m114| �[39m      �[34mexpect�[39m((result �[35mas�[39m �[33mCvmDetailV20251028�[39m)�[33m.�[39mname)�[33m.�[39m�[34mtoBe�[39m(�[32m"test-cvm"�[39m)�[33m;�[39m
    �[90m115| �[39m    })�[33m;�[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_info.test.ts,title=src/actions/cvms/get_cvm_info.test.ts > getCvmInfo > API routing & basic success > should call correct endpoint with id,line=113,column=22::AssertionError: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "app_id": "app-123",%0A    "base_image": "ubuntu:20.04",%0A    "contract_address": "0x9876543210987654321098765432109876543210",%0A    "dapp_dashboard_url": "https://dashboard.example.com",%0A    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",%0A    "disk_size": 40,%0A    "encrypted_env_pubkey": "0x1234567890abcdef",%0A    "gateway_domain": "gateway.example.com",%0A    "id": 123,%0A    "in_progress": false,%0A    "instance_id": "instance-123",%0A    "kms_info": Object {%0A      "chain": Object {%0A        "blockExplorers": Object {%0A          "default": Object {%0A            "apiUrl": "https://api.etherscan.io/api",%0A            "name": "Etherscan",%0A            "url": "https://etherscan.io",%0A          },%0A        },%0A        "blockTime": 12000,%0A        "contracts": Object {%0A          "ensUniversalResolver": Object {%0A            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A            "blockCreated": 23085558,%0A          },%0A          "multicall3": Object {%0A            "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A            "blockCreated": 14353601,%0A          },%0A        },%0A+       "extend": [Function anonymous],%0A+       "fees": undefined,%0A+       "formatters": undefined,%0A        "id": 1,%0A        "name": "Ethereum",%0A        "nativeCurrency": Object {%0A          "decimals": 18,%0A          "name": "Ether",%0A          "symbol": "ETH",%0A        },%0A        "rpcUrls": Object {%0A          "default": Object {%0A            "http": Array [%0A              "https://eth.merkle.io",%0A            ],%0A          },%0A        },%0A+       "serializers": undefined,%0A      },%0A      "chain_id": 1,%0A      "gateway_app_id": "gateway-123",%0A      "id": "kms-123",%0A      "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A      "slug": "test-kms",%0A      "url": "https://kms.example.com",%0A      "version": "1.0.0",%0A    },%0A    "listed": true,%0A    "memory": 4096,%0A    "name": "test-cvm",%0A    "project_id": "project-123",%0A    "project_type": "webapp",%0A    "public_logs": true,%0A    "public_sysinfo": true,%0A    "public_urls": Array [%0A      Object {%0A        "app": "https://app.example.com",%0A        "instance": "https://instance.example.com",%0A      },%0A    ],%0A    "scheduled_delete_at": "2024-12-31T23:59:59Z",%0A    "status": "running",%0A    "syslog_endpoint": "https://syslog.example.com",%0A    "teepod": Object {%0A      "id": 456,%0A      "name": "test-node",%0A      "region_identifier": "us-west-1",%0A    },%0A    "teepod_id": 456,%0A    "vcpu": 2,%0A    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_info.test.ts:113:22%0A%0A
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/9]⎯�[22m�[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_info.test.ts,title=src/actions/cvms/get_cvm_info.test.ts > getCvmInfo > API routing & basic success > should call correct endpoint with uuid,line=124,column=22::AssertionError: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "app_id": "app-123",%0A    "base_image": "ubuntu:20.04",%0A    "contract_address": "0x9876543210987654321098765432109876543210",%0A    "dapp_dashboard_url": "https://dashboard.example.com",%0A    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",%0A    "disk_size": 40,%0A    "encrypted_env_pubkey": "0x1234567890abcdef",%0A    "gateway_domain": "gateway.example.com",%0A    "id": 123,%0A    "in_progress": false,%0A    "instance_id": "instance-123",%0A    "kms_info": Object {%0A      "chain": Object {%0A        "blockExplorers": Object {%0A          "default": Object {%0A            "apiUrl": "https://api.etherscan.io/api",%0A            "name": "Etherscan",%0A            "url": "https://etherscan.io",%0A          },%0A        },%0A        "blockTime": 12000,%0A        "contracts": Object {%0A          "ensUniversalResolver": Object {%0A            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A            "blockCreated": 23085558,%0A          },%0A          "multicall3": Object {%0A            "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A            "blockCreated": 14353601,%0A          },%0A        },%0A+       "extend": [Function anonymous],%0A+       "fees": undefined,%0A+       "formatters": undefined,%0A        "id": 1,%0A        "name": "Ethereum",%0A        "nativeCurrency": Object {%0A          "decimals": 18,%0A          "name": "Ether",%0A          "symbol": "ETH",%0A        },%0A        "rpcUrls": Object {%0A          "default": Object {%0A            "http": Array [%0A              "https://eth.merkle.io",%0A            ],%0A          },%0A        },%0A+       "serializers": undefined,%0A      },%0A      "chain_id": 1,%0A      "gateway_app_id": "gateway-123",%0A      "id": "kms-123",%0A      "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A      "slug": "test-kms",%0A      "url": "https://kms.example.com",%0A      "version": "1.0.0",%0A    },%0A    "listed": true,%0A    "memory": 4096,%0A    "name": "test-cvm",%0A    "project_id": "project-123",%0A    "project_type": "webapp",%0A    "public_logs": true,%0A    "public_sysinfo": true,%0A    "public_urls": Array [%0A      Object {%0A        "app": "https://app.example.com",%0A        "instance": "https://instance.example.com",%0A      },%0A    ],%0A    "scheduled_delete_at": "2024-12-31T23:59:59Z",%0A    "status": "running",%0A    "syslog_endpoint": "https://syslog.example.com",%0A    "teepod": Object {%0A      "id": 456,%0A      "name": "test-node",%0A      "region_identifier": "us-west-1",%0A    },%0A    "teepod_id": 456,%0A    "vcpu": 2,%0A    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_info.test.ts:124:22%0A%0A
�[31m�[1m�[7m FAIL �[27m�[22m�[39m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with uuid
�[31m�[1mAssertionError�[22m: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m

- Expected
+ Received

  Object {
    "app_id": "app-123",
    "base_image": "ubuntu:20.04",
    "contract_address": "0x9876543210987654321098765432109876543210",
    "dapp_dashboard_url": "https://dashboard.example.com",
    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "disk_size": 40,
    "encrypted_env_pubkey": "0x1234567890abcdef",
    "gateway_domain": "gateway.example.com",
    "id": 123,
    "in_progress": false,
    "instance_id": "instance-123",
    "kms_info": Object {
      "chain": Object {
        "blockExplorers": Object {
          "default": Object {
            "apiUrl": "https://api.etherscan.io/api",
            "name": "Etherscan",
            "url": "https://etherscan.io",
          },
        },
        "blockTime": 12000,
        "contracts": Object {
          "ensUniversalResolver": Object {
            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
            "blockCreated": 23085558,
          },
          "multicall3": Object {
            "address": "0xca11bde05977b3631167028862be2a173976ca11",
            "blockCreated": 14353601,
          },
        },
+       "extend": [Function anonymous],
+       "fees": undefined,
+       "formatters": undefined,
        "id": 1,
        "name": "Ethereum",
        "nativeCurrency": Object {
          "decimals": 18,
          "name": "Ether",
          "symbol": "ETH",
        },
        "rpcUrls": Object {
          "default": Object {
            "http": Array [
              "https://eth.merkle.io",
            ],
          },
        },
+       "serializers": undefined,
      },
      "chain_id": 1,
      "gateway_app_id": "gateway-123",
      "id": "kms-123",
      "kms_contract_address": "0x1234567890123456789012345678901234567890",
      "slug": "test-kms",
      "url": "https://kms.example.com",
      "version": "1.0.0",
    },
    "listed": true,
    "memory": 4096,
    "name": "test-cvm",
    "project_id": "project-123",
    "project_type": "webapp",
    "public_logs": true,
    "public_sysinfo": true,
    "public_urls": Array [
      Object {
        "app": "https://app.example.com",
        "instance": "https://instance.example.com",
      },
    ],
    "scheduled_delete_at": "2024-12-31T23:59:59Z",
    "status": "running",
    "syslog_endpoint": "https://syslog.example.com",
    "teepod": Object {
      "id": 456,
      "name": "test-node",
      "region_identifier": "us-west-1",
    },
    "teepod_id": 456,
    "vcpu": 2,
    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",
  }

�[36m �[2m❯�[22m src/actions/cvms/get_cvm_info.test.ts:�[2m124:22�[22m�[39m
    �[90m122| �[39m      �[90m// UUID dashes are removed during transformation�[39m
    �[90m123| �[39m      �[34mexpect�[39m(mockGet)�[33m.�[39m�[34mtoHaveBeenCalledWith�[39m(�[32m"/cvms/123e4567e89b42d3a456�[39m…
    �[90m124| �[39m      �[34mexpect�[39m(result)�[33m.�[39m�[34mtoEqual�[39m(mockCvmInfoData)�[33m;�[39m
    �[90m   | �[39m                     �[31m^�[39m
    �[90m125| �[39m    })�[33m;�[39m
    �[90m126| �[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_info.test.ts,title=src/actions/cvms/get_cvm_info.test.ts > getCvmInfo > API routing & basic success > should call correct endpoint with app_id (adds prefix),line=134,column=22::AssertionError: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "app_id": "app-123",%0A    "base_image": "ubuntu:20.04",%0A    "contract_address": "0x9876543210987654321098765432109876543210",%0A    "dapp_dashboard_url": "https://dashboard.example.com",%0A    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",%0A    "disk_size": 40,%0A    "encrypted_env_pubkey": "0x1234567890abcdef",%0A    "gateway_domain": "gateway.example.com",%0A    "id": 123,%0A    "in_progress": false,%0A    "instance_id": "instance-123",%0A    "kms_info": Object {%0A      "chain": Object {%0A        "blockExplorers": Object {%0A          "default": Object {%0A            "apiUrl": "https://api.etherscan.io/api",%0A            "name": "Etherscan",%0A            "url": "https://etherscan.io",%0A          },%0A        },%0A        "blockTime": 12000,%0A        "contracts": Object {%0A          "ensUniversalResolver": Object {%0A            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A            "blockCreated": 23085558,%0A          },%0A          "multicall3": Object {%0A            "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A            "blockCreated": 14353601,%0A          },%0A        },%0A+       "extend": [Function anonymous],%0A+       "fees": undefined,%0A+       "formatters": undefined,%0A        "id": 1,%0A        "name": "Ethereum",%0A        "nativeCurrency": Object {%0A          "decimals": 18,%0A          "name": "Ether",%0A          "symbol": "ETH",%0A        },%0A        "rpcUrls": Object {%0A          "default": Object {%0A            "http": Array [%0A              "https://eth.merkle.io",%0A            ],%0A          },%0A        },%0A+       "serializers": undefined,%0A      },%0A      "chain_id": 1,%0A      "gateway_app_id": "gateway-123",%0A      "id": "kms-123",%0A      "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A      "slug": "test-kms",%0A      "url": "https://kms.example.com",%0A      "version": "1.0.0",%0A    },%0A    "listed": true,%0A    "memory": 4096,%0A    "name": "test-cvm",%0A    "project_id": "project-123",%0A    "project_type": "webapp",%0A    "public_logs": true,%0A    "public_sysinfo": true,%0A    "public_urls": Array [%0A      Object {%0A        "app": "https://app.example.com",%0A        "instance": "https://instance.example.com",%0A      },%0A    ],%0A    "scheduled_delete_at": "2024-12-31T23:59:59Z",%0A    "status": "running",%0A    "syslog_endpoint": "https://syslog.example.com",%0A    "teepod": Object {%0A      "id": 456,%0A      "name": "test-node",%0A      "region_identifier": "us-west-1",%0A    },%0A    "teepod_id": 456,%0A    "vcpu": 2,%0A    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_info.test.ts:134:22%0A%0A
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/9]⎯�[22m�[39m

�[31m�[1m�[7m FAIL �[27m�[22m�[39m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with app_id (adds prefix)
�[31m�[1mAssertionError�[22m: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m

- Expected
+ Received

  Object {
    "app_id": "app-123",
    "base_image": "ubuntu:20.04",
    "contract_address": "0x9876543210987654321098765432109876543210",
    "dapp_dashboard_url": "https://dashboard.example.com",
    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "disk_size": 40,
    "encrypted_env_pubkey": "0x1234567890abcdef",
    "gateway_domain": "gateway.example.com",
    "id": 123,
    "in_progress": false,
    "instance_id": "instance-123",
    "kms_info": Object {
      "chain": Object {
        "blockExplorers": Object {
          "default": Object {
            "apiUrl": "https://api.etherscan.io/api",
            "name": "Etherscan",
            "url": "https://etherscan.io",
          },
        },
        "blockTime": 12000,
        "contracts": Object {
          "ensUniversalResolver": Object {
            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
            "blockCreated": 23085558,
          },
          "multicall3": Object {
            "address": "0xca11bde05977b3631167028862be2a173976ca11",
            "blockCreated": 14353601,
          },
        },
+       "extend": [Function anonymous],
+       "fees": undefined,
+       "formatters": undefined,
        "id": 1,
        "name": "Ethereum",
        "nativeCurrency": Object {
          "decimals": 18,
          "name": "Ether",
          "symbol": "ETH",
        },
        "rpcUrls": Object {
          "default": Object {
            "http": Array [
              "https://eth.merkle.io",
            ],
          },
        },
+       "serializers": undefined,
      },
      "chain_id": 1,
      "gateway_app_id": "gateway-123",
      "id": "kms-123",
      "kms_contract_address": "0x1234567890123456789012345678901234567890",
      "slug": "test-kms",
      "url": "https://kms.example.com",
      "version": "1.0.0",
    },
    "listed": true,
    "memory": 4096,
    "name": "test-cvm",
    "project_id": "project-123",
    "project_type": "webapp",
    "public_logs": true,
    "public_sysinfo": true,
    "public_urls": Array [
      Object {
        "app": "https://app.example.com",
        "instance": "https://instance.example.com",
      },
    ],
    "scheduled_delete_at": "2024-12-31T23:59:59Z",
    "status": "running",
    "syslog_endpoint": "https://syslog.example.com",
    "teepod": Object {
      "id": 456,
      "name": "test-node",
      "region_identifier": "us-west-1",
    },
    "teepod_id": 456,
    "vcpu": 2,
    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",
  }

�[36m �[2m❯�[22m src/actions/cvms/get_cvm_info.test.ts:�[2m134:22�[22m�[39m
    �[90m132| �[39m
    �[90m133| �[39m      �[34mexpect�[39m(mockGet)�[33m.�[39m�[34mtoHaveBeenCalledWith�[39m(�[32m`/cvms/app_�[39m�[36m${�[39mapp_id�[36m}�[39m�[32m`�[39m)�[33m;�[39m
    �[90m134| �[39m      �[34mexpect�[39m(result)�[33m.�[39m�[34mtoEqual�[39m(mockCvmInfoData)�[33m;�[39m
    �[90m   | �[39m                     �[31m^�[39m
    �[90m135| �[39m    })�[33m;�[39m
    �[90m136| �[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_info.test.ts,title=src/actions/cvms/get_cvm_info.test.ts > getCvmInfo > API routing & basic success > should call correct endpoint with instance_id (40-char hex detected as app_id),line=145,column=22::AssertionError: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "app_id": "app-123",%0A    "base_image": "ubuntu:20.04",%0A    "contract_address": "0x9876543210987654321098765432109876543210",%0A    "dapp_dashboard_url": "https://dashboard.example.com",%0A    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",%0A    "disk_size": 40,%0A    "encrypted_env_pubkey": "0x1234567890abcdef",%0A    "gateway_domain": "gateway.example.com",%0A    "id": 123,%0A    "in_progress": false,%0A    "instance_id": "instance-123",%0A    "kms_info": Object {%0A      "chain": Object {%0A        "blockExplorers": Object {%0A          "default": Object {%0A            "apiUrl": "https://api.etherscan.io/api",%0A            "name": "Etherscan",%0A            "url": "https://etherscan.io",%0A          },%0A        },%0A        "blockTime": 12000,%0A        "contracts": Object {%0A          "ensUniversalResolver": Object {%0A            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A            "blockCreated": 23085558,%0A          },%0A          "multicall3": Object {%0A            "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A            "blockCreated": 14353601,%0A          },%0A        },%0A+       "extend": [Function anonymous],%0A+       "fees": undefined,%0A+       "formatters": undefined,%0A        "id": 1,%0A        "name": "Ethereum",%0A        "nativeCurrency": Object {%0A          "decimals": 18,%0A          "name": "Ether",%0A          "symbol": "ETH",%0A        },%0A        "rpcUrls": Object {%0A          "default": Object {%0A            "http": Array [%0A              "https://eth.merkle.io",%0A            ],%0A          },%0A        },%0A+       "serializers": undefined,%0A      },%0A      "chain_id": 1,%0A      "gateway_app_id": "gateway-123",%0A      "id": "kms-123",%0A      "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A      "slug": "test-kms",%0A      "url": "https://kms.example.com",%0A      "version": "1.0.0",%0A    },%0A    "listed": true,%0A    "memory": 4096,%0A    "name": "test-cvm",%0A    "project_id": "project-123",%0A    "project_type": "webapp",%0A    "public_logs": true,%0A    "public_sysinfo": true,%0A    "public_urls": Array [%0A      Object {%0A        "app": "https://app.example.com",%0A        "instance": "https://instance.example.com",%0A      },%0A    ],%0A    "scheduled_delete_at": "2024-12-31T23:59:59Z",%0A    "status": "running",%0A    "syslog_endpoint": "https://syslog.example.com",%0A    "teepod": Object {%0A      "id": 456,%0A      "name": "test-node",%0A      "region_identifier": "us-west-1",%0A    },%0A    "teepod_id": 456,%0A    "vcpu": 2,%0A    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_info.test.ts:145:22%0A%0A
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/9]⎯�[22m�[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_info.test.ts,title=src/actions/cvms/get_cvm_info.test.ts > getCvmInfo > API routing & basic success > should call correct endpoint with custom instance_id,line=155,column=22::AssertionError: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "app_id": "app-123",%0A    "base_image": "ubuntu:20.04",%0A    "contract_address": "0x9876543210987654321098765432109876543210",%0A    "dapp_dashboard_url": "https://dashboard.example.com",%0A    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",%0A    "disk_size": 40,%0A    "encrypted_env_pubkey": "0x1234567890abcdef",%0A    "gateway_domain": "gateway.example.com",%0A    "id": 123,%0A    "in_progress": false,%0A    "instance_id": "instance-123",%0A    "kms_info": Object {%0A      "chain": Object {%0A        "blockExplorers": Object {%0A          "default": Object {%0A            "apiUrl": "https://api.etherscan.io/api",%0A            "name": "Etherscan",%0A            "url": "https://etherscan.io",%0A          },%0A        },%0A        "blockTime": 12000,%0A        "contracts": Object {%0A          "ensUniversalResolver": Object {%0A            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A            "blockCreated": 23085558,%0A          },%0A          "multicall3": Object {%0A            "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A            "blockCreated": 14353601,%0A          },%0A        },%0A+       "extend": [Function anonymous],%0A+       "fees": undefined,%0A+       "formatters": undefined,%0A        "id": 1,%0A        "name": "Ethereum",%0A        "nativeCurrency": Object {%0A          "decimals": 18,%0A          "name": "Ether",%0A          "symbol": "ETH",%0A        },%0A        "rpcUrls": Object {%0A          "default": Object {%0A            "http": Array [%0A              "https://eth.merkle.io",%0A            ],%0A          },%0A        },%0A+       "serializers": undefined,%0A      },%0A      "chain_id": 1,%0A      "gateway_app_id": "gateway-123",%0A      "id": "kms-123",%0A      "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A      "slug": "test-kms",%0A      "url": "https://kms.example.com",%0A      "version": "1.0.0",%0A    },%0A    "listed": true,%0A    "memory": 4096,%0A    "name": "test-cvm",%0A    "project_id": "project-123",%0A    "project_type": "webapp",%0A    "public_logs": true,%0A    "public_sysinfo": true,%0A    "public_urls": Array [%0A      Object {%0A        "app": "https://app.example.com",%0A        "instance": "https://instance.example.com",%0A      },%0A    ],%0A    "scheduled_delete_at": "2024-12-31T23:59:59Z",%0A    "status": "running",%0A    "syslog_endpoint": "https://syslog.example.com",%0A    "teepod": Object {%0A      "id": 456,%0A      "name": "test-node",%0A      "region_identifier": "us-west-1",%0A    },%0A    "teepod_id": 456,%0A    "vcpu": 2,%0A    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_info.test.ts:155:22%0A%0A
�[31m�[1m�[7m FAIL �[27m�[22m�[39m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with instance_id (40-char hex detected as app_id)
�[31m�[1mAssertionError�[22m: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m

- Expected
+ Received

  Object {
    "app_id": "app-123",
    "base_image": "ubuntu:20.04",
    "contract_address": "0x9876543210987654321098765432109876543210",
    "dapp_dashboard_url": "https://dashboard.example.com",
    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "disk_size": 40,
    "encrypted_env_pubkey": "0x1234567890abcdef",
    "gateway_domain": "gateway.example.com",
    "id": 123,
    "in_progress": false,
    "instance_id": "instance-123",
    "kms_info": Object {
      "chain": Object {
        "blockExplorers": Object {
          "default": Object {
            "apiUrl": "https://api.etherscan.io/api",
            "name": "Etherscan",
            "url": "https://etherscan.io",
          },
        },
        "blockTime": 12000,
        "contracts": Object {
          "ensUniversalResolver": Object {
            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
            "blockCreated": 23085558,
          },
          "multicall3": Object {
            "address": "0xca11bde05977b3631167028862be2a173976ca11",
            "blockCreated": 14353601,
          },
        },
+       "extend": [Function anonymous],
+       "fees": undefined,
+       "formatters": undefined,
        "id": 1,
        "name": "Ethereum",
        "nativeCurrency": Object {
          "decimals": 18,
          "name": "Ether",
          "symbol": "ETH",
        },
        "rpcUrls": Object {
          "default": Object {
            "http": Array [
              "https://eth.merkle.io",
            ],
          },
        },
+       "serializers": undefined,
      },
      "chain_id": 1,
      "gateway_app_id": "gateway-123",
      "id": "kms-123",
      "kms_contract_address": "0x1234567890123456789012345678901234567890",
      "slug": "test-kms",
      "url": "https://kms.example.com",
      "version": "1.0.0",
    },
    "listed": true,
    "memory": 4096,
    "name": "test-cvm",
    "project_id": "project-123",
    "project_type": "webapp",
    "public_logs": true,
    "public_sysinfo": true,
    "public_urls": Array [
      Object {
        "app": "https://app.example.com",
        "instance": "https://instance.example.com",
      },
    ],
    "scheduled_delete_at": "2024-12-31T23:59:59Z",
    "status": "running",
    "syslog_endpoint": "https://syslog.example.com",
    "teepod": Object {
      "id": 456,
      "name": "test-node",
      "region_identifier": "us-west-1",
    },
    "teepod_id": 456,
    "vcpu": 2,
    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",
  }

�[36m �[2m❯�[22m src/actions/cvms/get_cvm_info.test.ts:�[2m145:22�[22m�[39m
    �[90m143| �[39m
    �[90m144| �[39m      �[34mexpect�[39m(mockGet)�[33m.�[39m�[34mtoHaveBeenCalledWith�[39m(�[32m`/cvms/app_�[39m�[36m${�[39minstance_id�[36m}�[39m�[32m`�[39m)�[33m;�[39m
    �[90m145| �[39m      �[34mexpect�[39m(result)�[33m.�[39m�[34mtoEqual�[39m(mockCvmInfoData)�[33m;�[39m
    �[90m   | �[39m                     �[31m^�[39m
    �[90m146| �[39m    })�[33m;�[39m
    �[90m147| �[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_info.test.ts,title=src/actions/cvms/get_cvm_info.test.ts > getCvmInfo > safeGetCvmInfo > should return SafeResult on success,line=224,column=29::AssertionError: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "app_id": "app-123",%0A    "base_image": "ubuntu:20.04",%0A    "contract_address": "0x9876543210987654321098765432109876543210",%0A    "dapp_dashboard_url": "https://dashboard.example.com",%0A    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",%0A    "disk_size": 40,%0A    "encrypted_env_pubkey": "0x1234567890abcdef",%0A    "gateway_domain": "gateway.example.com",%0A    "id": 123,%0A    "in_progress": false,%0A    "instance_id": "instance-123",%0A    "kms_info": Object {%0A      "chain": Object {%0A        "blockExplorers": Object {%0A          "default": Object {%0A            "apiUrl": "https://api.etherscan.io/api",%0A            "name": "Etherscan",%0A            "url": "https://etherscan.io",%0A          },%0A        },%0A        "blockTime": 12000,%0A        "contracts": Object {%0A          "ensUniversalResolver": Object {%0A            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A            "blockCreated": 23085558,%0A          },%0A          "multicall3": Object {%0A            "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A            "blockCreated": 14353601,%0A          },%0A        },%0A+       "extend": [Function anonymous],%0A+       "fees": undefined,%0A+       "formatters": undefined,%0A        "id": 1,%0A        "name": "Ethereum",%0A        "nativeCurrency": Object {%0A          "decimals": 18,%0A          "name": "Ether",%0A          "symbol": "ETH",%0A        },%0A        "rpcUrls": Object {%0A          "default": Object {%0A            "http": Array [%0A              "https://eth.merkle.io",%0A            ],%0A          },%0A        },%0A+       "serializers": undefined,%0A      },%0A      "chain_id": 1,%0A      "gateway_app_id": "gateway-123",%0A      "id": "kms-123",%0A      "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A      "slug": "test-kms",%0A      "url": "https://kms.example.com",%0A      "version": "1.0.0",%0A    },%0A    "listed": true,%0A    "memory": 4096,%0A    "name": "test-cvm",%0A    "project_id": "project-123",%0A    "project_type": "webapp",%0A    "public_logs": true,%0A    "public_sysinfo": true,%0A    "public_urls": Array [%0A      Object {%0A        "app": "https://app.example.com",%0A        "instance": "https://instance.example.com",%0A      },%0A    ],%0A    "scheduled_delete_at": "2024-12-31T23:59:59Z",%0A    "status": "running",%0A    "syslog_endpoint": "https://syslog.example.com",%0A    "teepod": Object {%0A      "id": 456,%0A      "name": "test-node",%0A      "region_identifier": "us-west-1",%0A    },%0A    "teepod_id": 456,%0A    "vcpu": 2,%0A    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_info.test.ts:224:29%0A%0A
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/9]⎯�[22m�[39m

�[31m�[1m�[7m FAIL �[27m�[22m�[39m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with custom instance_id
�[31m�[1mAssertionError�[22m: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m

- Expected
+ Received

  Object {
    "app_id": "app-123",
    "base_image": "ubuntu:20.04",
    "contract_address": "0x9876543210987654321098765432109876543210",
    "dapp_dashboard_url": "https://dashboard.example.com",
    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "disk_size": 40,
    "encrypted_env_pubkey": "0x1234567890abcdef",
    "gateway_domain": "gateway.example.com",
    "id": 123,
    "in_progress": false,
    "instance_id": "instance-123",
    "kms_info": Object {
      "chain": Object {
        "blockExplorers": Object {
          "default": Object {
            "apiUrl": "https://api.etherscan.io/api",
            "name": "Etherscan",
            "url": "https://etherscan.io",
          },
        },
        "blockTime": 12000,
        "contracts": Object {
          "ensUniversalResolver": Object {
            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
            "blockCreated": 23085558,
          },
          "multicall3": Object {
            "address": "0xca11bde05977b3631167028862be2a173976ca11",
            "blockCreated": 14353601,
          },
        },
+       "extend": [Function anonymous],
+       "fees": undefined,
+       "formatters": undefined,
        "id": 1,
        "name": "Ethereum",
        "nativeCurrency": Object {
          "decimals": 18,
          "name": "Ether",
          "symbol": "ETH",
        },
        "rpcUrls": Object {
          "default": Object {
            "http": Array [
              "https://eth.merkle.io",
            ],
          },
        },
+       "serializers": undefined,
      },
      "chain_id": 1,
      "gateway_app_id": "gateway-123",
      "id": "kms-123",
      "kms_contract_address": "0x1234567890123456789012345678901234567890",
      "slug": "test-kms",
      "url": "https://kms.example.com",
      "version": "1.0.0",
    },
    "listed": true,
    "memory": 4096,
    "name": "test-cvm",
    "project_id": "project-123",
    "project_type": "webapp",
    "public_logs": true,
    "public_sysinfo": true,
    "public_urls": Array [
      Object {
        "app": "https://app.example.com",
        "instance": "https://instance.example.com",
      },
    ],
    "scheduled_delete_at": "2024-12-31T23:59:59Z",
    "status": "running",
    "syslog_endpoint": "https://syslog.example.com",
    "teepod": Object {
      "id": 456,
      "name": "test-node",
      "region_identifier": "us-west-1",
    },
    "teepod_id": 456,
    "vcpu": 2,
    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",
  }

�[36m �[2m❯�[22m src/actions/cvms/get_cvm_info.test.ts:�[2m155:22�[22m�[39m
    �[90m153| �[39m
    �[90m154| �[39m      �[34mexpect�[39m(mockGet)�[33m.�[39m�[34mtoHaveBeenCalledWith�[39m(�[32m`/cvms/�[39m�[36m${�[39minstance_id�[36m}�[39m�[32m`�[39m)�[33m;�[39m
    �[90m155| �[39m      �[34mexpect�[39m(result)�[33m.�[39m�[34mtoEqual�[39m(mockCvmInfoData)�[33m;�[39m
    �[90m   | �[39m                     �[31m^�[39m
    �[90m156| �[39m    })�[33m;�[39m
    �[90m157| �[39m  })�[33m;�[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_list.test.ts,title=src/actions/cvms/get_cvm_list.test.ts > getCvmList > API routing & basic success > should call correct endpoint with query params,line=140,column=22::AssertionError: expected { Object (items, total, ...) } to deeply equal { Object (items, total, ...) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "items": Array [%0A      Object {%0A        "allow_upgrade": true,%0A        "billing_period": "monthly",%0A        "dapp_dashboard_url": "https://dashboard.example.com",%0A        "disk_size": 40,%0A        "gateway_domain": "gateway.example.com",%0A        "hosted": Object {%0A          "app_id": "app-123",%0A          "app_url": "https://app.example.com",%0A          "boot_error": null,%0A          "boot_progress": null,%0A          "configuration": Object {},%0A          "exited_at": null,%0A          "id": "vm-123",%0A          "image_version": "1.0.0",%0A          "instance_id": "instance-123",%0A          "name": "test-vm",%0A          "shutdown_progress": null,%0A          "status": "running",%0A          "uptime": "24h",%0A        },%0A        "in_progress": false,%0A        "kms_info": Object {%0A          "chain": Object {%0A            "blockExplorers": Object {%0A              "default": Object {%0A                "apiUrl": "https://api.etherscan.io/api",%0A                "name": "Etherscan",%0A                "url": "https://etherscan.io",%0A              },%0A            },%0A            "blockTime": 12000,%0A            "contracts": Object {%0A              "ensUniversalResolver": Object {%0A                "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A                "blockCreated": 23085558,%0A              },%0A              "multicall3": Object {%0A                "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A                "blockCreated": 14353601,%0A              },%0A            },%0A+           "extend": [Function anonymous],%0A+           "fees": undefined,%0A+           "formatters": undefined,%0A            "id": 1,%0A            "name": "Ethereum",%0A            "nativeCurrency": Object {%0A              "decimals": 18,%0A              "name": "Ether",%0A              "symbol": "ETH",%0A            },%0A            "rpcUrls": Object {%0A              "default": Object {%0A                "http": Array [%0A                  "https://eth.merkle.io",%0A                ],%0A              },%0A            },%0A+           "serializers": undefined,%0A          },%0A          "chain_id": 1,%0A          "gateway_app_id": "gateway-123",%0A          "id": "kms-123",%0A          "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A          "slug": "test-kms",%0A          "url": "https://kms.example.com",%0A          "version": "1.0.0",%0A        },%0A        "listed": true,%0A        "managed_user": Object {%0A          "id": 1,%0A          "username": "testuser",%0A        },%0A        "memory": 4096,%0A        "name": "test-cvm",%0A        "node": Object {%0A          "id": 1,%0A          "name": "test-node",%0A          "region_identifier": "us-west-1",%0A        },%0A        "project_id": "project-123",%0A        "project_type": "webapp",%0A        "public_urls": Array [%0A          Object {%0A            "app": "https://app.example.com",%0A            "instance": "https://instance.example.com",%0A          },%0A        ],%0A        "status": "running",%0A        "syslog_endpoint": "https://syslog.example.com",%0A        "vcpu": 2,%0A      },%0A    ],%0A    "page": 1,%0A    "page_size": 10,%0A    "pages": 1,%0A    "total": 1,%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_list.test.ts:140:22%0A%0A
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/9]⎯�[22m�[39m


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_list.test.ts,title=src/actions/cvms/get_cvm_list.test.ts > getCvmList > edge cases > should work without parameters,line=161,column=22::AssertionError: expected { Object (items, total, ...) } to deeply equal { Object (items, total, ...) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "items": Array [%0A      Object {%0A        "allow_upgrade": true,%0A        "billing_period": "monthly",%0A        "dapp_dashboard_url": "https://dashboard.example.com",%0A        "disk_size": 40,%0A        "gateway_domain": "gateway.example.com",%0A        "hosted": Object {%0A          "app_id": "app-123",%0A          "app_url": "https://app.example.com",%0A          "boot_error": null,%0A          "boot_progress": null,%0A          "configuration": Object {},%0A          "exited_at": null,%0A          "id": "vm-123",%0A          "image_version": "1.0.0",%0A          "instance_id": "instance-123",%0A          "name": "test-vm",%0A          "shutdown_progress": null,%0A          "status": "running",%0A          "uptime": "24h",%0A        },%0A        "in_progress": false,%0A        "kms_info": Object {%0A          "chain": Object {%0A            "blockExplorers": Object {%0A              "default": Object {%0A                "apiUrl": "https://api.etherscan.io/api",%0A                "name": "Etherscan",%0A                "url": "https://etherscan.io",%0A              },%0A            },%0A            "blockTime": 12000,%0A            "contracts": Object {%0A              "ensUniversalResolver": Object {%0A                "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A                "blockCreated": 23085558,%0A              },%0A              "multicall3": Object {%0A                "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A                "blockCreated": 14353601,%0A              },%0A            },%0A+           "extend": [Function anonymous],%0A+           "fees": undefined,%0A+           "formatters": undefined,%0A            "id": 1,%0A            "name": "Ethereum",%0A            "nativeCurrency": Object {%0A              "decimals": 18,%0A              "name": "Ether",%0A              "symbol": "ETH",%0A            },%0A            "rpcUrls": Object {%0A              "default": Object {%0A                "http": Array [%0A                  "https://eth.merkle.io",%0A                ],%0A              },%0A            },%0A+           "serializers": undefined,%0A          },%0A          "chain_id": 1,%0A          "gateway_app_id": "gateway-123",%0A          "id": "kms-123",%0A          "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A          "slug": "test-kms",%0A          "url": "https://kms.example.com",%0A          "version": "1.0.0",%0A        },%0A        "listed": true,%0A        "managed_user": Object {%0A          "id": 1,%0A          "username": "testuser",%0A        },%0A        "memory": 4096,%0A        "name": "test-cvm",%0A        "node": Object {%0A          "id": 1,%0A          "name": "test-node",%0A          "region_identifier": "us-west-1",%0A        },%0A        "project_id": "project-123",%0A        "project_type": "webapp",%0A        "public_urls": Array [%0A          Object {%0A            "app": "https://app.example.com",%0A            "instance": "https://instance.example.com",%0A          },%0A        ],%0A        "status": "running",%0A        "syslog_endpoint": "https://syslog.example.com",%0A        "vcpu": 2,%0A      },%0A    ],%0A    "page": 1,%0A    "page_size": 10,%0A    "pages": 1,%0A    "total": 1,%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_list.test.ts:161:22%0A%0A
�[31m�[1m�[7m FAIL �[27m�[22m�[39m src/actions/cvms/get_cvm_info.test.ts�[2m > �[22mgetCvmInfo�[2m > �[22msafeGetCvmInfo�[2m > �[22mshould return SafeResult on success
�[31m�[1mAssertionError�[22m: expected { id: 123, name: 'test-cvm', …(25) } to deeply equal { id: 123, name: 'test-cvm', …(25) }�[39m

- Expected
+ Received

  Object {
    "app_id": "app-123",
    "base_image": "ubuntu:20.04",
    "contract_address": "0x9876543210987654321098765432109876543210",
    "dapp_dashboard_url": "https://dashboard.example.com",
    "deployer_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "disk_size": 40,
    "encrypted_env_pubkey": "0x1234567890abcdef",
    "gateway_domain": "gateway.example.com",
    "id": 123,
    "in_progress": false,
    "instance_id": "instance-123",
    "kms_info": Object {
      "chain": Object {
        "blockExplorers": Object {
          "default": Object {
            "apiUrl": "https://api.etherscan.io/api",
            "name": "Etherscan",
            "url": "https://etherscan.io",
          },
        },
        "blockTime": 12000,
        "contracts": Object {
          "ensUniversalResolver": Object {
            "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
            "blockCreated": 23085558,
          },
          "multicall3": Object {
            "address": "0xca11bde05977b3631167028862be2a173976ca11",
            "blockCreated": 14353601,
          },
        },
+       "extend": [Function anonymous],
+       "fees": undefined,
+       "formatters": undefined,
        "id": 1,
        "name": "Ethereum",
        "nativeCurrency": Object {
          "decimals": 18,
          "name": "Ether",
          "symbol": "ETH",
        },
        "rpcUrls": Object {
          "default": Object {
            "http": Array [
              "https://eth.merkle.io",
            ],
          },
        },
+       "serializers": undefined,
      },
      "chain_id": 1,
      "gateway_app_id": "gateway-123",
      "id": "kms-123",
      "kms_contract_address": "0x1234567890123456789012345678901234567890",
      "slug": "test-kms",
      "url": "https://kms.example.com",
      "version": "1.0.0",
    },
    "listed": true,
    "memory": 4096,
    "name": "test-cvm",
    "project_id": "project-123",
    "project_type": "webapp",
    "public_logs": true,
    "public_sysinfo": true,
    "public_urls": Array [
      Object {
        "app": "https://app.example.com",
        "instance": "https://instance.example.com",
      },
    ],
    "scheduled_delete_at": "2024-12-31T23:59:59Z",
    "status": "running",
    "syslog_endpoint": "https://syslog.example.com",
    "teepod": Object {
      "id": 456,
      "name": "test-node",
      "region_identifier": "us-west-1",
    },
    "teepod_id": 456,
    "vcpu": 2,
    "vm_uuid": "123e4567-e89b-42d3-a456-556642440000",
  }

�[36m �[2m❯�[22m src/actions/cvms/get_cvm_info.test.ts:�[2m224:29�[22m�[39m
    �[90m222| �[39m      �[34mexpect�[39m(result�[33m.�[39msuccess)�[33m.�[39m�[34mtoBe�[39m(�[35mtrue�[39m)�[33m;�[39m
    �[90m223| �[39m      �[35mif�[39m (result�[33m.�[39msuccess) {
    �[90m224| �[39m        �[34mexpect�[39m(result�[33m.�[39mdata)�[33m.�[39m�[34mtoEqual�[39m(mockCvmInfoData)�[33m;�[39m
    �[90m   | �[39m                            �[31m^�[39m
    �[90m225| �[39m        �[34mexpect�[39m((result�[33m.�[39mdata �[35mas�[39m �[33mCvmDetailV20251028�[39m)�[33m.�[39mname)�[33m.�[39m�[34mtoBe�[39m(�[32m"test-cv�[39m…
    �[90m226| �[39m      }


::error file=/home/runner/work/phala-cloud/phala-cloud/js/src/actions/cvms/get_cvm_list.test.ts,title=src/actions/cvms/get_cvm_list.test.ts > getCvmList > safeGetCvmList > should return SafeResult on success,line=184,column=29::AssertionError: expected { Object (items, total, ...) } to deeply equal { Object (items, total, ...) }%0A%0A- Expected%0A+ Received%0A%0A  Object {%0A    "items": Array [%0A      Object {%0A        "allow_upgrade": true,%0A        "billing_period": "monthly",%0A        "dapp_dashboard_url": "https://dashboard.example.com",%0A        "disk_size": 40,%0A        "gateway_domain": "gateway.example.com",%0A        "hosted": Object {%0A          "app_id": "app-123",%0A          "app_url": "https://app.example.com",%0A          "boot_error": null,%0A          "boot_progress": null,%0A          "configuration": Object {},%0A          "exited_at": null,%0A          "id": "vm-123",%0A          "image_version": "1.0.0",%0A          "instance_id": "instance-123",%0A          "name": "test-vm",%0A          "shutdown_progress": null,%0A          "status": "running",%0A          "uptime": "24h",%0A        },%0A        "in_progress": false,%0A        "kms_info": Object {%0A          "chain": Object {%0A            "blockExplorers": Object {%0A              "default": Object {%0A                "apiUrl": "https://api.etherscan.io/api",%0A                "name": "Etherscan",%0A                "url": "https://etherscan.io",%0A              },%0A            },%0A            "blockTime": 12000,%0A            "contracts": Object {%0A              "ensUniversalResolver": Object {%0A                "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",%0A                "blockCreated": 23085558,%0A              },%0A              "multicall3": Object {%0A                "address": "0xca11bde05977b3631167028862be2a173976ca11",%0A                "blockCreated": 14353601,%0A              },%0A            },%0A+           "extend": [Function anonymous],%0A+           "fees": undefined,%0A+           "formatters": undefined,%0A            "id": 1,%0A            "name": "Ethereum",%0A            "nativeCurrency": Object {%0A              "decimals": 18,%0A              "name": "Ether",%0A              "symbol": "ETH",%0A            },%0A            "rpcUrls": Object {%0A              "default": Object {%0A                "http": Array [%0A                  "https://eth.merkle.io",%0A                ],%0A              },%0A            },%0A+           "serializers": undefined,%0A          },%0A          "chain_id": 1,%0A          "gateway_app_id": "gateway-123",%0A          "id": "kms-123",%0A          "kms_contract_address": "0x1234567890123456789012345678901234567890",%0A          "slug": "test-kms",%0A          "url": "https://kms.example.com",%0A          "version": "1.0.0",%0A        },%0A        "listed": true,%0A        "managed_user": Object {%0A          "id": 1,%0A          "username": "testuser",%0A        },%0A        "memory": 4096,%0A        "name": "test-cvm",%0A        "node": Object {%0A          "id": 1,%0A          "name": "test-node",%0A          "region_identifier": "us-west-1",%0A        },%0A        "project_id": "project-123",%0A        "project_type": "webapp",%0A        "public_urls": Array [%0A          Object {%0A            "app": "https://app.example.com",%0A            "instance": "https://instance.example.com",%0A          },%0A        ],%0A        "status": "running",%0A        "syslog_endpoint": "https://syslog.example.com",%0A        "vcpu": 2,%0A      },%0A    ],%0A    "page": 1,%0A    "page_size": 10,%0A    "pages": 1,%0A    "total": 1,%0A  }%0A%0A ❯ src/actions/cvms/get_cvm_list.test.ts:184:29%0A%0A
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/9]⎯�[22m�[39m

�[31m�[1m�[7m FAIL �[27m�[22m�[39m src/actions/cvms/get_cvm_list.test.ts�[2m > �[22mgetCvmList�[2m > �[22mAPI routing & basic success�[2m > �[22mshould call correct endpoint with query params
�[31m�[1mAssertionError�[22m: expected { Object (items, total, ...) } to deeply equal { Object (items, total, ...) }�[39m

- Expected
+ Received

  Object {
    "items": Array [
      Object {
        "allow_upgrade": true,
        "billing_period": "monthly",
        "dapp_dashboard_url": "https://dashboard.example.com",
        "disk_size": 40,
        "gateway_domain": "gateway.example.com",
        "hosted": Object {
          "app_id": "app-123",
          "app_url": "https://app.example.com",
          "boot_error": null,
          "boot_progress": null,
          "configuration": Object {},
          "exited_at": null,
          "id": "vm-123",
          "image_version": "1.0.0",
          "instance_id": "instance-123",
          "name": "test-vm",
          "shutdown_progress": null,
          "status": "running",
          "uptime": "24h",
        },
        "in_progress": false,
        "kms_info": Object {
          "chain": Object {
            "blockExplorers": Object {
              "default": Object {
                "apiUrl": "https://api.etherscan.io/api",
                "name": "Etherscan",
                "url": "https://etherscan.io",
              },
            },
            "blockTime": 12000,
            "contracts": Object {
              "ensUniversalResolver": Object {
                "address": "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
                "blockCreated": 23085558,
              },
              "multicall3": Object {
                "address": "0xca11bde05977b3631167028862be2a173976ca11",
                "blockCreated": 14353601,
              },
            },
+           "extend": [Function anonymous],
+           "fees": undefined,
+           "formatters": undefined,
            "id": 1,
            "name": "Ethereum",
            "nativeCurrency": Object {
              "decimals": 18,
              "name": "Ether",
              "symbol": "ETH",
            },
            "rpcUrls": Object {
              "default": Object {
                "http": Array [
                  "https:/...*[Comment body truncated]*

Comment on lines 635 to 644
composeFile.pre_launch_script = preLaunchScriptContent;
}

if (options.fs) {
composeFile.storage_fs = options.fs;
}

const payload: Record<string, unknown> = {
name: name,
compose_file: composeFile,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: When updating a CVM via phala deploy --cvm-id, the --fs option is silently ignored because updateCvm doesn't update the app_compose.storage_fs field.
Severity: MEDIUM

Suggested Fix

In the updateCvm function, update the app_compose object with the filesystem option before sending the update request. Add the following code: if (validatedOptions.fs) { app_compose.storage_fs = validatedOptions.fs; }.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: cli/src/commands/deploy/handler.ts#L635-L644

Potential issue: The `updateCvm` function, used for updating existing CVMs, does not
propagate the `fs` option to the `app_compose` object before sending the update request.
While new deployments correctly handle this option by setting `composeFile.storage_fs`,
the update path is missing this logic. As a result, if a user attempts to change the
filesystem on an existing CVM using the `--fs` flag (e.g., `phala deploy --cvm-id <id>
--fs ext4`), the flag is silently ignored, and the filesystem remains unchanged,
contrary to user expectation.

Did we get this right? 👍 / 👎 to inform future reviews.

h4x3rotab and others added 3 commits March 4, 2026 06:39
…tion

Allow users to specify ext4 or zfs filesystem when provisioning a CVM
via `phala deploy --fs ext4`. The storage_fs field is set in the
app-compose (compose_file) payload, which is the source of truth for
filesystem selection in dstack.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Leechael Leechael force-pushed the feat/deploy-fs-option branch from 0cfdfd1 to 15c3940 Compare March 3, 2026 23:07
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.

2 participants