Skip to content

bug: localize internal list cli and app scratch state - #355

Merged
codeforester merged 1 commit into
mainfrom
bug/338-20260831-bug-prevent-public-library-calls-from-leaking-undeclared-scr
Aug 31, 2026
Merged

bug: localize internal list cli and app scratch state#355
codeforester merged 1 commit into
mainfrom
bug/338-20260831-bug-prevent-public-library-calls-from-leaking-undeclared-scr

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

  • localize internal list, CLI, and app scratch variables so public calls cannot overwrite caller state
  • return CLI option lookup results through explicit output variables instead of implicit globals
  • add caller-collision and namespace-regression coverage across list, CLI, and app paths

Validation

  • bats lib/bash/list/tests/lib_list.bats lib/bash/cli/tests/lib_cli.bats lib/bash/app/tests/lib_app.bats tests/namespace-contract.bats (48 tests)
  • ./tests/validate.sh (571 tests plus option, property, artifact, benchmark, integration, concurrency, quality, compatibility, release, and example gates)

Impact

  • Public API: unchanged; an internal CLI lookup helper now uses explicit output arguments
  • Documentation: changelog entry only
  • CI: namespace contract now rejects undeclared internal globals created by representative public calls
  • Demo: no changes required
  • Security: no direct security impact

The remaining dynamically scoped supervisor and trap state in the stdlib and GitHub modules is intentional and covered by their lifecycle tests.

Fixes #338

@codeforester
codeforester merged commit acdf99b into main Aug 31, 2026
10 checks passed
@codeforester
codeforester deleted the bug/338-20260831-bug-prevent-public-library-calls-from-leaking-undeclared-scr branch August 31, 2026 03:56
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.

bug: prevent public library calls from leaking undeclared scratch variables

1 participant