Match the submit-a-plugin entry example to the marketplace schema - #2991
Open
ylcn91 wants to merge 1 commit into
Open
Match the submit-a-plugin entry example to the marketplace schema#2991ylcn91 wants to merge 1 commit into
ylcn91 wants to merge 1 commit into
Conversation
## What was wrong The `submit-a-plugin` skill's worked marketplace entry still carried an `engines` object. The published entry contract sets `additionalProperties: false` and never defined `engines`: a listing declares no compatibility, and bb reads `engines.bb` and `engines.bbPluginSdk` from the plugin's own `package.json` instead, as `docs/plugin-marketplace-plan.md` describes. Anyone who copied the example produced an entry that `npm run build` and `npm run check` reject in get-bb/marketplace. Nothing guarded the example against the schema, so the field survived the schema change. ## What changed - `references/marketplace-entry.md`: drops `engines` from the worked entry, and replaces the "copy honest engine ranges" prose with the actual rule, that compatibility lives in the plugin manifest. - `references/pull-request.md`: drops the "Entry engine ranges do not exceed manifest ranges" review item, which checked a field an entry cannot have. - `test/skills/submit-a-plugin.test.ts`: validates the worked entry against `apps/web/public/schemas/marketplace-v2.schema.json`, the document get-bb/marketplace compiles each entry file against. The remaining example fields (`id`, `displayName`, `description`, `icon`, `tags`, `author`, `source`) already match the schema. ## How you verified - `pnpm exec turbo run test --filter=@bb/server -- test/skills/submit-a-plugin.test.ts` passes. Re-adding `engines` to the example fails the new test with `must NOT have additional properties`. - `pnpm exec turbo run typecheck --filter=@bb/server` passes. - Validated the corrected example against `schema/marketplace-v2.schema.json` fetched from get-bb/marketplace@main; that file is byte-identical to the copy this repo publishes. Fixes get-bb#2508
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The
submit-a-pluginskill's worked marketplace entry still carried anenginesobject. The published entry contract setsadditionalProperties: falseand never definedengines: a listingdeclares no compatibility, and bb reads
engines.bbandengines.bbPluginSdkfrom the plugin's ownpackage.jsoninstead, asdocs/plugin-marketplace-plan.mddescribes. Anyone who copied theexample produced an entry that
npm run buildandnpm run checkreject in get-bb/marketplace. Nothing guarded the example against the
schema, so the field survived the schema change.
Issue: #2508. Investigation report: https://get-bb.github.io/reports/issues/2508.html
What changed
references/marketplace-entry.md: dropsenginesfrom the workedentry, and replaces the "copy honest engine ranges" prose with the
actual rule, that compatibility lives in the plugin manifest.
references/pull-request.md: drops the "Entry engine ranges do notexceed manifest ranges" review item, which checked a field an entry
cannot have.
test/skills/submit-a-plugin.test.ts: validates the worked entryagainst
apps/web/public/schemas/marketplace-v2.schema.json, thedocument get-bb/marketplace compiles each entry file against.
The remaining example fields (
id,displayName,description,icon,tags,author,source) already match the schema.How you verified
pnpm exec turbo run test --filter=@bb/server -- test/skills/submit-a-plugin.test.tspasses. Re-adding
enginesto the example fails the new test withmust NOT have additional properties.pnpm exec turbo run typecheck --filter=@bb/serverpasses.schema/marketplace-v2.schema.jsonfetched from get-bb/marketplace@main; that file is byte-identical to the
copy this repo publishes.
Fixes #2508