personal memory agent
0

Configure Feed

Select the types of activity you want to include in your feed.

test(providers): align cogitate tests with new _build_llm/diagnostic tier

Three tests on main went stale against this branch's openhands.py
changes and were outside the branch's focused validation set:

- test_run_cogitate_invokes_restore / test_run_cogitate_error_before_
usage_baseline_omits_usage patch _build_llm with fakes whose
signatures predate the keyword-only num_retries parameter run_cogitate
now passes; give the fakes the matching keyword.
- test_tier_inventory_matches_capabilities hardcoded "sol" as always
present, which the new diagnostic tier (sol/reads/submit all False)
violates by design; derive expected tools from caps.sol and caps.reads
so the invariant holds for a sol-less tier.

No production behavior changed; only test doubles/expectations updated to
match the contract this branch already established.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

+9 -3
+3 -1
tests/test_log_policy.py
··· 65 65 calls: list[tuple[int, tuple[logging.Handler, ...]] | None] = [] 66 66 real_apply_http_logging_policy = apply_http_logging_policy 67 67 68 - def fail_build_llm(provider: str, model: str) -> Any: 68 + def fail_build_llm( 69 + provider: str, model: str, *, num_retries: int | None = None 70 + ) -> Any: 69 71 raise RuntimeError("sentinel") 70 72 71 73 def apply_spy(
+1 -1
tests/test_openhands_errors.py
··· 165 165 ): 166 166 build_exc = RuntimeError("llm exploded") 167 167 168 - def fail_build(_provider, _model): 168 + def fail_build(_provider, _model, *, num_retries=None): 169 169 raise build_exc 170 170 171 171 monkeypatch.setattr(openhands, "_build_llm", fail_build)
+5 -1
tests/test_talent_cli.py
··· 393 393 assert tiers[tier]["sol"] is caps.sol 394 394 assert tiers[tier]["reads"] is caps.reads 395 395 assert tiers[tier]["submit"] is caps.submit 396 - expected_tools = ["sol", *COGITATE_READ_TOOL_NAMES] if caps.reads else ["sol"] 396 + expected_tools: list[str] = [] 397 + if caps.sol: 398 + expected_tools.append("sol") 399 + if caps.reads: 400 + expected_tools.extend(COGITATE_READ_TOOL_NAMES) 397 401 assert tiers[tier]["tools"] == expected_tools 398 402 399 403