Skip to content

feat: monitor Renovate hosted evidence - #242

Merged
edithatogo merged 2 commits into
mainfrom
codex/renovate-monitor
Aug 1, 2026
Merged

feat: monitor Renovate hosted evidence#242
edithatogo merged 2 commits into
mainfrom
codex/renovate-monitor

Conversation

@edithatogo

Copy link
Copy Markdown
Owner

Summary

  • add a scheduled/manual Renovate hosted-evidence monitor
  • detect a Renovate Dashboard or Renovate-authored PR through the GitHub API
  • publish JSON evidence and a warning without blocking normal CI
  • add deterministic unit coverage for healthy and unhealthy hosted states

Safety

Dependabot remains enabled until Renovate activity is proven. The monitor never marks Conductor work complete automatically.

Verification

  • full pre-commit suite: 82 tests passed
  • lint, typecheck, formatting, coverage, audit, workflow, docs, and Conductor validation passed

Relates #234 and #236.

Copilot AI review requested due to automatic review settings August 1, 2026 08:00
@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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.

@amazon-q-developer amazon-q-developer 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.

Review Summary

This PR adds a scheduled monitor for Renovate hosted evidence through GitHub API checks. The implementation is generally solid with good test coverage.

Critical Issues Found (3)

  1. Logic Error: Missing validation for repository format before splitting - could cause silent failures or incorrect API calls
  2. Crash Risk: Missing error handling in workflow step for JSON parsing failures
  3. Potential Data Loss: Limited to 100 items per API call may miss Renovate evidence in large repositories

Verification

The PR description indicates 82 tests passed with full pre-commit suite validation. The code structure follows good practices with separation of concerns between entry point, library, and tests.

Please address the critical validation and error handling issues before merging.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

Comment on lines +56 to +58
export async function runRenovateHostedCheck({ repository, token }) {
if (!repository || !token) throw new Error('GITHUB_REPOSITORY and GITHUB_TOKEN are required');
const [owner, repo] = repository.split('/');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Logic Error: Add validation for repository format before splitting. If repository doesn't contain a slash or has an invalid format (e.g., "myrepo" instead of "owner/repo"), the split operation will produce incorrect values, causing API calls to fail silently or target wrong repositories.

Suggested change
export async function runRenovateHostedCheck({ repository, token }) {
if (!repository || !token) throw new Error('GITHUB_REPOSITORY and GITHUB_TOKEN are required');
const [owner, repo] = repository.split('/');
export async function runRenovateHostedCheck({ repository, token }) {
if (!repository || !token) throw new Error('GITHUB_REPOSITORY and GITHUB_TOKEN are required');
if (!repository.includes('/')) throw new Error('GITHUB_REPOSITORY must be in owner/repo format');
const [owner, repo] = repository.split('/');

Comment on lines +59 to +62
const [issues, pulls] = await Promise.all([
fetchGitHub(`/repos/${owner}/${repo}/issues?state=all&per_page=100`, token),
fetchGitHub(`/repos/${owner}/${repo}/pulls?state=all&per_page=100`, token),
]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fetching only 100 items per endpoint may miss Renovate evidence in repositories with many issues or PRs. Consider implementing pagination to retrieve all items, or at minimum increase the limit and add sorting to ensure most recent items are checked first.

Comment on lines +34 to +40
- name: Publish evidence summary
shell: bash
run: |
cat renovate-hosted.json >> "$GITHUB_STEP_SUMMARY"
if jq -e '.healthy == false' renovate-hosted.json >/dev/null; then
echo '::warning::No Renovate Dashboard or bot pull request is visible yet; Dependabot fallback remains required.'
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Crash Risk: Missing error handling for JSON parsing. If renovate-hosted.json is empty or contains invalid JSON, the jq command will fail but the step will continue. Add error handling or use set -e to fail on errors.

Suggested change
- name: Publish evidence summary
shell: bash
run: |
cat renovate-hosted.json >> "$GITHUB_STEP_SUMMARY"
if jq -e '.healthy == false' renovate-hosted.json >/dev/null; then
echo '::warning::No Renovate Dashboard or bot pull request is visible yet; Dependabot fallback remains required.'
fi
- name: Publish evidence summary
shell: bash
run: |
set -e
cat renovate-hosted.json >> "$GITHUB_STEP_SUMMARY"
if jq -e '.healthy == false' renovate-hosted.json >/dev/null; then
echo '::warning::No Renovate Dashboard or bot pull request is visible yet; Dependabot fallback remains required.'
fi

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.94737% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
scripts/lib/renovate-hosted.js 80.00% 15 Missing ⚠️
scripts/run-coverage.js 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@edithatogo
edithatogo merged commit 1be6d8a into main Aug 1, 2026
10 of 11 checks passed
@edithatogo
edithatogo deleted the codex/renovate-monitor branch August 1, 2026 08:10
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.

3 participants