The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(skills): declare correct controller output names (new_workflows/workflow)\n\nThe skills_install_from_url and skills_create controller schemas declared output\nfields new_skills / skill, but the handlers emit new_workflows / workflow (the\nwire structs carry no serde rename, and the frontend reads the workflow names).\nFallout from the skills->workflows rename that nothing cross-checked.\n\nFix the controller catalog to declare new_workflows and workflow (schema-only;\nwire fields, handlers and frontend are unchanged). skills_update inherits the\nfix by cloning skills_create's schema. Add a regression test pinning the\ndeclared output names to the wire reality.\n\nFixes #6083\n
shanubbfd15086ccf
diff --git a/src/openhuman/skills/schemas/controller_schemas.rs b/src/openhuman/skills/schemas/controller_schemas.rsindex 64de25dff5..26d96c6b05 100644--- a/src/openhuman/skills/schemas/controller_schemas.rs+++ b/src/openhuman/skills/schemas/controller_schemas.rs@@ -275,9 +275,9 @@ pub fn skills_schemas(function: &str) -> ControllerSchema {},],outputs: vec![FieldSchema {- name: "skill",+ name: "workflow",ty: TypeSchema::Ref("WorkflowSummary"),- comment: "The newly created skill, re-discovered through the standard pipeline.",+ comment: "The newly created workflow, re-discovered through the standard pipeline.",required: true,}],},@@ -328,9 +328,9 @@ pub fn skills_schemas(function: &str) -> ControllerSchema {required: true,},FieldSchema {- name: "new_skills",+ name: "new_workflows",ty: TypeSchema::Array(Box::new(TypeSchema::String)),- comment: "Slugs of skills that appeared in the catalog as a result of the install.",+ comment: "Slugs of workflows that appeared in the catalog as a result of the install.",required: true,},],diff --git a/src/openhuman/skills/schemas_tests.rs b/src/openhuman/skills/schemas_tests.rsindex 431b44a035..f961ef9be2 100644--- a/src/openhuman/skills/schemas_tests.rs+++ b/src/openhuman/skills/schemas_tests.rs@@ -32,3 +32,47 @@ fn skill_summary_round_trip_minimum_fields() {assert_eq!(summary.name, "demo");assert_eq!(summary.description, "desc");}++/// Pins the declared controller-schema output names to the workflow-spelled+/// wire reality. The skills→workflows rename left two schemas emitting the old+/// spelling (`new_skills` / `skill`) while the handlers and wire structs+/// (`WorkflowsInstallFromUrlResult.new_workflows`, `WorkflowsCreateResult.workflow`)+/// switched to the new one — a silent schema/wire divergence the frontend+/// papered over by reading the wire names directly. These assertions fail on+/// the pre-rename schema and stop it from drifting back.+#[test]+fn install_and_create_schemas_declare_workflow_output_names() {+ // Arrange+ let install = skills_schemas("skills_install_from_url");+ let create = skills_schemas("skills_create");+ let update = skills_schemas("skills_update");++ // Act+ let has_output = |schema: &crate::core::ControllerSchema, name: &str| {+ schema.outputs.iter().any(|f| f.name == name)+ };++ // Assert — install echoes the workflow-spelled slug list, never the old one.+ assert!(+ has_output(&install, "new_workflows"),+ "skills_install_from_url must declare `new_workflows`; outputs: {:?}",+ install.outputs.iter().map(|f| f.name).collect::<Vec<_>>()+ );+ assert!(+ !has_output(&install, "new_skills"),+ "skills_install_from_url must not declare the pre-rename `new_skills`"+ );++ // create / update share one schema; both carry the `workflow` output.+ for (function, schema) in [("skills_create", &create), ("skills_update", &update)] {+ assert!(+ has_output(schema, "workflow"),+ "{function} must declare `workflow`; outputs: {:?}",+ schema.outputs.iter().map(|f| f.name).collect::<Vec<_>>()+ );+ assert!(+ !has_output(schema, "skill"),+ "{function} must not declare the pre-rename `skill`"+ );+ }+}