Skip to content

General Polish - #39

Merged
viceroypenguin merged 4 commits into
masterfrom
polish
Jul 27, 2026
Merged

General Polish#39
viceroypenguin merged 4 commits into
masterfrom
polish

Conversation

@viceroypenguin

@viceroypenguin viceroypenguin commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • API Improvements

    • Grouped enqueue and scheduling methods now place the group identifier before the cancellation token, with consistent behavior across scheduler integrations.
    • Updated scheduling examples and samples use named arguments for improved clarity.
  • Documentation

    • Refreshed registration examples and application setup guidance.
    • Updated diagnostics, error scenarios, storage capability guidance, and fair-queue API documentation.
  • Error Handling

    • Improved job validation messages for invalid batches, detached continuations, and dependency cycles.

Duke added 4 commits July 27, 2026 17:32
The `Immediate.Jobs.Aspire.Api` assembly name generated the unwieldy
`AddImmediateJobsAspireApiJobs`, which makes the sample a natural place to
show the escape hatch rather than a reason to tolerate the name.
Only 13 of 75 throws carried an `IJOB0xx:` prefix, all of them from the
batches feature, so the codes read as a scheme that covers 8% of the runtime
exceptions. Worse, they shared the `IJOB` prefix and numeric space with the
analyzer diagnostics, leaving `IJOB020` and `IJOB0020` a zero apart and
meaning different things.

The messages keep their wording and lose the prefix, so `IJOB` now means a
compile-time diagnostic and nothing else. No test asserted on the codes.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ba18756-868a-4018-ae18-1772be5fdd66

📥 Commits

Reviewing files that changed from the base of the PR and between 9f17d30 and 7790920.

📒 Files selected for processing (17)
  • docs/batches-and-continuations.md
  • docs/fair-queues.md
  • docs/storage-capabilities.md
  • readme.md
  • samples/Aspire/Api/Endpoints/SampleApiEndpoints.cs
  • samples/Aspire/Api/Program.cs
  • samples/Basic/Program.cs
  • samples/NativeAot/Program.cs
  • src/Immediate.Jobs.EntityFrameworkCore/EntityFrameworkCoreJobStorage.cs
  • src/Immediate.Jobs.LinqToDB/LinqToDBJobStorage.cs
  • src/Immediate.Jobs.NodaTime/NodaTimeJobSchedulerExtensions.cs
  • src/Immediate.Jobs.Shared/InMemoryJobStorage.cs
  • src/Immediate.Jobs.Shared/JobBatches.cs
  • src/Immediate.Jobs.Shared/JobSchedulers.cs
  • src/Immediate.Jobs.Testing/CaptureOnlyJobScheduler.cs
  • tests/Immediate.Jobs.FunctionalTests/Packages/NodaTimeTests.cs
  • tests/Immediate.Jobs.FunctionalTests/Packages/TestingPackageTests.cs

📝 Walkthrough

Walkthrough

The change aligns grouped scheduler overloads and call sites, replaces legacy runtime diagnostic prefixes, updates diagnostic documentation, and migrates documentation and samples to application-specific handler and job registration APIs.

Changes

API and diagnostics

Layer / File(s) Summary
Diagnostic identifiers and runtime messages
docs/batches-and-continuations.md, readme.md, src/Immediate.Jobs.*/..., src/Immediate.Jobs.Shared/*
Diagnostic references now use IJOB0020 where applicable, while runtime exception messages use plain text without legacy IJOB prefixes.
Grouped scheduler parameter ordering
src/Immediate.Jobs.Shared/JobSchedulers.cs, src/Immediate.Jobs.NodaTime/NodaTimeJobSchedulerExtensions.cs, src/Immediate.Jobs.Testing/CaptureOnlyJobScheduler.cs, samples/Aspire/Api/Endpoints/SampleApiEndpoints.cs, tests/Immediate.Jobs.FunctionalTests/Packages/*
Grouped overloads place groupId before CancellationToken; forwarding calls and tests use the updated signatures and named arguments.
Registration examples and sample wiring
readme.md, docs/fair-queues.md, docs/storage-capabilities.md, docs/batches-and-continuations.md, samples/*/Program.cs
Examples use AddMyAppJobs and generated handler registration, while Aspire, Basic, and Native AOT samples register their application handlers and jobs explicitly.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 59.46% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too generic and does not communicate the main changes, such as handler registration, scheduler API ordering, or diagnostic/message updates. Use a concise, specific title that highlights the primary change set, e.g. "Polish scheduler APIs and docs" or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch polish

