SkillPedia Skills Encyclopedia
中文 EN

Skills 2026-06-11 08:37 UTC

SkillJect

Committed by leo0481. Update Category: Bug Fixes & Stability Improvements. Commit details: fix(config): make .env / main.yaml credentials reliably reach judge and agent. This update resolves known runtime errors and enhances system reliability.

leo0481 6598997 jiaxiaojunQAQ/SkillJect

CommitRaw commit message

fix(config): make .env / main.yaml credentials reliably reach judge and agent

Credentials edited in .env or main.yaml were silently ignored, forcing
hardcoded api_key/base_url in openai_client.py and execution_config.py.
Three layered silent failures caused this:

- load_dotenv() did not override shell-exported vars, so a stale export
  masked new .env values ("edited .env but nothing changed").
- judge_client fell back from a missing key to OPENAI_API_KEY but had no
  symmetric base_url fallback, silently hitting api.openai.com with a
  relay key and surfacing an opaque auth error.
- AgentConfig.get_claude_settings() emitted settings.json with no auth
  field when the token was unresolved, deferring failure into the sandbox.

Changes:
- load_env_file(): project-root .env first, override=True, prints the
  loaded path, warns when none found or python-dotenv is missing.
- judge_client: base_url fallback (base_url_env -> OPENAI_BASE_URL ->
  default) symmetric with api_key; raise a named ConfigurationError when
  the key is unresolved; INFO-log model/base_url/masked key.
- get_claude_settings(): fail fast with a variable-named error when auth
  is unresolved; warn on missing base_url; log injected env masked.
- add src/shared/secrets.mask_secret() for safe credential logging.
- document the new loading semantics in .env.example and main.yaml.

13 new TDD tests; full suite 280 passing.