Repository navigation
refactor(scripts): reuse dependency report CLI helpers - #132866
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 6:04 PM ET / 22:04 UTC. ClawSweeper reviewWhat this changesThe PR replaces dependency-report-local flag parsing and artifact writes with existing shared script helpers and adds focused coverage for the full option set. Merge readinessNo blocking findings. This focused maintainer-authored cleanup preserves the dependency-report CLI contract while removing duplicated parser and artifact-writing code; current main still has the local implementations. Priority: P3 Review scores
Verification
How this fits togetherThe dependency-change report compares lockfiles and dependency-related Git changes, then writes JSON and Markdown artifacts. Release-evidence tooling invokes this CLI through the package script and consumes those artifacts in release review. flowchart LR
A[Release evidence tool] --> B[Dependency report CLI]
B --> C[Shared flag parser]
B --> D[Lockfile and Git comparison]
D --> E[JSON and Markdown artifacts]
C --> B
Before merge
Agent review detailsSecurityNone. PR surfaceTests +37, Other -34. Total +3 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the behavior-preserving consolidation with its focused CLI contract coverage, keeping parser and artifact behavior owned by the shared script helpers. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving script refactor; source comparison and focused tests cover the retained CLI contract. Is this the best way to solve the issue? Yes. Reusing the existing parser and artifact owner removes duplicate policy while keeping report-specific error wording and base-selection validation local. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ca9f6315ae15. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Rank-up move disposition:
|
|
Merged via squash.
|
What Problem This Solves
The dependency change report maintained its own argument parser and artifact writer even though repository-owned helpers already implement those contracts. That duplicated policy could drift as the shared script tooling evolves.
Why This Change Was Made
Reuse the canonical flag parser and report artifact writer while preserving the dependency report's existing defaults, errors, duplicate handling, option separator behavior, and mutually exclusive base selection.
User Impact
No user-visible behavior changes. Maintainers get one canonical implementation for these script contracts and less duplicate tooling code.
Evidence
node scripts/run-vitest.mjs test/scripts/dependency-changes-report.test.ts test/scripts/report-cli-helpers.test.ts test/scripts/arg-utils.test.ts(84 tests passed)git diff --check