Repository navigation
Conversation
The bot suites have not run in CI, so they drifted silently against main: - compact-hook tests: commit_session now sends turn-budget retention kwargs (retention_mode/keep_recent_turn_count/...); fakes recorded only the dead physical-message keep_recent_count. Record the full retention contract and migrate configs to commit_keep_recent_turn_count (commit_keep_recent_count is the deprecated field). - agent-loop tests: token_usage now includes cache_read_input_tokens and the pre-model hook receives keep_recent_turn_count instead of keep_recent_count; align expectations and configs. - compile prompt test: the checkout rule now states Compile 'scans and validates the complete tree' instead of 'commits only validated changes'. - legacy workspace test: hardcoded 2026-08-20 timestamps crossed the 2-day STALE_SESSION_THRESHOLD window, so the session was skipped; derive timestamps relative to now. No production code changed. Full suite: 531 passed.
None of the repo workflows exercise bot/tests or bot/vikingbot, so the 531-test suite had no CI signal and drifted red unnoticed (12 stale failures at the time of this change). Add a path-gated bot-tests job to the PR workflow: it runs when bot/, the shared dependency manifests, or this workflow change, installs via 'uv sync --frozen --extra bot', and runs pytest over both bot test trees.
The first bot-tests run failed 239 async tests with "async def functions are not natively supported": 'uv sync --frozen --extra bot' only provides the dev group's bare pytest, while pyproject sets asyncio_mode=auto, which requires pytest-asyncio from the test extra. Add --extra test, matching the existing pattern in _test_lite.yml.
|
The first Root cause: Fix in c267be4: add |
|
Confirmed green: with |
|
The failed integration run ( I've pushed an empty commit to retrigger, and I'm extending #4374 to cover |
Summary
The VikingBot unit test suites (
bot/tests/+bot/vikingbot/, 531 tests) are not executed by any workflow in the repo — no job setsworking-directory: botor invokes pytest on bot paths. As a result the suite drifted red silently: 12 of 531 tests were failing on currentmain(verified onf97ce530), in some cases for weeks:test_openviking_api_key_type.py)commit_sessionnow sends turn-budget retention kwargs (retention_mode="turn_budget",keep_recent_turn_count, …) from #3380; test fakes had strict signatures →TypeError→success=Falsetest_agent_loop_outcome.py)token_usagenow includescache_read_input_tokens(#4059); the pre-model hook kwarg was renamedkeep_recent_count→keep_recent_turn_counttest_compile.py)test_session_portable_paths.py)2026-08-20timestamps crossed the 2-daySTALE_SESSION_THRESHOLD— a time-bomb test, failing since ~08-22All 12 are test-side drift against intentional main behavior — no production code is changed by this PR. Each was triaged against the introducing commit before updating the expectation.
What the tests now pin (notable)
keep_recent_count. They now record the full retention contract:(session_id, retention_mode, keep_recent_turn_count, user_id), with configs migrated to the activecommit_keep_recent_turn_countfield (commit_keep_recent_countremains inAgentsConfigas the documented deprecated field).nowso it can never cross the staleness window again, instead of rotting on a fixed date.CI lane
Adds a path-gated
bot-testsjob to01. Pull Request Checks:bot/**,pyproject.toml,uv.lock, or the workflow itself change (samecheck-depsoutputs pattern ascuvs-tests/langchain-tests).uv sync --frozen --extra bot— the documented bot dependency set (READMEinstallsopenviking[bot]);vikingbotis a packaged module of the main distribution ([tool.setuptools.packages.find] where = [".", "bot"]), so noPYTHONPATHtricks are needed.uv run python -m pytest -q -o addopts='' bot/tests bot/vikingbot(coverage addopts disabled for this lane — the--cov=openvikingdefault measures the wrong package for a bot run).Verification
main@f97ce530:519 passed, 12 failed.531 passed(bot/tests+bot/vikingbot, Python 3.12).uv.lockprovides-extrasincludesbot; bot-only deps (croniter,lark-oapi,gradio, …) are present in the lockfile, souv sync --frozen --extra botresolves offline-pinned.check-deps→bot-tests, outputs wired).This closes the fifth known CI blind-spot family for this suite (after openclaw vitest, dsh plugin tests, web-studio vitest, and the plugin-tests manifest).