@@ -79,6 +79,13 @@ function datamachine_persisted_agent_registry_reset(): void {
7979 'description ' => 'Maintains WooCommerce knowledge. ' ,
8080 ),
8181 ),
82+ array (
83+ 'agent_id ' => 103 ,
84+ 'agent_slug ' => 'roadie ' ,
85+ 'agent_name ' => 'Roadie ' ,
86+ 'owner_id ' => 9 ,
87+ 'agent_config ' => array (),
88+ ),
8289 )
8390);
8491
@@ -90,12 +97,14 @@ static function () use ( $repository ): void {
9097);
9198do_action ( 'init ' );
9299
93- $ agents = wp_get_agents ();
94- $ agent = wp_get_agent ( 'wordpress-com-wiki ' );
95- agents_api_smoke_assert_equals ( array ( 'wordpress-com-wiki ' , 'woocommerce-wiki ' ), array_keys ( $ agents ), 'persisted rows are visible through wp_get_agents() ' , $ failures , $ passes );
100+ $ agents = wp_get_agents ();
101+ $ agent = wp_get_agent ( 'wordpress-com-wiki ' );
102+ $ roadie_agent = wp_get_agent ( 'roadie ' );
103+ agents_api_smoke_assert_equals ( array ( 'wordpress-com-wiki ' , 'woocommerce-wiki ' , 'roadie ' ), array_keys ( $ agents ), 'persisted rows are visible through wp_get_agents() ' , $ failures , $ passes );
96104agents_api_smoke_assert_equals ( true , $ agent instanceof WP_Agent, 'persisted row resolves through wp_get_agent() ' , $ failures , $ passes );
97105agents_api_smoke_assert_equals ( 'WordPress.com Wiki ' , $ agent ? $ agent ->get_label () : '' , 'row agent_name becomes label ' , $ failures , $ passes );
98106agents_api_smoke_assert_equals ( 'Maintains the WordPress.com wiki brain. ' , $ agent ? $ agent ->get_description () : '' , 'wiki brain description is surfaced ' , $ failures , $ passes );
107+ agents_api_smoke_assert_equals ( '' , $ roadie_agent ? $ roadie_agent ->get_description () : 'missing ' , 'missing config description stays empty instead of synthesizing a runtime-branded fallback ' , $ failures , $ passes );
99108agents_api_smoke_assert_equals ( 7 , $ agent && is_callable ( $ agent ->get_owner_resolver () ) ? call_user_func ( $ agent ->get_owner_resolver () ) : 0 , 'owner_resolver returns persisted owner_id ' , $ failures , $ passes );
100109agents_api_smoke_assert_equals ( 'gpt-5.5 ' , $ agent ? $ agent ->get_default_config ()['default_model ' ] ?? '' : '' , 'agent_config becomes default_config ' , $ failures , $ passes );
101110agents_api_smoke_assert_equals ( 'wordpress-com-wiki ' , $ agent ? $ agent ->get_meta ()['source_package ' ] ?? '' : '' , 'bundle slug is exposed as source package ' , $ failures , $ passes );
@@ -113,7 +122,7 @@ static function () use ( $repository ): void {
113122do_action ( 'init ' );
114123
115124$ agents = wp_get_agents ();
116- agents_api_smoke_assert_equals ( array ( 'wordpress-com-wiki ' , 'woocommerce-wiki ' ), array_keys ( $ agents ), 'projection skips duplicate slugs without dropping other rows ' , $ failures , $ passes );
125+ agents_api_smoke_assert_equals ( array ( 'wordpress-com-wiki ' , 'woocommerce-wiki ' , ' roadie ' ), array_keys ( $ agents ), 'projection skips duplicate slugs without dropping other rows ' , $ failures , $ passes );
117126agents_api_smoke_assert_equals ( 'Declarative Definition ' , $ agents ['wordpress-com-wiki ' ]->get_label (), 'first registered definition wins ' , $ failures , $ passes );
118127agents_api_smoke_assert_equals ( array (), $ GLOBALS ['__agents_api_smoke_wrong ' ], 'duplicate skip avoids doing-it-wrong notices ' , $ failures , $ passes );
119128
0 commit comments