Skip to content

tech-debt: triage same-name class/enum clusters for consolidation (SourceType/SearchResult/ToolCall candidates) — round-5 #12771

Open
1 of 2 issues completed

Description

@mrveiss

Round-5 candidate scan under #12645. A fresh duplicate-class-name sweep surfaced same-named class defs across modules. These are CANDIDATES requiring triage, NOT confirmed forks — this session proved repeatedly that same-name ≠ same-concept (ServiceActionRequest #12755 = 1 live + 1 dead; get_redis_config #12748 = 1 fork + several distinct concerns; ServiceStatus below is simultaneously an Enum, a BaseModel, and a dataclass). Triage each cluster real-fork-vs-distinct BEFORE any convergence; converging distinct-but-same-named classes would be a regression.

Likely GENUINE enum/class consolidation candidates (triage first)

  • SourceType (5, all str, Enum) — source_attribution.py:23, knowledge/ownership.py:45, api/codebase_analytics/source_models.py:17, api/schemas_analytics.py:3019, api/knowledge_grounding_models.py:31. Compare members; if overlapping, a canonical str,Enum in autobot_shared may fit.
  • SearchResult (8) — agent_loop/search/base.py:32, npu_semantic_search.py:100, autobot_memory_graph/semantic_search.py:92, utils/gpu_vector_search.py:118, advanced_rag_optimizer.py:50, knowledge/vector_search_engine.py:39, knowledge/memory_graph/hybrid_scorer.py:54, services/autoresearch/auto_research_agent.py:90. The vector/semantic-search variants may share a field shape.
  • ToolCall (4) — llm_shared/models.py:111, utils/tool_pattern_analyzer.py:78, tools/parallel/types.py:30, benchmarks/benchmark_belief_state.py:117.

Likely DISTINCT (same name, different concept — probably leave)

  • ValidationResult (7) — 7 unrelated validators (causal/startup/system/codegen/project-state/skills). Almost certainly per-domain shapes.
  • ServiceStatus (7) — MIXED kinds: Enum (service_discovery:65, service_registry:48), plain class (graceful_degradation:63, redis_service_manager:65), BaseModel (schemas_system:2921), str,Enum (slm database:253). Not one fork.
  • PerformanceMetrics, PatternType, ResearchResult, OptimizationRecommendation — verify per-domain.

Already tracked elsewhere (do NOT duplicate)

Acceptance

Per cluster: classify real-fork vs distinct (field/member/kind diff), converge ONLY true forks onto a canonical (superset, no behavior/shape change), document the distinct ones. Ref the no-regression contract in #12645.

