How did you handle games where Stockfish would castle or promote?

i forced stockfish to play only non castling, non en passant, non promotion moves by filtering legal moves and passing only those as root_moves

also removed castling/EP rights from FEN

I'd call that cheating but the size and capability is impressive nonetheless.