refactor(core): finalize P1 decomposition safeguards#635
Merged
limityan merged 4 commits intoGCWing:mainfrom May 11, 2026
Merged
refactor(core): finalize P1 decomposition safeguards#635limityan merged 4 commits intoGCWing:mainfrom
limityan merged 4 commits intoGCWing:mainfrom
Conversation
d112b08 to
f9f3fb4
Compare
wsp1911
approved these changes
May 11, 2026
Move the core decomposition plan into docs/plans and add the architecture guardrail doc for future bitfun-core split work. Introduce the product-full safety net without reducing the default core capability set, and make current product crates opt into the full runtime explicitly. Add bitfun-core-types for shared AI error DTOs while preserving the existing bitfun-events re-export path. Move the existing terminal-core and tool-runtime packages to workspace-level crate paths without changing their package or lib names. Update AGENTS, README, and CONTRIBUTING guidance so future core decomposition work follows the guardrails and uses the new support crate locations.
Introduce bitfun-agent-stream and move stream processing logic, fixtures, and stream regression tests out of bitfun-core while keeping a compatibility wrapper for the existing core import path. Move shared AI error categorization and detail helpers into bitfun-core-types, then narrow BitFunError's concrete dependency coupling at the core boundary. Introduce bitfun-runtime-ports as a DTO and trait-only boundary for agent submissions, dynamic tools, config reads, and session transcript reads, with initial core adapters for the coordinator, config service, and tool registry. Keep product feature defaults unchanged while reducing the compile surface needed for stream-focused tests.
Carry AgentSubmissionSource through the runtime submission port and map it back to DialogTriggerSource so port-based submissions preserve their original caller semantics instead of collapsing to the bot default. Rename the transcript filter DTO from from_turn_id to turn_id, keeping the serialized camelCase contract explicit through tests. Restrict DynamicToolProvider output to MCP dynamic tools and derive provider_id from mcp__server__tool names so built-in registry tools are not exposed as provider-owned dynamic tools.
Add WAI-ARIA tablist and tabpanel wiring to the session usage panel, including keyboard navigation for ArrowLeft, ArrowRight, Home, and End. Cap large usage tables behind an explicit expansion control, switch table header and row rendering to stable ids, and add localized copy for the collapsed row summary. Extend usage panel regression coverage for tab semantics, keyboard navigation, and long-table expansion. Also document the terminal-core compatibility re-export so the legacy bitfun_core::service::terminal path remains intentional.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
origin/main.product-fulllifecycle rules,services-integrationsdebug-log, andai-adaptersownership.Changes
bitfun-coredefault still maps toproduct-full, product crates keep explicit full-runtime features, and server/relay manifests are not expanded just for symmetry.bitfun_core::service::terminalpath remains intentional whileterminal-corelives at workspace level.product-fullis a release-safety guardrail, not a new dumping ground, and leaves non-P1 follow-up work explicitly open instead of claiming broader migration completion.Release Safety
bitfun-core/bitfun-desktop; no verification command failed.Verification
pnpm run type-check:webpnpm run lint:webpnpm --dir src/web-ui run test:run(65 files / 324 tests)cargo test -p bitfun-runtime-portscargo test -p bitfun-agent-streamcargo test -p bitfun-core-typescargo check -p terminal-corecargo check -p tool-runtimecargo check -p bitfun-core --features product-fullcargo check -p bitfun-desktopcargo check -p bitfun-clicargo check -p bitfun-servercargo check -p bitfun-acpcargo check --workspacegit diff --checkgit diff -- package.json scripts/dev.cjs scripts/desktop-tauri-build.mjs scripts/ensure-openssl-windows.mjs scripts/ci/setup-openssl-windows.ps1 BitFun-Installer