Skip to content

Commit ace63b6

Browse files
ostermanClaude (via Conductor)claudeautofix-ci[bot]aknysh
authored
feat: Add git root discovery for default base path (#1773)
* feat: Add git root discovery for default base path Enable running Atmos from any subdirectory like Git. When using the default embedded configuration and no local Atmos config exists, Atmos now automatically discovers the git repository root and uses it as the base path. Local configuration always takes precedence—if atmos.yaml, .atmos.yaml, .atmos/, .atmos.d/, or atmos.d/ exist in the current directory, git root discovery is skipped. This behavior is controlled by ATMOS_GIT_ROOT_BASEPATH environment variable (defaults to enabled, set to "false" to disable for testing). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * [autofix.ci] apply automated fixes * docs: Document git root discovery in CLI configuration Add comprehensive documentation for the git root discovery feature in the CLI Configuration page. Explains how it works, when it activates, local configuration precedence, and how to disable it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * test: Update snapshot for git root discovery trace logging Updates the Valid_Log_Level_in_Config_File test snapshot to include new TRACE-level log messages that were introduced by the git root discovery feature. The snapshot now correctly captures the "Git root base path disabled via ATMOS_GIT_ROOT_BASEPATH=false" trace messages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add happy-path test and refactor git root functions Changes: 1. Add happy-path test for git root discovery (addresses CodeRabbitAI feedback) - All previous tests had expectChange=false - New test uses TEST_GIT_ROOT to verify BasePath updates correctly - Ensures regression protection for core feature 2. Extract git root functions to dedicated file (resolve file-length-limit) - Move applyGitRootBasePath and hasLocalAtmosConfig to pkg/config/git_root.go - Reduces load.go from 836 to 739 lines - Remove orphaned comment block for moved function - Improves code organization and maintainability Tests: All pkg/config tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * [autofix.ci] apply automated fixes * Improve comment explaining bootstrap config pattern for ATMOS_GIT_ROOT_BASEPATH Addresses CodeRabbitAI feedback about reading from Settings struct. The updated comment clarifies: - This is bootstrap configuration, read during config loading - Must use os.Getenv() because processEnvVars() runs AFTER LoadConfig() - Follows same pattern as ATMOS_CLI_CONFIG_PATH in readEnvAmosConfigPath() - Cannot use Settings struct as it's populated after git root discovery This is intentional architectural design, not a violation of Atmos patterns. Bootstrap config (controls config loading) vs application config (loaded from config). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude (via Conductor) <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Andriy Knysh <[email protected]> Co-authored-by: aknysh <[email protected]>
1 parent bc06ba6 commit ace63b6

File tree

12 files changed

+1806
-36
lines changed

12 files changed

+1806
-36
lines changed

NOTICE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ MIT LICENSED DEPENDENCIES
934934

935935
- github.com/Azure/azure-sdk-for-go/sdk/azcore
936936
License: MIT
937-
URL: https://github.com/Azure/azure-sdk-for-go/blob/sdk/azcore/v1.19.1/sdk/azcore/LICENSE.txt
937+
URL: https://github.com/Azure/azure-sdk-for-go/blob/sdk/azcore/v1.20.0/sdk/azcore/LICENSE.txt
938938

939939
- github.com/Azure/azure-sdk-for-go/sdk/azidentity
940940
License: MIT
@@ -970,7 +970,7 @@ MIT LICENSED DEPENDENCIES
970970

971971
- github.com/HdrHistogram/hdrhistogram-go
972972
License: MIT
973-
URL: https://github.com/HdrHistogram/hdrhistogram-go/blob/v1.1.2/LICENSE
973+
URL: https://github.com/HdrHistogram/hdrhistogram-go/blob/v1.2.0/LICENSE
974974

975975
- github.com/Masterminds/semver/v3
976976
License: MIT

0 commit comments

Comments
 (0)