ai-coding-minesIndexGitHub

A rejection is an event — unlogged, the rejected side is pure silence

Deploy and infrastructure

Symptom

After an authentication change, one job was being rejected continuously. The rest were fine, so the whole looked healthy.

Cause

The endpoint returned 403 and recorded nothing. The caller (an external scheduler) kept the failure on its own dashboard, and on the server side there was no trace that the job had even been attempted.

★★★ A rejection is not "nothing happened" — it is an event. Unlogged, the rejected party becomes completely silent.

Fix

[AUTH-FAIL] job=<name> token_prefix=<first 10> src_ip=<origin>

★ Log only the token's prefix. Print the whole thing and the work of getting the token out of the URL comes back through the logs.

★★ The key field is job. "Which job was rejected" is the diagnosis; the token fragment is a narrowing aid.

★★ Partial failure dissolves into the average

One of five jobs dying still reads as "80% success" — not an alert. ★★★ Averages dissolve partial failure. → Look per job. The same applies to the completion records in the entry above: lump them into one and the problem reappears.

★★★ And rejection logs double as intrusion detection

That endpoint is publicly reachable. Without rejection logs, our own misconfiguration and someone else's probing are equally invisible.

★ A sudden rise in AUTH-FAIL is not a configuration problem — it is something else. → Log the source IP too. Our scheduler's address is fixed, so one line separates them.