feat(reviewer): extract shared noema-core package (ADR-0014) - #536
feat(reviewer): extract shared noema-core package (ADR-0014)#536seonghobae wants to merge 72 commits into
Conversation
Adds ADR-0012 recording the architecture decision for unifying Noema into one shared runtime: three candidates were evaluated (shared-package, shared-service, contract-only), and shared-package won on evidence — the only real, current, same-language duplicate is the pydantic-ai Agent-construction wiring independently built in this repository's reviewer/agent.py and naruon's noema_agent.py, not the broader claims the shared-service/contract-only candidates rested on. Implements the ADR's first concrete PR: extracts the AsyncOpenAI -> OpenAIChatModel -> OpenAIProvider -> Agent(...) wiring from reviewer/noema_reviewer into a new packages/noema-core subpackage, plus a shared NOEMA_PERSONA identity fragment. reviewer/ is the sole consumer (self-consumption only); no behavior change — the existing 478-test, 100% coverage/docstring reviewer suite passes unmodified, and noema-core carries its own equivalent 100%/100% suite. Not yet published to an index; both CI (central-review.yml) and local pytest reach it via PYTHONPATH, the same mechanism already used for noema_reviewer itself. naruon's adoption, the identity/verdict-schema contract grafted from the contract-only candidate, and publishing noema-core to an index are scoped as explicit next steps in the ADR, not bundled into this PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughPydanticAI Agent 구성 배선을 provider-neutral Changes공유 noema-core 패키지
reviewer 연결과 지연 로딩
패키징과 CI 검증
설계 결정과 변경 기록
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to This PR moves provider-neutral agent construction into a shared package and embeds it in reviewer artifacts. It is not merge-ready while the required exact-head validation checks remain queued or pending; bounded follow-up also remains for staged-package provenance and provider-client cleanup, while the editable-install assertion needs minor hardening. Sequence Diagram(s)sequenceDiagram
participant Reviewer as reviewer
participant Config as resolve_model
participant Core as noema_core
participant Backend as reviewer build_backend
participant CI as reviewer-ci
Reviewer->>Config: OpenAI 호환 Model 구성
Config-->>Reviewer: 해석된 Model 반환
Reviewer->>Core: build_agent(Model, system_prompt)
Core-->>Reviewer: PydanticAI Agent 반환
Backend->>Core: canonical noema-core 소스 staging
Backend-->>CI: noema_core 포함 wheel 및 sdist 생성
CI->>CI: 설치 import, 해시, coverage 및 docstring 검증
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Triage note: this branch was 63 commits behind Generated by Claude Code |
Reconstruct the branch non-destructively on current protected main, preserve the shared-core/reviewer packaging delta, and resolve the ADR identity collision by moving the decision to ADR-0014. Keep provider routing and credentials outside noema-core; external consumption still requires immutable publication.
Describe noema-core as caller-supplied PydanticAI Agent construction only; keep provider discovery, endpoint selection, credentials and failover with contextual-orchestrator and reviewer policy with the reviewer bounded context.
|
Fresh protected-base repair supersedes the stale authority block above. Protected |
|
2026-09-06 KST post-#546 repair finding: protected reviewer source is now |
Scope
Introduce the minimal provider-neutral
noema-coreShared Kernel. It accepts an already-resolved PydanticAIModel;contextual-orchestratorremains the provider/model discovery, credential, routing, retry and failover owner. ADR-0014 remains Proposed and external adoption requires an immutable Noema release, not this mutable PR head.Current exact authority — 2026-09-06 KST
Protected Noema is
main@e26d771470a4ece873c367b40b3cd6cb03ac7de3. Ordinary two-parent/non-force restack8415e3c5e5eb1ed0b276f2d1154f96691d1d4e69preserves the complete noema-core/reviewer/package delta and adopts merged #527 OIDC trust without taking provider authority into Noema.Fresh exact-head
reviewer-ci 34026788459, requiredSecurity Scan 34026788482,ci 34026788510, andpatch-validator-image 34026788486are queued. Predecessor GREEN does not transfer. Keep Draft until terminal current gates and current review state are clear.