fix: resolve build breaks from new rvf-types fields in rvf-launch, rvf-node

- rvf-launch: add missing retrieval_quality field to SearchResult
- rvf-node: add match arms for new Security/QualityBelowThreshold error variants
- rvf-node: use struct update syntax for new QueryOptions fields
- rvf-runtime: add missing domain_expansion_present field in tests

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
rUv 2026-02-16 14:03:29 +00:00
parent 4e5e83882a
commit f4f7e0fa11
4 changed files with 8 additions and 1 deletions

View file

@ -425,6 +425,7 @@ impl MicroVm {
.map(|r| rvf_runtime::SearchResult {
id: r.id,
distance: r.distance,
retrieval_quality: rvf_types::quality::RetrievalQuality::Full,
})
.collect())
}

View file

@ -35,6 +35,10 @@ fn map_rvf_err(e: RvfError) -> napi::Error {
RvfError::InvalidEnumValue { type_name, value } => {
format!("Invalid {type_name} value: {value}")
}
RvfError::Security(e) => format!("Security error: {e}"),
RvfError::QualityBelowThreshold { quality, reason } => {
format!("Quality below threshold ({quality:?}): {reason}")
}
};
napi::Error::from_reason(msg)
}
@ -504,6 +508,7 @@ impl RvfDatabase {
ef_search: opts.ef_search.unwrap_or(100) as u16,
filter,
timeout_ms: opts.timeout_ms.unwrap_or(0),
..RustQueryOptions::default()
}
}
None => RustQueryOptions::default(),

View file

@ -498,6 +498,7 @@ mod tests {
manifest_present: false,
orchestrator_present: true,
world_model_present: true,
domain_expansion_present: false,
total_size: 0,
};

View file

@ -40,7 +40,7 @@ fn build_full_container() -> (Vec<u8>, AgiContainerHeader) {
vec_segment_count: 4, index_segment_count: 2,
witness_count: 100, crypto_present: false,
manifest_present: true, orchestrator_present: true,
world_model_present: true, total_size: 0,
world_model_present: true, domain_expansion_present: false, total_size: 0,
})
.build()
.unwrap()