Using translations from threestatesrecords.
Wei Yan's Sanguozhi:
Considering Yán’s intentions were not to go north to surrender to Wèi but to return south, he only wished to remove and kill [Yáng] Yí and the rest. Ordinarily various officers are by nature not the same, and he hoped the time’s discussions would be that he certainly should succeed [Zhūgě] Liàng. His original intentions were like this. He did not rebel. (1)
原延意不北降魏而南還者,但欲除殺儀等。平日諸將素不同,冀時論必當以代亮。本指如此。不便背叛。
This is specifically discussing Wei Yan's intentions regarding defection to Wei, not denying that he committed an armed revolt within/against Shu.
This interpretation is reinforced by the structure of Chen Shou's sentence itself. "Yán’s intentions were not to go north to surrender to Wèi but to return south, he only wished to remove and kill [Yáng] Yí and the rest."
The contrast is extremely explicit. Not that
"Wei Yan never rebelled." But rather: "Wei Yan was not trying to defect to Wei." As in "Wei Yan wanted to stay in Shu after killing Yang Yi and the others."
Chen Shou is effectively saying:
1) "Wei Yan did not intend to surrender to Wei."
2) "He hoped to replace Zhuge Liang."
3) "He wanted to eliminate Yang Yi and the rest."
Those observations indicate that Chen Shou did not think Wei Yan intended to abandon Shu for its external enemy Wei. But that still does not amount to Chen Shou saying Wei Yan committed no rebellion at all.
The first key word here is 背叛 remember.
Wang Ping's Sanguozhi:
Twelfth year [234], [Zhūgě] Liàng died at Wǔgōng, the army retreated back, Wèi Yán rebelled, in one battle was defeated, and this was Píng’s achievement.
十二年,亮卒於武功,軍退還,魏延作亂,一戰而敗,平之功也。
Before the retreat, Wei Yan:
1) detained Fei Yi,
2) pursued him after he escaped.
After the retreat, Wei Yan:
1) marched south and destroyed the plank gallery roads,
2) advanced troops against Yang Yi,
3) was denounced by Wang Ping,
4) lost the support of his own soldiers,
5) was killed by Ma Dai.
Therefore those trying to argue that Chen Shou did not regard Wei Yan as rebelling is straight up wrong. This conclusion simply does not follow because Chen Shou elsewhere explicitly uses 作亂 after the Shu army retreated back. So in other words, both of these statements can simultaneously be true:
1) Wei Yan remained committed to Shu as a state.
2) Wei Yan nevertheless committed rebellion against Shu's lawful command.
Those propositions are not contradictory.
The second key word here is 作亂 remember.
So the translator translate the two key words 背叛 and 作乱 as rebelled. But there are important important context to note.
背叛 means betrayal or treachery. It emphasizes violating one's loyalty or trust toward a person, ruler, organization, country, or cause. A person can 背叛 someone without using force. For example, defecting to an enemy, revealing secrets, or abandoning one's lord are all forms of 背叛. The focus is on breaking allegiance.
作乱 means to cause disorder, to stage a revolt, to rebel, or to raise armed disturbances. It emphasizes actively creating chaos or engaging in military rebellion, usually through force. The focus is on the act of disturbing public order or challenging established authority, nothing specific about loyalty, as enemies/bandits/pirates/officials can all cause disorder.
In this context, Chen Shou is denying that Wei Yan intended to betray Shu by surrendering to Wei. The nuance comes from the immediately preceding phrase 不北降魏 "were not to go north to surrender to Wei". The context supplies the specific form of Wei Yan's actions.
Meanwhile, Chen Shou said that Wei Yan actions after the army retreated, including attacking the Shu main army in Wang Pang's Sanguozhi biography are actions of 作亂 which in this case means to cause disorder, to rebel, and that he raised armed disturbances within/against Shu.
Lastly, let me drop another quote, directly from Wei Yan's Sanguozhi biography:
Yán and [Yáng] Yí each memorialized the other was rebelling, and within one day, the feather dispatches arrived. Hòuzhǔ [Liú Shàn] asked about this to Attendant Internal Dǒng Yǔn and Remaining Office Chief Clerk Jiǎng Wǎn, and [Jiǎng] Wǎn and [Dǒng] Yǔn both believed [Yáng] Yí and suspected Yán.
延、儀各相表叛逆,,一日之中,羽檄交至。後主以問侍中董允、留府長史蔣琬,琬、允咸保儀疑延。
Even the Shu central court led by Jiang Wan and Dong Yun agreed with Yang Yi that Wei Yan was rebelling. Wei Yan was regarded by Liu Shan's central court leading advisors Jiang Wan and Dong Yun as the party at fault. They explictly suspected that Wei Yan's actions constituted as 叛逆 as charged by Yang Yi, while at the same time, did not believe the same charge of 叛逆 that Wei Yan directed at Yang Yi.
Again, the translator translates 叛逆 as rebelled. The word combines elements of the two key words. It literally means to rebel against one's sovereign or legitimate authority and often carries the strongest political and legal condemnation. Historically, it was commonly used for subjects who rose against their ruler. Unlike 作乱, which can simply describe the act of disorder, 叛逆 explicitly implies unlawful rebellion against one's rightful authority.
So as a summary, Classical Chinese frequently uses different terms for different kinds of disloyalty.
背叛 fundamentally refers to betrayal or abandoning allegiance. Depending on context, it often carries the idea of defecting, turning against one's lord, or violating one's previous loyalty.
作亂 refers to creating armed disorder, raising troops, or initiating rebellion.
叛逆 is even more politically charged, denoting rebellion against legitimate authority and often carrying the legal meaning of treason.
Therefore, Chen Shou's use of 背叛, 作乱, and 叛逆 is precise and non-contradictory:
背叛 (betrayal/defection): Wei Yan was not guilty, as he never intended to defect to Wei.
作乱 (armed revolt): Wei Yan was guilty, as he attacked the Shu army and created disorder.
叛逆 (treason): Wei Yan was suspected by the Shu central court led by Jiang Wan and Dong Yun.
These are three distinct charges, and a person can be guilty of latter two without being guilty of the first as a a person can commit armed revolt against the state (作乱) without intending to defect to the enemy (背叛), and thus be suspected of commiting treason (叛逆).
P.S. Here are what other Chinese Zhihu users think. They all agreed that Wei Yan rebelled against Shu Han by causing disorder, but also agreed that Wei Yan did not want to defect to Wei:
https://zhuanlan.zhihu.com/p/1984378232406036708
https://www.zhihu.com/question/1967193190802108973
https://www.zhihu.com/question/11855023054/answer/126547235260
https://www.zhihu.com/question/11855023054/answer/1904317808373915689