Conversation
Reviewer's GuideThis PR streamlines release builds by integrating the goreleaser-rust plugin, consolidates and tidies packaging configurations and scripts, reduces runtime dependencies by moving serde_yaml to dev, and updates tests and documentation accordingly. Class diagram for Cargo.toml dependency changesclassDiagram
class MainCrate {
+serde
+serde_json
-serde_yaml
}
class DevDependencies {
+serde_yaml
+yaque
+wiremock
+octocrab
+test-support
}
MainCrate --|> DevDependencies : dev-dependencies
Flow diagram for hardened preremove.sh scriptflowchart TD
A[Start preremove.sh]
B{Is systemctl available and systemd running?}
C{Is comenqd.service active?}
D[Stop comenqd.service]
E{Is comenqd.service enabled?}
F[Disable comenqd.service]
G[End]
A --> B
B -- No --> G
B -- Yes --> C
C -- Yes --> D
C -- No --> E
D --> E
E -- Yes --> F
E -- No --> G
F --> G
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary by CodeRabbit
WalkthroughUpdate the packaging and build system to use the GoReleaser Rust plugin, replacing custom Go-based build hooks and manual cargo commands. Change configuration file paths for packaging, clarify configuration documentation, and adjust related documentation. Move the Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GoReleaser
participant Rust Builder
participant Packaging
Developer->>GoReleaser: Trigger release
GoReleaser->>Rust Builder: Build binaries for targets
Rust Builder-->>GoReleaser: Return built artifacts
GoReleaser->>Packaging: Archive, package, and include config files
Packaging-->>GoReleaser: Return release packages
GoReleaser-->>Developer: Publish release
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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Hey @leynos - I've reviewed your changes and found some issues that need to be addressed.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Actionable comments posted: 5
🔭 Outside diff range comments (1)
Cargo.toml (1)
4-4: Fix invalid Rust edition
edition = "2024"is not yet supported. Downgrade to the latest stable edition to unblockcargo build.-edition = "2024" +edition = "2021"
📜 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 (10)
.goreleaser.yaml(3 hunks)Cargo.toml(1 hunks)docs/automated-cross-platform-packaging.md(7 hunks)docs/comenq-design.md(1 hunks)packaging/config/comenqd.toml(1 hunks)packaging/linux/preremove.sh(1 hunks)src/lib.rs(0 hunks)test-support/Cargo.toml(1 hunks)test-support/src/lib.rs(1 hunks)tests/steps/release_steps.rs(1 hunks)
💤 Files with no reviewable changes (1)
- src/lib.rs
🧰 Additional context used
📓 Path-based instructions (5)
**/*.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 using Arc to 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 unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not use return in 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.
Prefer expect over allow.
Use rstest fixtures for shared setup.
Replace duplicated tests with #[rstest(...)] parameterised cases.
Prefer mockall for mocks/stubs.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums. Derive std::error::Error (via the thiserror crate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary. Use eyre::Report for 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 to eyre only in the main main() entrypoint or top-level async task.
Files:
tests/steps/release_steps.rstest-support/src/lib.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/steps/release_steps.rstest-support/src/lib.rs
Cargo.toml
📄 CodeRabbit Inference Engine (AGENTS.md)
Cargo.toml: Use explicit version ranges in Cargo.toml and keep dependencies up-to-date.
Mandate caret requirements for all dependencies. All crate versions specified in Cargo.toml must 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 are strictly forbidden, as are tilde requirements (~) except for documented reasons.
Files:
Cargo.toml
docs/**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
docs/**/*.md: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
When new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve, proactively update the relevant file(s) in the docs/ directory to reflect the latest state. Ensure the documentation remains accurate and current.
Files:
docs/comenq-design.mddocs/automated-cross-platform-packaging.md
**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
**/*.md: Documentation must use en-GB-oxendict spelling and grammar. (EXCEPTION: the naming of the LICENSE file, which is to be left unchanged for community consistency.)
Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks must be wrapped at 120 columns.
Tables and headings must not be wrapped.
Use dashes (-) for list bullets.
Use GitHub-flavoured Markdown footnotes ([^1]) for references and footnotes.
Files:
docs/comenq-design.mddocs/automated-cross-platform-packaging.md
⚙️ CodeRabbit Configuration File
**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")
- Use en-GB-oxendict (-ize / -our) spelling and grammar
- Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
- Code blocks should be wrapped to 120 columns.
- Headings must not be wrapped.
- Documents must start with a level 1 heading
- Headings must correctly increase or decrease by no more than one level at a time
- Use GitHub-flavoured Markdown style for footnotes and endnotes.
- Numbered footnotes must be numbered by order of appearance in the document.
Files:
docs/comenq-design.mddocs/automated-cross-platform-packaging.md
docs/**/*
📄 CodeRabbit Inference Engine (docs/roadmap.md)
Add a new document to the
/docsdirectory detailing the automated packaging process for future maintainers and contributors.
Files:
docs/comenq-design.mddocs/automated-cross-platform-packaging.md
🧠 Learnings (1)
📚 Learning: applies to docs/packaging/comenqd/config.toml : provide a default configuration file for comenqd at ...
Learnt from: CR
PR: leynos/comenq#0
File: docs/automated-cross-platform-packaging.md:0-0
Timestamp: 2025-08-03T14:59:20.901Z
Learning: Applies to docs/packaging/comenqd/config.toml : Provide a default configuration file for comenqd at packaging/comenqd/config.toml to be included in packages.
Applied to files:
docs/automated-cross-platform-packaging.md
🧬 Code Graph Analysis (1)
tests/steps/release_steps.rs (1)
test-support/src/workflow.rs (1)
uses_goreleaser(10-36)
🔇 Additional comments (9)
packaging/config/comenqd.toml (1)
3-4: Document behaviour when token is empty – approved
The extra line removes ambiguity about disabling GitHub integration. Keep the comment in sync with docs and CLI help.Cargo.toml (1)
25-25: Ignore redundant workspace mapping suggestion forserde_yaml
The entry at line 25 under[dev-dependencies]declares the crate’s use in tests; the stanza at line 52 in[workspace.dependencies]only unifies version resolution and does not remove the need to list it per crate.
- Cargo.toml:25 –
serde_yaml = { workspace = true }remains required in[dev-dependencies]- Cargo.toml:52 –
[workspace.dependencies]entry only sets the versionLikely an incorrect or invalid review comment.
test-support/Cargo.toml (1)
12-12: Align dev-only dependency with workspace – approved
Promotingserde_yamlto a shared workspace dependency keeps test crates in step with production code.packaging/linux/preremove.sh (1)
4-11: Guard service actions behind systemd presence – approved
The top-level check prevents failures on non-systemd hosts while preservingset -euo pipefailsafety..goreleaser.yaml (2)
3-5: Verify plug-in import path
Confirm thatgithub.com/goreleaser/goreleaser-rustmatches the tag used by your GoReleaser installation; mismatched versions quietly break the pipeline.
10-16: Ensure builder switch covers cross targets
Switching tobuilder: rustremoves the oldgohook logic. Confirm that required linker flags, LTO settings, and target-specific features are still applied through.cargo/configorbuild.rs.tests/steps/release_steps.rs (1)
7-7: Confirm no stale imports remainripgrep returned no matches for
comenq_lib::workflow::uses_goreleaser, so all import paths have been updated successfully. Approve code changes.docs/automated-cross-platform-packaging.md (2)
403-405: Keep a singlepluginsstanza.After deleting the earlier block, retain this one to load the Rust plugin.
458-460: Ensure config file markedconfigin both package sets.The first
nfpmsblock forcomenq-packagesomits the default config; onlycomenqd-packagesincludes it. Ship the same file with the client package or clarify why it is daemon-only.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.goreleaser.yaml(3 hunks)docs/automated-cross-platform-packaging.md(7 hunks)test-support/src/lib.rs(1 hunks)tests/steps/release_steps.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.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 using Arc to 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 unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not use return in 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.
Prefer expect over allow.
Use rstest fixtures for shared setup.
Replace duplicated tests with #[rstest(...)] parameterised cases.
Prefer mockall for mocks/stubs.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums. Derive std::error::Error (via the thiserror crate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary. Use eyre::Report for 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 to eyre only in the main main() entrypoint or top-level async task.
Files:
tests/steps/release_steps.rstest-support/src/lib.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/steps/release_steps.rstest-support/src/lib.rs
docs/**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
docs/**/*.md: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
When new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve, proactively update the relevant file(s) in the docs/ directory to reflect the latest state. Ensure the documentation remains accurate and current.
Files:
docs/automated-cross-platform-packaging.md
**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
**/*.md: Documentation must use en-GB-oxendict spelling and grammar. (EXCEPTION: the naming of the LICENSE file, which is to be left unchanged for community consistency.)
Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks must be wrapped at 120 columns.
Tables and headings must not be wrapped.
Use dashes (-) for list bullets.
Use GitHub-flavoured Markdown footnotes ([^1]) for references and footnotes.
Files:
docs/automated-cross-platform-packaging.md
⚙️ CodeRabbit Configuration File
**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")
- Use en-GB-oxendict (-ize / -our) spelling and grammar
- Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
- Code blocks should be wrapped to 120 columns.
- Headings must not be wrapped.
- Documents must start with a level 1 heading
- Headings must correctly increase or decrease by no more than one level at a time
- Use GitHub-flavoured Markdown style for footnotes and endnotes.
- Numbered footnotes must be numbered by order of appearance in the document.
Files:
docs/automated-cross-platform-packaging.md
docs/**/*
📄 CodeRabbit Inference Engine (docs/roadmap.md)
Add a new document to the
/docsdirectory detailing the automated packaging process for future maintainers and contributors.
Files:
docs/automated-cross-platform-packaging.md
🧠 Learnings (1)
📚 Learning: applies to docs/packaging/comenqd/config.toml : provide a default configuration file for comenqd at ...
Learnt from: CR
PR: leynos/comenq#0
File: docs/automated-cross-platform-packaging.md:0-0
Timestamp: 2025-08-03T14:59:20.901Z
Learning: Applies to docs/packaging/comenqd/config.toml : Provide a default configuration file for comenqd at packaging/comenqd/config.toml to be included in packages.
Applied to files:
docs/automated-cross-platform-packaging.md
🧬 Code Graph Analysis (2)
tests/steps/release_steps.rs (1)
test-support/src/workflow.rs (1)
uses_goreleaser(10-36)
test-support/src/lib.rs (1)
test-support/src/workflow.rs (1)
uses_goreleaser(10-36)
🔇 Additional comments (8)
tests/steps/release_steps.rs (1)
7-7: LGTM - Clean separation of test utilities.Moving
uses_goreleaserfrom the main library totest-supportproperly separates test utilities from production code.test-support/src/lib.rs (1)
5-6: LGTM - Correctly implements minimal API exposure.The implementation properly keeps the
workflowmodule private whilst re-exporting only the requireduses_goreleaserfunction, following good API design principles..goreleaser.yaml (2)
3-4: LGTM - Proper use of official goreleaser-rust plugin.Using the official GoReleaser Rust plugin simplifies the build process and eliminates the need for custom Go-based build hooks.
10-13: LGTM - Rust builder is appropriate for Rust project.Switching from Go builder to Rust builder with explicit target triples is the correct approach for a Rust project and eliminates manual cargo command orchestration.
Also applies to: 17-20
docs/automated-cross-platform-packaging.md (4)
80-80: LGTM - Configuration path consistently updated.The documentation correctly reflects the new shared configuration location at
packaging/config/comenqd.toml.
289-291: LGTM - Clear explanation of shared configuration approach.The documentation properly explains that the shared configuration file is sufficient for both platforms, eliminating unnecessary duplication.
302-323: LGTM - Documentation accurately reflects GoReleaser Rust plugin usage.The example configuration correctly demonstrates the use of the official
goreleaser-rustplugin with appropriate Rust target triples, matching the actual implementation.
332-332: LGTM - Archive and package paths consistently updated.All references to the configuration file have been properly updated to use the new shared location
packaging/config/comenqd.toml.Also applies to: 357-357
| - >- | ||
| packaging/config/comenqd.toml |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify config path consistency across codebase.
The configuration path has been updated to packaging/config/comenqd.toml. Ensure all references throughout the codebase use the new path to prevent packaging inconsistencies.
Also applies to: 55-55
🏁 Script executed:
#!/bin/bash
# Search for any remaining references to the old config path
echo "Searching for old config path references:"
rg -n "packaging/comenqd/config\.toml" --type md --type yaml --type toml --type sh
echo -e "\nSearching for any hardcoded config paths:"
rg -n "config\.toml" --type md --type yaml --type toml --type sh | grep -v "packaging/config/comenqd.toml"
echo -e "\nVerifying systemd service file references:"
fd -e service -x cat {} \; | rg -n "config\.toml"Length of output: 2633
Update config path references to use /etc/comenqd/config.toml consistently
Update all hard-coded paths and documentation to match the new comenqd directory name:
• .goreleaser.yaml (line 56): change
dst: /etc/comenq/config.toml → dst: /etc/comenqd/config.toml
• Systemd service files: replace --config /etc/comenq/config.toml → --config /etc/comenqd/config.toml
• docs/roadmap.md (line 34): ensure path reads /etc/comenqd/config.toml
• docs/automated-cross-platform-packaging.md: replace every /etc/comenq/config.toml, usr/local/etc/comenq/config.toml, etc/"comenq/config.toml" with /etc/comenqd/config.toml, usr/local/etc/comenqd/config.toml, etc/"comenqd/config.toml"
• docs/comenq-design.md (lines 506, 517, 596, 625, 687, 690–692, 909): update all /etc/comenqd/config.toml references to match the new filename if any still use the old spelling
Fix these to prevent inconsistencies during packaging and installation.
🤖 Prompt for AI Agents
In .goreleaser.yaml around lines 29 to 30 and specifically at line 56, update
the destination path from /etc/comenq/config.toml to /etc/comenqd/config.toml to
reflect the new directory name. Also, review and update all related systemd
service files, documentation files including docs/roadmap.md at line 34,
docs/automated-cross-platform-packaging.md, and docs/comenq-design.md at the
specified lines to replace any old path references with the consistent
/etc/comenqd/config.toml path. This ensures all references to the config path
are uniform and correct.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.goreleaser.yaml(3 hunks)docs/automated-cross-platform-packaging.md(11 hunks)packaging/darwin/comenqd.plist(1 hunks)packaging/linux/comenqd.service(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
⚙️ CodeRabbit Configuration File
**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")
- Use en-GB-oxendict (-ize / -our) spelling and grammar
- Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
- Code blocks should be wrapped to 120 columns.
- Headings must not be wrapped.
- Documents must start with a level 1 heading
- Headings must correctly increase or decrease by no more than one level at a time
- Use GitHub-flavoured Markdown style for footnotes and endnotes.
- Numbered footnotes must be numbered by order of appearance in the document.
Files:
docs/automated-cross-platform-packaging.md
🔇 Additional comments (4)
.goreleaser.yaml (2)
10-13: Add Darwin triples or document intentional omissionDocumentation under
docs/automated-cross-platform-packaging.mdadvertises macOS support, yet the build matrix only lists Linux targets. Either extendtargetswith the two Darwin triples or state explicitly in the docs that macOS binaries are not produced.Also applies to: 17-20
29-30: Config path fix looks soundNew path
packaging/config/comenqd.tomland destination/etc/comenqd/config.tomlresolve the earlier inconsistency.
No further action required.Also applies to: 55-56
packaging/darwin/comenqd.plist (1)
11-11: Path corrected
--config /usr/local/etc/comenqd/config.tomlnow matches the unified location. Good catch.packaging/linux/comenqd.service (1)
9-9: Ensure directory exists during install
ExecStartreferences/etc/comenqd/config.toml. Confirm the post-install script (or the package manager) creates/etc/comenqdwith correct permissions so systemd does not fail at startup.
Lock the goreleaser-rust plugin to v1.6.0 to stabilise builds and rewrite packaging documentation to avoid second-person phrasing.
|
@coderabbitai review |
|
@sourcery-ai review |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
.goreleaser.yaml(3 hunks)docs/automated-cross-platform-packaging.md(11 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
docs/**/*.md: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
When new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve, proactively update the relevant file(s) in the docs/ directory to reflect the latest state. Ensure the documentation remains accurate and current.
Files:
docs/automated-cross-platform-packaging.md
**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
**/*.md: Documentation must use en-GB-oxendict spelling and grammar. (EXCEPTION: the naming of the LICENSE file, which is to be left unchanged for community consistency.)
Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks must be wrapped at 120 columns.
Tables and headings must not be wrapped.
Use dashes (-) for list bullets.
Use GitHub-flavoured Markdown footnotes ([^1]) for references and footnotes.
Files:
docs/automated-cross-platform-packaging.md
⚙️ CodeRabbit Configuration File
**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")
- Use en-GB-oxendict (-ize / -our) spelling and grammar
- Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
- Code blocks should be wrapped to 120 columns.
- Headings must not be wrapped.
- Documents must start with a level 1 heading
- Headings must correctly increase or decrease by no more than one level at a time
- Use GitHub-flavoured Markdown style for footnotes and endnotes.
- Numbered footnotes must be numbered by order of appearance in the document.
Files:
docs/automated-cross-platform-packaging.md
docs/**/*
📄 CodeRabbit Inference Engine (docs/roadmap.md)
Add a new document to the
/docsdirectory detailing the automated packaging process for future maintainers and contributors.
Files:
docs/automated-cross-platform-packaging.md
🔇 Additional comments (2)
.goreleaser.yaml (2)
3-5: Locking the plugin version improves build determinism – nice work.
Pinninggoreleaser-rustatv1.6.0prevents unexpected breakage when new plugin releases land.
29-31: Confirm no stale config paths remain
rg returned no matches for the legacy paths. All scripts, docs and CI jobs now usepackaging/config/comenqd.tomland/etc/comenqd/config.tomlas the single source of truth.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/automated-cross-platform-packaging.md (1)
332-332: See earlier comment on Lines 282-284 regarding archive path mismatch.
📜 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 (5)
Cargo.toml(1 hunks)docs/automated-cross-platform-packaging.md(11 hunks)test-support/Cargo.toml(1 hunks)test-support/src/lib.rs(1 hunks)tests/steps/release_steps.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
Cargo.toml
📄 CodeRabbit Inference Engine (AGENTS.md)
Cargo.toml: Use explicit version ranges in Cargo.toml and keep dependencies up-to-date.
Mandate caret requirements for all dependencies. All crate versions specified in Cargo.toml must 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 are strictly forbidden, as are tilde requirements (~) except for documented reasons.
Files:
Cargo.toml
**/*.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 using Arc to 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 unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Place function attributes after doc comments.
Do not use return in 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.
Prefer expect over allow.
Use rstest fixtures for shared setup.
Replace duplicated tests with #[rstest(...)] parameterised cases.
Prefer mockall for mocks/stubs.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Prefer semantic error enums. Derive std::error::Error (via the thiserror crate) for any condition the caller might inspect, retry, or map to an HTTP status.
Use an opaque error only at the app boundary. Use eyre::Report for 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 to eyre only in the main main() entrypoint or top-level async task.
Files:
tests/steps/release_steps.rstest-support/src/lib.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/steps/release_steps.rstest-support/src/lib.rs
docs/**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
docs/**/*.md: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
When new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve, proactively update the relevant file(s) in the docs/ directory to reflect the latest state. Ensure the documentation remains accurate and current.
Files:
docs/automated-cross-platform-packaging.md
**/*.md
📄 CodeRabbit Inference Engine (AGENTS.md)
**/*.md: Documentation must use en-GB-oxendict spelling and grammar. (EXCEPTION: the naming of the LICENSE file, which is to be left unchanged for community consistency.)
Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks must be wrapped at 120 columns.
Tables and headings must not be wrapped.
Use dashes (-) for list bullets.
Use GitHub-flavoured Markdown footnotes ([^1]) for references and footnotes.
Files:
docs/automated-cross-platform-packaging.md
⚙️ CodeRabbit Configuration File
**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")
- Use en-GB-oxendict (-ize / -our) spelling and grammar
- Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
- Code blocks should be wrapped to 120 columns.
- Headings must not be wrapped.
- Documents must start with a level 1 heading
- Headings must correctly increase or decrease by no more than one level at a time
- Use GitHub-flavoured Markdown style for footnotes and endnotes.
- Numbered footnotes must be numbered by order of appearance in the document.
Files:
docs/automated-cross-platform-packaging.md
docs/**/*
📄 CodeRabbit Inference Engine (docs/roadmap.md)
Add a new document to the
/docsdirectory detailing the automated packaging process for future maintainers and contributors.
Files:
docs/automated-cross-platform-packaging.md
🧬 Code Graph Analysis (2)
tests/steps/release_steps.rs (1)
test-support/src/workflow.rs (1)
uses_goreleaser(10-36)
test-support/src/lib.rs (1)
test-support/src/workflow.rs (1)
uses_goreleaser(10-36)
🔇 Additional comments (18)
test-support/Cargo.toml (1)
12-12: LGTM! Dependency addition supports workflow functionality.The addition of
serde_yamlas a workspace dependency correctly supports the new workflow module that needs YAML parsing capabilities for theuses_goreleaserfunction.tests/steps/release_steps.rs (1)
8-8: LGTM! Import updated to reflect workflow module relocation.The import correctly points to the new location of
uses_goreleaserin the test-support crate whilst maintaining the existing alias for backwards compatibility.Cargo.toml (1)
25-25: LGTM! Dependency correctly moved to development scope.Moving
serde_yamlto dev-dependencies reduces the production footprint whilst maintaining availability for testing workflow functionality. This aligns with the PR objective to streamline production dependencies.test-support/src/lib.rs (1)
6-7: LGTM! Implementation addresses previous feedback correctly.The workflow module is kept internal whilst selectively re-exporting only
uses_goreleaser, maintaining a minimal public API surface as requested in previous review feedback.docs/automated-cross-platform-packaging.md (14)
44-45: No issues detected in the amendedExecStartstanza.
74-75: No issues detected.
80-80: No issues detected.
91-91: No issues detected.
140-140: No issues detected.
168-168: No issues detected.
209-209: No issues detected.
273-273: No issues detected.
302-304: Duplicate-key issue resolved – looks goodThe YAML now contains a single
pluginskey with an explicit version pin.
310-315: No issues detected.
318-323: No issues detected.
357-359: No issues detected.
379-379: No issues detected.
386-387: No issues detected.
| (etc/"comenqd").mkpath | ||
| etc.install "config.toml" => "comenqd/config.toml" | ||
| (var/"log/comenq").mkpath |
There was a problem hiding this comment.
Fix missing configuration file in Homebrew formula
etc.install "config.toml" assumes the file sits at the archive root, but
the archive currently stores it under packaging/config/comenqd.toml
(Line 332). brew will fail to locate the file, breaking macOS installs.
Patch either archive or formula so both sides agree:
# Option A (preferred): expose the config at archive root
archives:
files:
- LICENSE
- README.md
- - packaging/config/comenqd.toml
+ - src: packaging/config/comenqd.toml
+ dst: config.toml
# Option B: keep directory structure and reference it correctly in the formula
- etc.install "config.toml" => "comenqd/config.toml"
+ etc.install "packaging/config/comenqd.toml" => "comenqd/config.toml"Choose one approach and keep the pathing consistent throughout.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In docs/automated-cross-platform-packaging.md around lines 282 to 284, the
Homebrew formula incorrectly assumes the config.toml file is at the archive
root, but it is actually located under packaging/config/comenqd.toml. To fix
this, update the formula's etc.install path to match the archive location or
move the config file in the archive to the root so both paths align. Ensure the
path used in the formula and the archive is consistent to prevent brew install
failures on macOS.
Summary
Testing
make fmtmake lintmake testmake markdownlintmake nixiehttps://chatgpt.com/codex/tasks/task_e_688f9476b600832296aedbdbcc5c827a
Summary by Sourcery
Streamline packaging and release workflow by adopting the goreleaser-rust plugin, consolidating configuration paths, hardening systemd scripts, trimming runtime dependencies, and updating related documentation and tests.
Enhancements:
Build:
Documentation:
Tests: