Context
lib_file.sh and lib_git.sh depend on stdlib functions such as log_error, log_debug, fatal_error, and log_info_file. Their READMEs document the load order, but direct standalone sourcing fails later with rough command not found errors.
Scope
- Add an early dependency guard to
lib/bash/file/lib_file.sh.
- Add an early dependency guard to
lib/bash/git/lib_git.sh.
- The guard should emit a concise message to stderr and return nonzero when the file is sourced without
lib_std.sh.
- Keep double-sourcing behavior intact.
- Add BATS coverage for direct companion-library sourcing without stdlib.
Acceptance Criteria
- Sourcing each companion library without stdlib returns nonzero with a clear message.
- Sourcing after stdlib works as before.
- Double-sourcing remains a no-op success.
Validation
Suggested Branch
bug/<issue>-20260618-companion-dependency-guards
Context
lib_file.shandlib_git.shdepend on stdlib functions such aslog_error,log_debug,fatal_error, andlog_info_file. Their READMEs document the load order, but direct standalone sourcing fails later with roughcommand not founderrors.Scope
lib/bash/file/lib_file.sh.lib/bash/git/lib_git.sh.lib_std.sh.Acceptance Criteria
Validation
./tests/validate.shSuggested Branch
bug/<issue>-20260618-companion-dependency-guards