Skip to content

fix(ai): delegate structured defaults to adaptive orchestration - #91

Merged
seonghobae merged 5 commits into
mainfrom
agent/quality-cost-auto-default
Aug 16, 2026
Merged

fix(ai): delegate structured defaults to adaptive orchestration#91
seonghobae merged 5 commits into
mainfrom
agent/quality-cost-auto-default

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • switch ordinary structured extraction, summarization, commitment, relationship-classification, and post-evaluation consumers from fixed route to contextual-orchestrator auto;
  • retain explicit verify for post chat and lineage adjudication because those are deliberate checked-judgment contracts;
  • add focused regression coverage, changelog evidence, and an APA 7th ADR.

Why

Each consumer should own its domain prompt and fail-closed parser, not the model/workflow topology. In auto, contextual-orchestrator may keep an easy request on one worker or allocate deeper verification when uncertainty and task risk justify it, then minimize known execution cost among quality-sufficient paths. Unpriced models are not treated as free.

Verification

Test-first bootstrap workflow 31940669723 completed successfully on exact bootstrap head 44671f29ab673e0e4317df0f161c57591fe691b7 and produced this clean two-commit branch from main:

  1. the new consumer-mode contracts failed before implementation;
  2. the focused adaptive-default tests passed after implementation;
  3. the complete Python test suite passed;
  4. compile validation and git diff --check passed.

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

Summary by CodeRabbit

  • 새로운 기능

    • 일반적인 AI 처리 요청에 적응형 오케스트레이션이 기본 적용됩니다.
    • 모델 선택, 검증, 폴백 및 비용 최적화가 상황에 맞게 자동 조정됩니다.
    • 인용 기반 검토 및 판정 흐름에서는 기존의 명시적 검증 모드가 유지됩니다.
  • 문서

    • 적응형 오케스트레이션의 기본 동작과 사용 기준을 문서화했습니다.
  • 테스트

    • 주요 요약, 추출 및 평가 기능에서 자동 모드가 기본값인지 검증합니다.

@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: 126b4886-6015-426d-a68d-556acc522258

📥 Commits

Reviewing files that changed from the base of the PR and between 02cf4cc and 8962ba1.

📒 Files selected for processing (8)
  • CHANGELOG.d/0.78.0-adaptive-orchestration.md
  • docs/adr/0013-adaptive-contextual-orchestrator-default.md
  • lineageweave/commitment_extraction.py
  • lineageweave/entity_relationship_classification.py
  • lineageweave/keyman_extraction.py
  • lineageweave/post_evaluation.py
  • lineageweave/post_summary.py
  • tests/test_adaptive_orchestration_defaults.py

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


📝 Walkthrough

Walkthrough

일반 contextual-orchestrator 소비자의 기본 실행 모드를 route에서 auto로 변경했습니다. 명시적 verify 경로는 유지했습니다. ADR, 변경 로그 및 소비자 경계 테스트를 추가했습니다.

Changes

Adaptive 오케스트레이션 기본값

Layer / File(s) Summary
소비자 기본 모드 계약 및 적용
docs/adr/0013-adaptive-contextual-orchestrator-default.md, lineageweave/commitment_extraction.py, lineageweave/entity_relationship_classification.py, lineageweave/keyman_extraction.py, lineageweave/post_evaluation.py, lineageweave/post_summary.py
일반 contextual-orchestrator 소비자가 mode="auto"를 사용하도록 요청 설정과 설명을 변경했습니다. verify는 adjudication 경로로 유지했습니다.
기본값 검증 및 릴리스 기록
tests/test_adaptive_orchestration_defaults.py, CHANGELOG.d/0.78.0-adaptive-orchestration.md
구조화된 소비자와 사후 평가 소비자의 요청 payload가 mode="auto"를 사용하는지 검증했습니다. 0.78.0 변경 로그에 기본값과 verify 경로를 기록했습니다.

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

Merge Risk: ⚪ Minimal · up to 8962b

The change delegates selected structured-processing defaults to contextual orchestration while retaining explicit verification for checked-judgment paths; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 구조화된 기본 실행을 adaptive orchestration에 위임하는 주요 변경을 정확하고 간결하게 설명합니다.
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 💡 1
📝 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.

@seonghobae
seonghobae enabled auto-merge (squash) August 16, 2026 10:30
@seonghobae

Copy link
Copy Markdown
Contributor Author

Reviewed the exact current head. The routeauto default is correct for structured extract/summarize/classify/evaluate consumers: LineageWeave keeps the fail-closed parser and leaves topology to contextual-orchestrator. Explicit verify on chat/adjudication is the right exception.

One merge-order note, not a code defect: this ADR is 0006 on current main, which is sequential and correct. Stacked PR #74 already uses docs/adr/00060012 for the PROV-O/actor line. Whichever lands second must renumber rather than overwrite.

Synthetic fixtures only. No raw LLM API.

Copy link
Copy Markdown
Contributor Author

Merge-order conflict addressed on the current branch: the adaptive routing decision moved from docs/adr/0006-... to docs/adr/0013-..., reserving ADRs 0006–0012 for stacked PR #74. No runtime behavior changed; exact-head checks are being regenerated.

Copy link
Copy Markdown
Contributor Author

Changelog overlap with stacked PR #74 is also removed. The current branch restores protected-main CHANGELOG.md unchanged and records this slice in CHANGELOG.d/0.78.0-adaptive-orchestration.md, leaving #74's root changelog and 0.76/0.77 fragments independent. Exact-head checks are regenerating.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Leaving this PR blocked rather than rewriting it onto main. ADR 0013 and the 0.78.0 changelog fragment still collide with #74 (ADRs 0006–0012, also versioned 0.78.0) and with #89 (ADR 0013 registry). After #74+#89 land, rebase this onto that head as ADR 0015 / 0.80.x. Do not merge first.

]
}

import lineageweave.post_evaluation as module
@seonghobae

Copy link
Copy Markdown
Contributor Author

Still leaving this blocked. ADR 0013 / 0.78.0 still collide with #74 (ADRs 0006–0012, also 0.78.0) and #89 (ADR 0013 registry). After #74+#89 land, rebase as ADR 0015 / 0.80.x. Do not merge first. Same applies to competing #96.

@seonghobae
seonghobae merged commit c93d449 into main Aug 16, 2026
29 checks passed
cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
PR #91 landed an adaptive-orchestration ADR 0013 on the #74 base after
this slice already used 0013 for the normalized analysis-run registry.
Renumber the adaptive record to 0015 so ADR numbers stay unique.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
PR #91 landed an adaptive-orchestration ADR 0013 on the #74 base after
this slice already used 0013 for the normalized analysis-run registry.
Renumber the adaptive record to 0015 so ADR numbers stay unique.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
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