That-it-for-tat exchange of tariffs between the United States and Canada hardly constitutes a trade war. But it's a dangerous little border skirmish, and it stands as a warning to both governments of the speed with which a trade dispute can get out of hand.

It started three weeks ago when President Reagan, without warning, imposed a heavy tariff on cedar shingles from Canada. This week the Canadians retaliated with tariffs on computer parts, books, semiconductors, rail cars and various other imports from the United States. The United States has now decided, wisely, to cool it. Mr. Reagan has gracefully apologized to Prime Minister Brian Mulroney for the American failure to give him advance warning, and there seems to be no inclination here to instigate further retaliation. But even at this point the casualties are not trivial. One of them is the arrangement made a few months ago for free trade in computer parts among the United States, Japan and Canada. The Canadians are now pulling out. Worse, the episode has strengthened all the old accusations that Canadian interests count for little in the American mind.

How did it start? The wooden shingle producers in this country are a dying industry, principally because synthetic shingles have largely replaced wood. But to the extent that wooden shingles are still used, they come increasingly from Canada -- and the American manufacturers have been hammering on the White House door for relief. The White House, worried about the grossly protectionist trade bill that the House Democrats have cobbled together, wanted to show that it could be responsive to a grievance. Perhaps it also wanted to give a little help to Sen. Bob Packwood, the chairman of the Finance Committee, whose showing in the Oregon primary two days earlier had been surprisingly weak. Cedar shingles are a small matter, but the broad category of timber and lumber imports is a very large one in the Pacific Northwest, and the Canadian competition is a concern there to the point of obsession. The American producers have claimed for years that the Canadians unfairly subsidize their lumber exports. That's very much a matter of dispute, but it's clear that many small lumber businesses in the Northwest are being pressed hard by bigger and better-financed competitors, some of which are Canadian.

Changing patterns of trade and technology can have severe impacts on the lives of working people and their communities. A growing North American economy generates a lot of collisions like this one over wood products. But the Reagan administration, disapproving of any kind of trade adjustment aid, has left itself with no response but trade barriers, which, as in this case, have sharp and unpleasant effects on relations with other countries. Statistically, these new tariffs won't make much of a dent in the huge flows of trade across the border in both directions. But the atmosphere has cooled a little and, at a moment when the two countries are beginning to negotiate a broad agreement for free trade, things are now moving in the wrong direction.