Skip to content

Document roadmap for generic publish tooling - #1

Merged
leynos merged 1 commit into
mainfrom
codex/create-roadmap-for-generic-python-scripts
Sep 30, 2025
Merged

Document roadmap for generic publish tooling#1
leynos merged 1 commit into
mainfrom
codex/create-roadmap-for-generic-python-scripts

Conversation

@leynos

@leynos leynos commented Sep 30, 2025

Copy link
Copy Markdown
Owner

Summary

  • add a roadmap describing the changes required to generalise the publish and version bump scripts beyond the current workspace

Testing

  • not run (documentation only)

https://chatgpt.com/codex/tasks/task_e_68dc486cc1988322af1ec9e5b4191d08

Summary by Sourcery

Documentation:

  • Add roadmap.md outlining the steps to enable generic workspace metadata discovery, crate‐specific configuration, flexible layouts support, generalized version propagation, and improved validation and ergonomics

Summary by CodeRabbit

  • Documentation
    • Added a roadmap document outlining plans to generalize publish tooling.
    • Details improvements such as workspace metadata discovery, shared data exposure, compatibility shims for crate ordering, configurable per-crate behavior, flexible workspace layouts, and rule-based version/documentation propagation.
    • Includes plans for unit tests, CLI updates, documentation updates, and expanded integration testing across representative workspaces.
    • Provides a clear, step-by-step path for future enhancements to streamline and standardize publishing workflows.

@sourcery-ai

sourcery-ai Bot commented Sep 30, 2025

Copy link
Copy Markdown

Reviewer's Guide

This PR introduces a new roadmap document that analyzes current coupling in the publish and version bump scripts and lays out a five-phase plan to generalize these tools for arbitrary Rust workspaces.

Class diagram for current and proposed publish tooling structure

classDiagram
    class PublishWorkspaceMembers {
        +PUBLISHABLE_CRATES: tuple
        +get_crate_list()
        +get_release_order()
    }
    class RunPublishCheck {
        +run()
        +publish_crate(crate_name)
        +dry_run(crate_name)
    }
    class BumpVersion {
        +bump_member_version(crate_name)
        +update_markdown_versions()
    }
    PublishWorkspaceMembers <|-- RunPublishCheck
    PublishWorkspaceMembers <|-- BumpVersion
    %% Proposed changes
    class WorkspaceMetadataDiscovery {
        +parse_manifest()
        +get_crate_paths()
        +get_release_order()
    }
    class ConfigurableBehaviour {
        +load_config()
        +get_publish_command(crate_name)
        +get_dry_run_action(crate_name)
    }
    class FlexibleLayoutSupport {
        +resolve_workspace_root()
        +discover_members()
    }
    class VersionPropagation {
        +configure_shared_versions()
        +update_documentation(paths)
    }
    WorkspaceMetadataDiscovery <|-- RunPublishCheck
    WorkspaceMetadataDiscovery <|-- BumpVersion
    ConfigurableBehaviour <|-- RunPublishCheck
    FlexibleLayoutSupport <|-- RunPublishCheck
    FlexibleLayoutSupport <|-- BumpVersion
    VersionPropagation <|-- BumpVersion
Loading

Flow diagram for the roadmap to generalize publish tooling

flowchart TD
    A["Current: Hard-coded crate list and paths"] --> B["Phase 1: Discover workspace metadata dynamically"]
    B --> C["Phase 2: Make crate-specific behaviour configurable"]
    C --> D["Phase 3: Support flexible workspace layouts"]
    D --> E["Phase 4: Generalise version propagation"]
    E --> F["Phase 5: Validation and ergonomics"]
Loading

File-Level Changes

Change Details Files
Add a roadmap document for generalizing publish tooling
  • Create docs/roadmap.md with a high-level overview
  • Summarize current coupling issues in run_publish_check.py and bump_version.py
  • Define a structured five-phase roadmap
