Skip to content

[Bug] th-cli run-tests silently accepts unknown options (e.g. --prompt_timeout) and fails later inside the test #1215

Closed

Description

@rquidute

Description

th-cli run-tests silently accepts options it doesn't recognise and forwards them to the Python test as extra test parameters. A typo in a real option, such as --prompt_timeout (underscore) instead of --prompt-timeout (dash), isn't reported by the CLI. The run starts, then fails inside the SDK container.

Reported in the matter-csg-th Slack thread: the test appeared stuck at Start Python test [EXECUTING] when started with --prompt_timeout.

Cause

run_tests is declared with ignore_unknown_options: True and allow_extra_args: True (cli/th_cli/commands/run_tests.py) so that test parameters can be passed after --. Because of this, Click doesn't raise "No such option" for unknown options before --. _parse_extra_args then turns --prompt_timeout 1000 into test_parameters["prompt_timeout"] = "1000", which is appended to the SDK test runner command line.

The SDK runner rejects it and the run aborts. The error appears only in the backend/Python test log:

PYTHON_TEST | ... | test_harness_client.py: error: unrecognized arguments: --prompt_timeout 5

From the CLI side this can look like a hang at Start Python test [EXECUTING]. In the reporter's setup it did not hang (the run aborted), so the visibility of the error is the main problem.

Expected behaviour

  • Unknown options given before -- fail immediately with a clear message, ideally with a suggestion (No such option: --prompt_timeout. Did you mean --prompt-timeout?).
  • Only arguments after -- are treated as test parameters.

Possible follow-up

Surface the SDK runner's startup/argument errors in the CLI output when a run aborts at test start.

Workaround

Use --prompt-timeout <seconds> (dash).

Activity

  1. self-assigned this
    on Nov 17, 2026
  2. moved this from Todo to In Progress in CSG issue trackingon Nov 19, 2026
  3. rquidute commented on Nov 23, 2026

    @rquidute
    ContributorAuthor

    Closed as completed

  4. moved this from In Progress to Done in CSG issue trackingon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions