Skip to content

feat(ai): make adaptive orchestration the planning default - #529

Closed
seonghobae wants to merge 25 commits into
developfrom
agent/adaptive-orchestrator-default
Closed

feat(ai): make adaptive orchestration the planning default#529
seonghobae wants to merge 25 commits into
developfrom
agent/adaptive-orchestrator-default

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • explicitly send orchestration_mode: "auto" from the current protected-develop contextual-orchestrator client;
  • preserve the existing authenticated, fail-closed production transport, bounded input/response validation, 120-second timeout, operator-safe error contract, and explicit SCOPEWEAVE_DEV=1 development-only deterministic adapter;
  • extend the existing canonical orchestrator production-boundary test, update the canonical production contract, and record the change in CHANGELOG.md.

TDD and branch safety

The original feature branch was two protected-develop commits behind and contained a branch-local self-modifying workflow that staged tests, mutated source, deleted itself, and pushed with write credentials. Continuing from that stale tree would have overwritten already-shipped orchestrator hardening. The unsafe workflow and helper scripts were removed, its old run 31945254038 completed as failed, and the branch was reconciled non-destructively with protected develop@28420da358f57be5e85be3660251e39b85e1cc94 before product work resumed.

On the reconciled current-base code:

  1. RED commit 177e2a12e1f6be32c5a9b91379f92cf1170a71c8 updates the existing canonical tests/unit/orchestrator.test.mjs request-body expectation to require orchestration_mode: "auto".
  2. GREEN source commit 5a6afdd9f26994987e3d9ba3b85a8dd95f06a7e7 adds only that field to the existing validated production request body.
  3. Subsequent documentation commits update the code-current production contract and changelog without reintroducing the discarded self-modifying control path.

Dependency contract

The current protected ContextualWisdomLab/contextual-orchestrator main revision verified for this change is 6841b71935e0b7cb98fb52bcb4709cc5100c8d87. Its /v1/chat/completions contract accepts orchestration_mode and currently permits auto, route, and conduct. ScopeWeave selects auto but does not freeze or claim a particular provider, worker count, topology, verifier strategy, or cost heuristic; those remain contextual-orchestrator authority.

Verification

Exact-current-head CI/security/review evidence is authoritative. Predecessor-head successes are not carried forward. The PR must not merge until all applicable current-head required checks, security/review gates, unresolved-thread requirements, and qualifying independent approval required by live repository governance pass on the unchanged head.

Summary by CodeRabbit

  • 새 기능

    • 프로덕션 planning-analysis 요청이 auto 오케스트레이션 모드를 사용하도록 개선되었습니다.
    • 실행 정책과 라우팅을 오케스트레이션 서비스에 위임하면서 기존 인증 및 응답 제어를 유지합니다.
  • 문서

    • 운영 계약, 적용 범위, 책임 경계, 보안 및 롤백 절차를 문서화했습니다.
  • 테스트

    • 요청에 auto 모드가 포함되는지 검증하도록 테스트를 보강했습니다.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e61930f-d378-4b57-99a3-5a1b1688d12c

📥 Commits

Reviewing files that changed from the base of the PR and between 44e7903 and 6e1c89a.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docs/doctoring/contextual-orchestrator-auto-default.md
  • docs/orchestrator-production.md
  • server/orchestrator.mjs
  • tests/unit/orchestrator.test.mjs

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Production planning-analysis 요청이 orchestration_mode: "auto"를 명시하도록 변경되었습니다. 요청 테스트와 운영 문서가 새 계약을 반영합니다. 인증된 fail-closed 전송과 응답 경계 제어는 유지됩니다.

Changes

자동 오케스트레이션 기본값

Layer / File(s) Summary
요청 계약 및 검증 갱신
server/orchestrator.mjs, tests/unit/orchestrator.test.mjs
chat 요청 payload에 orchestration_mode: 'auto'를 추가했습니다. 단위 테스트의 예상 payload를 갱신했습니다.
운영 계약 문서화
docs/orchestrator-production.md, docs/doctoring/contextual-orchestrator-auto-default.md, CHANGELOG.md
Production briefing 계약, contextual-orchestrator의 지원 모드와 책임 범위, 변경 기록을 auto 모드에 맞게 갱신했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6e1c8

The change makes adaptive orchestration the planning default while preserving the existing transport and validation behavior; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: cursoragent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 planning 호출의 기본 오케스트레이션 모드를 adaptive orchestration으로 변경하는 주요 내용을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/adaptive-orchestrator-default

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Please submit a formal review for exact current head 6e1c89aacac5925781d8a47d1d77ee61c49de635 against protected develop@44e7903cf8891c65410f7fc6ca5144de3fdb5185. Verify the bounded request-shape change (orchestration_mode: "auto") preserves the existing authenticated fail-closed transport and does not transfer caller authority over provider/model/topology selection. Current opencode-review check 95240664378 is terminal success, but there is no formal review submission on this head. Review only: do not mutate the branch, merge, weaken gates, or treat workflow/model status as approval by itself.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

Superseded by the older canonical transport owner in #496 after exact overlap analysis. Both PRs independently modified the same server/orchestrator.mjs request-body boundary, so leaving them as unrelated roots created a last-writer regression risk.

Unique #529 behavior has been preserved on #496's current combined line rather than discarded:

  • ordinary hardened request regression now requires orchestration_mode: "auto";
  • attribution regression separately requires auto while tenant attribution is present and when it is omitted;
  • production source composes orchestration_mode: "auto" with sanitized attribution instead of choosing one feature over the other;
  • docs/orchestrator-production.md, docs/doctoring/contextual-orchestrator-auto-default.md, and CHANGELOG.md preserve the adaptive-orchestration contract, dependency evidence, APA-7 research references, rollback boundary, and release note.

The preserved combined owner is #496 head 3069978d48b4933651430186242f81ecf611d382 at this comparison. A direct commit comparison still diverges because #496 also contains attribution work, but #529's five-file semantic delta has been reconstructed/superseded there. Closing this PR prevents accidental independent integration from erasing the attribution field; #496 remains subject to fresh exact-head CI/security/review gates before merge.

@seonghobae seonghobae closed this Aug 17, 2026
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