Conversation
|
/snapit |
|
🫰✨ Thanks @jplhomer! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260916180830Caution After installing, validate the version by running |
Collapse the terminal report by rule, optional pattern, and severity. JSON, traces, scoring, and check counts still keep every occurrence. Co-authored-by: AI (Pi/Grok 4.6) <noreply@pi.dev>
9132dea to
e633fc3
Compare
|
/snapit |
Co-authored-by: AI (Pi/Grok 4.6) <noreply@pi.dev>
|
/snapit |
There was a problem hiding this comment.
🟡 Changes recommended
Remove found_by from presentation grouping and use efficient per-group file tracking to avoid incorrect grouping and quadratic behavior.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR groups repeated App Doctor findings in human-readable reports while preserving full occurrence data for verbose and machine-readable outputs.
Changes:
- Groups findings by rule, pattern, and severity.
- Adds occurrence/file counts and sample paths.
- Adds pattern metadata for secret and Liquid findings.
- Adds coverage for grouping and output behavior.
File summaries
| File | Description |
|---|---|
packages/app/src/cli/services/doctor-output.ts |
Renders grouped and verbose reports. |
packages/app/src/cli/services/doctor-output.test.ts |
Tests report grouping and formatting. |
packages/app/src/cli/services/app-doctor-engine/types.ts |
Adds optional pattern identifiers. |
packages/app/src/cli/services/app-doctor-engine/tests/secret-safety.test.ts |
Verifies secret pattern metadata. |
packages/app/src/cli/services/app-doctor-engine/rules/secret-rules.ts |
Assigns secret finding patterns. |
packages/app/src/cli/services/app-doctor-engine/rules/liquid-rules.ts |
Assigns Liquid finding patterns. |
packages/app/src/cli/services/app-doctor-engine/output/group-issues.ts |
Implements presentation grouping. |
packages/app/src/cli/services/app-doctor-engine/output/group-issues.test.ts |
Tests grouping semantics and immutability. |
packages/app/src/cli/services/app-doctor-engine/index.ts |
Exports grouping functionality. |
Review details
Suppressed comments (1)
packages/app/src/cli/services/app-doctor-engine/output/group-issues.ts:32
- For a repeated rule with N distinct files,
group.files.includes(...)scans the accumulated file list for every occurrence, making grouping O(N²). This is especially costly for the large finding sets this change is intended to collapse; track per-group files with a Set/Map while grouping and materialize the array for the report.
if (!group.files.includes(issue.location.file)) group.files.push(issue.location.file)
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
WHY are these changes introduced?
Repeated App Doctor findings can overwhelm the terminal report and bury unrelated, actionable issues. Collapsing the underlying records would instead lose the file/line evidence agents need and the occurrences used to compare runs.
WHAT is this pull request doing?
Group only the human-readable report by rule, optional pattern, and severity, showing occurrence/file counts and up to three sample paths.
--verboseexpands every occurrence. JSON, traces, scoring, and check counts still keep one record per finding.No public changeset: App Doctor remains a hidden early-access command.
How to manually test your changes?
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add