@@ -699,6 +699,38 @@ describe("loadPluginManifestRegistry", () => {
699699 expect ( registry . plugins [ 0 ] ?. trustedOfficialInstall ) . toBe ( true ) ;
700700 } ) ;
701701
702+ it ( "marks official diagnostics-otel config paths trusted when the install record matches" , ( ) => {
703+ const dir = makeTempDir ( ) ;
704+ writeManifest ( dir , { id : "diagnostics-otel" , configSchema : { type : "object" } } ) ;
705+
706+ const registry = loadPluginManifestRegistry ( {
707+ installRecords : {
708+ "diagnostics-otel" : {
709+ source : "npm" ,
710+ spec : "@openclaw/diagnostics-otel" ,
711+ installPath : dir ,
712+ resolvedName : "@openclaw/diagnostics-otel" ,
713+ resolvedVersion : "2026.5.18" ,
714+ resolvedSpec : "@openclaw/diagnostics-otel@2026.5.18" ,
715+ } ,
716+ } ,
717+ candidates : [
718+ createPluginCandidate ( {
719+ idHint : "diagnostics-otel" ,
720+ rootDir : dir ,
721+ packageName : "@openclaw/diagnostics-otel" ,
722+ origin : "config" ,
723+ } ) ,
724+ ] ,
725+ } ) ;
726+
727+ expect ( registry . plugins ) . toHaveLength ( 1 ) ;
728+ expectRecordFields ( registry . plugins [ 0 ] , "plugin" , {
729+ origin : "config" ,
730+ trustedOfficialInstall : true ,
731+ } ) ;
732+ } ) ;
733+
702734 it ( "preserves trusted official installs when a config path selects the installed package" , ( ) => {
703735 const dir = makeTempDir ( ) ;
704736 writeManifest ( dir , { id : "diagnostics-prometheus" , configSchema : { type : "object" } } ) ;
0 commit comments