From e581db9f5cede4f1a46f36b064560b04286c004c Mon Sep 17 00:00:00 2001 From: David Orozco Date: Thu, 13 Aug 2026 13:29:40 -0500 Subject: [PATCH 1/4] job list: opt into the paginated ListJobs response MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sends signadot-api-opt-in: jobs-pagination and reads resp.Payload.Items instead of resp.Payload, matching ListJobs' new envelope response (signadot/signadot#7328). The CLI's own -o json/-o yaml output is unchanged (still a plain job array) — only the wire format from the server changed. Blocked on signadot/go-sdk#92 merging + a new tag; go.mod isn't bumped here since that PR isn't released yet. Verified locally against the regenerated go-sdk branch and a live apiserver: table view, --all, -o json, and -o yaml all confirmed working, and the request carries the signadot-api-opt-in header (not resp.Payload.Items unmarshal guesswork). Co-Authored-By: Claude Sonnet 5 --- internal/command/jobs/list.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/internal/command/jobs/list.go b/internal/command/jobs/list.go index 95d00d24..2c42b35c 100644 --- a/internal/command/jobs/list.go +++ b/internal/command/jobs/list.go @@ -27,22 +27,34 @@ func newList(job *config.Job) *cobra.Command { return cmd } +// jobsPaginationOptIn opts into the server's paginated ListJobs response +// ({items, nextCursor, hasMore, totalCount, totalPages} instead of a bare +// array) — see signadot/signadot#7328. The CLI's own -o json/-o yaml output +// stays a plain job array either way (below), so this is purely about not +// depending on the legacy server-side path ahead of its 2026-11-16 sunset. +const jobsPaginationOptIn = "jobs-pagination" + func list(cfg *config.JobList, out io.Writer) error { if err := cfg.InitAPIConfig(); err != nil { return err } - resp, err := cfg.Client.Jobs.ListJobs(jobs.NewListJobsParams().WithOrgName(cfg.Org), nil) + optIn := jobsPaginationOptIn + resp, err := cfg.Client.Jobs.ListJobs( + jobs.NewListJobsParams().WithOrgName(cfg.Org).WithSignadotAPIOptIn(&optIn), + nil, + ) if err != nil { return err } + items := resp.Payload.Items switch cfg.OutputFormat { case config.OutputFormatDefault: - return printJobTable(cfg, out, resp.Payload) + return printJobTable(cfg, out, items) case config.OutputFormatJSON: - return print.RawJSON(out, resp.Payload) + return print.RawJSON(out, items) case config.OutputFormatYAML: - return print.RawYAML(out, resp.Payload) + return print.RawYAML(out, items) default: return fmt.Errorf("unsupported output format: %q", cfg.OutputFormat) } From d29cf91bd04a3e1fe397e54c34764765d87de8c5 Mon Sep 17 00:00:00 2001 From: David Orozco Date: Fri, 14 Aug 2026 10:26:45 -0500 Subject: [PATCH 2/4] job list: pass opt-in flag as []string, matching go-sdk's array param signadot-api-opt-in is now declared as an array header (go-sdk#92), so WithSignadotAPIOptIn takes []string instead of *string. Co-Authored-By: Claude Sonnet 5 --- internal/command/jobs/list.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/command/jobs/list.go b/internal/command/jobs/list.go index 2c42b35c..5f3a95a2 100644 --- a/internal/command/jobs/list.go +++ b/internal/command/jobs/list.go @@ -38,9 +38,8 @@ func list(cfg *config.JobList, out io.Writer) error { if err := cfg.InitAPIConfig(); err != nil { return err } - optIn := jobsPaginationOptIn resp, err := cfg.Client.Jobs.ListJobs( - jobs.NewListJobsParams().WithOrgName(cfg.Org).WithSignadotAPIOptIn(&optIn), + jobs.NewListJobsParams().WithOrgName(cfg.Org).WithSignadotAPIOptIn([]string{jobsPaginationOptIn}), nil, ) if err != nil { From 6b799049fff6e47b1a4e9c942e4c5814438ea755 Mon Sep 17 00:00:00 2001 From: David Orozco Date: Tue, 18 Aug 2026 10:45:02 -0500 Subject: [PATCH 3/4] job list: pin signadot-api-version instead of the opt-in flag list Mirrors signadot/signadot#7328's pivot from a flag-list header to a single dated version (Stripe/GitHub style). Pins to 2026-08-18, the version at which ListJobs pagination became available. Co-Authored-By: Claude Sonnet 5 --- internal/command/jobs/list.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/internal/command/jobs/list.go b/internal/command/jobs/list.go index 5f3a95a2..f4532f6b 100644 --- a/internal/command/jobs/list.go +++ b/internal/command/jobs/list.go @@ -27,19 +27,21 @@ func newList(job *config.Job) *cobra.Command { return cmd } -// jobsPaginationOptIn opts into the server's paginated ListJobs response -// ({items, nextCursor, hasMore, totalCount, totalPages} instead of a bare -// array) — see signadot/signadot#7328. The CLI's own -o json/-o yaml output -// stays a plain job array either way (below), so this is purely about not -// depending on the legacy server-side path ahead of its 2026-11-16 sunset. -const jobsPaginationOptIn = "jobs-pagination" +// jobsPaginationAPIVersion pins to the API version at/after which ListJobs +// returns the paginated response ({items, nextCursor, hasMore, totalCount, +// totalPages} instead of a bare array) — see signadot/signadot#7328. The +// CLI's own -o json/-o yaml output stays a plain job array either way +// (below), so this is purely about not depending on the legacy server-side +// path ahead of its 2026-11-16 sunset. +const jobsPaginationAPIVersion = "2026-08-18" func list(cfg *config.JobList, out io.Writer) error { if err := cfg.InitAPIConfig(); err != nil { return err } + apiVersion := jobsPaginationAPIVersion resp, err := cfg.Client.Jobs.ListJobs( - jobs.NewListJobsParams().WithOrgName(cfg.Org).WithSignadotAPIOptIn([]string{jobsPaginationOptIn}), + jobs.NewListJobsParams().WithOrgName(cfg.Org).WithSignadotAPIVersion(&apiVersion), nil, ) if err != nil { From c0b6f56ac8a3bfef17a6480b33eb02614fd65deb Mon Sep 17 00:00:00 2001 From: David Orozco Date: Wed, 19 Aug 2026 10:21:03 -0500 Subject: [PATCH 4/4] job list: back to signadot-api-opt-in: pagination MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Slack thread landed on keeping the original header name, single value only (no version, no list) — see signadot/signadot#7328. Co-Authored-By: Claude Sonnet 5 --- internal/command/jobs/list.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/internal/command/jobs/list.go b/internal/command/jobs/list.go index f4532f6b..0fa7fcd7 100644 --- a/internal/command/jobs/list.go +++ b/internal/command/jobs/list.go @@ -27,21 +27,20 @@ func newList(job *config.Job) *cobra.Command { return cmd } -// jobsPaginationAPIVersion pins to the API version at/after which ListJobs -// returns the paginated response ({items, nextCursor, hasMore, totalCount, -// totalPages} instead of a bare array) — see signadot/signadot#7328. The -// CLI's own -o json/-o yaml output stays a plain job array either way -// (below), so this is purely about not depending on the legacy server-side -// path ahead of its 2026-11-16 sunset. -const jobsPaginationAPIVersion = "2026-08-18" +// jobsPaginationOptIn opts into the server's paginated ListJobs response +// ({items, nextCursor, hasMore, totalCount, totalPages} instead of a bare +// array) — see signadot/signadot#7328. The CLI's own -o json/-o yaml output +// stays a plain job array either way (below), so this is purely about not +// depending on the legacy server-side path ahead of its 2026-11-16 sunset. +const jobsPaginationOptIn = "pagination" func list(cfg *config.JobList, out io.Writer) error { if err := cfg.InitAPIConfig(); err != nil { return err } - apiVersion := jobsPaginationAPIVersion + optIn := jobsPaginationOptIn resp, err := cfg.Client.Jobs.ListJobs( - jobs.NewListJobsParams().WithOrgName(cfg.Org).WithSignadotAPIVersion(&apiVersion), + jobs.NewListJobsParams().WithOrgName(cfg.Org).WithSignadotAPIOptIn(&optIn), nil, ) if err != nil {