Repository navigation
test(harness): green the harness suite and run it in CI - #323
Draft
KarthikAvinashFI wants to merge 5 commits into
Draft
KarthikAvinashFI wants to merge 5 commits into
KarthikAvinashFI wants to merge 5 commits into
Conversation
…l runner now logs
…agent writers replaced
…ce and prompt size
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Why
The harness test suite (
tests/test_harness.pyandtests/harness/) runs in no CI job, so it drifted: a merge glued an old test body into another test, fakes fell behind the code they stand in for, and a few checks still describe a tool surface the harness no longer has. This PR makes the suite green again and adds a CI job that keeps it that way.2. What changed
.github/workflows/harness-tests.yml(new)devandmain:uv sync --extra livekit --extra harness-stores --extra harness-ui --extra hosted-tracing, thenuv run pytest -q -p no:cacheprovider tests/test_harness.py tests/harnesstests/harness/test_grade.pytest_the_cap_holds_for_the_session_that_saves_too(theNameErroronst); then drops that fan-out test: it drove thegenerate_suitetool, which sub-agent writers replaced, andwrite_in_parallelhas no caller lefttests/harness/test_dispatch_ack.pyrun_id,test_case_id,failure.details,failure.stage) and the runner context it reads (usage_reporter,evidence_seam)tests/test_harness.pytest_a_skill_only_names_tools_its_stage_actually_hasderives every field of the contract's nested models, the values Literal fields and the sub-goal contract offer, and the sub-agent name, instead of a hand list; it keeps the hand list only for the example tools the scenario skill uses to show a check going wrong.test_hosted_claude_session_uses_durable_resume_and_restricted_toolsruns on a Gemini model (the harness refuses Claude models) and checks the current tool surface:allowed_toolsis exactly the spec's builtins, no MCP server, strict config.test_the_system_prompt_stays_within_budgetcaps the prompts at today's size plus room3. Behavior callouts
write-scenariosskill alone is 124,000 characters today. The cap still fails a skill that keeps growing; shrinking the skill is its own work.options.tools == builtinsor thatAskUserQuestionstays out ofallowed_tools: since the scenario-writers change, the Claude backend grants builtins throughallowed_toolsand restricts the rest with the gate hooks and permission callback.4. Tests
uv run pytest -q tests/test_harness.py tests/harnesswith the CI extras, on this headlivekit/psycopg, which the CI job installsMutation check for the skill test: a skill naming a tool that does not exist (
seed_the_wrold) fails it.Not in this job:
tests/test_cli_examples.py(11) andtests/test_config_and_facades.py(37) fail ondevtoo, back to at least 8 Oct (a0e2ef23); they exercise the SDK examples and optimizer scoring, not the harness.5. Commands
Linear
Fix TH-8768