Skip to content

fix(ai): use adaptive orchestration for edit proposals - #30

Open
seonghobae wants to merge 2 commits into
mainfrom
agent/quality-cost-auto-default
Open

fix(ai): use adaptive orchestration for edit proposals#30
seonghobae wants to merge 2 commits into
mainfrom
agent/quality-cost-auto-default

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the DiagramWeave contextual-orchestrator adapter send explicit mode: "auto";
  • keep DiagramWeave's source-first prompt, revision binding, no-tools boundary, strict assistant JSON extraction, and Core proposal validation unchanged;
  • add a regression assertion, changelog entry, and APA 7th ADR.

Why

The proposal consumer should not select one fixed worker. Contextual-orchestrator should decide whether one route is sufficient or a deeper verified workflow is needed, then minimize known cost among quality-sufficient paths. An omitted mode currently maps to auto, but the explicit field makes the consumer contract reviewable and prevents future default drift.

Verification

Test-first bootstrap workflow 31940343995 completed successfully. It first demonstrated the new request-body assertion failed on the unchanged adapter, then implemented the field and ran the repository's complete npm run verify contract, including syntax, tests, 100% coverage, and docstring checks, followed by git diff --check.

Normal pull-request CI, security, review, and protected-branch gates remain authoritative for merge.

Summary by CodeRabbit

  • 개선 사항

    • 편집 제안 요청이 자동 오케스트레이션 모드를 사용하도록 변경되었습니다.
    • 모델 및 제공자 선택, 워크플로 깊이, 검증, 폴백과 비용 최적화가 자동으로 조정됩니다.
  • 문서

    • 자동 오케스트레이션 정책과 적용 범위를 설명하는 설계 문서가 추가되었습니다.

@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: d1f0b7bd-1086-4eb7-8495-7c569dc09b01

📥 Commits

Reviewing files that changed from the base of the PR and between 31fca92 and e42fd64.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • docs/adr/0008-adaptive-contextual-orchestrator-default.md
  • packages/contextual-orchestrator/src/client.js
  • packages/contextual-orchestrator/test/client.test.js

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


📝 Walkthrough

Walkthrough

편집 제안 요청이 고정 모델 호출 대신 mode: "auto"를 사용합니다. ADR이 오케스트레이션 책임과 예외 조건을 정의합니다. 클라이언트 테스트가 요청 본문의 모드 값을 검증합니다.

Changes

Adaptive orchestration 요청

Layer / File(s) Summary
Auto 모드 요청 및 정책
docs/adr/0008-adaptive-contextual-orchestrator-default.md, packages/contextual-orchestrator/src/client.js, packages/contextual-orchestrator/test/client.test.js, CHANGELOG.md
ADR-0008이 mode: "auto" 사용 정책과 오케스트레이션 책임을 정의합니다. 클라이언트 요청 본문에 mode: "auto"를 추가합니다. 테스트와 변경 로그가 변경 내용을 반영합니다.

Estimated code review effort: 1 (낮음) | ~5 minutes

Merge Risk: ⚪ Minimal · up to e42fd

This localized change makes adaptive orchestration explicit while preserving the existing proposal flow and validation behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 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 제목은 편집 제안에 적응형 오케스트레이션을 적용하는 주요 변경 사항을 간결하고 정확하게 설명합니다.
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/quality-cost-auto-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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e42fd648aa880f3890efb55a9836d96381417dcd.

  • Head SHA: e42fd648aa880f3890efb55a9836d96381417dcd

  • Workflow run: 31953020996

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 2

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: 0008-adaptive-contextual-orchestrator-default.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0008-adaptive-contextual-orchestrator-default.md"]
  R2 --> V2["docs review"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 16, 2026

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: e42fd648aa880f3890efb55a9836d96381417dcd
  • Workflow run: 31958103275
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e42fd648aa880f3890efb55a9836d96381417dcd.

  • Head SHA: e42fd648aa880f3890efb55a9836d96381417dcd

  • Workflow run: 31958103275

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 2

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: 0008-adaptive-contextual-orchestrator-default.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0008-adaptive-contextual-orchestrator-default.md"]
  R2 --> V2["docs review"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e42fd648aa880f3890efb55a9836d96381417dcd.

  • Head SHA: e42fd648aa880f3890efb55a9836d96381417dcd

  • Workflow run: 31958103275

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 2

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: 0008-adaptive-contextual-orchestrator-default.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0008-adaptive-contextual-orchestrator-default.md"]
  R2 --> V2["docs review"]
Loading

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