CHATTY_TIMEOUT is ignored and also cancels timeout_s from the config file

Open Beginner friendly
#14 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli, testing

Research direction

Start with _ENV_MAPPINGS in src/chatty/config.py and the documented CHATTY_TIMEOUT entry in docs/ARCHITECTURE.md. Check how pydantic reads environment names and where configuration tests live, then add a test that verifies every mapping is read by pydantic. Done when the test catches mismatches and the timeout configuration no longer reports an ignored environment variable.

Written by the indexing model from the issue text.

Description

area: config bug wrong-result

_ENV_MAPPINGS (src/chatty/config.py:389) lists CHATTY_TIMEOUT and CHATTY_TIMEOUT_S as environment variables for timeout_s, and docs/ARCHITECTURE.md:201 documents CHATTY_TIMEOUT. pydantic only reads CHATTY_TIMEOUT_S (env prefix plus field name).

Effect: when CHATTY_TIMEOUT is set, the source tracking decides an env var wins and drops the TOML value, but pydantic never reads CHATTY_TIMEOUT. With timeout_s = 30 in chatty.toml and CHATTY_TIMEOUT=120, chatty uses the default of 60 seconds:

  timeout_s: 60 (from: env:CHATTY_TIMEOUT)

Fix: either make pydantic read CHATTY_TIMEOUT (add it as an alias), or drop it from _ENV_MAPPINGS and the docs. A test should check every entry in _ENV_MAPPINGS against what pydantic actually reads.

Dominant language
Python
Stars
0
Forks
2
Avg merge
1d 4h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lanl/chatty

All issues in lanl/chatty

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.