tail-pipe-corrupts-exit-code-verification

When checking script exit codes by piping through tail (e.g., python3 script.py | tail -20; echo $?), the $? reflects tail’s exit code, not the script’s. This caused a false audit finding that lint scripts exited 0 on failure — they were actually correct. Use ${PIPESTATUS[0]} or capture exit code before the pipe: python3 script.py > out.txt; echo $?; tail out.txt.