Conversation
Reviewer's GuideIntroduce a reusable test_helpers module with temp_config and octocrab_for functions, and refactor existing daemon and Cucumber step tests to use these helpers instead of manual setup. Class diagram for new test_helpers module and usageclassDiagram
class test_helpers {
+temp_config(tempdir) Config
+octocrab_for(server) Arc<Octocrab>
}
class Config {
+github_token: String
+socket_path: PathBuf
+queue_path: PathBuf
+cooldown_period_seconds: u64
}
class Octocrab
test_helpers ..> Config : returns
test_helpers ..> Octocrab : returns
Class diagram for refactored daemon test setupclassDiagram
class DaemonTest {
+setup_run_worker(status: u16) (MockServer, Arc<Config>, Receiver, Arc<Octocrab>)
}
DaemonTest ..> test_helpers : uses
DaemonTest ..> Config : uses
DaemonTest ..> Octocrab : uses
DaemonTest ..> MockServer : uses
DaemonTest ..> Receiver : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary by CodeRabbit
WalkthroughRefactor test code across several modules to replace manual configuration and Octocrab client setup with shared utility functions. Introduce new helper functions in the Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Case
participant Util as util/temp_config, octocrab_for
participant MockServer as MockServer
Test->>Util: Call temp_config(tmp_dir)
Util-->>Test: Return Config instance
Test->>MockServer: Start mock server
MockServer-->>Test: Provide URI
Test->>Util: Call octocrab_for(mock_server)
Util-->>Test: Return Octocrab client
Test->>Test: Proceed with test logic using helpers
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
tests/steps/worker_steps.rs (1)
1-5: Remove forbidden#![allow]block and add mandatory module-level docsThe coding guidelines ban
#[allow]. Replace each suppression with a narrowly-scoped#[expect(..., reason = "...")]and prepend a//!module doc comment that explains this test module’s intent.-#![allow( - clippy::expect_used, - clippy::unwrap_used, - reason = "simplify test output" -)] +//! Cucumber steps exercising the worker daemon. +//! +//! The test harness intentionally uses `.expect()` / `.unwrap()` for brevity. +#![expect(clippy::expect_used, reason = "Allowed in test code")] +#![expect(clippy::unwrap_used, reason = "Allowed in test code")]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
crates/comenqd/src/daemon.rs(5 hunks)tests/cucumber.rs(1 hunks)tests/steps/listener_steps.rs(2 hunks)tests/steps/worker_steps.rs(3 hunks)tests/util/mod.rs(1 hunks)tests/util/test_helpers.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
⚙️ CodeRabbit Configuration File
**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.
Adhere to single responsibility and CQRS
Place function attributes after doc comments.
Do not use
returnin single-line functions.Move conditionals with >2 branches into a predicate function.
Avoid
unsafeunless absolutely necessary.Every module must begin with a
//!doc comment that explains the module's purpose and utility.Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar
Lints must not be silenced except as a last resort.
#[allow]is forbidden.- Only narrowly scoped
#[expect(lint, reason = "...")]is allowed.- No lint groups, no blanket or file-wide suppression.
- Include
FIXME:with link if a fix is expected.Use
rstestfixtures for shared setup and to avoid repetition between tests.Replace duplicated tests with
#[rstest(...)]parameterised cases.Prefer
mockallfor mocks/stubs.Prefer
.expect()over.unwrap()Ensure that any API or behavioural changes are reflected in the documentation in
docs/Ensure that any completed roadmap steps are recorded in the appropriate roadmap in
docs/Files must not exceed 400 lines in length
- Large modules must be decomposed
- Long match statements or dispatch tables should be decomposed by domain and collocated with targets
- Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.
Files:
tests/cucumber.rstests/util/mod.rstests/steps/worker_steps.rstests/util/test_helpers.rstests/steps/listener_steps.rscrates/comenqd/src/daemon.rs
🧬 Code Graph Analysis (4)
tests/util/mod.rs (1)
tests/util/test_helpers.rs (2)
octocrab_for(32-41)temp_config(19-26)
tests/steps/worker_steps.rs (1)
tests/util/test_helpers.rs (2)
octocrab_for(32-41)temp_config(19-26)
tests/steps/listener_steps.rs (1)
tests/util/test_helpers.rs (1)
temp_config(19-26)
crates/comenqd/src/daemon.rs (1)
tests/util/test_helpers.rs (2)
octocrab_for(32-41)temp_config(19-26)
🔇 Additional comments (8)
tests/util/test_helpers.rs (1)
1-42: LGTM! Well-structured test helper module.The implementation follows Rust coding guidelines excellently:
- Proper module documentation with
//!- Justified use of
#[expect(clippy::expect_used)]for test context- Clear function documentation
- Appropriate use of
.expect()over.unwrap()with descriptive messages- Functions serve their single responsibility well
The helper functions will effectively centralise test setup and reduce duplication across the test suite.
tests/cucumber.rs (1)
3-3: LGTM! Proper module integration.The addition of
mod util;correctly integrates the new test utility module into the cucumber test framework.tests/util/mod.rs (1)
1-6: LGTM! Clean module organisation.The module structure is well-organised with:
- Proper documentation following the
//!requirement- Clear re-exports of the helper functions
- Simple and effective module layout
tests/steps/listener_steps.rs (2)
15-15: LGTM! Proper import of test utilities.The import correctly brings in the
temp_confighelper function from the centralised utilities module.
40-40: LGTM! Effective use of helper function.The replacement of manual
Configconstruction withtemp_config(&dir)successfully centralises test setup logic whilst maintaining the same behaviour. This improves maintainability and reduces duplication.crates/comenqd/src/daemon.rs (1)
268-268: LGTM! Correct usage of helper functions with struct updates.The helper function usage is implemented correctly:
- Proper use of struct update syntax to override specific fields whilst using helper defaults
octocrab_for(&server)correctly creates the mock client- All existing test behaviour is preserved
The refactoring successfully reduces duplication and centralises configuration setup.
Also applies to: 289-289, 309-309, 368-368
tests/steps/worker_steps.rs (2)
10-10: Good replacement of repetitive boiler-plateImporting
temp_configandoctocrab_forcentralises test setup and removes duplicated code.
84-85: Arc-wrapped helper simplifies client creationSwapping the in-place builder for
octocrab_forkeeps the step concise and consistent with other tests.
There was a problem hiding this comment.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
Cargo.toml (1)
20-20: Use caret requirements for dependency versions.The coding guidelines mandate caret requirements for all dependencies. Change
tempfile = "3.10"totempfile = "^3.10"in both locations.Apply this diff:
-tempfile = "3.10" # latest 3.x at time of writing; update as new patch versions release +tempfile = "^3.10" # latest 3.x at time of writing; update as new patch versions releaseAnd in workspace dependencies:
-tempfile = "3.10" +tempfile = "^3.10"Also applies to: 51-51
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
Cargo.toml(1 hunks)crates/comenqd/src/daemon.rs(5 hunks)test-support/Cargo.toml(1 hunks)test-support/src/daemon.rs(1 hunks)test-support/src/lib.rs(1 hunks)tests/steps/worker_steps.rs(3 hunks)tests/util/mod.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.rs
📄 CodeRabbit Inference Engine (AGENTS.md)
**/*.rs: Clippy warnings MUST be disallowed.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider usingArcto reduce the amount of data returned.
Write unit and behavioural tests for new functionality. Run both before and after making any change.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Prefer immutable data and avoid unnecessarymutbindings.
Handle errors with theResulttype instead of panicking where feasible.
Avoidunsafecode unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not usereturnin single-line functions.
Use predicate functions for conditional criteria with more than two branches.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Preferexpectoverallow.
Prefer.expect()over.unwrap().
Useconcat!()to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums. Derivestd::error::Error(via thethiserrorcrate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary. Useeyre::Reportfor human-readable logs; these should not be exposed in public APIs.
Never export the opaque type from a library. Convert to domain enums at API boundaries, and toeyreonly in the mainmain()entrypoint or top-level async task.
Files:
tests/util/mod.rstests/steps/worker_steps.rstest-support/src/lib.rscrates/comenqd/src/daemon.rstest-support/src/daemon.rs
⚙️ CodeRabbit Configuration File
**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.
Adhere to single responsibility and CQRS
Place function attributes after doc comments.
Do not use
returnin single-line functions.Move conditionals with >2 branches into a predicate function.
Avoid
unsafeunless absolutely necessary.Every module must begin with a
//!doc comment that explains the module's purpose and utility.Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar
Lints must not be silenced except as a last resort.
#[allow]is forbidden.- Only narrowly scoped
#[expect(lint, reason = "...")]is allowed.- No lint groups, no blanket or file-wide suppression.
- Include
FIXME:with link if a fix is expected.Use
rstestfixtures for shared setup and to avoid repetition between tests.Replace duplicated tests with
#[rstest(...)]parameterised cases.Prefer
mockallfor mocks/stubs.Prefer
.expect()over.unwrap()Ensure that any API or behavioural changes are reflected in the documentation in
docs/Ensure that any completed roadmap steps are recorded in the appropriate roadmap in
docs/Files must not exceed 400 lines in length
- Large modules must be decomposed
- Long match statements or dispatch tables should be decomposed by domain and collocated with targets
- Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.
Files:
tests/util/mod.rstests/steps/worker_steps.rstest-support/src/lib.rscrates/comenqd/src/daemon.rstest-support/src/daemon.rs
Cargo.toml
📄 CodeRabbit Inference Engine (AGENTS.md)
Cargo.toml: Use explicit version ranges inCargo.tomland keep dependencies up-to-date.
Mandate caret requirements for all dependencies: All crate versions specified inCargo.tomlmust use SemVer-compatible caret requirements (e.g.,some-crate = "1.2.3").
Prohibit unstable version specifiers: The use of wildcard (*) or open-ended inequality (>=) version requirements is strictly forbidden as they introduce unacceptable risk and unpredictability. Tilde requirements (~) should only be used where a dependency must be locked to patch-level updates for a specific, documented reason.
Files:
Cargo.toml
🧬 Code Graph Analysis (4)
tests/util/mod.rs (1)
test-support/src/daemon.rs (2)
octocrab_for(31-40)temp_config(18-25)
tests/steps/worker_steps.rs (1)
test-support/src/daemon.rs (2)
octocrab_for(31-40)temp_config(18-25)
test-support/src/lib.rs (1)
test-support/src/daemon.rs (2)
octocrab_for(31-40)temp_config(18-25)
crates/comenqd/src/daemon.rs (2)
test-support/src/daemon.rs (2)
octocrab_for(31-40)temp_config(18-25)test-support/src/util.rs (1)
wait_for_file(22-30)
🔇 Additional comments (12)
tests/util/mod.rs (1)
1-3: LGTM! Clean utility module design.The module provides a clear abstraction layer for test helpers with proper documentation and clean re-exports.
test-support/src/lib.rs (1)
3-3: LGTM! Proper module organisation.The daemon module addition and re-exports follow Rust conventions and maintain clean crate-level API.
Also applies to: 6-6
crates/comenqd/src/daemon.rs (3)
249-249: Excellent refactoring to use proper imports.This addresses the previous review concern about using
include!by properly importing shared test utilities through the module system.
259-262: LGTM! Clean use of shared test utilities.The refactoring successfully eliminates code duplication by using
temp_configandoctocrab_forhelpers, improving maintainability whilst preserving the ability to customise configuration as needed.Also applies to: 281-281
301-301: Excellent use of struct update syntax with helpers.Using
..temp_config(&dir)allows customising specific fields whilst leveraging the shared helper for sensible defaults. This pattern strikes the right balance between code reuse and test-specific requirements.Also applies to: 360-360
tests/steps/worker_steps.rs (3)
10-10: Import change looks good.The import of helper functions from the new util module properly consolidates test setup utilities.
39-41: Excellent resolution of the field override issue.This refactoring successfully addresses the previous review concern by using the helper function and then explicitly modifying the field, making the override clear and intentional rather than hidden in struct syntax.
83-83: Clean replacement with helper function.The octocrab creation is now properly delegated to the centralised helper, improving consistency across tests.
test-support/src/daemon.rs (4)
1-5: Excellent module documentation.The module-level documentation clearly explains the purpose and utility, fully complying with the coding guidelines requirement for every module to begin with a
//!comment.
6-6: Proper lint expectation with clear reasoning.The narrowly scoped expectation for
clippy::expect_usedwith a clear reason follows the coding guidelines perfectly, avoiding blanket suppression whilst acknowledging the test context.
15-25: Well-documented and straightforward helper function.The
temp_configfunction has clear documentation explaining its purpose and parameters. The implementation provides sensible defaults for test scenarios.
27-40: Appropriate use of expect in test utility context.The
octocrab_forfunction is well-documented and properly uses.expect()over.unwrap()as required by the coding guidelines. The Arc wrapper is appropriate for the shared client usage pattern.
There was a problem hiding this comment.
Actionable comments posted: 3
🔭 Outside diff range comments (1)
crates/comenqd/src/daemon.rs (1)
248-256: Delete theinclude!-based helper module – the newtest_supportimport makes it redundant.
mod test_helperspulls in the same helper functions now provided bytest_support::{…}. Keeping both definitions bloats the test binary, risks name clashes, and triggers dead-code / duplicate definitions warnings under Clippy.Apply this surgical removal:
- mod test_helpers { - include!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/../../tests/util/test_helpers.rs" - )); - }No other changes are required; all call-sites already use the
test_supportre-export.
♻️ Duplicate comments (1)
crates/comenqd/src/daemon.rs (1)
363-368: Keep test-fixture style consistent – reuse the proposed helper here too.Once the
cfg_with_cooldownhelper is introduced (see previous comment), rewrite this initialisation accordingly to avoid duplicating the struct-update literal.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
crates/comenqd/src/daemon.rs(4 hunks)tests/cucumber.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit Inference Engine (AGENTS.md)
**/*.rs: Clippy warnings MUST be disallowed.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider usingArcto reduce the amount of data returned.
Write unit and behavioural tests for new functionality. Run both before and after making any change.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Prefer immutable data and avoid unnecessarymutbindings.
Handle errors with theResulttype instead of panicking where feasible.
Avoidunsafecode unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not usereturnin single-line functions.
Use predicate functions for conditional criteria with more than two branches.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Preferexpectoverallow.
Prefer.expect()over.unwrap().
Useconcat!()to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums. Derivestd::error::Error(via thethiserrorcrate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary. Useeyre::Reportfor human-readable logs; these should not be exposed in public APIs.
Never export the opaque type from a library. Convert to domain enums at API boundaries, and toeyreonly in the mainmain()entrypoint or top-level async task.
Files:
tests/cucumber.rscrates/comenqd/src/daemon.rs
⚙️ CodeRabbit Configuration File
**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.
Adhere to single responsibility and CQRS
Place function attributes after doc comments.
Do not use
returnin single-line functions.Move conditionals with >2 branches into a predicate function.
Avoid
unsafeunless absolutely necessary.Every module must begin with a
//!doc comment that explains the module's purpose and utility.Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar
Lints must not be silenced except as a last resort.
#[allow]is forbidden.- Only narrowly scoped
#[expect(lint, reason = "...")]is allowed.- No lint groups, no blanket or file-wide suppression.
- Include
FIXME:with link if a fix is expected.Use
rstestfixtures for shared setup and to avoid repetition between tests.Replace duplicated tests with
#[rstest(...)]parameterised cases.Prefer
mockallfor mocks/stubs.Prefer
.expect()over.unwrap()Ensure that any API or behavioural changes are reflected in the documentation in
docs/Ensure that any completed roadmap steps are recorded in the appropriate roadmap in
docs/Files must not exceed 400 lines in length
- Large modules must be decomposed
- Long match statements or dispatch tables should be decomposed by domain and collocated with targets
- Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.
Files:
tests/cucumber.rscrates/comenqd/src/daemon.rs
|
@coderabbitai please update these instructions to reflect the changes in this branch: Update all usages of Modified Modified Modified Modified This commit eliminates all mutable Config bindings by making |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@leynos I've analyzed the current codebase and can provide updated instructions. Based on the current implementation, here are the instructions to refactor Updated Instructions for
|
There was a problem hiding this comment.
Actionable comments posted: 2
🔭 Outside diff range comments (2)
tests/cucumber.rs (1)
8-10: Insert function docs above the attribute
Place the doc comment before#[tokio::main]to satisfy the “attribute after doc comments” rule and silence Clippy’smissing_docslint.+ +/// Entry-point for the Cucumber test suite. +/// Spawns each `World` and executes its feature file concurrently. #[tokio::main] async fn main() {crates/comenqd/src/daemon.rs (1)
242-247: Delete theinclude!-based helper re-export.
test_supportalready exposeswait_for_file,temp_config, andoctocrab_for. Keeping thisinclude!duplicates code and risks symbol clashes. Remove thetest_helpersmodule and import everything directly fromtest_support.- mod test_helpers { - include!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/../../tests/util/test_helpers.rs" - )); - } + // No longer needed – all helpers come from `test_support`.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
crates/comenqd/src/daemon.rs(3 hunks)test-support/Cargo.toml(1 hunks)tests/cucumber.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit Inference Engine (AGENTS.md)
**/*.rs: Clippy warnings MUST be disallowed.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider usingArcto reduce the amount of data returned.
Write unit and behavioural tests for new functionality. Run both before and after making any change.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Prefer immutable data and avoid unnecessarymutbindings.
Handle errors with theResulttype instead of panicking where feasible.
Avoidunsafecode unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not usereturnin single-line functions.
Use predicate functions for conditional criteria with more than two branches.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Preferexpectoverallow.
Prefer.expect()over.unwrap().
Useconcat!()to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums. Derivestd::error::Error(via thethiserrorcrate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary. Useeyre::Reportfor human-readable logs; these should not be exposed in public APIs.
Never export the opaque type from a library. Convert to domain enums at API boundaries, and toeyreonly in the mainmain()entrypoint or top-level async task.
Files:
tests/cucumber.rscrates/comenqd/src/daemon.rs
⚙️ CodeRabbit Configuration File
**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.
Adhere to single responsibility and CQRS
Place function attributes after doc comments.
Do not use
returnin single-line functions.Move conditionals with >2 branches into a predicate function.
Avoid
unsafeunless absolutely necessary.Every module must begin with a
//!doc comment that explains the module's purpose and utility.Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar
Lints must not be silenced except as a last resort.
#[allow]is forbidden.- Only narrowly scoped
#[expect(lint, reason = "...")]is allowed.- No lint groups, no blanket or file-wide suppression.
- Include
FIXME:with link if a fix is expected.Use
rstestfixtures for shared setup and to avoid repetition between tests.Replace duplicated tests with
#[rstest(...)]parameterised cases.Prefer
mockallfor mocks/stubs.Prefer
.expect()over.unwrap()Ensure that any API or behavioural changes are reflected in the documentation in
docs/Ensure that any completed roadmap steps are recorded in the appropriate roadmap in
docs/Files must not exceed 400 lines in length
- Large modules must be decomposed
- Long match statements or dispatch tables should be decomposed by domain and collocated with targets
- Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.
Files:
tests/cucumber.rscrates/comenqd/src/daemon.rs
🔇 Additional comments (4)
tests/cucumber.rs (1)
3-3: Duplicate-module fix looks good
The earlier compilation error from declaringmod util;twice is resolved.test-support/Cargo.toml (2)
11-11: Caret requirement forwiremocklooks good.The previous review request is satisfied; dependency now follows semver-compatible caret syntax.
4-4: Approve 2024 edition usageRecognise that rust-toolchain.toml at the repository root already pins the nightly toolchain (
nightly-2025-07-22), satisfying the requirement foredition = "2024".
No changes required.
- rust-toolchain.toml (root): channel = "nightly-2025-07-22"
crates/comenqd/src/daemon.rs (1)
256-261: LGTM for the helper function.The extracted
cfg_with_cooldowneliminates repetition and keeps tests declarative.
Summary
ConfigandOctocrabTesting
make testhttps://chatgpt.com/codex/tasks/task_e_688c8993c3b08322a02f6b6fb34e856c
Summary by Sourcery
Add reusable test helper functions for creating daemon Config and Octocrab instances and refactor existing tests to leverage them
Enhancements:
Tests: