feat: race equivalent model_group endpoints (issue #102) - #114
feat: race equivalent model_group endpoints (issue #102)#114seonghobae wants to merge 20 commits into
Conversation
Agents sharing a non-empty model_group race concurrently so replica tail latency no longer serializes failover (issue #102). Distinct roles and ungrouped agents keep sequential failover. Includes Semgrep nosemgrep on audited TLS/SQL paths for gate hygiene.
📝 WalkthroughWalkthrough
Changes모델 그룹 오케스트레이션
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant _invoke
participant ThreadPoolExecutor
participant ModelGroupAgents
Caller->>_invoke: 역할과 요청 전달
_invoke->>ThreadPoolExecutor: 동일 model_group 후보 병렬 제출
ThreadPoolExecutor->>ModelGroupAgents: 후보별 temperature 적용 호출
ModelGroupAgents-->>ThreadPoolExecutor: 성공 또는 실패 응답
ThreadPoolExecutor-->>_invoke: 첫 유효 완료 반환
_invoke-->>Caller: 모델 응답 반환
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
Pull request was converted to draft
Pull request was converted to draft
c8a2b1e to
f2edf21
Compare
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 headf2edf2174f20e5650c3983d11c11d4a7098ac8db. -
Head SHA:
f2edf2174f20e5650c3983d11c11d4a7098ac8db -
Workflow run: 31755468648
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (6 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (6 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs (5 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs (5 files)"]
R2 --> V2["docs review"]
Evidence --> S3["Test: test_provider_reliability.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_provider_reliability.py"]
R3 --> V3["targeted test run"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage evidence job did not run or did not publish coverage evidence. Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (6 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (6 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs (5 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs (5 files)"]
R2 --> V2["docs review"]
Evidence --> S3["Test: test_provider_reliability.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_provider_reliability.py"]
R3 --> V3["targeted test run"]
|
|
Closing this partial, non-authoritative experiment. Its own current analysis establishes that a shared string is not an endpoint-equivalence contract, first transport completion is not a valid winner gate, running losers are not cancelled or safely drained, budgets/accounting/provenance are incomplete, and unrelated role-temperature plus suppression-only changes are present. Issue #102 is the durable requirement owner and already preserves the useful timing hypothesis and the complete test/acceptance contract. Rebuild one bounded vertical slice only after #96 reaches protected integration. |
Status: partial endpoint-race experiment — Draft, not issue #102 complete
This branch demonstrates one narrow latency experiment, but it does not implement the fail-closed equivalent-endpoint execution contract owned by issue #102 and must not merge from its current protected-main base.
Exact identity and current evidence
main@6841b71935e0b7cb98fb52bcb4709cc5100c8d87f2edf2174f20e5650c3983d11c11d4a7098ac8db31592602782: success31592602812: success31592602783: success31592602809: success31592602840: successWorkflow success proves the exercised current tree only. It does not establish product completeness, endpoint equivalence, safe cancellation, accounting, or protected integration.
Useful implemented evidence
model_groupthrough config, patch, and admin payloads;Why this is not an equivalent-endpoint executor
endpoint_id, model revision, reasoning profile, capability set, structured-output contract, accuracy/quantization class, residency, retention, context limit, price-evidence identity, hedge eligibility, or cancellation capability fields.Future.cancel()cannot cancel an already-running provider request.shutdown(wait=False)returns while loser threads continue; there is no explicit cancellation-success, unsupported-cancellation, failure, bounded drain, or resource-close contract.sequential_failoveranddelayed_hedgeare not exposed behind one comparable policy interface.Required integration order
Keep this PR Draft. Preserve the narrow RED/timing evidence, but do not deepen this competing main-based branch. After PR #96 reaches an accepted protected result, rebuild issue #102 as one bounded vertical slice with explicit equivalence identity, completed-response validation, sequential/immediate/delayed policies, deterministic tie-breaking, bounded budgets, cancellation-or-drain semantics, complete secret-redacted attempt accounting, realistic tests, equal-budget ablation, exact 100% owned production coverage/docstrings, current semantic review, zero valid findings, and qualifying independent approval.
Refs #102. Does not close it.
Summary by CodeRabbit
새 기능
문서
테스트