This is the problem of imperative/functional programming languages, instead of using provers/verifiers.
Edit:
In "The Count of MonteCristo" by Alexandre Dumas, the protagonist was accused of aiding Bonaparte, and in the French island prison meets the priest who was accused (under Bonaparte) of aiding royalty. (I may have switched that around, it's been a while since reading). So even though switches in power occur, once incarcerated the evolving machine does not correct its past decisions.
When you automate corporate decisions with code, there is no real judicial branch (arbitrator, judges, ...), only an executive branch (computers) and a legislative branch (programmers). Hence there is no appeal mechanism.
In theory one could formalize our natural language concepts so that a verifier (for example MetaMath verifier) can act as a neutral judge. Then the automated corporate decisions would not just compute the decision to be taken, but also the proof that this is follows from the axiomatic corporate rules. Of course there is no guarantee that such a set of axioms actually encode what the corporation truly wishes, so even in the system I describe Ibrahim would get fired, BUT with the difference that he (and any superiors all the way up to the director) can see the "proof" of why this "should" happen, at which point they will understand which rule(s) were misformalized, which rule(s) did not accurately convey their intention. At this point they could fix the rule(s) and verify all the previously generated decisions with proofs, and possibly identify other individuals who where a bit meeker, and after the 3rd signal something was wrong simply went home never showing up again...