Skip to content

Use goreleaser-rust and tidy packaging#47

Merged
leynos merged 6 commits intomainfrom
vvk74o-codex/address-code-review-comments
Aug 4, 2025
Merged

Use goreleaser-rust and tidy packaging#47
leynos merged 6 commits intomainfrom
vvk74o-codex/address-code-review-comments

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Aug 3, 2025

Summary

  • reduce production dependencies by moving serde_yaml to dev and test crates
  • streamline releases with goreleaser-rust and a shared config template
  • harden packaging scripts with systemctl checks

Testing

  • make fmt
  • make lint
  • make test
  • make markdownlint
  • make nixie

https://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:

  • Reduce production dependencies by moving serde_yaml to dev and test crates
  • Replace manual GoReleaser build hooks with goreleaser-rust plugin for cross-platform Rust builds
  • Consolidate default configuration into packaging/config/comenqd.toml and update all packaging paths accordingly
  • Harden systemd installation scripts with checks for systemctl availability before stopping or disabling services
  • Add uses_goreleaser helper in test-support and adjust tests to import workflow utilities

Build:

  • Update .goreleaser.yaml to import goreleaser-rust plugin and specify Rust build targets

Documentation:

  • Revise automated packaging documentation to reflect new config locations, plugin usage, and packaging steps

Tests:

  • Update release_steps and test-support modules to use the new uses_goreleaser helper

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Aug 3, 2025

Reviewer's Guide

This 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 changes

classDiagram
  class MainCrate {
    +serde
    +serde_json
    -serde_yaml
  }
  class DevDependencies {
    +serde_yaml
    +yaque
    +wiremock
    +octocrab
    +test-support
  }
  MainCrate --|> DevDependencies : dev-dependencies
Loading

Flow diagram for hardened preremove.sh script

flowchart 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
Loading

File-Level Changes

Change Details Files
Integrate goreleaser-rust plugin for release builds
  • Add plugins.import entry for goreleaser-rust in .goreleaser.yaml
  • Replace Go builder hooks with Rust builder and explicit targets
  • Remove custom pre-build hook sections in documentation examples
.goreleaser.yaml
docs/automated-cross-platform-packaging.md
docs/comenq-design.md
Consolidate packaging config path to packaging/config/comenqd.toml
  • Rename default config file location and update install scripts
  • Update systemd unit and Homebrew formula to reference /etc/comenqd/config.toml
  • Adjust archive and docs content to use new config directory
packaging/config/comenqd.toml
packaging/linux/comenqd.service
packaging/darwin/comenqd.plist
.goreleaser.yaml
docs/automated-cross-platform-packaging.md
docs/comenq-design.md
Harden packaging scripts with systemctl checks
  • Add command -v systemctl and systemd runtime directory guard
  • Wrap stop and disable service calls inside existence checks
packaging/linux/preremove.sh
Move serde_yaml to dev-dependencies to reduce runtime footprint
  • Remove serde_yaml from [dependencies] in Cargo.toml
  • Add serde_yaml under [dev-dependencies] in Cargo.toml and test-support
Cargo.toml
test-support/Cargo.toml
Refactor test-support and release workflow tests
  • Extract uses_goreleaser helper into test-support crate
  • Update test imports to use test_support::uses_goreleaser
  • Remove legacy workflow mod from main src
test-support/src/lib.rs
tests/steps/release_steps.rs
src/lib.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 3, 2025

Summary by CodeRabbit

  • Documentation

    • Updated documentation to reflect changes in configuration file paths and streamlined packaging instructions.
    • Clarified the behaviour of the GitHub token configuration.
    • Simplified build and packaging process documentation to use the GoReleaser Rust plugin.
  • Chores

    • Migrated build and packaging configuration to use the GoReleaser Rust plugin for improved cross-platform support.
    • Corrected configuration file paths in service, plist, and packaging files for consistency.
  • Bug Fixes

    • Improved pre-remove script reliability by ensuring systemd checks are only performed when appropriate.
  • Refactor

    • Adjusted internal module structure and re-exports for better test support and code organisation.

Walkthrough

Update 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 workflow module from the main library to the test-support crate, updating imports accordingly.

Changes

Cohort / File(s) Change Summary
GoReleaser Rust plugin migration & config path update
.goreleaser.yaml, docs/automated-cross-platform-packaging.md, docs/comenq-design.md
Switch to goreleaser-rust plugin, removing Go builder and manual cargo hooks; update config file path from packaging/comenqd/config.toml to packaging/config/comenqd.toml; update documentation accordingly.
Dependency management
Cargo.toml, test-support/Cargo.toml
Move serde_yaml from main dependencies to dev-dependencies in Cargo.toml; add serde_yaml as a workspace dependency in test-support/Cargo.toml.
Module visibility and import path update
src/lib.rs, test-support/src/lib.rs, tests/steps/release_steps.rs
Remove public workflow module from main library; add it to test-support crate; update test import to use test_support::workflow.
Packaging script robustness
packaging/linux/preremove.sh
Add checks for systemctl and systemd runtime directory before stopping/disabling service, improving script robustness.
Config documentation improvement
packaging/config/comenqd.toml
Clarify github_token comment to specify that leaving it empty disables GitHub integration.
Packaging config path fixes
packaging/linux/comenqd.service, packaging/darwin/comenqd.plist
Correct configuration file paths in systemd service and macOS plist from /etc/comenq/config.toml to /etc/comenqd/config.toml.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

