Skip to content

fix: save dependency review evidence for large updates - #2487

Open
groupthinking wants to merge 4 commits into
mainfrom
codex/fix-dependency-review-evidence
Open

groupthinking wants to merge 4 commits into
mainfrom
codex/fix-dependency-review-evidence

Conversation

@groupthinking

@groupthinking groupthinking commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fetch the dependency diff from GitHub's compare API after the existing review action, avoiding GitHub's template-object limit on large action outputs.
  • Save the raw response and a separate record with the exact base/head commits, review outcome, count, and SHA-256 digest. Missing, malformed, snapshot-warned, or graph-inconsistent API responses fail before evidence is saved. For changed npm lockfiles, verify returned package names, versions, and scopes against the exact base/head lockfile revisions.
  • Treat a change only to the dependency review workflow as a code change with no dependency graph delta. CI tests still validate the workflow. Actual manifest and lockfile changes still run dependency review.
  • Keep the existing vulnerability and license policy unchanged.

Closes #2485

Paths changed

  • .github/workflows/dependency-review.yml
  • scripts/ci/record_dependency_review.py
  • tests/unit/test_dependency_review_workflow.py

Validation

  • Focused tests/unit/test_dependency_review_workflow.py suite — 19 passed on the final head, including warned empty/partial responses, a warning-free empty response, graph drift rejection, and a real Git rename regression.
  • uvx ruff check scripts/ci/record_dependency_review.py tests/unit/test_dependency_review_workflow.py — passed.
  • git diff --check — passed.

Hosted validation and limits

The current head is 148cbf55fdce412255d2a61780459143521fa4c4. Its hosted checks are being verified on that exact head; see the live check list for final status. The dependency-review job passes through its no-delta path because this PR changes no dependency manifest or lockfile. Its hosted run tests the code-only path, while a real dependency PR must still validate the evidence recorder against a warning-free comparison. The Vercel Agent Review found that Git rename detection could omit an old manifest path; --no-renames and a real Git rename regression test address that finding. The review thread is resolved.

An earlier hosted artifact on superseded head 80fdf2b contained a raw 276-entry comparison whose bytes matched its recorded digest. GitHub also warned that the base had 3 dependency snapshots and the head had 1. That comparison may have unexpected removals and is not complete evidence under the new guard. The prior local trial against #2479 saved 1,390 raw changes before snapshot warnings were checked; it likewise cannot establish a complete comparison.

Live recorder check and graph scope limitation

At the current code head, the local recorder rejects the live, warning-free #2495 comparison without writing evidence, because its removed root fast-uri 3.1.7 entry is labeled runtime while the exact base lockfile marks it dev: true. It also rejects current main versus #2452 before writing evidence because GitHub reports a 3-base/1-head snapshot warning. In contrast, it accepts controlled off-main #2496: the v0.2.0 comparison has only the intended root fast-uri 3.1.7 removal and 3.1.9 addition, both development, and the saved raw bytes match the recorded SHA-256. #2496 was closed unmerged.

The older v0.1.6 component-detection action caches packages by PURL and can apply one development flag across manifests. The v0.2.0 action used on #2496 maps each manifest's scope separately; that version is proposed in stacked draft #2492. The new recorder validation reduces the risk of accepting a wrong npm lockfile scope or a change attributed to an unchanged manifest. It does not establish complete snapshot parity or accurate non-npm package metadata for real updates against current main. Inspect the full comparison, including manifests, packages, scopes, vulnerabilities, and licenses, before a real dependency PR verdict.

A fresh compare for #2452 still reports the base 3/head 1 snapshot mismatch. Once this guard is on main, that update will require complete matching snapshots before its dependency evidence can pass.

The previously approved per-file Python scan timeout and declared-dependency fallback are unchanged. Python fallback can omit transitive dependencies when a requirements scan times out.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 08:31
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
v0-uvai Ready Ready Preview, v0 Oct 28, 2026 3:34pm UTC

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • 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.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: The number of snapshots compared for the base SHA (3) and the head SHA (1) do not match. You may see unexpected removals in the diff.
Re-running this action after a short time may resolve the issue. See the documentation for more information and troubleshooting advice.

Scanned Files

  • apps/backend/requirements.txt
  • docs/design/enterprise-demo/package.json
  • docs/guides/requirements.txt
  • docs/knowledge_prototypes/mcp-servers/legacy_proxies/server-code-assistant/package.json
  • docs/knowledge_prototypes/mcp-servers/legacy_proxies/server-communication-hub/package.json
  • docs/knowledge_prototypes/mcp-servers/legacy_proxies/server-creative-studio/package.json
  • docs/knowledge_prototypes/mcp-servers/legacy_proxies/server-data-analysis/package.json
  • docs/knowledge_prototypes/mcp-servers/legacy_proxies/server-knowledge-management/package.json
  • docs/knowledge_prototypes/mcp-servers/legacy_proxies/server-workflow-automation/package.json
  • docs/knowledge_prototypes/mcp-servers/mcp-alexnet/requirements.txt
  • docs/knowledge_prototypes/mcp-servers/mcp_youtube-0.2.0/uv.lock
  • docs/knowledge_prototypes/universal-automation-service/monitoring/package.json
  • docs/knowledge_prototypes/universal-automation-service/requirements.txt
  • requirements.txt

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The evidence recorder ignores dependency-graph snapshot warnings, allowing successful API responses with incomplete dependency data to be recorded as complete evidence.

1 open issue
What changed in this PR

Addresses #2485 by moving dependency-review evidence collection from large Actions outputs to GitHub’s compare API, while retaining the existing vulnerability and license policy.

Changes:

  • Fetches dependency data for exact base and head commits without workflow-template expansion.
  • Saves the raw response alongside review metadata, change count, and SHA-256 digest.
  • Updates artifact uploads and tests for large responses and evidence integrity.
File Description
tests/​unit/​test_dependency_review_workflow.py Tests large-response preservation, metadata, digest, and workflow wiring.
scripts/​ci/​record_dependency_review.py Adds API-based dependency evidence recording.
.github/​workflows/​dependency-review.yml Runs the recorder and uploads the evidence directory.

Review effort: Balanced

Comment thread scripts/ci/record_dependency_review.py
Comment thread scripts/ci/record_dependency_review.py Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Validation

⚠️ Large PR detected (519 lines changed)

This branch was successfully deployed

1 active deployment
Preview — 148cbf55 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix dependency review evidence failure on large pull requests

2 participants