Skip to content

docs: add a release-algorithm diagram - #778

Merged
BryanFRD merged 1 commit into
mainfrom
docs/diagrams
Aug 1, 2026
Merged

docs: add a release-algorithm diagram#778
BryanFRD merged 1 commit into
mainfrom
docs/diagrams

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Closes #777

Documents what happens between reading the commits and the release existing, with the reasoning behind the ordering.

Covers the analysis phase (release lock, commit-graph write on fresh clones, the single tag_foreach pre-scan that collapses per-package tag lookups from O(tags) callbacks + O(commits) walk to O(1), and the changelog section built once so hooks, tag body and release notes cannot disagree), then execute_release with an explicit note on why git lands before the forge and why files_to_commit is snapshotted after pre-commit hooks.

Includes the checkpoint state machine as a stateDiagram-v2 — the six phases, the pinning to HEAD, and the deliberate refusal to resume when the repo has moved.

The manifest section records the rule that matters most for user trust: format writers splice the version in place and never reserialise, because reformatting someone's Cargo.toml is a bug rather than a side effect.

Copilot AI review requested due to automatic review settings August 1, 2026 11:55

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ferrfleet ferrfleet 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.

Docs-only addition (docs/diagrams/release-algorithm.md + index). Cross-checked the diagrams and the ordering claims against the actual implementation (src/monorepo/run/{mod,execute,checkpoint,lock}.rs) — lock-before-mutation, commit-graph write, single tag_foreach pre-collection, execute_release step order (commit → tags → push → forge → post-publish), checkpoint phase ordering/HEAD-pinning/stale handling, and push-before-publish all match the code exactly, including the #770/#549/#514 history referenced in comments.

Nit: "18 modules under src/formats/, each owning one file shape" overcounts slightly — of the 18 files in that directory, mod.rs (dispatch table) and splice.rs (shared helper) aren't format-specific, and lockfiles.rs covers multiple lockfile kinds rather than one shape. Only 15 modules map 1:1 to a FileFormat variant. Not worth blocking on, just a number to tighten if this doc gets revisited.

@BryanFRD
BryanFRD merged commit 380d2e1 into main Aug 1, 2026
39 checks passed
@BryanFRD
BryanFRD deleted the docs/diagrams branch August 1, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add a release-algorithm diagram

2 participants