Comment @coderabbitai help to get the list of available commands.

@viceroypenguin

Copy link
Copy Markdown
Member Author

@coderabbitai help

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai rate limit to show your current review rate limit status.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
  • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
  • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai emit path instructions to emit generated path-specific review instructions for this repository.
  • @coderabbitai resolve merge conflict to automatically resolve merge conflicts.
  • @coderabbitai autofix to automatically fix issues identified in unresolved review comments.
  • @coderabbitai fix-ci to automatically fix failing CI checks by creating a stacked PR with fixes.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@viceroypenguin

Copy link
Copy Markdown
Member Author

@coderabbitai rate limit

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Your plan includes PR reviews subject to rate limits. Reviews are available now.

@viceroypenguin

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on API and documentation “polish” around scheduler overloads, registration ergonomics, and validation messaging across storage adapters.

Changes:

  • Reordered grouped enqueue/scheduling overloads to place groupId before CancellationToken, and updated tests/docs/samples accordingly.
  • Refined ImmediateJobException runtime messages for batch/continuation validation (including removing embedded IJOB… codes from messages).
  • Updated registration guidance and samples to use generated Add{Assembly}Jobs() / Add{Assembly}Handlers() patterns and clarify assembly naming.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Immediate.Jobs.FunctionalTests/Packages/TestingPackageTests.cs Updates enqueue calls to use named arguments with the new grouped overload parameter order.
tests/Immediate.Jobs.FunctionalTests/Packages/NodaTimeTests.cs Updates NodaTime scheduling calls to match the reordered grouped overloads.
src/Immediate.Jobs.Testing/CaptureOnlyJobScheduler.cs Aligns testing scheduler overload signatures and forwarding calls with the new parameter order.
src/Immediate.Jobs.Shared/JobSchedulers.cs Reorders grouped overload parameters in the shared scheduler contract and updates internal forwarding; adjusts several runtime exception messages.
src/Immediate.Jobs.Shared/JobBatches.cs Updates batch validation exception messages (removing embedded IJOB codes).
src/Immediate.Jobs.Shared/InMemoryJobStorage.cs Updates in-memory storage validation exception messages (removing embedded IJOB codes).
src/Immediate.Jobs.NodaTime/NodaTimeJobSchedulerExtensions.cs Reorders NodaTime extension overload parameters and updates forwarding calls.
src/Immediate.Jobs.LinqToDB/LinqToDBJobStorage.cs Updates LinqToDB storage validation exception messages (removing embedded IJOB codes).
src/Immediate.Jobs.EntityFrameworkCore/EntityFrameworkCoreJobStorage.cs Updates EF Core storage validation exception messages (removing embedded IJOB codes).
samples/NativeAot/Program.cs Adds generated handlers registration for the NativeAOT sample.
samples/Basic/Program.cs Adds generated handlers registration for the Basic sample.
samples/Aspire/Api/Program.cs Adds assembly identifier + generated handlers registration; updates jobs registration method name.
samples/Aspire/Api/Endpoints/SampleApiEndpoints.cs Updates grouped enqueue calls to use named arguments with the new parameter order.
readme.md Updates examples and diagnostics documentation; adds clarification on generated registrations.
docs/storage-capabilities.md Updates registration examples to use AddMyAppJobs() naming.
docs/fair-queues.md Updates grouped overload signature and examples to reflect new argument order and registration naming.
docs/batches-and-continuations.md Updates diagnostic IDs and narrative around batch/continuation diagnostics and runtime guards.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/batches-and-continuations.md
Comment thread readme.md
@viceroypenguin
viceroypenguin merged commit 2e85931 into master Jul 27, 2026
3 checks passed
@viceroypenguin
viceroypenguin deleted the polish branch July 27, 2026 22:56
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.

2 participants