Repository navigation
test(spec): unset scope cases from the bash oracle - #2607
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | bbc5194 | Commit Preview URL Branch Preview URL |
Oct 08 2026, 12:50 AM |
chaliy
force-pushed
the
claude/unset-local-scope
branch
from
October 8, 2026 00:22
cc7871e to
1ee92d1
Compare
The behavior landed with the declaration engine (#2597); these cases pin it: a callee's `unset` uncovers the caller's binding for scalars and arrays, and a local unset in its own scope stays invisible for the rest of the call. Claude-Session: https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
chaliy
force-pushed
the
claude/unset-local-scope
branch
from
October 8, 2026 00:49
1ee92d1 to
bbc5194
Compare
Contributor
Author
|
Rebased on Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
unset NAMEnow follows bash's dynamic scope:unset vuncovers the caller's local, or the global, instead of deleting both.Why
Debian-oracle case
functions-dynamic-scope-and-unset, and two bashbox local-scope cases that were skipped. A helper that doesunset flagto clear state was wiping the caller's and the global value, and nothing restored them.Before / After
noneglobalnoneglobalglobalNew spec file
unset-local-scope.test.sh(4 cases), verified against bash 5.2;bashbox_local_scope_unset_from_a_callee_uncovers_the_globaland..._a_global_scalarlose their skip markers.Risk
Medium-low.
CallFramegains anunset_localsset, checked first in the regular-variable lookup. A name never declared local is unset globally as before. The full spec corpus (3125 cases), lib, integration and bash-comparison suites pass.Checklist
cargo test -p bashkit --lib,--test integration, bash_comparisoncargo clippy --all-targets -D warnings,cargo fmt --check,just check-okfhttps://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
Generated by Claude Code