Skip to content

refactor(layout): batch2 bee/observability/adapter/core/kb - #593

Merged
delete-cloud merged 1 commit into
mainfrom
refactor/layout-batch2
Jun 13, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
refactor/layout-batch2

Conversation

@delete-cloud

Copy link
Copy Markdown
Owner

What

Batch 2 of the package-layout consolidation: relocate 13 mid-traffic top-level modules into cohesive subpackages. Old import paths preserved via shims / in-place package conversion — no call-site changes required.

New packages (bee/) + B-shims: bee_command_bridge|launch|runtime|template_pack|workspace.py → bee/*.py
Observability: observability.py → observability/config.py (A); agent_observability.py → observability/agent.py (B); metrics.py → observability/metrics.py (B)
Adapter: adapter.py → adapter/pipeline.py (A); adapter_types.py → adapter/types.py (B)
Core: app.py → core/app.py (B); agent_identity.py → core/agent_identity.py (B)
KB: kb.py → kb/rag.py (A) — distinct from plugins/kb.py

  • A = module→package: __init__.py re-exports the full public surface (import * + explicit non-public names).
  • B = sys.modules alias shim at the old path.

Notable in-package repoints (to break import cycles / fix path-relative logic)

  • Bee internal imports → coding_agent.bee.*; bee/__init__.py uses lazy re-exports.
  • adapter/pipeline.py → coding_agent.adapter.types, coding_agent.observability.agent, coding_agent.redaction.
  • core/app.py agent.toml default fixed to Path(__file__).parents[1] / "agent.toml" (package root).
  • kb/rag.py preserves monkeypatch/private-name behavior (Progress, _source_id, fetch-cap constants).

Verification (independent, outside codex sandbox)

  • uv run pytest -q: 3725 passed, 8 skipped, 20 xfailed
  • All 13 old import paths succeed in fresh processes.
  • A-package re-exports: every public name is identity-equal between coding_agent.<pkg> and coding_agent.<pkg>.<mod> (no missing/divergent objects).
  • core/app.py resolves the default agent.toml to package root.

Batch 2 of 4. Spec: .opencode/prompts/tasks/package-layout-consolidation-task-packet.md.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@delete-cloud, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 6 minutes and 48 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a84ab17a-8163-41ea-9f4e-22237d5fafb3

📥 Commits

Reviewing files that changed from the base of the PR and between 444531c and d74b4af.

📒 Files selected for processing (27)
  • coding-agent/src/coding_agent/adapter/__init__.py
  • coding-agent/src/coding_agent/adapter/pipeline.py
  • coding-agent/src/coding_agent/adapter/types.py
  • coding-agent/src/coding_agent/adapter_types.py
  • coding-agent/src/coding_agent/agent_identity.py
  • coding-agent/src/coding_agent/agent_observability.py
  • coding-agent/src/coding_agent/app.py
  • coding-agent/src/coding_agent/bee/__init__.py
  • coding-agent/src/coding_agent/bee/command_bridge.py
  • coding-agent/src/coding_agent/bee/launch.py
  • coding-agent/src/coding_agent/bee/runtime.py
  • coding-agent/src/coding_agent/bee/template_pack.py
  • coding-agent/src/coding_agent/bee/workspace.py
  • coding-agent/src/coding_agent/bee_command_bridge.py
  • coding-agent/src/coding_agent/bee_launch.py
  • coding-agent/src/coding_agent/bee_runtime.py
  • coding-agent/src/coding_agent/bee_template_pack.py
  • coding-agent/src/coding_agent/bee_workspace.py
  • coding-agent/src/coding_agent/core/agent_identity.py
  • coding-agent/src/coding_agent/core/app.py
  • coding-agent/src/coding_agent/kb/__init__.py
  • coding-agent/src/coding_agent/kb/rag.py
  • coding-agent/src/coding_agent/metrics.py
  • coding-agent/src/coding_agent/observability/__init__.py
  • coding-agent/src/coding_agent/observability/agent.py
  • coding-agent/src/coding_agent/observability/config.py
  • coding-agent/src/coding_agent/observability/metrics.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/layout-batch2

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 and usage tips.

@delete-cloud
delete-cloud merged commit 77e25e1 into main Jun 13, 2026
2 checks passed
@delete-cloud
delete-cloud deleted the refactor/layout-batch2 branch June 13, 2026 17:41
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 participant