Activity

  1. mrveiss commented on Jul 30, 2026

    @mrveiss
    OwnerAuthor

    Additional confirmed cluster for this triage — and unlike most candidates here, this one is a verified byte-identical fork, not a same-name coincidence:

    BatchJobStatus and BatchJobType are declared in api/schemas_workflows.py:2167 (production) and re-declared identically in api/batch_jobs_schedules_test.py:36, which imports neither.

    Members match exactly today (pending/running/completed/failed/cancelled), so the test passes — and will keep passing if production members ever change, because it is asserting against its own copy. That is the failure mode this cluster triage exists to catch, in its quietest form: a test that cannot fail when the thing it guards drifts.

    Suggested resolution when this cluster is worked: import from schemas_workflows in the test rather than converging two production definitions — there is only one production definition here.

  2. modified the milestones: Backlog, v0.12.0 on Sep 12, 2026
  3. 44 remaining items

  4. mrveiss commented on Oct 20, 2026

    @mrveiss
    OwnerAuthor

    New same-name clusters from widening the symbol-fork scan to the infrastructure tree (#18559). The infra deploy and ops scripts re-declare backend or shared classes:

    • get_service_registry/ServiceRegistry: autobot-backend/utils/service_registry.py:403 vs six autobot-infrastructure/shared/scripts/*.py (e.g. backup_manager.py:64, deploy_autobot.py:89, metrics_collector.py:90, deployment_registry.py:88).
    • TimingConstants: autobot_shared/ssot_constants.py:576 vs deploy_autobot.py:56, deployment_rollback.py:77, zero_downtime_deploy.py:65.
    • NPUTaskRequest/NPUTaskResponse: autobot-infrastructure/shared/scripts/utilities/npu_worker.py:36/46 vs autobot-npu-worker/.../api_schemas.py:23/34.
    • LogLevel: code_intelligence/log_pattern_miner.py:42 vs log_aggregator.py:84 and logging/log_forwarder.py:92. Also AgentType, TaskType, TaskComplexity, WorkflowStep, WorkflowStatus, DeploymentStatus, DeploymentStrategy and HealthStatus.

    All are frozen in the widened baseline, so no new copies can appear. Resolving them shrinks it.

  5. mrveiss commented on Oct 20, 2026

    @mrveiss
    OwnerAuthor

    Routed here by the #18559 triage (PR #18963): these clusters were frozen into the symbol-fork baseline by widening FORK_ROOTS, and each is a real fork of a backend/shared class or enum redeclared in the infrastructure scripts (or the Windows worker). Same-name homonyms were checked and excluded.

    • AgentType: autobot-backend/agents/agent_orchestration/types.py:129, autobot-infrastructure/shared/scripts/utilities/agent_workflow_analysis.py:16
    • DeploymentStatus: autobot-infrastructure/shared/scripts/zero_downtime_deploy.py:108, autobot-slm-backend/status_enums.py:49
    • DeploymentStrategy: autobot-backend/models/infrastructure.py:22, autobot-infrastructure/shared/scripts/zero_downtime_deploy.py:99
    • FrontendIssue: autobot-backend/code_analysis/src/frontend_analyzer.py:61, autobot-infrastructure/shared/scripts/debug/frontend_analysis_lib.py:53
    • HealthStatus: autobot-infrastructure/shared/scripts/startup_coordinator.py:101, autobot_shared/status_enums.py:493
    • LogLevel: autobot-backend/code_intelligence/log_pattern_miner.py:42, autobot-infrastructure/shared/scripts/log_aggregator.py:84, autobot-infrastructure/shared/scripts/logging/log_forwarder.py:92
    • NPUTaskRequest: autobot-infrastructure/shared/scripts/utilities/npu_worker.py:36, autobot-npu-worker/resources/windows-npu-worker/app/api_schemas.py:23
    • NPUTaskResponse: autobot-infrastructure/shared/scripts/utilities/npu_worker.py:46, autobot-npu-worker/resources/windows-npu-worker/app/api_schemas.py:34
    • SearchRequest: autobot-backend/api/schemas_knowledge.py:1032, autobot-infrastructure/shared/mcp/tools/knowledge-base-mcp/autobot_knowledge_mcp/server.py:57
    • ServiceRegistry: autobot-backend/utils/service_registry.py:76, autobot-infrastructure/shared/scripts/deployment_registry.py:88
    • TaskComplexity: autobot-backend/autobot_types.py:14, autobot-infrastructure/shared/scripts/utilities/orchestrator_enhancement.py:16
    • TimingConstants: autobot-infrastructure/shared/scripts/deploy_autobot.py:56, autobot-infrastructure/shared/scripts/deployment_rollback.py:77, autobot-infrastructure/shared/scripts/zero_downtime_deploy.py:65, autobot_shared/ssot_constants.py:576
    • WorkflowStatus: autobot-backend/llc/models/enums.py:468, autobot-infrastructure/shared/scripts/utilities/orchestrator_enhancement.py:23
    • WorkflowStep: autobot-backend/services/workflow_automation/models.py:131, autobot-infrastructure/shared/scripts/utilities/agent_workflow_analysis.py:26, autobot-infrastructure/shared/scripts/utilities/orchestrator_enhancement.py:32

    Per-cluster verdicts: repo_tests/symbol_fork_triage_18559.json. Note #18466 already tracks the third AgentType.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions