Skip to content

fix(cli): write correct dict format for --task in run command#24

Merged
abrichr merged 1 commit intomainfrom
fix/run-task-json-format
Feb 13, 2026
Merged

fix(cli): write correct dict format for --task in run command#24
abrichr merged 1 commit intomainfrom
fix/run-task-json-format

Conversation

@abrichr
Copy link
Member

@abrichr abrichr commented Feb 13, 2026

Summary

Fix run --task <uuid> writing wrong JSON format into the WAA container.

Before: Wrote ["task-uuid"] (JSON array)
After: Writes {"chrome": ["task-uuid"]} (dict keyed by domain)

Root cause

WAA's /client/run.py line 397 does test_all_meta = {args.domain: test_all_meta[args.domain]}, which indexes the config dict by domain string. A bare array causes TypeError: list indices must be integers or slices, not str.

Fix

Instead of hardcoding the JSON, run a small Python script inside the container that reads test_all.json, finds which domain contains the task, and writes the correct {domain: [task_id]} format.

Test plan

  • 327 tests pass
  • Ruff lint + format clean
  • Manual: run --task <uuid> on a live VM

🤖 Generated with Claude Code

WAA's run.py expects test config as {domain: [task_ids...]} dict, but
--task wrote a bare JSON array [task_id] causing TypeError when run.py
indexes by domain string key.

Now looks up the task's domain from test_all.json inside the container
and writes the correct {domain: [task_id]} format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abrichr abrichr merged commit e2bba55 into main Feb 13, 2026
4 checks passed
@abrichr abrichr deleted the fix/run-task-json-format branch February 13, 2026 18:42
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.

1 participant