Define plugin sidecar ABI contract

This commit is contained in:
Meta Vens 2026-07-09 02:24:29 +01:00
commit f505b7e86c
16 changed files with 304 additions and 23 deletions

View file

@ -90,12 +90,26 @@ foreach ($handoffPath in $HandoffPaths) {
throw "Plugin handoff $($handoff.pluginId) advertisement runtime missing authority: $authority"
}
}
foreach ($sidecarProperty in @("processKind", "protocol", "requestSchema", "responseSchema", "commandEnvelope", "receiptSchema", "stateAuthority")) {
if (-not $manifest.runtime.sidecar.$sidecarProperty) {
throw "Plugin handoff $($handoff.pluginId) manifest sidecar missing property: $sidecarProperty"
}
if ($advertisement.runtime.sidecar.$sidecarProperty -ne $manifest.runtime.sidecar.$sidecarProperty) {
throw "Plugin handoff $($handoff.pluginId) advertisement sidecar $sidecarProperty does not match manifest: $($advertisement.runtime.sidecar.$sidecarProperty)"
}
}
$operations = @($abiFixture.operations | ForEach-Object { $_.operation })
foreach ($operation in @("describe", "validate", "project", "lower", "measure", "apply")) {
if (-not ($operations -contains $operation)) {
throw "Plugin handoff $($handoff.pluginId) ABI fixture missing operation: $operation"
}
if (-not (@($manifest.runtime.sidecar.operations) -contains $operation)) {
throw "Plugin handoff $($handoff.pluginId) manifest sidecar missing operation: $operation"
}
if (-not (@($advertisement.runtime.sidecar.operations) -contains $operation)) {
throw "Plugin handoff $($handoff.pluginId) advertisement sidecar missing operation: $operation"
}
}
foreach ($moveSet in @($handoff.moveSets)) {

View file

@ -58,9 +58,19 @@ node $consumerScript $consumerExport `
--expect-plugin-runtime sai.vn:executable-sidecar `
--expect-plugin-runtime-transport sai.vn:cultmesh `
--expect-plugin-runtime-authority sai.vn:no-provider-state-mutation `
--expect-plugin-runtime-field sai.vn:sidecar.processKind:long-running-daemon `
--expect-plugin-runtime-field sai.vn:sidecar.protocol:cultmesh-rpc-with-stdio-dev-transport `
--expect-plugin-runtime-field sai.vn:sidecar.requestSchema:gamecult.eve.plugin_abi.request.v1 `
--expect-plugin-runtime-field sai.vn:sidecar.responseSchema:gamecult.eve.plugin_abi.response.v1 `
--expect-plugin-runtime-field sai.vn:sidecar.stateAuthority:proposes-plugin-state-only-provider-accepts `
--expect-plugin-runtime norn.graph:executable-sidecar `
--expect-plugin-runtime-transport norn.graph:cultmesh `
--expect-plugin-runtime-authority norn.graph:no-provider-state-mutation
--expect-plugin-runtime-authority norn.graph:no-provider-state-mutation `
--expect-plugin-runtime-field norn.graph:sidecar.processKind:long-running-daemon `
--expect-plugin-runtime-field norn.graph:sidecar.protocol:cultmesh-rpc-with-stdio-dev-transport `
--expect-plugin-runtime-field norn.graph:sidecar.requestSchema:gamecult.eve.plugin_abi.request.v1 `
--expect-plugin-runtime-field norn.graph:sidecar.responseSchema:gamecult.eve.plugin_abi.response.v1 `
--expect-plugin-runtime-field norn.graph:sidecar.stateAuthority:proposes-plugin-state-only-provider-accepts
if ($LASTEXITCODE -ne 0) {
throw "Plugin owner conformance consumer smoke failed with exit code $LASTEXITCODE"