Subscribe Work with me
← All hacks Agents3 min read

An empty filter result is not proof the review never came

My agent spent about forty minutes telling me a code review had never arrived. The verdict was already sitting there, posted one minute after the merge request opened, and only the filter was wrong.

How to do it

  1. When a filtered query returns an empty list, read it as "the filter may be wrong", not as "the thing is not there". The same filter had worked on an earlier merge request that day, which is exactly why an empty result looked believable.
  2. Before reporting that something is absent, read the same data once with no filter at all. One unfiltered read settles it; a repeated filtered read only repeats the same mistake with more confidence.
  3. Read the notes list plainly: newest first, ordered by creation time, a small page size. The last few comments are enough to know whether a verdict landed on our app’s merge request.
  4. Match on the bot’s hidden marker comment, not on prose. Wording drifts as the model changes; a marker is written for machines and stays stable.
  5. Compare the revision named in that marker to the merge request head. A verdict on an older commit is not a verdict on the code you are about to merge.
  6. Let the agent say "no review yet" only after an unfiltered read that holds no matching marker.
Prompt to copy
Rule for reporting absence from an API result. If a filtered query (jmespath, jq, a select expression) comes back empty, do not tell me the thing is missing. Read the same endpoint once with no filter, show me the raw tail of the response, and only then draw a conclusion. An empty filtered result is a possible filter bug, never proof of absence. When you check a review bot's verdict on a merge request: list the notes newest first with a small page size, find the bot's marker comment, and compare the revision in that marker to the current merge request head. Report "verdict ready for this head", "verdict is for an older commit", or "no verdict yet", and say which read you based it on.

One AI hack in your inbox, every morning.

Short, practical, with the prompt to copy. Unsubscribe in one click.