Skip to content

refactor(supervisor): take job ends from the manager that owns them - #1035

Merged
janbjorge merged 1 commit into
mainfrom
refactor/carry-unwritten-job-logs
Oct 24, 2026
Merged

janbjorge merged 1 commit into
mainfrom
refactor/carry-unwritten-job-logs

Conversation

@janbjorge

Copy link
Copy Markdown
Owner

Summary

  • QueueManager and PgQueuer expose write_job_ends and unwritten_job_logs. runit replays that list around each cycle through UnwrittenJobLogs.
  • A scheduler has neither, so the supervisor does not branch on manager type.
  • The list stays empty. The next PR is what fills it when a shutdown flush fails.

Testing

  • uv sync --frozen && uv run ruff check . && uv run ruff format . --check && uv run lint-imports && uv run mypy . && uv run pytest passed
  • test_pgqueuer_carries_the_queue_managers_unwritten_job_logs shows PgQueuer and QueueManager carry the list, and a scheduler does not
  • test_unwritten_job_logs_stay_held_when_the_write_fails keeps the ends and does not run the body
  • test_unwritten_job_logs_capture_what_the_run_could_not_write replaces the held ends with what the run left
  • uv run ruff check, uv run mypy, and uv run lint-imports passed on the touched files

Checklist

  • I have read the Contributing Guide
  • I have added or updated tests
  • I have updated documentation if necessary

QueueManager and PgQueuer expose write_job_ends and
unwritten_job_logs. runit replays that list around each cycle.
A scheduler has neither, so it is left alone.
@janbjorge janbjorge added the Agentic Issue or PR written mainly by an AI agent. Required on all agent-authored contributions. label Oct 24, 2026
@janbjorge
janbjorge added this pull request to stack #1037 October 24, 2026 10:48
@janbjorge
janbjorge merged commit 9b8ab84 into main Oct 24, 2026
21 checks passed
@janbjorge
janbjorge deleted the refactor/carry-unwritten-job-logs branch October 24, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agentic Issue or PR written mainly by an AI agent. Required on all agent-authored contributions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant