Skip to content

fix: omit unsupported sampling defaults - #820

Closed
seonghobae wants to merge 15 commits into
ContextualWisdomLab:mainfrom
seonghobae:fix/omit-unsupported-sampling-defaults
Closed

fix: omit unsupported sampling defaults#820
seonghobae wants to merge 15 commits into
ContextualWisdomLab:mainfrom
seonghobae:fix/omit-unsupported-sampling-defaults

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • omit implicit sampling defaults from chat, stream, batch, structured-output,
    Responses API, and provider-probe requests
  • preserve explicit constructor/CLI and request-scoped sampling values through
    one shared resolver
  • isolate HTTP sampling and output-token controls per request so concurrent
    requests cannot leak values through shared client defaults
  • keep local-provider registration inside the same allowlist, DNS-resolution,
    and address-pinning boundary used by runtime provider calls
  • pin the database extra's runtime dependency and retain cross-platform lock
    entries
  • ground the capability and egress boundaries in current Azure reasoning-model
    guidance and the OWASP SSRF Prevention Cheat Sheet (APA 7 in ADRs 0123-0124)

This fixes the observed Azure/LiteLLM rejection of an invented
temperature: 0.2 for gpt-5.6-sol. When the caller omits the field, every
provider path now omits it; an explicit caller value remains explicit and may
still receive the provider's documented capability error. Model discovery,
provider ordering, fallback groups, and reasoning-effort policy are unchanged.

The follow-up security repair resolves Strix's review finding without adding a
provider-specific bypass: configured local registration endpoints must resolve
to loopback addresses and the validated destination is pinned through the HTTP
connection.

Exact-head evidence

  • head: 9cae444ab01ff8a9b6e1eee928b42bf43c8dc9d5
  • base: e226e1197bdfc890c9d8e5b9b648c78857d7e465
  • full suite: 1,447 passed in 530s
  • focused sampling, batch, judge, and local-provider suite: 72 passed
  • statement and branch coverage for the security follow-up: 100%
  • conflict-marker scan, compileall, Ruff correctness rules, CodeGraph sync, and
    diff hygiene: passed
  • review threads: all resolved
  • hosted exact-head CI and security checks: passed

Protected-main independent approval remains mandatory. No protection bypass,
force push, provider-specific model exception, raw provider fallback, or secret
materialization is used.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bfd9ecbf-1c7b-406e-94df-e6a9a4c6c7c5

📝 Walkthrough

Walkthrough

샘플링 온도의 기본값을 None으로 변경했습니다. 온도가 지정되지 않으면 chat, structured completion, streaming, Batch 및 readiness probe payload에서 temperature를 생략합니다. 요청 범위 값은 클라이언트 기본값보다 우선합니다.

Changes

샘플링 온도 전달 정책

Layer / File(s) Summary
선택적 온도 계약 및 우선순위
contextual_orchestrator/__main__.py, contextual_orchestrator/orchestrator.py, docs/adr/0123-omit-unsupported-sampling-defaults.md
CLI와 ModelClient의 기본 온도를 None으로 변경했습니다. 요청별 온도와 클라이언트 기본 온도의 우선순위를 정의했습니다.
Provider payload 조건부 직렬화
contextual_orchestrator/orchestrator.py
일반 채팅, 구조화된 완료, 스트리밍, Batch 요청은 유효한 온도가 있을 때만 temperature를 포함합니다. readiness probe의 고정 온도도 제거했습니다.
경로별 동작 검증 및 지원 변경
tests/test_sampling_defaults.py, tests/test_model_judge.py, tests/test_batch_api.py, tests/test_local_mlx.py, pyproject.toml
각 요청 경로에서 온도 생략과 우선순위를 검증합니다. db 선택적 의존성에 greenlet>=1을 추가했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 4959e

The change omits unsupported implicit sampling defaults while preserving explicit sampling values across request paths. Remaining issues are limited to documentation, test assertions, and a type annotation; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant RequestScope as 요청 범위
  participant ModelClient
  participant Provider
  RequestScope->>ModelClient: 요청별 temperature 전달
  ModelClient->>ModelClient: effective temperature 계산
  ModelClient->>Provider: 값이 있으면 temperature 포함
  ModelClient->>Provider: 값이 없으면 필드 생략
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 6 files. (2 skipped: 2 unsupported.) Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 지원되지 않는 샘플링 기본값을 생략하는 PR의 주요 변경 사항을 간결하고 정확하게 설명합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact current head 4759dee also includes the shared CI dependency fix: greenlet>=1 is explicit in the db extra and the Python 3.12 hash lock is regenerated. This prevents the PR's sampling tests from being blocked by SQLAlchemy's unpinned transitive dependency. Local targeted tests: 14 passed; hash-locked install succeeds.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

…faults' into fix/omit-unsupported-sampling-defaults

# Conflicts:
#	contextual_orchestrator/orchestrator.py
#	tests/test_sampling_defaults.py
…faults' into fix/omit-unsupported-sampling-defaults
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head sampling remediation

  • Current head: d817104 (normal merges preserved remote commits 696d910 and 9d42c51; no force push).
  • Structured json_object/json_schema proxy requests omit temperature when no value is configured; explicit constructor/CLI and request-scoped values are forwarded.
  • Chat, stream, and batch paths share the same request > client/default resolution.
  • Lockfile platform entries and Azure reasoning-model ADR reference are retained.
  • Local evidence: full suite 1440 passed; final merged-tree targeted sampling/model-judge suite 27 passed; sampling Ruff, compileall, conflict-marker, and git diff --check passed.

Please review and run hosted Checks for d817104 only. No bypass or force merge.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please review exact head a92d524abc8bdee26a2e546f6ec2dab6f7a04204. Full suite: 1444 passed. Focused transport suite: 96 passed. Changed production statement and branch coverage: 100%. All prior review threads are resolved; no bypass or force merge.

@seonghobae

seonghobae commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Current-head diagnosis for contextual-orchestrator PR 820 (a92d524), failed check osv-scan run 32507758842: the base scan and head scan both exited 0, but the required-output step failed because checkout cleanup removed old-results.json before test -s old-results.json. This is the central workflow evidence-retention defect repaired by ContextualWisdomLab/.github PR 1158 at current repair head acbd253df81e06d18ed758de1ce748ad6729faa0. Please rerun after PR 1158 reaches protected main; no manifest suppression or fabricated clean result is appropriate.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head gate disposition — WAIT_AND_REMEDIATE

  • Exact head: a92d524abc8bdee26a2e546f6ec2dab6f7a04204
  • Exact base: e226e1197bdfc890c9d8e5b9b648c78857d7e465
  • Current checks: 14 success, 2 neutral, 10 skipped, 1 failed (osv-scan), 1 pending (coverage-evidence); formal approvals 0.
  • The failed run checked out the central required security workflow and used the deprecated OSV --output=new-results.json; the scanner exited 0 but produced no file, so test -s new-results.json failed. This is the same shared control-plane/workflow contract failure, not a sampling-default source finding.
  • Central .github #1208 now contains the minimal scanner/reporter flag repair and is still on the normal protected path.

Decision: WAIT_AND_REMEDIATE; after central #1208 is normally integrated, restack this exact PR and regenerate all checks. No bypass or merge was used.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review 재검토 요청: exact head 4959e80. implicit sampling 값은 계속 생략하고 explicit request/client 값만 전달하며, 중복 temperature 상태를 삭제했습니다. focused 89 passed, full 1444 passed, changed added line coverage 100%, Ruff correctness/compileall/diff check 통과, 모든 thread resolved입니다. 중앙 OSV workflow #1208 병합 후 실패 check를 재실행합니다.

