Document roadmap for generic publish tooling - #1
Conversation
Reviewer's GuideThis 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 structureclassDiagram
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
Flow diagram for the roadmap to generalize publish toolingflowchart 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"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughAdds 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Comment |
There was a problem hiding this comment.
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>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68dc486cc1988322af1ec9e5b4191d08
Summary by Sourcery
Documentation:
Summary by CodeRabbit