feat(ci): auto-sync the MCP known-latest constant, never a manual bump#6638
Merged
Conversation
apps/loopover-ui/src/lib/mcp-package.ts's MCP_PACKAGE_KNOWN_LATEST_VERSION is a client-side graceful-degradation fallback (shown only when the live npm registry fetch fails or hasn't resolved yet); ui:version-audit already requires it to track @loopover/mcp's real npm dist-tags.latest, but the only way to fix a drift was a manual edit. Adds a --write mode to scripts/check-ui-mcp-version-copy.mjs that self-heals the constant instead of failing, and a new scheduled workflow (mcp-ui-version-sync.yml) that runs it daily and keeps a standing PR open with the sync, mirroring orb-stable-release-pr.yml's pattern. Nothing ships without a maintainer merging the PR; CI's own invocation of ui:version-audit never passes --write, so a genuine drift in a contributor PR still fails loud.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6638 +/- ##
=======================================
Coverage 93.64% 93.64%
=======================================
Files 680 680
Lines 68026 68026
Branches 18673 18673
=======================================
Hits 63704 63704
Misses 3347 3347
Partials 975 975
Flags with carried forward coverage won't be shown. Click here to find out more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/loopover-ui/src/lib/mcp-package.ts'sMCP_PACKAGE_KNOWN_LATEST_VERSIONis a client-side graceful-degradation fallback (shown only when the live npm registry fetch fails or hasn't resolved yet).ui:version-auditalready requires it to track@loopover/mcp's real npmdist-tags.latest, but the only way to fix a drift was a manual edit — this repo just hit that exact failure on main.--writemode toscripts/check-ui-mcp-version-copy.mjsthat self-heals the constant instead of failing when the registry check is run with it..github/workflows/mcp-ui-version-sync.yml, daily cron +workflow_dispatch) that runs the sync and keeps a standing PR up to date, mirroringorb-stable-release-pr.yml's existing pattern (force-pushed branch,gh pr create/gh pr edit).maindirectly. CI's own invocation ofui:version-auditnever passes--write, so a genuine drift introduced by a contributor PR still fails loud as before.Scope
scripts/check-ui-mcp-version-copy.mjs,scripts/check-ui-mcp-version-copy.d.mts,package.json,test/unit/check-ui-mcp-version-copy-script.test.ts,.github/workflows/mcp-ui-version-sync.ymlValidation
npx tsc --noEmit— cleannpx vitest run test/unit/check-ui-mcp-version-copy-script.test.ts— 14/14 passed (new tests coverwriteKnownLatestVersiondirectly and the--writeCLI mode end-to-end against a disposable temp repo layout, never the real source file)npm run ui:version-audit(no--write) — still passes cleanly, unaffectednpm run ui:version-audit:sync(new script,--writemode) — confirmed no-op when already in syncnpm run actionlint— clean on the new workflowSafety
github.token, same asorb-stable-release-pr.yml)