test(tui): two runtime_api configured_model tests hang under the broad 'config' filter, pass alone (test isolation)
- Dominant language
- Rust
- Stars
- 41k
- Forks
- 3.6k
- Avg merge
- 13h 59m
- Merged PRs (30d)
- 299
Description
## Observed (two independent lane runs, 2026-09-17)
Running the broad name filter
```
cargo test -p codewhale-tui --lib --locked config
```
(which selects a large body of `runtime_api::*config*` tests — 779 completed ok), these two never finish:
```
test runtime_api::configured_model_api_tests::declared_model_posts_do_not_preserve_alias_at_wrong_endpoint has been running for over 60 seconds
test runtime_api::configured_model_api_tests::declared_model_posts_preserve_exact_identity_after_reload has been running for over 60 seconds
```
while running either alone is fast:
```
cargo test ... runtime_api::configured_model_api_tests::declared_model_posts_do_not_preserve_alias_at_wrong_endpoint -- --exact => ok, 0.25s
cargo test ... runtime_api::configured_model_api_tests::declared_model_posts_preserve_exact_identity_after_reload -- --exact => ok, 0.79s
```
The same pair previously aborted the filter run with a thread stack overflow under the default 2 MiB test-thread stack; with `RUST_MIN_STACK=16MiB` (what `scripts/dev-cargo.sh` and CI set) there is no overflow, but the hang under concurrency remains.
## Impact
The `config` filter cannot be used as a CI/lane gate: it never terminates, and it masks everything scheduled after it.
## Suspicion (unconfirmed)
Shared process-wide state under concurrent test threads — env guards (`lock_test_env`), the rate-limit window, or a listener/server port — parks these two tests. Needs a `--test-threads` bisect and a task dump at the hang.
Reported by the Codewhale night program; no fix attempted.
Contributor guide
Research direction
Start with the two named tests in runtime_api::configured_model_api_tests and reproduce the issue with the broad config filter. Bisect concurrency with --test-threads and capture a task dump at the hang, then inspect the env guards, rate-limit window, and listener/server port for shared state. Done means the config-filtered test run terminates reliably without a stack overflow or hang.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100