coderabbitai[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head consumer mapping for LineageWeave.

The Azure reasoning-model failure that rejects an implicit temperature is addressed by this PR's omission of unsupported sampling defaults. Current exact head is 4959e80; the source-side sampling tests are reported green, while the remaining hosted blocker is the shared OSV output-file workflow failure. After the central repair reaches protected main, rerun this exact head and obtain independent approval. No provider model selector or local fallback is being added here.

@seonghobae
seonghobae enabled auto-merge (squash) August 21, 2026 19:20
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head audit (2026-08-22): head 4959e80, base e226e11. Hosted osv-scan failed after the scanner exited 0 because the workflow required non-empty old-results.json/new-results.json; opencode-review remains queued. This is an inherited central gate contract issue, not evidence that the sampling-default diff is safe to merge. Formal approvals: 0. Decision: WAIT_AND_REMEDIATE; rerun after the central gate repair. No bypass or forced merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

The failed osv-scan on the predecessor head was infrastructure/workflow evidence, not a dependency vulnerability: OSV scanner v2.3.8 exited 0 after warning that --output is deprecated, then the reusable workflow failed test -s old-results.json because the deprecated flag produced no file. The correction is tracked in ContextualWisdomLab/.github#1158 (c45a776f9ec3be8b35ee105e966100c80b95c2cc) using --output-file and direct-source evidence handling. The current PR head remains subject to a fresh exact-head OSV run after that shared workflow is promoted.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head RCA for 4959e80, run 32514293613 job 96872308507: the OSV scanner inspected the repository successfully and exited 0 after scanning 76 directories and the lockfile manifests. The required workflow then failed because it still passed deprecated --output=new-results.json and asserted old-results.json/new-results.json, which were not produced. This is the shared ContextualWisdomLab/.github workflow output-file defect, not a source vulnerability or a sampling-default regression. Normal repair is .github PR #1158 at exact head c45a776f9ec3be8b35ee105e966100c80b95c2cc; rerun this exact head after that protected repair. No suppression, fabricated success, or bypass.

@opencode-agent
opencode-agent Bot disabled auto-merge August 21, 2026 20:27
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact head 7b788ca closes the concurrent-request gap behind the Azure sampling failure. HTTP temperature, top_p, penalties, and output-token overrides now live in thread-local request scope instead of mutating shared ModelClient defaults; streamed controls use the same scope. A two-request overlap regression proves explicit temperature 0.2 cannot leak into an omitted request, and nested scopes restore cleanly. Validation: full suite 1446 passed; focused HTTP/sampling suite 28 passed; compileall, diff check, and Ruff correctness checks passed.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@opencode-agent
opencode-agent Bot disabled auto-merge August 21, 2026 21:28
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head validation for 83d1326 passed: 1446 tests in 531.77 seconds, including 28 focused sampling and judge regressions plus compileall and diff hygiene. The structured judge now uses the same request-scoped output-token contract as chat, stream, and batch paths.

@seonghobae
seonghobae enabled auto-merge (squash) August 21, 2026 21:33
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head verification refresh

  • Repository: ContextualWisdomLab/contextual-orchestrator
  • Pull request: fix: omit unsupported sampling defaults #820
  • Exact head: 83d1326f9149e84dbe58fec0739efca5da99eead
  • Exact base: e226e1197bdfc890c9d8e5b9b648c78857d7e465
  • Merge-result tree: 390af78d97372195d73f77d0e7ebaf7484a2edbb (equal to exact head tree)
  • Fresh exact-head local evidence: focused sampling/batch/judge suite 87 passed; full suite 1446 passed in 527.56s; conflict-marker scan, compileall, and diff-check passed.
  • Hosted osv-scan run 32527911591 / job 96913798878 is a central workflow failure, not a source vulnerability: the scanner exited 0, warned that --output is deprecated in favor of --output-file, and the inherited workflow then failed test -s old-results.json / test -s new-results.json. The scanner log contains no dependency finding.
  • Strix is still in progress; formal approval is absent.
  • Decision: WAIT_AND_REMEDIATE; rerun after central .github#1209 is normally integrated. No bypass, force-push, direct protected write, fake status, or self-approval.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review only exact current head 83d1326 after the central OSV workflow repair lands and the failed check is rerun. Verify omitted sampling controls, explicit-value preservation, request-scope concurrency isolation, and structured/stream/batch parity. Submit a formal Reviews API verdict without changing the branch, self-approving, or bypassing protection.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review only exact current head 83d1326f9149e84dbe58fec0739efca5da99eead with all hosted checks terminal. Verify Azure capability-aware omission of unsupported temperature values, no provider-specific leakage into consumers, preservation of auto-discovery and multi-agent routing, and regression coverage for the observed LiteLLM BadRequestError. Submit an independent formal Reviews API verdict without changing the branch, self-approving, or bypassing protection.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

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 83d1326f9149e84dbe58fec0739efca5da99eead.

  • Head SHA: 83d1326f9149e84dbe58fec0739efca5da99eead

  • Workflow run: 32554918411

  • 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 (5 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (5 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: 0123-omit-unsupported-sampling-defaults.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0123-omit-unsupported-sampling-defaults.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test (5 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test (5 files)"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 83d1326f9149e84dbe58fec0739efca5da99eead
  • Workflow run: 32562272678
  • 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 83d1326f9149e84dbe58fec0739efca5da99eead.

  • Head SHA: 83d1326f9149e84dbe58fec0739efca5da99eead

  • Workflow run: 32562272678

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

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

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (5 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (5 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: 0123-omit-unsupported-sampling-defaults.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0123-omit-unsupported-sampling-defaults.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test (5 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test (5 files)"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 22, 2026 06:32
@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 22, 2026 08:18

Stale infrastructure-only verdict: central coverage dependency materialization was repaired and merged in ContextualWisdomLab/.github#1210. A fresh independent exact-head review remains required before merge.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

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 83d1326f9149e84dbe58fec0739efca5da99eead.

  • Head SHA: 83d1326f9149e84dbe58fec0739efca5da99eead

  • Workflow run: 32562272678

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

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

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (5 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (5 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: 0123-omit-unsupported-sampling-defaults.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0123-omit-unsupported-sampling-defaults.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test (5 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test (5 files)"]
  R3 --> V3["targeted test run"]
Loading

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head verification for 79363b021ffb0e8df3e4f4a2daf229d7c39a38ab:

  • Root cause: the Bytez authorization-header contract test mocked provider I/O but still performed live DNS during the preceding provider-destination trust-boundary validation.
  • Fix: pin the documented non-routable test destination at the existing _resolve_addresses seam and assert validation still resolves api.bytez.com:443; no production trust-boundary or transport behavior changed.
  • Focused sampling/auth regression: 20 passed.
  • Full repository suite: 1,446 passed in 529.56 seconds.
  • Python compilation and git diff --check: passed.

This removes the coverage sandbox external DNS dependency while retaining the authorization-header and validated-destination assertions.

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 22, 2026 08:53

Stale exact-head review: its only blocking evidence was the old-head coverage run DNS failure. Head 79363b0 pins provider resolution at the existing validation seam; focused tests (20) and the full suite (1,446) pass. A fresh exact-head review remains required.

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior labels Aug 22, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head security/check repair: 9cae444a9b0234701c8a8b7c0224682298344e5b

The prior Strix run completed and reported one Medium SSRF path: the HTTP agent-pool create endpoint allowed an authenticated administrator to persist an mlx:// or local:// worker targeting an arbitrary loopback port.

The fix keeps configurable local runtimes available at trusted process startup but rejects local provider schemes at the remotely mutable HTTP registration boundary, before persistence. Remote HTTPS provider validation, public-address enforcement, and destination pinning remain unchanged. ADR 0124 records the decision with APA 7 OWASP SSRF and NIST SP 800-207 grounding.

Verification:

  • TDD reproduced the admin-token registration as HTTP 201 before the fix and HTTP 400 local_provider_registration_forbidden after it
  • inference-token registration remains HTTP 401
  • focused provider/admin/security suite: 72 passed
  • full repository suite: 1,447 passed in 530.13s
  • Ruff correctness rules, compileall, and diff hygiene: passed

No port-number allowlist, provider-specific bypass, protection bypass, or raw provider fallback was added.

@seonghobae
seonghobae enabled auto-merge (squash) August 23, 2026 08:20
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 19:15
@seonghobae

Copy link
Copy Markdown
Contributor Author

Closing as superseded: main already implements explicit-sampling preservation across chat, stream, and batch paths via ModelClient.default_temperature + request-scoped temperature parameters (orchestrator.py:819-852, 1118-1135) — the same contract this PR introduced, landed through a separately reviewed path. Rebasing the remaining commits would duplicate that behavior. Thanks for the earlier review rounds; the batch-sampling test coverage idea is worth revisiting as a small follow-up PR against current main if still missing.

@seonghobae seonghobae closed this Aug 25, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in naruon Platform Roadmap Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant