Skip to content

@ ci(validate): derive the schema ref from the plugin's own SDK pin - #31

Merged
ken-jo merged 1 commit into
mainfrom
ci/derive-sdk-schema-ref
Aug 23, 2026
Merged

@ ci(validate): derive the schema ref from the plugin's own SDK pin#31
ken-jo merged 1 commit into
mainfrom
ci/derive-sdk-schema-ref

Conversation

@ken-jo

@ken-jo ken-jo commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

A plugin already states which SDK it builds against, once, as the #ref on its @lvis/plugin-sdk dependency. Repeating it as an sdk-ref input is the same shape as the runner-group allow-list that broke publishing in 2026-08: one decision, two copies, and the drift is silent.

It has been drifting the whole time:

repo SDK pin sdk-ref passed
lvis-plugin-ep v12.1.0 v12.1.0
lvis-plugin-template v11.2.0 main
lvis-plugin-work-assistant v11.1.0 main
lvis-plugin-meeting v11.1.0 main
lvis-plugin-ms-graph v11.0.0 main
lvis-plugin-local-indexer v12.1.0 main
lvis-plugin-git v8.0.0 (no validate caller)

lvis-plugin-git aside, every plugin but ep has been validating its manifest against a schema it does not ship with — lvis-plugin-work-assistant on SDK 11.1 checked against main, four majors ahead in the worst case. A tightening on main would fail a repo's CI for a rule its SDK never had; a loosening would pass a manifest its own SDK would reject. Neither shows up as anything but a confusing red or a false green.

So the workflow now resolves the ref itself: sdk-ref if given, otherwise the #ref from the caller's package.json, otherwise main with a ::warning:: that says the schema can move underneath it.

Checked before touching anythingschemas/plugin-manifest.schema.json exists at all seven pinned tags, and every manifest validates against both its pinned schema and main (ajv-cli@5, draft7, --strict=false). No repo's CI changes colour when the sdk-ref: 'main' line comes out of its caller; the caller cleanups follow as separate PRs.

A plugin already states which SDK it builds against, once, as the `#ref` on
its `@lvis/plugin-sdk` dependency. Asking the caller to repeat that as an
`sdk-ref` input stores the same decision in two places, and the two drifting
is not loud — the manifest just gets validated against a schema the plugin
does not ship with.

That drift was the normal state, not the exception. Six of seven callers
passed `main` while pinning v8.0.0, v11.0.0, v11.1.0 or v11.2.0; only
`lvis-plugin-ep` named its own version. So `lvis-plugin-git`, on SDK 8, has
been checked against a schema four majors ahead of it — a tightening on main
would have failed its CI for a rule its SDK never had, and a loosening would
have passed a manifest its own SDK would reject.

Derive it instead. `sdk-ref` stays as an explicit override and now defaults to
empty; a caller with no pinned SDK dependency still falls back to `main`, but
says so with a warning instead of silently.

Verified before changing anything: the schema file exists at every pinned tag,
and all seven manifests validate against both their pinned schema and main —
so no repo's CI changes colour when its `sdk-ref: 'main'` line goes away.
@ken-jo
ken-jo merged commit ef78515 into main Aug 23, 2026
1 check passed
@ken-jo
ken-jo deleted the ci/derive-sdk-schema-ref branch August 23, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant