Skip to content

Fix step execution status classification - #2267

Merged
chubes4 merged 3 commits into
mainfrom
fix/step-execution-status-contract
May 26, 2026
Merged

Fix step execution status classification#2267
chubes4 merged 3 commits into
mainfrom
fix/step-execution-status-contract

Conversation

@chubes4

@chubes4 chubes4 commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a shared StepExecutionResult classifier so live execution and debug sync classify step success from explicit execution metadata instead of packet presence alone.
  • Split AI handler packet metadata into tool_result_envelope and tool_result_data, with ToolResultFinder owning legacy metadata.tool_result compatibility.
  • Normalize ability/runtime scalar tool results onto both data and result, and keep Publish/Upsert consuming the projected handler-result contract.

Fixes #2263.

Tests

  • php -l inc/Core/StepExecutionResult.php && php -l inc/Abilities/Engine/ExecuteStepAbility.php && php -l inc/Engine/Debug/SyncRunner.php && php -l inc/Core/Steps/AI/AIStep.php && php -l inc/Engine/AI/Tools/ToolResultFinder.php && php -l inc/Core/AbilityResult.php && php -l inc/Engine/AI/conversation-loop.php
  • ./vendor/bin/phpcs inc/Core/StepExecutionResult.php inc/Core/AbilityResult.php inc/Engine/AI/conversation-loop.php inc/Core/Steps/AI/AIStep.php inc/Engine/AI/Tools/ToolResultFinder.php inc/Core/Steps/Publish/PublishStep.php inc/Core/Steps/Upsert/UpsertStep.php inc/Abilities/Engine/ExecuteStepAbility.php inc/Engine/Debug/SyncRunner.php tests/job-status-accounting-smoke.php tests/ai-error-status-propagation-smoke.php tests/transition-fanout-policy-smoke.php tests/step-exception-failure-contract-smoke.php tests/ability-result-wp-error-smoke.php tests/Unit/Engine/AI/Tools/ToolResultFinderTest.php tests/Unit/Core/Steps/AI/AIStepTest.php
  • php tests/ability-result-wp-error-smoke.php && php tests/job-status-accounting-smoke.php && php tests/ai-error-status-propagation-smoke.php && php tests/transition-fanout-policy-smoke.php && php tests/upsert-handler-result-handoff-smoke.php && php tests/ai-completion-assertion-packet-smoke.php && php tests/step-exception-failure-contract-smoke.php
  • php -r 'define("ABSPATH", __DIR__ . "/"); require "inc/Engine/AI/Tools/ToolResultFinder.php"; $entry = array("metadata" => array("tool_result_envelope" => array("success" => true, "data" => array("id" => 123)), "tool_result_data" => array("id" => 456))); if (array("id" => 456) !== DataMachine\\Engine\\AI\\Tools\\ToolResultFinder::projectResultData($entry)) { exit(1); }'

Notes

  • homeboy test --path /Users/chubes/Developer/data-machine@fix-step-execution-status-contract --extension wordpress could not run because Homeboy auto-selected lab runner lab, which is missing required php and composer tools.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Drafted and implemented the classifier/packet contract changes, added targeted coverage, and ran local verification; Chris remains responsible for review and merge.

@homeboy-ci

homeboy-ci Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
Deep dive: homeboy lint data-machine --changed-since 0a1cd54

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26460589144

Test

test — passed

  • 1253 passed
  • 3 skipped

ℹ️ Auto-fix lint issues: homeboy refactor data-machine --from lint --write
ℹ️ Collect coverage: homeboy test data-machine --coverage
ℹ️ Save test baseline: homeboy test data-machine --baseline
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine --changed-since 0a1cd54

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26460589144

Audit

audit — passed

  • dead_code — 147 finding(s)
  • requested_detectors — 127 finding(s)
  • intra-method-duplication — 66 finding(s)
  • repeated_literal_shape — 13 finding(s)
  • field_patterns — 9 finding(s)
  • structural — 7 finding(s)
  • parallel-implementation — 6 finding(s)
  • Taxonomy — 5 finding(s)
  • dead_guard — 5 finding(s)
  • Abilities — 4 finding(s)
  • Total: 404 finding(s)

Deep dive: homeboy audit data-machine --changed-since 0a1cd54

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26460589144
Tooling versions
  • Homeboy CLI: homeboy 0.199.1+cf108611
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: bbe282b9
  • Action: unknown@unknown

@chubes4
chubes4 merged commit 7cc9424 into main May 26, 2026
5 checks passed
@chubes4
chubes4 deleted the fix/step-execution-status-contract branch May 26, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize tool execution and handler-result packet contracts

1 participant