Skip to content

Fix various small finalized-related bugs in job listing#1327

Merged
brandur merged 1 commit into
masterfrom
brandur-finalized-at-list-fixes
Jul 23, 2026
Merged

Fix various small finalized-related bugs in job listing#1327
brandur merged 1 commit into
masterfrom
brandur-finalized-at-list-fixes

Conversation

@brandur

@brandur brandur commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Fixes a few bugs related to use of finalized in job listing:

  • Valid finalized-only queries were rejected because the validation
    condition was inverted. JoblistOrderByFinalizedAt was unusable as
    documented.

  • Queries containing non-finalized states were accepted even though jobs
    would have no finalized_at value, making requested order meaningless.

  • Mixed finalized and non-finalized filters were also accepted, leading
    to the same problem.

  • Returning a non-finalized job could panic while constructing the
    pagination cursor because its FinalizedAt value is nil.

Fixes #1326, but also squashes a couple other related bugs that Codex
found while investigating.

Fixes a few bugs related to use of finalized in job listing:

* Valid finalized-only queries were rejected because the validation
  condition was inverted. `JoblistOrderByFinalizedAt` was unusable as
  documented.

* Queries containing non-finalized states were accepted even though jobs
  would have no `finalized_at` value, making requested order meaningless.

* Mixed finalized and non-finalized filters were also accepted, leading
  to the same problem.

* Returning a non-finalized job could panic while constructing the
  pagination cursor because its `FinalizedAt` value is `nil`.

Fixes #1326, but also squashes a couple other related bugs that Codex
found while investigating.
@brandur
brandur force-pushed the brandur-finalized-at-list-fixes branch from 9f00b23 to a6c2c37 Compare July 23, 2026 17:25

@bgentry bgentry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just make sure this plays nicely with riverui 🙏

@brandur

brandur commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Thx! Had Codex do a review pass on River UI and it seems to think it all checks out.

@brandur
brandur merged commit 37d98e9 into master Jul 23, 2026
15 checks passed
@brandur
brandur deleted the brandur-finalized-at-list-fixes branch July 23, 2026 21:25
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.

JobListParams: OrderByFinalizedAt guard is inverted — rejects valid finalized-only filter, silently accepts meaningless non-finalized sort

2 participants