Skip to content

Expose stdlib loaded guard#55

Merged
codeforester merged 2 commits into
enhancement/42-20260621-add-string-libraryfrom
enhancement/50-20260621-stdlib-loaded-guard
Jun 21, 2026
Merged

Expose stdlib loaded guard#55
codeforester merged 2 commits into
enhancement/42-20260621-add-string-libraryfrom
enhancement/50-20260621-stdlib-loaded-guard

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

  • Add readonly BASE_BASH_LIBS_STDLIB_LOADED=1 after lib_std.sh initializes.
  • Switch companion library dependency guards to the explicit stdlib marker.
  • Cover the marker and fake-logger guard bypass cases in BATS.

Validation

  • RED: focused BATS failed on missing marker and weak companion guards.
  • bats lib/bash/std/tests/lib_std.bats lib/bash/file/tests/lib_file.bats lib/bash/git/tests/lib_git.bats lib/bash/str/tests/lib_str.bats
  • ./tests/validate.sh
  • git diff --check

Stacked on #49.

Fixes #50

@codeforester codeforester marked this pull request as ready for review June 21, 2026 05:03
## Summary
- Add shared EXIT cleanup registration for function hooks and cleanup
paths.
- Preserve an existing EXIT trap when stdlib cleanup is first
registered.
- Document the cleanup helper contract and add focused BATS coverage.

## Validation
- bats lib/bash/std/tests/lib_std.bats
- ./tests/validate.sh
- git diff --check

Stacked on #55.
Fixes #54
@codeforester codeforester merged commit 4f87e89 into enhancement/42-20260621-add-string-library Jun 21, 2026
2 checks passed
@codeforester codeforester deleted the enhancement/50-20260621-stdlib-loaded-guard branch June 21, 2026 05:08
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.

1 participant