Skip to content

refactor(core)!: delete legacy input-shape aliases for tools, bundles, schemas, and post identity - #4157

Merged
chubes4 merged 3 commits into
mainfrom
fix/issue-4152-data-machine-2
Dec 1, 2026
Merged

chubes4 merged 3 commits into
mainfrom
fix/issue-4152-data-machine-2

Conversation

@chubes4

@chubes4 chubes4 commented Dec 1, 2026

Copy link
Copy Markdown
Member

Summary

Core still accepted several pre-1.0 input shapes: the context_bindings alias, automatic job_id binding for handle_tool_call tools, {allow, default: deny} tool policies, bundle directories without schema_version, flat tool-parameter maps with per-property required flags, publish-format sniffing, and a meta_query fallback for post identity. This change deletes all of them, so each input now has one current shape. Callers, fixtures, tests and docs across the monorepo are updated to match.

What changed

  • Handler tool declarations must declare client_context_bindings (e.g. job_id) explicitly; the context_bindings alias and the automatic job_id binding for handle_tool_call tools are gone.
  • Agent tool policies accept only {mode, tools, categories}, and AgentBundler::from_directory() reads only schema-versioned bundles (the old monolithic-manifest reader and its helpers are deleted).
  • ToolSchemaNormalizer accepts only root JSON-schema objects with a root required array; InsertContentAbility and UpsertPostAbility tool definitions now use that shape.
  • WordPressPublishHelper::applySourceAttribution() uses the explicit content_format it is given (default html) and no longer sniffs content for block markup.
  • UpsertPostAbility resolves identity_meta only through the post-identity reservations table (malformed identities now return invalid_identity_meta); find_legacy_candidates is renamed find_posts_identified_by_meta.

Verification

  • ( if git diff --quiet --no-renames 3b44185 -- ' (( if git diff --quiet --no-renames 3b441855293e64f96937cb96dece6cbafe8b3f11 -- ':(literal)plugins/data-machine'; then :…): command succeeded; test execution not confirmed on 0f51eb5. Base main@3b44185 unchanged. 167078 ms; retained gate metadata.

  • ! grep -rqE --exclude-dir=vendor --exclude-dir=node_modules --exclude-dir=build (! grep -rqE --exclude-dir=vendor --exclude-dir=node_modules --exclude-dir=build "[^_]context_bindings|requiredNames|mer…): command succeeded; test execution not confirmed on 0f51eb5. Base main@3b44185 unchanged. 340 ms; retained gate metadata.

  • 1-verify-file-4fcc86ca70e514edae3286e33ef81a29fc34ff4a7707fc948cabb73d6e96c747.txt ((cd plugins/data-machine && { [ -d vendor ] || composer install -q --no-interaction; }); for f in $(git diff --name-onl…): Accepted inherited failure: 1 test also fails on base main@3b44185.

    • sha256:b0991e8431a49b0fc5ea9c545e59058fa24eeec3f7fb2d8134890324a6d8e0f4
  • repro: verified (the repro gate failed on base and passed on the candidate).

  • CI: pending

Cook run
  • Cook ID: agent-task-3c385e9e-6d34-4650-999c-ea2fe8dc2177
  • Attempt run ID: agent-task-3c385e9e-6d34-4650-999c-ea2fe8dc2177-attempt-1-44ca8e13
  • Gate 1: tree 510eff4e105cf1d9c74f72e3dedbd2399dfd300a
  • Gate 2: tree 510eff4e105cf1d9c74f72e3dedbd2399dfd300a

Delivery

  • Delivered: ToolManager context_bindings alias and automatic handle_tool_call job_id binding removed
  • Delivered: AgentSubagentGraph {allow, default: deny} policy support removed; fixtures converted
  • Delivered: AgentBundler from_directory schema-less fallback and helpers removed
  • Delivered: ToolSchemaNormalizer flat-map/per-property required support removed; InsertContent and UpsertPost converted
  • Delivered: WordPressPublishHelper contentHasBlocks sniffing removed
  • Delivered: UpsertPostAbility meta_query fallback and has_usable_identity_meta removed; find_legacy_candidates renamed

Evidence

  • Local run: every plugins/data-machine/tests/*-smoke.php except the four known pre-existing failures exited 0 after the changes.
  • Local run: php -l passes on every changed PHP file, the acceptance grep for legacy symbols returns nothing, and the diff under plugins/ is net -313 lines (measured against HEAD because origin/main is not present in this checkout).
  • Not run: PHPUnit tests (they need a WordPress test environment), including the rewritten UpsertPostAbilityTest and WordPressPublishHelperTest, which were only syntax-checked. The Homeboy lint gate also could not run locally because the wordpress extension is not installed; instead, phpcs with the WordPress standard found no new violations on added or changed lines apart from existing filename-convention warnings.

AI disclosure

Tool: Homeboy Cook. Agent: Homeboy (roadie). Model: roadie · route cook-heavy · served claude-opus-5-5. Cook time: 44m24s.

The AI found every caller across the monorepo, deleted the legacy code paths, converted producers, fixtures, tests and docs to the current shapes, and ran local smoke, php -l and phpcs checks on the changes, under the direction of the Cook requester. Homeboy reports controller verification separately from this account of the AI's work. A human reviews before merge.

Closes #4152

@homeboy-ci

homeboy-ci Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Lint

✅ review lint — passed

ℹ️ Auto-fix: homeboy review lint data-machine --path /home/runner/work/data-machine/data-machine/plugins/data-machine --changed-since 70e80ec --fix
ℹ️ Some issues may require manual fixes
ℹ️ Full options: homeboy self docs commands/lint
Deep dive: homeboy review lint data-machine

Artifacts and drill-down
  • CI results artifact: homeboy-differential-candidate-265f03d74305f909-1 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-differential-candidate-265f03d74305f909-1 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/46660285396

@homeboy-ci

homeboy-ci Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Failed reconciliation

  • review test: error in reconciliation
  • Failed run
  • Failed job
  • homeboy review ci triage https://github.com/Extra-Chill/data-machine/pull/4157
  • Next action: Repair the failed phase, then rerun the workflow.

@chubes4

chubes4 commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

Follow-up 765f142: the claimed handler-tool fixture in HandlerToolResolutionTest used the removed flat parameter shape with per-property required. It now declares a canonical object schema. A scan of every parameters/input_schema literal under plugins/*/inc found no remaining flat-shape tool definitions.

Out of scope here: per-property required is still accepted by Agents API's WP_Agent_Tool_Parameters::validateRequiredParameters(). That belongs to Agents API's own legacy cleanup.

AI disclosure: Claude (Anthropic) in the Pi coding agent, via a Roadie session at the maintainer's direction, wrote this comment and the follow-up commit.

@chubes4
chubes4 merged commit 7744353 into main Dec 1, 2026
42 checks passed
@chubes4
chubes4 deleted the fix/issue-4152-data-machine-2 branch December 1, 2026 14:11
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.

1.0 legacy removal T7: delete legacy input-shape aliases

1 participant