fix(interpreter): gate allexport env updates#1821
Merged
chaliy merged 1 commit intoJun 2, 2026
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | f3dee9c | Commit Preview URL | Jun 02 2026, 09:24 AM |
5c9bee5 to
f3dee9c
Compare
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.
Motivation
set -afrom persisting rejected assignments into the persistent environment and thereby bypassing the per-instance variable memory limits (TM-DOS-060).MemoryLimits.envbefore budget checks succeed.Description
insert_variable_checkedto return aboolsuccess indicator so callers can know whether the allocation was accepted while preserving silent rejection behavior.set_variable, run the memory budgetcheck_variable_insert/record_variable_insertfor existing local bindings before mutating the local frame or callinginsert_env_checkedunderALLEXPORT.ALLEXPORT, only callinsert_env_checkedafterinsert_variable_checkedreturnstrueso rejected global inserts are not mirrored intoself.env.test_allexport_rejected_global_update_does_not_mutate_envandtest_allexport_rejected_local_update_does_not_mutate_envto ensure rejected inserts leave both shell variables andenvunchanged.Testing
cargo test -p bashkit interpreter::tests::test_allexport_rejected --liband the new regression tests passed.cargo fmt --check && cargo test -p bashkit allexport --liband the allexport test group passed.test_allexport_rejected_*) and the existingtest_allexport_respects_env_memory_limitspassed.Codex Task