Skip to content

refactor: delete the unreachable get_problem_flows tool wrapper #3374

Description

@chubes4

Goal

Delete the unreachable GetProblemFlows model-tool wrapper without adding, removing, or changing any public capability.

Parent: #3332

Current state

DataMachine\Api\Chat\Tools\GetProblemFlows exists at inc/Api/Chat/Tools/GetProblemFlows.php and wraps the canonical datamachine/get-problem-flows ability owned by DataMachine\Abilities\Job\ProblemFlowsAbility.

Current ToolServiceProvider neither imports nor instantiates the wrapper, and no built-in ability projection registers get_problem_flows. The model-facing tool is absent from the current runtime while its unused class remains in production source.

Scope

Delete inc/Api/Chat/Tools/GetProblemFlows.php.

Do not change:

  • inc/Engine/AI/Tools/ToolServiceProvider.php
  • inc/Engine/AI/Tools/ability-tool-projections.php
  • inc/Abilities/Job/ProblemFlowsAbility.php

Add or update focused tests proving the current lifecycle and canonical ability surface remain unchanged.

Required behavior preservation

  • get_problem_flows remains absent from model-tool resolution in pipeline_editor, chat, and pipeline modes.
  • datamachine/get-problem-flows remains registered and executable.
  • Preserve the ability slug, schemas, threshold default, permission callback, REST visibility, and result behavior.
  • Preserve ToolServiceProvider registration order and filter timing exactly.
  • Do not add a projection declaration, replacement class, compatibility alias, callback, generic wrapper, or projection feature.
  • Do not modify REST or CLI contracts.

Why deletion, not projection

Projecting the ability would add a model-facing capability that is absent on current main. The dormant wrapper also had a flattened presentation shape that the current declarative projection mechanism does not express. Do not extend the projection mechanism for dead code.

Production LOC target

Expected net deletion: approximately 100-110 production PHP lines. Record exact totals in the PR.

Tests

Update tests/Unit/AI/Tools/ChatToolsAvailabilityTest.php to prove get_problem_flows remains absent from relevant model-tool modes. Add focused inventory coverage only if executable lifecycle coverage cannot prove the boundary.

Run focused chat-tool availability and problem-flow ability tests, existing projection/ability adapter smokes, complete Homeboy tests, package build, changed-file quality gates, and git diff --check.

Collision constraint

Open PR #3361 does not touch this wrapper or focused availability test. Do not modify its package-audit evidence or packaging files.

Constraints

  • No public contract or capability changes.
  • No new framework code.
  • No version bump or changelog edit.
  • Conventional refactor: commit.
  • PR only; do not release or deploy.

Refs #3332
Parent: #3113

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions