Skip to content

fix: automate upstream sync bookkeeping and date released changelog sections - #20

Merged
jsonMartin merged 4 commits into
mainfrom
ci/mechanical-upstream-sync
Oct 20, 2026
Merged

jsonMartin merged 4 commits into
mainfrom
ci/mechanical-upstream-sync

Conversation

@jsonMartin

Copy link
Copy Markdown
Owner

Upstream syncs need manual bookkeeping today, and every version change breaks CI. This PR removes both problems so the sync workflow can open a PR that passes CI on its own. It also repairs What's New for the 0.9.3.1 and 0.9.5.1 releases.

Changes

  • Tests no longer depend on live versions. startup_overlays.rs hard-coded v0.9.5.1 and SUPERHERDR 0.9.1.2, and history_omits_unreleased_sections required the live CHANGELOG to contain an Unreleased section. Both now derive their expectations from the running version or from a synthetic changelog. full_history_body_from() exists for that purpose.
  • Two new invariants. One requires the newest ### Inherited from Herdr section to match the Cargo base version. The other requires the current Superherdr version's heading to be dated. CONTRIBUTING has always said the first one was enforced, but no test checked it.
  • CHANGELOG.
    • Dates the published 0.9.3.1 (2026-10-08) and 0.9.5.1 (2026-10-15) headings. Their binaries left their own notes out of What's New because the headings still said Unreleased.
    • Opens ## [0.9.5.2] - Unreleased with the installer and What's New fixes.
  • README now points at releases/latest/download/install.sh instead of the 0.9.0.1 installer.
  • scripts/sync_upstream.sh now resolves the conflicts that come with every upstream release. Anything else still exits 2 and produces a draft PR. The new steps:
    • Cargo.toml: a 3-way merge with the version line normalized. Upstream release tags sit on branches, so the merge base often carries an older version than either side.
    • Cargo.lock: takes upstream's lock and runs cargo update --workspace.
    • Resets SUPERHERDR_REVISION to 1.
    • Grafts the inherited sections from upstream's tagged CHANGELOG.md, which also covers skipped releases.
    • Adds the dated ## [<base>.1] section. A pending Unreleased section becomes that section, and the intro text above it is kept.
  • AGENTS.md and CONTRIBUTING.md: the Cargo rule is corrected. Superherdr's version follows upstream, and the fourth part comes from SUPERHERDR_REVISION.

No OpenSpec proposal: these changes restore behavior the baseline specs already require, the release-notes order and the installer default.

Evidence

  • RUSTUP_TOOLCHAIN=1.96.1 just check on this branch merged with ci/automated-releases: exit 0. nextest ran 4185 tests, 4185 passed and 16 were skipped. OpenSpec: 6 passed, 0 failed.

  • python3 -m unittest scripts.test_sync_upstream -v: 9 tests OK. The new intro-preservation assertion fails against the previous script and passes with the fix.

  • Replayed the v0.9.5 sync from ebe0ca62 (main before 0.9.5) in a scratch worktree:

    • Cargo.toml and the superherdr lock entry match 9378c4b2.
    • The grafted 0.9.5 and 0.9.4 sections match the hand-grafted ones, ignoring blank lines.
    • The revision reset to 1 and the new heading is ## [0.9.5.1] - <date>.
    • It exited 2 with exactly the 8 real source conflicts left.
    • cargo metadata --locked succeeds.

    The replay also found a SIGPIPE exit 141 under pipefail that the small fixtures could not trigger. It is fixed.

  • grep -rn '0\.9\.5\.1\|0\.9\.1\.2' src: no hits.

Merge this before ci/automated-releases: its publish gate requires the dated heading format this PR writes.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: edff42fd-37ef-4230-89e1-89d5d05adf69
📥 Commits

Reviewing files that changed from the base of the PR and between 9378c4b and c0ef55d.

📒 Files selected for processing: 9
  • AGENTS.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • scripts/sync_upstream.sh
  • scripts/test_sync_upstream.py
  • src/client/shell/tests/startup_overlays.rs
  • src/release_notes.rs
  • src/ui/release_notes.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jsonMartin
jsonMartin merged commit 37eec85 into main Oct 20, 2026
5 checks passed
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.

1 participant