Red is useful
A red X on a pull request isn't a disaster — it's CI doing its job: catching a bug before it reaches customers. The skill is reading the log quickly and fixing the cause, not the symptom.
A failing run
function total(items) {
return items.reduce((sum, item) => sum + item.price, 0);
}
function withVat(amount) {
return Math.round(amount * 1.13);
}
module.exports = { total, withVat };
- Find the first failed step (✗) — later steps were skipped.
- Inside it, look for the assertion: expected vs actual values.
- Reproduce locally (npm test), fix, push again — the same PR re-runs CI.
- Branch protection can require green checks before merging.