A builder once Go, now Rust takes the stage,
Config paths aligned, docs turn the page.
Workflow moves house, test-support its new den,
Scripts grow robust, dependencies trim again.
Release with a flourish—let packaging begin!
🚀

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vvk74o-codex/address-code-review-comments

🪧 Tips

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR 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 summary to regenerate the summary of the PR.
  • @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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai 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.
  • 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

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes and found some issues that need to be addressed.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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 unblock cargo build.

-edition = "2024"
+edition = "2021"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e89e6cd and d52ddd4.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is 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.rs
  • test-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 return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless 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 rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for 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.rs
  • test-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.md
  • 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/comenq-design.md
  • 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/comenq-design.md
  • docs/automated-cross-platform-packaging.md
docs/**/*

📄 CodeRabbit Inference Engine (docs/roadmap.md)

Add a new document to the /docs directory detailing the automated packaging process for future maintainers and contributors.

Files:

  • docs/comenq-design.md
  • 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 (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 for serde_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 version

Likely an incorrect or invalid review comment.

test-support/Cargo.toml (1)

12-12: Align dev-only dependency with workspace – approved
Promoting serde_yaml to 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 preserving set -euo pipefail safety.

.goreleaser.yaml (2)

3-5: Verify plug-in import path
Confirm that github.com/goreleaser/goreleaser-rust matches the tag used by your GoReleaser installation; mismatched versions quietly break the pipeline.


10-16: Ensure builder switch covers cross targets
Switching to builder: rust removes the old go hook logic. Confirm that required linker flags, LTO settings, and target-specific features are still applied through .cargo/config or build.rs.

tests/steps/release_steps.rs (1)

7-7: Confirm no stale imports remain

ripgrep 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 single plugins stanza.

After deleting the earlier block, retain this one to load the Rust plugin.


458-460: Ensure config file marked config in both package sets.

The first nfpms block for comenq-packages omits the default config; only comenqd-packages includes it. Ship the same file with the client package or clarify why it is daemon-only.

Comment thread .goreleaser.yaml Outdated
Comment thread docs/automated-cross-platform-packaging.md Outdated
Comment thread docs/automated-cross-platform-packaging.md
Comment thread docs/comenq-design.md
Comment thread test-support/src/lib.rs Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d52ddd4 and f7cfccf.

📒 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.rs
  • test-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 return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless 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 rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for 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.rs
  • test-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 /docs directory 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_goreleaser from the main library to test-support properly 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 workflow module private whilst re-exporting only the required uses_goreleaser function, 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-rust plugin 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

Comment thread .goreleaser.yaml
Comment on lines +29 to +30
- >-
packaging/config/comenqd.toml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 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.tomldst: /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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 4, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 4, 2025

✅ Actions performed

Review triggered.

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7cfccf and 5b8b60f.

📒 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 omission

Documentation under docs/automated-cross-platform-packaging.md advertises macOS support, yet the build matrix only lists Linux targets. Either extend targets with 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 sound

New path packaging/config/comenqd.toml and destination /etc/comenqd/config.toml resolve 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.toml now matches the unified location. Good catch.

packaging/linux/comenqd.service (1)

9-9: Ensure directory exists during install

ExecStart references /etc/comenqd/config.toml. Confirm the post-install script (or the package manager) creates /etc/comenqd with correct permissions so systemd does not fail at startup.

Comment thread .goreleaser.yaml
Comment thread docs/automated-cross-platform-packaging.md Outdated
Lock the goreleaser-rust plugin to v1.6.0 to stabilise builds and rewrite packaging documentation to avoid second-person phrasing.
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Aug 4, 2025

@coderabbitai review

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Aug 4, 2025

@sourcery-ai review

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b8b60f and 0cb4c5a.

📒 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 /docs directory 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.
Pinning goreleaser-rust at v1.6.0 prevents 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 use packaging/config/comenqd.toml and /etc/comenqd/config.toml as the single source of truth.

Comment thread docs/automated-cross-platform-packaging.md
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0cb4c5a and c49788c.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is 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.rs
  • test-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 return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless 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 rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for 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.rs
  • test-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 /docs directory 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_yaml as a workspace dependency correctly supports the new workflow module that needs YAML parsing capabilities for the uses_goreleaser function.

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_goreleaser in 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_yaml to 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 amended ExecStart stanza.


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 good

The YAML now contains a single plugins key 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.

Comment on lines +282 to 284
(etc/"comenqd").mkpath
etc.install "config.toml" => "comenqd/config.toml"
(var/"log/comenq").mkpath
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

@leynos leynos merged commit 453d723 into main Aug 4, 2025
1 of 2 checks passed
@leynos leynos deleted the vvk74o-codex/address-code-review-comments branch August 4, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant