Skip to content

refactor(forks): resolve the 'services' symbol-fork batch (#18452) - #18460

Open
mrveiss wants to merge 5 commits into
mainfrom
issue-18452-forks-services
Open

mrveiss wants to merge 5 commits into
mainfrom
issue-18452-forks-services

Conversation

@mrveiss

@mrveiss mrveiss commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Thinking Path

Batch #18451 (parent #17312): 13 symbol-fork clusters. Triage per #12771, same name is not same concept: compared fields, members, callers and behaviour per cluster.

What Changed

name classification evidence action
get_engine HOMONYM two lazy singletons of different engine classes (continuous learning vs IDE integration) renamed get_continuous_learning_engine, get_ide_integration_engine
SecurityVulnerability HOMONYM DFA taint-flow finding (line/column/tainted_variable) vs legacy-shape shim record (file_path/cwe_id/confidence) DFA one renamed DFATaintVulnerability
SecurityAnalyzer HOMONYM (documented legacy adapter over the canonical analyzer) legacy shim returns the legacy dict shape and delegates detection to code_intelligence.security shim renamed LegacySecurityAnalyzer, 2 callers updated
get_redis_connection HOMONYM sync, per-database parameter, raises vs fixed analytics DB, returns None cache_management one renamed get_cache_redis_connection (codebase_analytics export and its source-string tests untouched)
APIRegistry HOMONYM runtime endpoint tracker (register_router) vs router-config catalog developer one renamed RuntimeEndpointRegistry
QueryIntent HOMONYM str Enum of code-search intents vs memory-graph dataclass enum renamed CodeQueryIntent
SessionSummary HOMONYM chat session list row vs realtime voice session record, no shared fields ChatSessionSummary, RealtimeSessionSummary (moved to api/schemas_realtime_session.py, required by the no-local-schemas hook)
MCPTool REAL FORK byte-identical fields (name, description, input_schema) redis_mcp copy deleted, imports api.schemas_code.MCPTool
TemplateSearchResponse HOMONYM LLC template search (typed results) vs workflow-template search (success flag, Any results) LLC one renamed LLCTemplateSearchResponse
TemplateCategory HOMONYM LLC (company/project/agent_role/workflow) vs workflow templates (security/research/...) workflow one renamed WorkflowTemplateCategory; the LLC side is left alone because llc/models/__init__.py is in open PRs #18453 and #18444
WorkflowTemplate HOMONYM advanced_workflow: intent, success_rate, usage stats vs workflow_templates: category, secrets, variables advanced one renamed SmartWorkflowTemplate
WorkflowControlRequest REAL FORK, one copy dead schemas_terminal copy has zero importers and is in no OpenAPI path; the live one is services.workflow_automation.models dead copy deleted
list_terminal_sessions HOMONYM FastAPI endpoint vs HTTP client that calls that endpoint client renamed fetch_terminal_sessions

Ratchet: symbol_fork_baseline.json 313 -> 300 (all 13 names removed). Ceiling for redis_mcp/tools.py lowered 669 -> 658 in both files.
OpenAPI: schema names changed for SessionSummary x2, TemplateSearchResponse x2; api.ts regenerated with the repo tooling in its own commit (rename-only diff, 111 lines each way). No frontend source references the old keys.
Left alone: the legacy SecurityVulnerability shim and the llc TemplateCategory, deliberately.
Also: legacy_analyzer_shim_test.py writes its fixtures through asyncio.to_thread, because touching the file made the #7444 hook count its existing blocking writes.

Verification

  • tests/test_api_fork_batch_18451.py (new): canonical MCPTool serves redis_mcp, dead copy gone, renamed symbols importable.
  • Ran: symbol_fork_ratchet_17312, python_file_size_ratchet, ceiling_record_parity_17872, sdk_response_model_contract, reach_scope_claim_17844, guard_reach_meta, router-auth 16375, legacy shim, LLC template, workflow_templates, orchestration, terminal tool, IDE integration tests: all passed.

Folded in

From branch issue-15024-gateway-adapters (handed over; same files as this PR's gateway work), cherry-picked with -x:

  • d4c7be4342 fold channel_adapters/ into adapters/, add ChannelType.WHATSAPP
  • bd4e593806 test: ChannelType lists every channel that has an adapter
    No conflicts; no reference to the old SessionManager/SessionStatus names exists in the folded files (already Gateway*).

AC evidence for #15024: canonical package recorded (repo_tests/one_gateway_adapter_package_15024_test.py docstring + adapters/__init__.py); transport_base.py and websocket_adapter.py live in adapters/; git grep gateway.channel_adapters finds no import; services/gateway/channel_adapters/ is gone; ChannelType.WHATSAPP at types.py:30 plus test_channel_type_lists_every_channel_that_has_an_adapter.

Closes #15024

Verification (folded work)

  • gateway tests + one_gateway_adapter_package_15024: 95 passed; symbol_fork_ratchet_17312, python_file_size_ratchet, ceiling_record_parity_17872, guard_reach_meta: 83 passed; reach_scope_claim_17844 alone: 10 passed.

Model Used

Claude Sonnet 5.5

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 87221482-fd1b-40dc-b18d-984ad2f092b5

📥 Commits

Reviewing files that changed from the base of the PR and between df211d3 and a598ede.


⛔ Files ignored due to path filters (3)
  • autobot-frontend/src/types/generated/api.ts is excluded by !**/generated/**
  • repo_tests/python_file_size_ratchet_baseline.py is excluded by !repo_tests/python_file_size_ratchet_baseline.py
  • scripts/python_file_size_known_large.py is excluded by !scripts/python_file_size_known_large.py

📒 Files selected for processing (51)
  • autobot-backend/api/whatsapp.py
  • autobot-backend/api/whatsapp_test.py
  • autobot-backend/llc/adapters/__init__.py
  • autobot-backend/llc/adapters/process_adapter.py
  • autobot-backend/llc/adapters/tests/test_adapters.py
  • autobot-backend/llc/api/agents.py
  • autobot-backend/llc/api/controls.py
  • autobot-backend/llc/api/github_webhooks.py
  • autobot-backend/llc/api/routines.py
  • autobot-backend/llc/api/work_items.py
  • autobot-backend/llc/health/probe.py
  • autobot-backend/llc/models/heartbeat_run.py
  • autobot-backend/llc/scheduler/heartbeat_scheduler.py
  • autobot-backend/llc/services/controls_service.py
  • autobot-backend/llc/services/replay_service.py
  • autobot-backend/llc/tests/test_agent_hire_trigger_12210.py
  • autobot-backend/llc/tests/test_controls.py
  • autobot-backend/llc/tests/test_github_webhooks.py
  • autobot-backend/llc/tests/test_health_probe.py
  • autobot-backend/llc/tests/test_heartbeat_idle_short_circuit_17726.py
  • autobot-backend/llc/tests/test_heartbeat_scheduler.py
  • autobot-backend/llc/tests/test_heartbeat_workspace_release.py
  • autobot-backend/llc/tests/test_org_role_authority.py
  • autobot-backend/llc/tests/test_provider_rate_limit_recovery.py
  • autobot-backend/llc/tests/test_registry_adapter_rate_limit.py
  • autobot-backend/services/autoresearch/models.py
  • autobot-backend/services/autoresearch/runner.py
  • autobot-backend/services/autoresearch/runner_test.py
  • autobot-backend/services/gateway/adapters/__init__.py
  • autobot-backend/services/gateway/adapters/transport_base.py
  • autobot-backend/services/gateway/adapters/websocket_adapter.py
  • autobot-backend/services/gateway/adapters/websocket_adapter_test.py
  • autobot-backend/services/gateway/channel_adapters/__init__.py
  • autobot-backend/services/gateway/gateway.py
  • autobot-backend/services/gateway/gateway_test.py
  • autobot-backend/services/gateway/session_manager.py
  • autobot-backend/services/gateway/types.py
  • autobot-backend/services/npu_pipeline/npu_client.py
  • autobot-backend/services/trigger_service.py
  • autobot-backend/services/trigger_service_test.py
  • autobot-backend/services/whatsapp_service.py
  • autobot-backend/services/workflow_automation/__init__.py
  • autobot-backend/services/workflow_automation/manager.py
  • autobot-backend/services/workflow_automation/templates.py
  • autobot-npu-worker/tests/test_npu_client.py
  • autobot_shared/webhook_signature.py
  • autobot_shared/webhook_signature_test.py
  • repo_tests/_reach_policy.py
  • repo_tests/one_gateway_adapter_package_15024_test.py
  • repo_tests/reach_scope_claim_17844_test.py
  • repo_tests/symbol_fork_baseline.json

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. The actual limit is the open-PR cap (AUTOBOT_OPEN_PR_CAP, default 40), enforced at pre-push against NEW branches only -- pushing more commits to this PR's own branch is never blocked by it.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Merge the ones whose CI has finished and review has passed: gh pr merge <number> --squash --delete-branch
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@mrveiss

mrveiss commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Security review (Opus) at 2d652b3: approve.

  • One verifier: autobot_shared/webhook_signature.py matches every callers wire format exactly: strip sha256=, hex HMAC-SHA256 over the raw body. GitHub (X-Hub-Signature-256, await request.body()atgithub_webhooks.py:145), WhatsApp (api/whatsapp.py:207) and triggers (X-AutoBot-Signature, api/triggers.py:218`).
  • Fails closed: an empty or missing secret or header, or a missing sha256= prefix, returns False. A wrong length or non-hex value fails compare_digest.
  • No unmigrated copy: hmac.new, compare_digest and the signature headers were grepped across the backend, SLM and shared. The other hits are different schemes (card signing, service signing, SigV4, token compares), and nothing imports the deleted copies.
  • Behaviour change: none at the route level. github_webhooks.py:138-143 already returns 503 on an unset or empty secret, so existing installs cannot break.
  • Improvement: the trigger copys TypeError` on a None signature now returns False.
  • api.ts: only the two trigger-response schemas are renamed, and no frontend code reads the old names.
  • Test leak: patch.dict(_registry) restores the module-level registry.

LOW, pre-existing in all three copies and never failing open: a non-ASCII header raises TypeError, giving a 500 instead of a 401. Filed as #18464, now with one place to fix it.

Queued for the next merge train.

@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

…age, add the missing ChannelType members (#15024)

(cherry picked from commit d4c7be4342ad72e8878917831dc014b12a48aeb5)
…15024)

(cherry picked from commit bd4e5938065db07d5509ba72e646296ef1de0573)
@mrveiss

mrveiss commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Delta check at a598ede (the #15024 fold): approve.

  • services/gateway/channel_adapters/ no longer exists, and git grep -E 'gateway[./]channel_adapters' finds 0 references in any form (imports, strings, patch targets; .test_durations excluded).
  • ChannelType.WHATSAPP is at services/gateway/types.py:30, and the canonical adapter package is pinned by test_channel_type_lists_every_channel_that_has_an_adapter.
  • 0 behind main, and the webhook-signature work approved at 2d652b3 is unchanged.

Closes #15024 is honest. Back in the next merge train.

This branch has not been deployed

No deployments
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.

tech-debt(gateway): two parallel adapter packages — adapters/ and channel_adapters/ — with one concrete adapter in each

1 participant