Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ this file. The format follows Keep a Changelog, and versioned releases follow
Semantic Versioning where the repository publishes a release.

## [Unreleased]
- Fix two `tests/test_contextual_orchestrator_review_policy.py` tests left broken by merged
`#1587` ("separate free-pool admission from global discovery"), which intentionally excluded
`OPENAI_API_KEY` from `FREE_POOL_CREDENTIAL_NAMES` but did not update
`test_build_catalog_applies_account_cap` and `test_build_catalog_respects_limit`, both of which
still built discovery reports using `openai` rows and asserted they were admitted to the free
pool. Every full-suite/coverage-evidence run on protected `main` (and every PR rebasing onto it)
inherited these two failures regardless of its own diff. Swapped the `openai` rows in both tests
for `bytez` (also `is_free`-eligible but, unlike `openai`, still in `FREE_POOL_CREDENTIAL_NAMES`),
preserving each test's original intent — three distinct provider accounts each capped at 2, and a
single provider's rows truncated to the configured limit — without depending on the now-removed
OpenAI free-pool admission. No production code changed.
- **Fix a live crash: `noema-review` failed with an unhandled `HTTPError` instead
of failing closed.** Live incident on `ContextualWisdomLab/naruon#1486`:
`scripts/ci/noema_review_gate.py::call_llm`'s `opener.open(request)` call sat
Expand Down
6 changes: 3 additions & 3 deletions tests/test_contextual_orchestrator_review_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def test_build_catalog_applies_account_cap() -> None:
for i in range(6)
]
+ [
{"provider": "openai", "model": f"o{i}", "agent_id": f"oa_{i}", "is_free": True, **FREE_PRICE}
{"provider": "bytez", "model": f"b{i}", "agent_id": f"bz_{i}", "is_free": True, **FREE_PRICE}
for i in range(3)
]
}
Expand All @@ -367,14 +367,14 @@ def test_build_catalog_applies_account_cap() -> None:
account_counts[account] = account_counts.get(account, 0) + 1
assert account_counts["nvidia_nim"] == 2
assert account_counts["nvidia_nim_sub"] == 2
assert account_counts["openai"] == 2
assert account_counts["bytez"] == 2


def test_build_catalog_respects_limit() -> None:
"""The catalog never exceeds the configured agent limit."""
report = {
"models": [
{"provider": "openai", "model": f"m{i}", "agent_id": f"oa_{i}", "is_free": True, **FREE_PRICE}
{"provider": "bytez", "model": f"m{i}", "agent_id": f"bz_{i}", "is_free": True, **FREE_PRICE}
for i in range(20)
]
}
Expand Down
Loading