From 6f6ed6abb933d784a58f12b0d2670c4dfa98332c Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Thu, 16 Jul 2026 07:09:49 -0400 Subject: [PATCH] test: remove retired runtime guards --- tests/native-agent.validate-package-spec.json | 11 --- tests/validate-docs-agent-packages.php | 74 ------------------- 2 files changed, 85 deletions(-) diff --git a/tests/native-agent.validate-package-spec.json b/tests/native-agent.validate-package-spec.json index 13a031a..bf3cd96 100644 --- a/tests/native-agent.validate-package-spec.json +++ b/tests/native-agent.validate-package-spec.json @@ -4,17 +4,6 @@ "user-docs-agent": "../bundles/user-docs-agent/native", "skills-agent": "../bundles/skills-agent/native" }, - "forbidden_dm_fragments": [ - "pipeline_slug", - "prompt_queue", - "step_type", - "tool_runtime_rules", - "handler_configs", - "datamachine", - "dm_", - "seed_queues", - "auth_refs" - ], "forbidden_publication_tools": [ "workspace_git_add", "workspace_git_commit", diff --git a/tests/validate-docs-agent-packages.php b/tests/validate-docs-agent-packages.php index 3f6bda3..a3398da 100644 --- a/tests/validate-docs-agent-packages.php +++ b/tests/validate-docs-agent-packages.php @@ -53,28 +53,11 @@ $assert( 'technical-docs-maintenance-agent' === ( $runner_recipe['docsAgent']['agentSlug'] ?? null ), 'Runner recipes must use the package agent slug.' ); } -$recipe_text = (string) file_get_contents( $root . '/ci/docs-agent-runner-recipe.json' ); -$blocked_runtime_fragments = array( 'wp-codebox', 'Automattic/wp-codebox', 'Extra-Chill/homeboy', 'homeboy-extensions', 'datamachine/', 'datamachine-agent-ci', 'runtime_task_ability', 'runtime_bundle_ability', 'runtime_workflow_ability', 'runtime_components', 'Automattic/agents-api@', 'Extra-Chill/data-machine@', 'Extra-Chill/data-machine-code@', 'workspace_policy', '/wordpress/wp-content/mu-plugins', 'required_abilities', 'disable_datamachine_directives', 'provider: openai', 'OPENAI_API_KEY', 'default_provider', 'default_model' ); -foreach ( $blocked_runtime_fragments as $internal_fragment ) { - $assert( ! str_contains( $recipe_text, $internal_fragment ), "Runner recipe must not expose runtime internals: {$internal_fragment}" ); -} - $runner_workspace = $example['runner']['workspace'] ?? array(); $assert( ! empty( $runner_workspace['enabled'] ), 'Example config must enable runner-owned workspace provisioning.' ); $assert( 'docs/agent-run' === ( $runner_workspace['branch_prefix'] ?? null ), 'Example config must declare the docs branch prefix.' ); $assert( is_file( $root . '/scripts/repair-docs-links.php' ), 'Docs link repair script must be available to consumer workflows.' ); -foreach ( array( $recipe, $example ) as $runner_recipe ) { - $runner_controls = $runner_recipe['runner'] ?? array(); - $policy_controls = $runner_recipe['policy'] ?? array(); - $runtime_controls = $runner_recipe['runtime'] ?? array(); - foreach ( array( 'contextRepositories', 'workspaceContractChecks' ) as $removed_runner_control ) { - $assert( ! array_key_exists( $removed_runner_control, $runner_controls ), "Runner recipe must not expose removed control {$removed_runner_control}." ); - } - $assert( ! array_key_exists( 'successCompletionOutcomes', $policy_controls ), 'Runner recipe must not expose removed successCompletionOutcomes.' ); - $assert( ! array_key_exists( 'stepBudget', $runtime_controls ), 'Runner recipe must not expose removed stepBudget.' ); -} - $maintain_docs_workflow = (string) file_get_contents( $root . '/.github/workflows/maintain-docs.yml' ); foreach ( array( 'verification_commands:', 'drift_checks:', 'schema:"docs-agent/runner-recipe/v1"' ) as $required_workflow_text ) { $assert( str_contains( $maintain_docs_workflow, $required_workflow_text ), "maintain-docs.yml missing required text: {$required_workflow_text}" ); @@ -83,45 +66,15 @@ $assert( str_contains( $maintain_docs_workflow, 'validation_dependencies:' ), 'maintain-docs.yml must expose caller-owned validation dependencies.' ); $assert( str_contains( $maintain_docs_workflow, 'validationDependencies:$validationDependencies' ), 'maintain-docs.yml must retain validation dependencies in the portable recipe.' ); $assert( str_contains( $maintain_docs_workflow, 'schema:"docs-agent/runner-recipe/v1"' ), 'maintain-docs.yml must build a portable Docs Agent recipe.' ); -$assert( ! str_contains( $maintain_docs_workflow, 'Automattic/studio' ), 'maintain-docs.yml must not hardcode downstream Studio context.' ); -$assert( ! str_contains( $maintain_docs_workflow, 'WordPress/agent-skills' ), 'maintain-docs.yml must not hardcode downstream skills context.' ); $assert( str_contains( $maintain_docs_workflow, 'declared_artifacts_json:' ), 'maintain-docs.yml must expose typed artifact declarations as a reusable workflow output.' ); $assert( str_contains( $maintain_docs_workflow, 'artifact_declarations< $native_assertions ) { $native_package_name = $native_assertions['package'] ?? ''; $native_dir = $native_dirs[ $native_package_name ] ?? null; @@ -224,7 +156,6 @@ $native_path = $native_dir . '/' . $native_file; $assert( is_file( $native_path ), "Missing native agent package file: {$native_file}" ); - $native_text = (string) file_get_contents( $native_path ); $native_package = $read_json( $native_path ); $agent = $native_package['agent'] ?? array(); @@ -274,11 +205,6 @@ $assert( ! in_array( $forbidden_tool, $tools, true ), "Native package {$native_file} must not enable publication tool: {$forbidden_tool}" ); } - // Native package documents must not carry legacy execution-envelope keys. - foreach ( $native_spec['forbidden_dm_fragments'] ?? array() as $dm_fragment ) { - $assert( ! str_contains( $native_text, $dm_fragment ), "Native package {$native_file} must not contain Data Machine fragment: {$dm_fragment}" ); - } - $instructions = strtolower( (string) $config['instructions'] ); foreach ( $native_assertions['instructions_must_contain'] ?? array() as $required_phrase ) { $assert( str_contains( $instructions, strtolower( (string) $required_phrase ) ), "Native package {$native_file} instructions missing required text: {$required_phrase}" );