Skip to content

[OMEGA-332] test(config): add configuration loader unit coverage - #290

Open
eliasakalu wants to merge 4 commits into
singnet:mainfrom
eliasakalu:test-config-loader
Open

[OMEGA-332] test(config): add configuration loader unit coverage#290
eliasakalu wants to merge 4 commits into
singnet:mainfrom
eliasakalu:test-config-loader

Conversation

@eliasakalu

Copy link
Copy Markdown

Summary

Add focused unit coverage for OmegaClaw's Python configuration loader and register the suite as a mandatory CI check.

Coverage

The new test suite verifies:

Command-line parsing

  • Standard key=value arguments.
  • Bare arguments converted to boolean flags.
  • Empty values.
  • Empty argument lists.
  • Values containing additional = characters.

Configuration sources

  • Command-line arguments.
  • OMEGACLAW_<key> environment variables.
  • YAML configuration files.
  • Supplied defaults.

Resolution precedence

The expected priority order is verified explicitly:

  1. Command-line argument
  2. Environment variable
  3. Configuration file
  4. Default value

Cache behavior

  • Resolved values remain stable after being cached.
  • init_config() clears values from the previous initialization.

Public API

The suite confirms the availability of:

  • init_config
  • config_get_by_key
  • command_line_to_dict

CI integration

Added the suite to:

Autotests/run_mandatory

@alyona-snet alyona-snet changed the title test(config): add configuration loader unit coverage [OMEGA-332] test(config): add configuration loader unit coverage Aug 10, 2026
timur-ashkenov
timur-ashkenov previously approved these changes Aug 11, 2026
@TossSky

TossSky commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Checked this for OMEGA-332.

What I checked:

  • the suite is registered in run_mandatory and collects with the mandatory set
  • argument parsing: key=value, bare flags, empty values, empty list, values with an extra =
  • all four sources: command line, OMEGACLAW_ environment, YAML file, defaults
  • priority order: command line, environment, file, default
  • cached values stay stable and init_config drops the previous ones
  • in-process only: no container, no dependency beyond what CI installs

I merged current main into the branch and resolved the conflict in Autotests/run_mandatory, keeping every registered entry.

I also pushed one change to the tests: the YAML file was written but never actually read, because both file-related tests resolved their value from somewhere else. Added test_init_config_reads_yaml_file and a second assertion on a key that only exists in the file, so a broken read now fails the suite.

Verdict: PASS

@alyona-snet

Copy link
Copy Markdown
Collaborator

@eliasakalu Hey! Could you please make some changes so the builds run properly?

@alyona-snet alyona-snet added in-jira The issue has been accepted for fixing and removed discussion labels Sep 4, 2026
@eliasakalu

Copy link
Copy Markdown
Author

@eliasakalu Hey! Could you please make some changes so the builds run properly?

I will okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-jira The issue has been accepted for fixing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants