fix(release): read the Homebrew lane version from the formula's version stanza - #358
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: PyModel/pythinker-code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe release status script now reads the Homebrew version from its formula’s ChangesHomebrew version parsing
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The change updates how Homebrew’s release version is read, and the supplied context identifies no concrete impact that should block merging. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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. Comment |
commit: |
Requirement or Bug
The nightly workflow has failed on
mainevery scheduled run since 2026-09-28 (runs 36405927270, 36551889134, 36698004633, 36814079854, 36847459152). After PR #356 shipped the Homebrew formula from native release tarballs, the release-reconciliation script can no longer read the formula's version, so the Homebrew lane fails on every nightly.Bug Reproduction Steps
@pymodel/pythinker-code@2.5.0).node scripts/release/release-status.mjsonmain(commit before this PR).FAIL | Formula/pythinker-code.rb (no version)— the step exits 1 and the nightly run goes red (drift issue "Release lane drift detected").Root Cause
brewFormulaVersionextracted the version from the old npm-tarball formula shape via the regex/pythinker-code-(\d+\.\d+\.\d+)\.tgz/. PR #356 rewrote the generated formula to pin native per-platform tarballs (pythinker-code-<target>.tar.gz, no version in the filename) and to declare an explicitversion "X.Y.Z"stanza instead. The lane checker — a consumer of the formula shape — was not updated, so it now always reports the formula as unreadable. This is a fundamental fix: the parser now reads the stanza the generator actually writes (renderFormulainscripts/release/update-brew-formula.mjs).Code Changes
scripts/release/release-status.mjs—brewFormulaVersionnow extracts the version from the formula'sversion "…"stanza.scripts/release/release-status.test.mjs— the fixture formula now renders the native-tarball shape (version stanza + native tarball URL), and a new test proves a formula without a version stanza fails the lane with "no pythinker-code tarball version".Behavior Changes and Affected Users
pythinker-code-<version>.tgznpm-tarball URLversion "…"stanzaNothing else observable changes: the CLI, desktop app, extension, installers, and updaters do not consume
brewFormulaVersion; it is internal to the release reconciliation script and the nightly workflow.Test coverage:
scripts/release/release-status.test.mjs— lane-aligned test (native-shape fixture), lagging-formula test, and the new missing-stanza test (pnpm run test:release, 59/59).Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Summary by CodeRabbit