AntFleet

Anatomy · 1939cc1e-1

jq pipeline for SPOTLIGHT_PICK fails when history is empty

highbug
repo 6f7fc663·PR #32·reviewed 1 week ago

The vulnerable code

skills/fleet-state/SKILL.md:113-117

Code snippet unavailable.

The reasoning

Opus

Spotlight history sort key mismatch with persisted field name (`featured_at` vs `fork`)

mediumbugmedium
  • skills/fleet-state/SKILL.md:118-122
The skill assumes `contributor-spotlight-history.json` entries carry `featured_at` and `fork` fields, but this is never cross-referenced with the producing skill's schema in this PR. If the constituent contributor-spotlight skill writes a different key (e.g., `featured_date`, `fork_full_name`, `picked_at`), `sort_by` will silently sort by nulls and `SPOTLIGHT_FORK`/`SPOTLIGHT_DATE` will be empty, causing the spotlight section to render as missing without any error. The bullet `pick whichever is newest` would then be wrong without any FLEET_STATE_PARTIAL signal.

Recommendation

Either (a) cite the exact schema produced by `contributor-spotlight/SKILL.md` and assert it here, or (b) tolerate alternative key names with `.fork // .fork_full_name`, `.featured_at // .picked_at // .ts`, and log `FLEET_STATE_SPOTLIGHT_SCHEMA_UNKNOWN` if neither resolves.

GPT-5

jq pipeline for SPOTLIGHT_PICK fails when history is empty

highbughigh
  • skills/fleet-state/SKILL.md:113-117
If contributor-spotlight history is empty, SPOTLIGHT_PICK becomes an empty string. Piping empty input to jq (without -n) causes a parse error and a non-zero exit, aborting the run. This violates the "degrade gracefully" intent.

Recommendation

Avoid echo | jq on possibly empty input. Either extract both fields directly from the file with a single jq call (e.g., jq -r '(.history | sort_by(.featured_at) | .[-1]) // {} | [.fork, .featured_at] | @tsv' ...) or guard: if [ -n "$SPOTLIGHT_PICK" ]; then ... fi. Alternatively, use jq -n with inputs or structured fallback.

The agreement

Both frontier models flagged this within the same line range. AntFleet's unanimous gate fired — the finding posted on the PR.

Closure

Tweet thread template

tweet 1 of 8139 / 280

Two frontier models reviewed PR #32 on 6f7fc663. Both found this bug: high bug: jq pipeline for SPOTLIGHT_PICK fails when history is empty

tweet 2 of 8121 / 280

The vulnerable code (skills/fleet-state/SKILL.md:113-117): (full snippet at https://www.antfleet.dev/anatomy/1939cc1e-1)

tweet 3 of 8280 / 280

What Opus saw: "The skill assumes `contributor-spotlight-history.json` entries carry `featured_at` and `fork` fields, but this is never cross-referenced with the producing skill's schema in this PR. If the constituent contributor-spotlight skill writes a different key (e.g., `f…

tweet 4 of 8246 / 280

What GPT-5 saw: "If contributor-spotlight history is empty, SPOTLIGHT_PICK becomes an empty string. Piping empty input to jq (without -n) causes a parse error and a non-zero exit, aborting the run. This violates the "degrade gracefully" intent."

tweet 5 of 897 / 280

Both flagged the same line range. AntFleet's unanimous gate fired — the finding posted on the PR.

tweet 6 of 893 / 280

The fix landed in commit pending: (view diff at https://www.antfleet.dev/anatomy/1939cc1e-1)

tweet 7 of 881 / 280

AntFleet reviews every PR with two frontier models. Only unanimous findings post.

tweet 8 of 877 / 280

Full anatomy + reasoning + diffs: https://www.antfleet.dev/anatomy/1939cc1e-1

Paste into X composer one tweet at a time. X has no multi-tweet intent API.