A heralded trip to China designed to display the foreign policy skills of the Reagan-Bush Republican ticket has ended in shambles, with the Chinese enraged and a shadow cast over any future dealings between Ronald Reagan and Peking.

Peking tonight delivered the final blow to Republican vice presidential candidate George Bush's hopes for his three days here by publicly labeling his visit a failure and roasting Reagan for a series of statements supporting renewed official U.S. ties with Taiwan.

A lengthy and unusually pointed commentary by the official New China News Agency issued tonight said Bush had "failed to reassure China" about Reagan's Taiwan policy. New China News Agency correspondents Zhou Lifang and Zhou Cipu called Bush's trip "a very difficult mission because his efforts were being canceled out by Reagan's statements back in the United States.

"Those who think that China is willing to develop its ties with the United States because China needs its help or that China, in order to maintain its relations with the United States, will eventually swallow the bitter pill prepared by Reagan are daydreaming," the commentary said. It is expected to be published in the People's Daily and broadcast nationwide Sunday.

As Bush pointed out several times during his trip here, the Chinese appreciate strong and consistent leadership in Washington, but Reagan's sudden decision to revive the Taiwan issue after his aides had appeared to bury it has left a bad taste with the Chinese that will probably linger in their dealing with any future Reagan administration, even if Reagan changes his position.

At a reception yesterday, as reports of another pro-Taiwan statement by Reagan reached Peking, one high Chinese official complained to an American acquaintance: "How can he say such things, contradict sensitive policy in public?"

The Chinese complained in June when Reagan voiced support for establishment of an official U.S. liaison office in Taiwan to clear the way for more direct ties than those now carried out by an unofficial American "institute" in Taipei. But Reagan's foreign policy adviser Richard Allen, who traveled here with Bush, quickly responded in June by telling reporters that Reagan intended no change "whatever in the present status of our relations with China." Reagan avoided the issue during the Republican convention and no demand for official U.S.-Taiwan ties appeared in the platform, so prospects for a trip to China by Bush, a former U.S. envoy here, seemed good.

But Reagan, in response to questions from reporters, reiterated his support for an official U.S. liaison office on Taiwan on Aug. 16, just as Bush left Los Angeles, and again on Thursday and Friday as Bush was trying to tell the Chinese that Reagan did not really intend to establish an official Taiwan office because it was barred by U.S. law.

Bush aides indicated here before his departure this afternoon that Bush would meet Reagan Monday in Los Angeles to review the China trip and that some attempt might be made there to clear up the controversy.

[Bush, landing in Honolulu today, said his mission was "absolutely not" a failure, according to the Associated Press. "When you sit down with the top leaders of Japan and the top leaders of China and have a very frank exchange of views, it's got to be a big plus," he said. Asked what he had accomplished, Bush said: "Understanding, a major thing in foreign affairs, major."]

Establishing an official liaison office in Taiwan would violate the Sino-American joint communique that established full diplomatic relations between Peking and Washington in 1979. The communique said the United States recognized the People's Republic of China as the "sole legal government of China." It said "within this context, the people of the United States will maintain cultural, commercial, and other unofficial relations with the people of Taiwan."

Reagan's statements on Taiwan have been contradictory. He has called for improved relations with Peking and said official ties with Taiwan were possible under the Taiwan Relations Act, a view his foreign policy adviser Allen contradicted here. There Chinese have focused on Reagan's support for Taiwan, while Bush attempted here to emphasize Reagan's desire for improved ties with Peking.

Tonight's Chinese commentary said Reagan had put Bush "in a very embarrassing situation." It recalled that Bush said "he would have no difficulty in explaining things to the Chinese" and that "common agreement has been reached in many areas." It said, "Since Bush's primary mission to China was to clarify Reagan's position on Taiwan and since the difference in principle between China and Reagan on the Taiwan question persists, how could any 'agreement' have been reached?"

The commentary also objected to Bush's support of the Taiwan Relations Act, which bars official ties with Taiwan but also has provisions guaranteeing Taiwan's security, which Peking feels violates Chinese sovereignty. In the past, the Chinese have been willing to mute these objections as long as Washington refrained from official Taiwan ties.

Few diplomats here, and few members of Bush's party, believe Reagan would seriously pursue an effort to change the character of U.S.-Taiwan ties in the face of objections from the Congress, most foreign policy experts and the Chinese themselves. They feel Reagan is seeking some way, however, to improve the style of relations with Taiwan, which he feels have been pushed so far into the background then American officials will not even meet Taiwan representatives in their offices.

Yesterday, when he first heard a report of a new pro-Taiwan statement by Reagan, Bush grimaced and put a hand to his forehead but declined comment. This afternoon, just before boarding his flight, he said he "did not feel" his trip was a failure. "I cannot imagine my getting a better reception," he said. His press secretary, Peter Teeley, remarked however, that be expected Monday's meeting with Reagan to be "very interesting."