feat: persist per-attempt job runs - #236
Merged
Merged
Conversation
Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com>
10 tasks
pilipilisbot
approved these changes
Oct 5, 2026
pilipilisbot
left a comment
Collaborator
There was a problem hiding this comment.
Approved. I reviewed the queue/run lifecycle changes against #227 and did not find blocking issues.
What I checked:
claim_next()creates a per-attemptjob_runsrow and keepsjobsas the compatibility summary.finish(),requeue_running(),block_running(),mark_cancelled(), andunlock_stale()close the active run with the expected result.- Legacy schema initialization backfills only the recoverable interval and marks it estimated.
- Runtime metrics now use completed
job_runs, preserve work/review grouping, and assign cross-midnight runs by largest local-day overlap with start-day tie behavior. - The dashboard detail exposes run history, and packaged resource coverage includes the new table.
Validation:
- Local focused suite:
/tmp/gab-pr236-venv/bin/pytest -q tests/test_queue.py tests/test_backend.py tests/test_packaged_resources.py-> 111 passed, 1 warning. - Local full Python suite:
/tmp/gab-pr236-venv/bin/pytest -q-> 392 passed, 1 warning. - GitHub checks are green for dashboard, pytest 3.11, and pytest 3.12.
I did not rerun the dashboard npm tests locally because this review worktree has no node_modules; the PR's dashboard check is green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
job_runsrecord for every claimed attempt and close it on done, blocked, requeued, or cancelled transitionsMigration and retention
historicalwithis_estimated=1ON DELETE CASCADE; they are not independently pruned so historical usage does not change silentlyTests
.venv/bin/pytest -q— 392 passednpm test— 60 passednpm run buildCloses #227
Requested by: @ecarreras