docs/roadmap.md
Outline detailed steps to decouple and configure scripts
  • Describe workspace metadata discovery and shared data representation
  • Specify configuration-driven crate behaviors and CLI options
  • Cover flexible workspace layouts and explicit root resolution
  • Generalize version propagation and documentation updates
  • Add validation, help text updates, and integration testing guidance
docs/roadmap.md

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

coderabbitai Bot commented Sep 30, 2025

Copy link
Copy Markdown

Walkthrough

Adds a new documentation file, docs/roadmap.md, outlining a plan to generalize publish tooling, including discovery via cargo metadata, configurable crate behavior, flexible workspace layouts, version propagation updates, tests, CLI/docs updates, and integration testing adjustments.

Changes

Cohort / File(s) Summary of Changes
Documentation: Roadmap
docs/roadmap.md
Added a roadmap describing generalization of publish tooling, covering metadata discovery, shared data exposure, ordering shims, configurable crate-specific behavior, flexible workspace roots, version propagation rules, tests, CLI/docs updates, and Makefile/integration test updates.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I thump my paw, a roadmap grows,
Paths for crates where metadata flows.
From rigid twigs to flexible vines,
Configs hum tunes, and version lines.
I nibble docs, then hop—delight!
Pipelines bloom in morning light.
Carrots commit: future bright! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly captures the primary change by indicating that a roadmap is being documented for generic publish tooling, directly reflecting the addition of the docs/roadmap.md file.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/create-roadmap-for-generic-python-scripts

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `docs/roadmap.md:36` </location>
<code_context>
+## Roadmap
+
+### 1. Introduce workspace metadata discovery
+1. Parse the workspace manifest (or invoke `cargo metadata`) to build the crate
+   list, release order, and per-crate paths at runtime, replacing the
+   `PUBLISHABLE_CRATES` constant and hard-coded `crates/<name>` resolution in the
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 2
<location> `docs/roadmap.md:40` </location>
<code_context>
+   list, release order, and per-crate paths at runtime, replacing the
+   `PUBLISHABLE_CRATES` constant and hard-coded `crates/<name>` resolution in the
+   publish workflow.【F:crate_tools/run_publish_check.py†L72-L187】
+2. Extend `publish_workspace_members` (or an adjacent helper) to expose the
+   discovered data so both scripts can consume a shared representation.
+3. Provide a compatibility shim that honours an explicit crate ordering when a
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 3
<location> `docs/roadmap.md:42` </location>
<code_context>
+   publish workflow.【F:crate_tools/run_publish_check.py†L72-L187】
+2. Extend `publish_workspace_members` (or an adjacent helper) to expose the
+   discovered data so both scripts can consume a shared representation.
+3. Provide a compatibility shim that honours an explicit crate ordering when a
+   workspace supplies one (for example via a config file) so existing release
+   sequences remain controllable.
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 4
<location> `docs/roadmap.md:47` </location>
<code_context>
+   sequences remain controllable.
+
+### 2. Make crate-specific behaviour configurable
+1. Replace the static live publish command map with configuration derived from
+   metadata or an external config file (YAML/TOML), allowing workspaces to mark
+   crates that require locked publishes or custom command sequences.【F:crate_tools/run_publish_check.py†L74-L485】
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 5
<location> `docs/roadmap.md:50` </location>
<code_context>
+1. Replace the static live publish command map with configuration derived from
+   metadata or an external config file (YAML/TOML), allowing workspaces to mark
+   crates that require locked publishes or custom command sequences.【F:crate_tools/run_publish_check.py†L74-L485】
+2. Generalise the dry-run action selection so that each crate declares whether
+   it should run `cargo check`, `cargo test`, or `cargo package`, instead of the
+   current name-based branching.【F:crate_tools/run_publish_check.py†L626-L637】
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 6
<location> `docs/roadmap.md:53` </location>
<code_context>
+2. Generalise the dry-run action selection so that each crate declares whether
+   it should run `cargo check`, `cargo test`, or `cargo package`, instead of the
+   current name-based branching.【F:crate_tools/run_publish_check.py†L626-L637】
+3. Document and implement CLI flags (or config schema) for optional behaviours
+   such as stripping `[patch]` sections, applying per-crate replacements, and
+   keeping the temporary workspace, so other projects can opt in without code
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 7
<location> `docs/roadmap.md:59` </location>
<code_context>
+   changes.【F:crate_tools/run_publish_check.py†L511-L667】
+
+### 3. Support flexible workspace layouts
+1. Let callers pass the workspace root explicitly (CLI option or environment
+   variable) and resolve crate locations via metadata, enabling vendored use of
+   the scripts.【F:crate_tools/bump_version.py†L340-L360】【F:crate_tools/run_publish_check.py†L160-L187】
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 8
<location> `docs/roadmap.md:62` </location>
<code_context>
+1. Let callers pass the workspace root explicitly (CLI option or environment
+   variable) and resolve crate locations via metadata, enabling vendored use of
+   the scripts.【F:crate_tools/bump_version.py†L340-L360】【F:crate_tools/run_publish_check.py†L160-L187】
+2. Ensure member discovery handles path, glob, and package rename cases from the
+   manifest rather than assuming directory names match package names.
+3. Update temporary export and pruning helpers to operate on the discovered set
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 9
<location> `docs/roadmap.md:64` </location>
<code_context>
+   the scripts.【F:crate_tools/bump_version.py†L340-L360】【F:crate_tools/run_publish_check.py†L160-L187】
+2. Ensure member discovery handles path, glob, and package rename cases from the
+   manifest rather than assuming directory names match package names.
+3. Update temporary export and pruning helpers to operate on the discovered set
+   of members so they no longer depend on rstest-bdd specific helper modules.
+
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 10
<location> `docs/roadmap.md:68` </location>
<code_context>
+   of members so they no longer depend on rstest-bdd specific helper modules.
+
+### 4. Generalise version propagation
+1. Allow configuring which workspace crates should share the workspace version
+   (for example via manifest metadata or an external map) instead of the
+   `ortho_config` special-case in `_update_member_version`.【F:crate_tools/bump_version.py†L422-L440】
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 11
<location> `docs/roadmap.md:71` </location>
<code_context>
+1. Allow configuring which workspace crates should share the workspace version
+   (for example via manifest metadata or an external map) instead of the
+   `ortho_config` special-case in `_update_member_version`.【F:crate_tools/bump_version.py†L422-L440】
+2. Replace the `replace_version_in_toml`/`_update_markdown_versions` coupling to
+   `ortho_config` with a rule-based system (e.g. scan for dependencies whose
+   names match the workspace crates) and support an extensible list of
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 12
<location> `docs/roadmap.md:75` </location>
<code_context>
+   `ortho_config` with a rule-based system (e.g. scan for dependencies whose
+   names match the workspace crates) and support an extensible list of
+   documentation paths supplied on the command line or via config.【F:crate_tools/bump_version.py†L504-L614】
+3. Add unit tests that cover multiple workspace layouts and documentation file
+   selections to guarantee the new configuration behaves as expected.
+
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 13
<location> `docs/roadmap.md:79` </location>
<code_context>
+   selections to guarantee the new configuration behaves as expected.
+
+### 5. Validation and ergonomics
+1. Update the CLI help text to describe the new configuration options and
+   document the expected metadata/configuration schema in `docs/`.
+2. Provide example config files and usage snippets for adopting the scripts in a
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 14
<location> `docs/roadmap.md:81` </location>
<code_context>
+### 5. Validation and ergonomics
+1. Update the CLI help text to describe the new configuration options and
+   document the expected metadata/configuration schema in `docs/`.
+2. Provide example config files and usage snippets for adopting the scripts in a
+   new workspace, ensuring the roadmap deliverables translate into actionable
+   migration steps.
</code_context>

<issue_to_address>
**suggestion (review_instructions):** This bullet point exceeds the 80 column limit for paragraphs and bullets.

Please wrap this bullet point to 80 columns for improved readability and to comply with the formatting guidelines.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

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.

@leynos
leynos merged commit 1e5e4c4 into main Sep 30, 2025
2 of 3 checks passed
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