feat(ci): add daily upstream plugin audit workflow and checker tool - #97
Conversation
There was a problem hiding this comment.
Sorry @tonythethompson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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 |
|
Findings
Verification |
|
/oc fix |
Co-authored-by: tonythethompson <tonythethompson@users.noreply.github.com>
|
All review findings addressed. P1 fixes
P2 fixes
Verification: 152/152 unit tests pass (139 before, incl. the previously failing pin gate), |
| snapshot_matches = bool( | ||
| resolved_newest and current_commit and resolved_newest.lower() == current_commit.lower() | ||
| ) | ||
| has_new_tag = not snapshot_matches |
There was a problem hiding this comment.
WARNING: Race condition - resolve_tag_commit returning None for newest_tag incorrectly flags NEW_TAG_AVAILABLE
When resolved_newest is None (e.g. tag deleted between API calls), snapshot_matches is False, making has_new_tag = True. This reports a phantom new tag. Guard with if resolved_newest is None: has_new_tag = False before the boolean inversion.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| if isinstance(data, dict) and "content" in data: | ||
| content = base64.b64decode(data["content"]).decode("utf-8", errors="replace") | ||
| # match nu-plugin = "0.115.0" or nu-plugin = { version = "0.115" } | ||
| m = re.search(r'nu-plugin\s*=\s*(?:\{[^}]*version\s*=\s*)?["\']([^"\']+)["\']', content) |
There was a problem hiding this comment.
SUGGESTION: Regex for nu-plugin dep won't match nested inline tables in Cargo.toml
[^}]* stops at the first }, so a value like nu-plugin = { version = "0.115", features = { "a", "b" } } would fail to match. Consider a non-greedy pattern or a simple TOML parser for robustness.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| python scripts/check_upstream_updates.py --report docs/upstream-audit-report.md |
There was a problem hiding this comment.
SUGGESTION: Generated report is written but never committed
The run step writes docs/upstream-audit-report.md, but the workflow has no git commit/push step. If the report is meant to be persisted in the repo, add a step to configure git and commit the file. Otherwise, document that the report is step-summary-only.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Reviewed by step-3.7-flash · Input: 80.3K · Output: 24.3K · Cached: 484.9K Review guidance: REVIEW.md from base branch |


Summary
Verification
Summary by cubic
Adds a daily CI workflow and Python checker to audit active plugins against upstream GitHub tags and
Cargo.tomlnu-plugin/nu-protocoldeps, replacing manual checks. The new tool fails closed on upstream API errors, generates a Markdown report, and exposes anupdates_foundoutput for follow-up jobs.Daily Upstream Plugin Checkworkflow (05:00 UTC + manual dispatch) that writesdocs/upstream-audit-report.mdand appends toGITHUB_STEP_SUMMARY.scripts/check_upstream_updates.pyusingGITHUB_TOKEN/GH_TOKENto classify plugins asREADY_FOR_BUMP,UPSTREAM_NU_BUMP_NO_TAG,NEW_TAG_AVAILABLE,UP_TO_DATE,TAG_PROVENANCE_MISMATCH, orFETCH_ERROR; exposesupdates_foundviaGITHUB_OUTPUT.FETCH_ERRORand the script exits non-zero.scripts/test_check_upstream_updates.py; runpython -m pytest scripts/. 152/152 tests pass.Written for commit a77e261. Summary will update on new commits.