Fidelity . . . is steadfastness in what a man expends of himself and for which he gives his word as a pledge. It is leaving behind what gives him security, even if it is to his own detriment. One is not reckoned faithful who incurs no harm by reasons of his fidelity, even if it is only small. Whenever stepping forward into something he judges to be for the good of his soul brings him harm, one is the more developed in fidelity. This moral quality is laudable; everyone will profit from it. Whoever is known for fidelity will be taken at his word in everything he promises. Whoever is taken at his word has great dignity. However, the advantage for kings in this moral quality is greater, and their need for it is stronger. For, when some of them are known to have little fidelity, they are not trusted when they make promises, their objectives are not achieved, and their army and their officials do not have faith in them. (Yahya ibn Adi, The Reformation of Morals, trans. Sidney H. Griffith [Provo, Utah: Brigham Young University, 2002], 34-37.)The Arabic term for this is wafā' which comprises notions of integrity, faithfulness, loyalty, fidelity, good faith, and even the discharge of a debt.
The opposite of this is perfidy:
Perfidy . . . is reneging on what a man will spend on his own accord, all the while guaranteeing the payment of it. This moral quality is to be deemed repugnant, even if there is some advantage and profit in it for the one possessing it. It is more repugnant in kings and leaders, and for them it is most harmful. No one relies on, and no man puts his trust in, any king known for perfidy. When he proves to be unreliable, the good order of his reign is vitiated. (Yahya ibn Adi, The Reformation of Morals, 50-51.)The Arabic term is ġadr which also means treason or betrayal.
Someone could write a book on this subject, indeed a friend of mine already has.
Yahya discusses the penalties resulting from perfidy. The penalties he discusses are not legal penalties though at certain times and in certain societies they might carry such. They are the social consequences of betrayal. Nothing has changed in that regard in the millennium since Yahya wrote.