Skip to content

fix(ci): harden JS lint steps — fix mastra-agentmesh TS errors, remove soft-fail masks - #2745

Merged
Imran Siddique (imran-siddique) merged 1 commit into
microsoft:mainfrom
nuthalapativarun:fix/ci-lint-hardening-mastra-copilot
Jun 2, 2026
Merged

Imran Siddique (imran-siddique) merged 1 commit into
microsoft:mainfrom
nuthalapativarun:fix/ci-lint-hardening-mastra-copilot

Conversation

@nuthalapativarun

Copy link
Copy Markdown
Contributor

Description

Both Lint mastra-agentmesh and Lint copilot-governance CI steps used 2>/dev/null || true, silently swallowing TypeScript errors and making those lint gates meaningless.

mastra-agentmesh had three real TS errors:

  • TS2307 – Cannot find module 'crypto' (dynamic import("crypto") requires @types/node)
  • TS2304 – Cannot find name 'TextEncoder' (DOM type not in lib)
  • TS2304 – Cannot find name 'crypto' (DOM global not in lib)

Fixes applied:

  1. tsconfig.json: added "DOM" to lib — resolves TextEncoder and crypto.subtle globals.
  2. src/audit.ts: replaced the Node.js crypto try/catch fallback with the Web Crypto API path only. Node 18+ (CI uses Node 20) exposes crypto.subtle as a global, so the dynamic import("crypto") that required @types/node is no longer needed.
  3. ci.yml: removed 2>/dev/null || true from both lint steps so failures surface in CI going forward.

tsc --noEmit passes with zero errors in both packages after this change.

Type of Change

maintenance

Package(s) Affected

docs/root

Checklist

  • ruff check — N/A (TS/CI only)
  • tests pass — tsc --noEmit passes in both packages after fix
  • docs updated — N/A
  • CLA signed

Attribution & Prior Art

N/A

AI Assistance

Changes reviewed and verified manually. Able to explain every change.

IP, Patents, and Licensing

No IP concerns.

Related Issues

N/A

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
🤖 AI Agent: contributor-guide — View details

AI-generated review output. Treat it as untrusted analysis and verify before acting.

Welcome, and thank you for your contribution! Great job identifying and fixing the TypeScript errors while improving CI reliability.

Before we can merge, please ensure:

  1. The Contributor License Agreement (CLA) is signed. Check the CONTRIBUTING.md for details.

Let us know if you need any help!

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential NONE
Overall MEDIUM

Automated check by AGT Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Jun 1, 2026
…e soft-fail masks

Both `Lint mastra-agentmesh` and `Lint copilot-governance` CI steps used
`2>/dev/null || true`, silently swallowing real TypeScript errors.

- mastra-agentmesh/tsconfig.json: add "DOM" to lib so TextEncoder and
  crypto.subtle globals are recognised (TS2304 × 2).
- mastra-agentmesh/src/audit.ts: replace Node.js crypto try/catch with
  the Web Crypto API path only; Node 18+ (CI uses Node 20) exposes
  `crypto.subtle` as a global, so the dynamic `import("crypto")` that
  required @types/node is no longer needed (TS2307 × 1).
- .github/workflows/ci.yml: remove `2>/dev/null || true` from both lint
  steps so failures surface in CI.

`tsc --noEmit` now passes with zero errors in both packages.

Signed-off-by: Varun Nuthalapati <nuthalapativarun@gmail.com>
@nuthalapativarun
nuthalapativarun force-pushed the fix/ci-lint-hardening-mastra-copilot branch from 42a863e to 2b3202d Compare June 2, 2026 00:10
@imran-siddique
Imran Siddique (imran-siddique) merged commit 7df31f0 into microsoft:main Jun 2, 2026
103 of 106 checks passed
MohammadHaroonAbuomar added a commit to MohammadHaroonAbuomar/agt-acs that referenced this pull request Jun 2, 2026
Bring 4 new upstream commits into the AGT 5.0 / ACS branch:
- docs: polish docs site (UX enhancement, clean IA) (microsoft#2771)
- fix(mesh-sdk): close client-side gap with POP-aware relay/registry (v4.0.0) (microsoft#2772)
- fix(attestation): make verify_evidence strict by default (CVSS 8.1) (microsoft#2769)
- fix(ci): harden JS lint steps - fix mastra-agentmesh TS errors (microsoft#2745)

Signed-off-by: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration/mastra-agentmesh needs-review:MEDIUM Contributor check flagged MEDIUM risk scripts/ci/cd size/S Small PR (< 50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants