Skip to content

Comments

cli/docs/tests: harden config edit invocation and add YAML empty-export coverage#3

Merged
oib merged 2 commits intomainfrom
codex/analyze-codebase-and-suggest-improvements-exvc22
Feb 17, 2026
Merged

cli/docs/tests: harden config edit invocation and add YAML empty-export coverage#3
oib merged 2 commits intomainfrom
codex/analyze-codebase-and-suggest-improvements-exvc22

Conversation

@oib
Copy link
Owner

@oib oib commented Feb 17, 2026

Motivation

  • Improve the robustness of the CLI editor invocation for aitbc config edit to avoid fragile os.system usage and handle complex EDITOR values.
  • Ensure config export returns an empty mapping for an empty .aitbc.yaml when exporting in both JSON and YAML formats.
  • Fix inconsistent documentation links and conservative Python-version notes in the docs.

Description

  • Replaced os.system(...) with a tokenized invocation using shlex.split(...) + subprocess.run(...) and ensured EDITOR is stripped with a nano fallback in cli/aitbc_cli/commands/config.py.
  • Made YAML export resilient to empty files by using yaml.safe_load(f) or {} so exports of empty .aitbc.yaml yield an empty mapping.
  • Updated tests in tests/cli/test_config.py to patch the new subprocess.run target and added test_export_empty_yaml_yaml_format to assert YAML-format export of an empty config returns {}; also kept existing JSON empty-export test.
  • Updated docs: unified the GitHub Discussions/Issue Tracker links and adjusted Python version references in docs/8_development/1_overview.md and docs/1_project/3_infrastructure.md for consistency.

Testing

  • Ran PYTHONPATH=cli pytest -q tests/cli/test_config.py which completed successfully with 32 passed.
  • Ran a local link-existence scan against docs/8_development/1_overview.md which reported no missing local links.

Codex Task

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@oib oib merged commit 0a7583d into main Feb 17, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant