Just how firm is the long relationship between Cuba and Russia?

There's room for wondering in the aftermath of the historic three-day visit that Soviet leader Mikhail Gorbachev paid to Havana this week.Despite the new Cuban-Soviet friendship treaty and other outward expressions of solidarity between Gorbachev and Cuban dictator Fidel Castro, there certainly are plenty of sources of friction that must have been explored privately.

For openers, there's the severe financial drain that Cuba continues to exert on Russia at a time when the Soviet economy is ailing. In foreign aid alone, that drain comes to more than $5 billion a year. Nor has Cuba been meeting its export obligations to Russia and its satellites in East Europe.

The bottom line is that Russia buys more than half of all of Cuba's sugar exports. This makes Havana almost totally dependent on Moscow.

Yet Castro is not averse to biting the hand that feeds him. At a time when Gorbachev seems to be tolerating dissent, Castro still suppresses it. Likewise, Castro, who has never allowed competitive elections during his 30-year reign, has openly criticized Gorbachev's reforms on the grounds that they borrow too much from capitalism. In fact, in a long introductory speech before Gorbachev's departing address to Cubans, Castro said it would be "madness" for Cuba to adopt Soviet-style reforms. How's that for adroit diplomacy?

No wonder that Gorbachev announced that, contrary to expectations, he did not intend to cancel Cuba's debt to Russia. Instead, the Soviet leader focused on promises that the Kremlin would refrain from installing bases or nuclear weapons in Latin America. Then he traveled on to Britain.

Moreover, while Moscow professes horror at the export of revolution, Cuba continues to do just that, particularly in El Salvador and Nicaragua.

Despite such differences and disagreements, Cuba is still Russia's chief outpost in the Western Hemisphere, and this gives Castro considerable clout in dealing with Gorbachev.

Under the circumstances, it will be hard to consider Gorbachev's international peace campaign as much more than propaganda until Moscow starts cutting its ties to Havana and lets Cuba fend for itself.