Skip to content

refactor: make code review capabilities dynamic - #1723

Merged
limityan merged 2 commits into
GCWing:mainfrom
limityan:yanzhn/dynamic-review-capabilities
Jul 24, 2026
Merged

refactor: make code review capabilities dynamic#1723
limityan merged 2 commits into
GCWing:mainfrom
limityan:yanzhn/dynamic-review-capabilities

Conversation

@limityan

@limityan limityan commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace six fixed built-in review specialist identities with one dynamically scoped ReviewWorker, while keeping one owning review agent, a conditional judge, and bounded managed packets for genuinely large targets.
  • Reduce repeated review reads and duplicate launches through revision-backed, session-local read receipts plus exact packet admission and retry bounds; preserve custom reviewers and historical built-in IDs/configuration.
  • Resolve equivalent review-platform remotes deterministically, return typed needs_remote_selection results for distinct repositories, and route ordinary review child sessions to the populated detail pane.
  • Add complete ReviewWorker UI copy for en-US, zh-CN, and zh-TW.

CI root cause and fix

The frontend CI completeness test enumerates the current fallback review roles. The runtime and TypeScript fallback had moved from the six legacy fixed roles to worker, but the three Web UI scenes/agents.json catalogs still contained only the legacy role entries. This left reviewTeams.members.worker.funName and the rest of the worker role copy undefined in every supported Web UI locale.

The fix adds the same four fields and three responsibilities for worker in all three locale catalogs. It does not change locale identity, fallback behavior, prompt language selection, or {LANGUAGE_PREFERENCE}.

Design and compatibility

  • No new telemetry service, persisted schema, or second agent runtime is introduced. Existing diagnostics and contract tests provide the required quality evidence.
  • Read receipts are review-only, content-stable, session-local, and cleared on context replacement, rollback, or session deletion.
  • Ambiguous PR operations never guess between distinct repositories; equivalent provider/host/project aliases collapse with stable origin, upstream, then lexical preference.
  • Historical fixed reviewer IDs remain non-discoverable compatibility aliases, and exact custom reviewer definitions keep precedence.
  • get_workspace_snapshot intentionally retains its overview semantics: no remote yields an empty snapshot and multiple remotes use the service's connected/supported preference. The strict remote-selection gate applies to the 12 concrete PR operations that can otherwise produce the reported ambiguity error.

Verification

  • cargo test -p bitfun-agent-runtime
  • cargo test -p bitfun-core --lib (1401 passed, 1 ignored on the original implementation head)
  • cargo check --workspace
  • pnpm --dir src/web-ui run test:run src/shared/services/reviewTeamLocaleCompleteness.test.ts (6 passed)
  • Focused review UI/service suite (5 files, 100 passed)
  • pnpm run i18n:contract:test:ci (23 passed, 14 skipped)
  • pnpm run i18n:audit (0 warnings)
  • pnpm run lint:web
  • pnpm run build:web
  • node --test scripts/check-core-boundaries.test.mjs (16 passed)
  • pnpm run check:repo-hygiene
  • pnpm run theme:color-audit:all
  • git diff --check gcwing/main...HEAD

The full Web suite no longer reports any review-team locale failure. On the Windows checkout, one unrelated source-string contract test remains sensitive to CRLF (RemoteConnectDialog.contract.test.ts); that file is outside this PR and the same test passed in the prior Ubuntu CI run. The updated Ubuntu CI run is the final authority for the full suite.

Three independent read-only re-reviews covered correctness/compatibility, architecture and competitor alignment, and Rust/TypeScript/UI/remote boundaries. No remaining high-confidence blockers were found.

@limityan
limityan marked this pull request as ready for review July 24, 2026 00:14
@limityan
limityan merged commit 15b9ed9 into GCWing:main Jul 24, 2026
5 checks passed
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