Skip to content

test: assert generated prompts reach the agent, and fix stale token-report test docstrings - #1702

Merged
max-sixty merged 1 commit into
mainfrom
test/stale-test-docstrings
Nov 17, 2026
Merged

max-sixty merged 1 commit into
mainfrom
test/stale-test-docstrings

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Test-only cleanup from the nightly survey: two prompt tests that couldn't fail on a mangled prompt now check the prompt the agent receives, and several test docstrings and names that described the older jq-based token report now describe the current code.

  • test_config_edge_cases.py. test_very_long_prompt_nightly and test_prompt_with_multiline only asserted that the generated workflow parses as a mapping, so a truncated prompt or one with its line breaks lost would still pass. Both now compare the parsed prompt: input exactly (via the shared agent_prompt helper, as the placeholder test above them already does). Two variables in test_setup_steps_preserves_order were still named after old setup steps (node_pos, cache_pos); they are renamed to match the echo first/echo last steps they locate.
  • test_token_report.py. The docstring of test_one_unreadable_artifact_costs_its_own_run_and_no_other described jq failing under set -euo pipefail. token_report.main now parses token-usage.json in Python and skips the run on TypeError/ValueError. test_workflow_prefix_is_passed_to_jq_as_data is renamed, since prefixes are matched with str.startswith and never reach jq. A docstring citing the removed EXTRA_PREFIXES variable now says "extra prefix arguments", and an unused REPO_ROOT constant is gone.
  • test_list_recent_runs.py. Drops a function-local from datetime import datetime that repeated the module-level import.

The three files pass locally (177 tests). None of these edits touch the hunks open PR #1672 changes in test_token_report.py.

@max-sixty
max-sixty merged commit 8443aaf into main Nov 17, 2026
12 checks passed
@max-sixty
max-sixty deleted the test/stale-test-docstrings branch November 17, 2026 06:47
max-sixty added a commit that referenced this pull request Nov 18, 2026
Bumps generator version to 0.3.27 and syncs lockfile.

8 commits since 0.3.26: nightly restarts stalled CI causes and weekly restarts other unfinished issues (#1688), review-runs drains outage trackers the bot closed (#1700), nightly files unfixed reachable defects as issues (#1699), the sandbox gets its own XDG_RUNTIME_DIR (#1697), comment and test fixes (#1701, #1702, #1703), and the 0.3.26 regeneration (#1695).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants