Repository navigation
Fix external plugin validation when modern and legacy manifests coexist - #6207
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🚦 Submission status: 👀 Ready for reviewRisk tier: Why this tier
Automated checks
Review
Commands
Updated for |
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the root-manifest precedence change.
No open issues 🎉
What changed in this PR
Fixes external-plugin quality gates selecting legacy manifests over a modern root plugin.json, addressing the compliance failure reported for Azure’s update in #6176.
Changes:
- Makes the root manifest authoritative, retaining nested manifests as fallbacks only when the root is absent.
- Adds regression tests for manifest precedence, invalid JSON, lint-target selection, and version matching under nested source paths.
- Documents that legacy manifests cannot override or bypass an invalid root manifest.
| File | Description |
|---|---|
eng/external-plugin-quality-gates.test.mjs |
Adds regression coverage for root-manifest precedence across quality gates. |
eng/external-plugin-quality-gates.mjs |
Places root plugin.json first in the shared manifest search order. |
CONTRIBUTING.md |
Clarifies root-manifest authority when legacy manifests coexist. |
Review effort: Balanced (auto)
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
The Azure update in #6176 fails manifest compliance even though its pinned source contains a valid Agent Plugins v1.0.0 root
plugin.json. Quality gates currently prefer.github/plugin/plugin.jsonand.plugin/plugin.json, selecting a legacy manifest instead.Make the root manifest authoritative for compliance, lint-target selection, version matching, and installed-manifest lookup. Retain nested locations as legacy fallbacks only when the root is absent; an invalid root must still fail rather than falling back. This also aligns selection order with the external-plugin metadata validator.
Add regression coverage for mixed modern/legacy manifests, malformed legacy JSON, invalid roots, lint-target selection, and matching/mismatching root versions under a nested source path. Document the precedence in the contribution guidance.
Relates to #6176.
Type of Contribution
Additional Notes
Validation:
node --test eng\external-plugin-quality-gates.test.mjs eng\external-plugin-validation.test.mjs: passed, 64 tests.npm run build: passed; generated files remained unchanged. Existing non-SPDX license warnings were emitted.bash eng/fix-line-endings.sh: passed.git diff --check: passed.bd001a39dc9d4fea4f4e488284a9cfbb05d4bf78passed the shared schema validator with no errors.The full Azure install smoke test was not rerun locally; #6176's existing run already passed lint, installation, and version matching. Its failing compliance gate needs rerunning after this fix lands. Resource-specific checklist items are not applicable;
npm run buildwas used instead of the equivalentnpm startalias.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.