Skip to content

fix(cli/api): address Bugbot findings on the v0.4.0 RC (#106) - #108

Merged
saadqbal merged 2 commits into
developfrom
fix/bugbot-v0.4.0-rc-findings
Jun 24, 2026
Merged

fix(cli/api): address Bugbot findings on the v0.4.0 RC (#106)#108
saadqbal merged 2 commits into
developfrom
fix/bugbot-v0.4.0-rc-findings

Conversation

@saadqbal

@saadqbalsaadqbal commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes the two Cursor Bugbot findings on the v0.4.0 release candidate (flagged on the promote PR #107). Both are pre-existing in the batch (not from #104). Rolls up under the release ticket #106.

1. api: pagination silently truncates on an unparseable next (Bugbot: Medium)

ListClients followed DRF next via nextPath, which returned "" for both an empty link (end of pages) and an unparseable one. So a non-empty next that url.Parse rejects silently ended the loop and returned only the pages seen so far with a nil error — list/use/namespace-collision checks would then miss clients with no signal.

nextPath now returns (string, error): "" , nil for an empty link, an error for a non-empty link that won't parse. (Trigger is unlikely — DRF emits well-formed URLs, url.Parse is lenient — but a silent partial list is the wrong failure mode for a correctness-sensitive call.)

2. cli: known-but-unsupported non-image category misrouted (Bugbot: Low)

The category gate only special-cased known-but-unsupported image categories, so causal_language_modeling (registry-known, CLISupported:false, with a real UnsupportedNote) fell through to the default branch and was reported as "isn't a recognized task category" — when it is recognized, just pending support.

Swapped case push.IsImagecase push.IsKnown (supported categories are already caught above, so IsKnown here means known-but-unsupported, image or text). Default branch is left for genuine typos. Message-only — exit code was already 2.

Tests

  • pagination still followed end-to-end (page 1 → 2 → done); unparseable next is now a hard error
  • causal_language_modeling now gets the pending-support note, not the unrecognized-category message (the existing exit-2 test didn't assert the message, which is how this slipped through)
  • gofmt/go vet/go build clean; full go test -race -cover ./... green

🤖 Generated with Claude Code


Note

Low Risk
Targeted correctness and UX fixes with regression tests; no auth or data-path changes beyond failing loudly on bad pagination links.

Overview
Addresses two v0.4.0 RC Bugbot findings: client list pagination and dataset push category messaging.

API:nextPath now returns (string, error). An empty DRF next still ends pagination; a non-empty link that url.Parse rejects is a hard error instead of being treated like end-of-list. That stops ListClients from returning a partial client set with no error (which would break list, use, and namespace collision checks).

CLI: The pre-schema category gate uses push.IsKnown instead of push.IsImage for registry-known but CLI-unsupported categories (e.g. causal_language_modeling). Users get the registry pending-support message (isn't supported by the CLI yet + UnsupportedNote), not isn't a recognized task category.

Tests: Pagination still follows page 1 → 2; unparseable next fails; causal_language_modeling asserts the corrected error text.

Reviewed by Cursor Bugbot for commit e14685f. Bugbot is set up for automated code reviews on this repo. Configure here.

saadqbaland others added 2 commits June 24, 2026 19:31
…te (#106)
ListClients followed DRF `next` via nextPath, which returned "" for BOTH an
empty link (end of pages) and an unparseable one — so a non-empty `next` the
server sends that url.Parse rejects silently ended the loop, and ListClients
returned only the pages seen so far with a nil error. list / `use` /
namespace-collision checks would then miss clients with no signal.
nextPath now returns (string, error): "" + nil for an empty link, an error for
a non-empty link that won't parse. Trigger is unlikely (DRF emits well-formed
URLs, url.Parse is lenient), but the failure mode — silent partial list — is
the wrong one for a correctness-sensitive call.
Tests: pagination still followed end-to-end (page 1 → 2 → done); an
unparseable next link is now a hard error, not a truncation.
Bugbot: 8dadb5c2-804a-48ed-bc81-eb14e6317be1 (v0.4.0 RC, #107)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ote (#106)
The dataset-push category gate only special-cased known-but-unsupported *image*
categories (`case push.IsImage`), so a registry-known non-image category that
isn't CLI-supported yet — `causal_language_modeling` (FamilyText,
CLISupported:false, with a real UnsupportedNote) — fell to the default branch
and was reported as "isn't a recognized task category". It IS recognized; it's
pending support.
Swap the gate to `case push.IsKnown`: supported categories are already caught
by the prior case, so IsKnown here means known-but-unsupported (image or text),
all routed through the registry's per-category pending-support note. The default
branch is left for genuinely unknown/typo'd categories. Message-only (exit code
was already 2).
Test: causal_language_modeling now gets the pending-support note, not the
unrecognized-category message. (The existing exit-2 test didn't assert the
message, which is how this slipped through.)
Bugbot: 16f5b945-5d67-4201-8bc6-1f6baf633672 (v0.4.0 RC, #107)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@saadqbalsaadqbal self-assigned this Jun 24, 2026
@saadqbal
saadqbal merged commit f7bc32b into developJun 24, 2026
19 checks passed
@saadqbal
saadqbal deleted the fix/bugbot-v0.4.0-rc-findings branch July 10, 2026 10:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@saadqbal@LukasWodka