Skip to content

fix(mcp): load trusted compiler for template scans - #452

Merged
santoshyadavdev merged 1 commit into
mainfrom
santoshyadavdev-trusted-template-compiler
Nov 4, 2026
Merged

santoshyadavdev merged 1 commit into
mainfrom
santoshyadavdev-trusted-template-compiler

Conversation

@santoshyadavdev

Copy link
Copy Markdown
Collaborator

What and why

Template scans previously imported @angular/compiler through the scanned project's package resolution, allowing project-controlled code to execute with the scanner's authority. Bundle and load the package's compiler instead, and use the project's declared Angular major only for version-specific lint behavior.

How it was verified

  • pnpm commit:check (1 commit message OK)
  • pnpm format:check
  • pnpm typecheck
  • pnpm test, pnpm test:devtools and pnpm test:panel (workspace and panel tests passed; pnpm test:devtools has one failure in hub-entry.test.ts)
  • pnpm skills:check (when .claude/ changed)
  • Docs in apps/docs updated and pnpm docs:build passes (when behavior, options, UI labels or agent tools changed), or the no-docs label added with the reason below
  • pnpm extension:build and extension/ui committed (when app/ changed)
  • Checked in the browser with axe (when the UI changed)

Additional checks: pnpm typecheck, pnpm build, pnpm extension:build, pnpm docs:build, and pnpm exec nx affected -t test build passed. The two focused template compiler test files passed (43 tests). Axe checks passed using installed Chrome with the Playwright script; the standard command could not download its pinned Chromium.

Screenshots

N/A. No UI changes.

Notes for reviewers

The failing package test expects a missing built hub entry, but pnpm devtools:build-pkg creates that entry before the test runs. No change in this PR touches the hub loader.

Parse project templates with the compiler bundled by the package, not code selected from scanned project dependencies. Keep Angular-version-specific findings aligned with the project's declared version.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50eea704-5bf1-466a-9ca8-b960d93bc30b
Commits

Reviewing files that changed from the base of the PR and between dcbd285 and a217a93.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 9
  • apps/docs/src/content/agents/tools.md
  • apps/docs/src/content/getting-started/cli.md
  • packages/devtools/package.json
  • packages/devtools/src/__tests__/lint-export.test.ts
  • packages/devtools/src/lint-export.ts
  • packages/devtools/src/rpc/__tests__/template-lint.test.ts
  • packages/devtools/src/rpc/template-lint.ts
  • packages/devtools/src/rpc/trusted-template-compiler.ts
  • packages/devtools/tsdown.config.ts
  • 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

@github-actions github-actions Bot added area: package The ng-devtools package (packages/ng-devtools) area: agents MCP server, agent tools and resources area: docs The documentation site labels Nov 4, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
a217a93 2026-11-04T06:09:57.252Z View logs ↗

@nx-cloud

nx-cloud Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit a217a93

Command Status Duration Result
nx affected -t test build ✅ Succeeded 2m 38s View ↗
nx build --configuration development ✅ Succeeded 38s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-04 06:12:47 UTC

@santoshyadavdev
santoshyadavdev merged commit aa23439 into main Nov 4, 2026
11 of 12 checks passed
@santoshyadavdev
santoshyadavdev deleted the santoshyadavdev-trusted-template-compiler branch November 4, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents MCP server, agent tools and resources area: docs The documentation site area: package The ng-devtools package (packages/ng-devtools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant