Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/videre-host/src/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ fn parse<S: for<'de> Deserialize<'de>>(owner: &str, value: &toml::Value) -> anyh

/// Admit one provider: a `[venue]` section, when present, must be the
/// adapter shape with a non-empty version set.
///
/// Opt-in: a manifest omitting `[venue]` is admitted unconditionally, an
/// intentional silent opt-out for non-venue keepers.
pub(crate) fn admit_provider(provider: &str, sections: &ExtensionSections) -> anyhow::Result<()> {
let Some(value) = sections.get(SECTION) else {
return Ok(());
Expand Down Expand Up @@ -91,6 +94,9 @@ pub(crate) fn verify_exported_versions(
/// `[venue] body_versions` set contains that version. Every installed
/// venue is a legal runtime submit target, so one non-decoding adapter
/// refuses the keeper.
///
/// Opt-in: a manifest omitting `[venue]` is admitted unconditionally, an
/// intentional silent opt-out for non-venue keepers.
pub(crate) fn admit_worker(
worker: &str,
sections: &ExtensionSections,
Expand Down
5 changes: 5 additions & 0 deletions crates/videre-host/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,11 @@ impl<T: RuntimeTypes> ProviderKind<T> for VenueAdapterKind {
.await
.map_err(anyhow::Error::from)
.context("read adapter body-versions")?;
// Post-instantiation, pre-init: an export cannot be called before
// instantiating, so unlike the pre-compile manifest-section
// predicates in `supervisor.rs` a buggy or malicious adapter fully
// instantiates, running any instantiation side effects, before this
// divergence check catches the mismatch.
crate::handshake::verify_exported_versions(venue_id.as_str(), &declared, exported)?;
match bindings
.call_init(&mut store, &config)
Expand Down
Loading