Skip to content

Make MeTTa runner not read config dir by default#1020

Merged
vsbogd merged 4 commits intotrueagi-io:mainfrom
vsbogd:no-config-dir-by-default
Sep 9, 2025
Merged

Make MeTTa runner not read config dir by default#1020
vsbogd merged 4 commits intotrueagi-io:mainfrom
vsbogd:no-config-dir-by-default

Conversation

@vsbogd
Copy link
Collaborator

@vsbogd vsbogd commented Sep 2, 2025

Fixes #1016 and expected to resolve nightly build random failures. Default behavior of Environment is changed:

  • by default no configuration directory is expected and read and as a consequence no default git catalog is read by Metta runner
  • metta-py, metta-repl and exts/agents.py code is changed to read configuration from default configuration directory

EnvBuilder::set_no_config_dir is removed and EnvBuilder::set_default_config_dir is added instead. In Python API the default config dir is encoded as empty string. At first I was going to write EnvBuilder::default_config_dir() method to return the default config dir and use EvnBuilder::set_config_dir to set it. But as EnvBuilder::default_config_dir() call can fail the error processing makes callers code ugly (not mentioning passing resulting path to the caller via C API). Thus I decided to keep EnvBuilder::set_default_config_dir() method instead.

# except the case when _metta is set via get_agent_atom with parent MeTTa
if self._include_paths is not None:
env_builder = Environment.custom_env(include_paths=self._include_paths)
env_builder = Environment.custom_env(include_paths=self._include_paths, config_dir="")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Necr0x0Der, @besSveta I am not sure if agent should read configuration from file system or not, my opinion that probably not, but I reproduced previous behavior.

@vsbogd vsbogd requested a review from besSveta September 3, 2025 10:52
@vsbogd vsbogd changed the title MeTTa runner doesn't read config dir by default Make MeTTa runner not read config dir by default Sep 3, 2025
@vsbogd vsbogd merged commit 92bc30c into trueagi-io:main Sep 9, 2025
1 check passed
@vsbogd vsbogd deleted the no-config-dir-by-default branch September 9, 2025 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metta::new(None) creates default config directory and reads git catalog

3 participants