Skip to content

refactor(core)!: delete agent schema-repair helpers and dead legacy helpers - #4156

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

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

Conversation

@chubes4

@chubes4 chubes4 commented Dec 1, 2026

Copy link
Copy Markdown
Member

Summary

Core still had pre-1.0 compatibility code that production data no longer needs: schema-repair helpers for the agents and processed-items tables, the shared legacy agent directory helpers, scalar provider/model aliases in agent config, an unused packet-success recorder, the metadata.tool_result envelope fallback, the legacy context-file cleanup CLI and the pre-v0.67 layer-directory copy cleanup. This change deletes all of it. Only the canonical install schema, per-agent directories, default_provider/default_model and tool_result_envelope remain.

What changed

  • Deleted Agents::ensure_identity_scope_schema and ensure_site_scope_column with their private helpers, and ProcessedItemDeferrals::ensure_deferral_schema and validate_deferral_schema with theirs; create_table already builds every column and index they repaired.
  • Deleted DirectoryManager::get_agent_directory and ensure_agent_directory_writable, ToolExecutor::recordPacketExecutionSuccess, and the wp datamachine agents cleanup-legacy-context-files subcommand.
  • AgentConfigFactory::normalize no longer turns scalar provider/model into default_provider/default_model, and PersistedAgentGraphProjector now reads only default_model.
  • ToolResultFinder no longer reads the envelope from metadata.tool_result; only tool_result_envelope (or tool_result_data) is used.
  • ComposableFileGenerator no longer deletes pre-v0.67 layer-directory copies. Its result no longer includes stale_removed, and the @since x.y.z placeholder is gone. Tests and smokes that only covered these paths were deleted or moved to the canonical shape, a test now checks the installer's deferral schema, and docs/core-system/tool-result-finder.md documents tool_result_envelope.

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 6c96d7b. Base main@3b44185 unchanged. 171227 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 "ensure_site_scope_column|ensure_identi…): command succeeded; test execution not confirmed on 6c96d7b. Base main@3b44185 unchanged. 336 ms; retained gate metadata.

  • 1-verify-file-5b2bc8164930ca07a690b8643fcc558d42b74fbd7d89e2724c737233c67e8e07.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-54a2e259-47a6-44b1-9595-dd92382065ba
  • Attempt run ID: agent-task-54a2e259-47a6-44b1-9595-dd92382065ba-attempt-1-12b5250d
  • Gate 1: tree cbd5c932778920038f2705c2fa1ef2f92bad99f5
  • Gate 2: tree cbd5c932778920038f2705c2fa1ef2f92bad99f5

Delivery

  • Delivered:
  • Delivered:
  • Delivered:
  • Delivered: AgentConfigFactory accepts only default_provider/default_model
  • Delivered: Delete ToolExecutor::recordPacketExecutionSuccess
  • Delivered: Delete ToolResultFinder metadata.tool_result fallback
  • Delivered: Delete cleanup_legacy_context_files and its subcommand
  • Delivered: Delete pre-v0.67 layer-dir cleanup and @SInCE x.y.z placeholder in ComposableFileGenerator

Evidence

  • Limit: the edited PHPUnit tests could not be run (no WordPress test environment here). The Homeboy lint gate could not run because its wordpress extension isn't installed, and phpcs isn't available.
  • Local check: every changed PHP file passes php -l.
  • Local check: every plugins/data-machine/tests/*-smoke.php passed except the four known exclusions. The first run caught agent-bundle-export-config-projection-smoke, which still used scalar provider/model; after moving it to default_provider/default_model it passes.
  • Local check: the acceptance grep for the removed symbols returns nothing. The change deletes 616 more lines than it adds, measured against HEAD because origin/main isn't available locally.

AI disclosure

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

The AI searched the monorepo for callers of each symbol, deleted the legacy code and the tests covering only that code, moved the remaining tests, smokes and docs to the canonical shapes, and ran syntax checks and smoke tests locally, 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 #4151

@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 3b44185 --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/46654232200

@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/4156
  • Next action: Repair the failed phase, then rerun the workflow.

@chubes4

chubes4 commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

Follow-up 00e9ef7: AgentAbilitiesTest still sent the removed scalar provider/model agent-config aliases. It now uses canonical default_provider/default_model. No runtime code sends the scalar aliases.

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 70e80ec into main Dec 1, 2026
42 checks passed
@chubes4
chubes4 deleted the fix/issue-4151-data-machine-2 branch December 1, 2026 13:44
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 T6: delete agent schema-repair helpers and dead legacy helpers

1 participant