Skip to content

fix(api): log the auto-combo variants GET /api/combos/auto skips instead of failing silently - #15362

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:fix/combos-auto-log-skipped-variants
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:fix/combos-auto-log-skipped-variants

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

Combo listing sometimes came back short with no log line saying which variant was missing. Each build loop dropped its own failure quietly, so a skipped variant left no trace. The endpoint now logs a single warning naming every variant that stayed out of the list and the first error, while the response stays the same.

Related Issues

Validation

  • Change type: routing
  • Focused tests and category gates from the golden path
  • npm run lint — ESLint on the touched files is clean; the full run is red on the base (🔴 Release branch not green: release/v3.8.52 #15306).
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/combos-auto-skipped-variants.test.ts — injected failure for a named, a template and a tiered-suffix variant (one line, id named once, variant absent), a variant that fails once and builds in a later loop (kept, not reported), the quiet case, payload stability, and a bounded single-line message.
  • Failure injection poisons one scoring weight pack, so the tests run in CI without module mocks; it reaches the named, template and tiered-suffix loops. The model-family loop has no such seam and goes through the same helper and the same catch.

Coverage Notes

  • src/app/api/combos/auto/route.ts — covered by tests/unit/combos-auto-skipped-variants.test.ts (injected failures, retry across loops, quiet case, payload stability, message bounding).

Reviewer Notes

  • Behavior: Only the log is new: an id is still marked as seen once its build succeeds, so a variant that fails in one loop can be built by a later loop (six ids are built by two loops). The warning lists each missing id once, keeps the first error on one line and cuts it at 300 characters.
  • Merge: Either order with fix(api): resolve auto-combo candidate capabilities once in GET /api/combos/auto #15353, the second to land rebases on the release tip. This change keeps the preparation block untouched and only edits the loops and the final warning, so a merge stays mechanical.
  • Follow-up: Per-request capability resolution and memoization stay open for a later change; this one only logs skipped variants.

@maxmad64bis
maxmad64bis force-pushed the fix/combos-auto-log-skipped-variants branch from 413733e to bf20663 Compare October 2, 2026 16:51
…ead of failing silently

Silent per-variant catch blocks left skipped variants untraced. The route now logs one line naming the variants that stayed out of the list, and a variant that fails in one loop but builds in a later one is still listed. Covered by injected-failure tests that run in CI.
@maxmad64bis
maxmad64bis force-pushed the fix/combos-auto-log-skipped-variants branch from bf20663 to f91911e Compare October 2, 2026 17:57
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 3, 2026 01:40
@diegosouzapw
diegosouzapw merged commit 787a67b into diegosouzapw:release/v3.8.52 Oct 6, 2026
158 of 246 checks passed
@maxmad64bis
maxmad64bis deleted the fix/combos-auto-log-skipped-variants branch October 7, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants