fix: support full null runtimes - #200
Conversation
lucee@7 21 fullNull=false Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
lucee@6 21 fullNull=false Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
boxlang@be 21 fullNull=false Test Results 1 files 30 suites 8s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
boxlang@1 21 fullNull=false Test Results 1 files 30 suites 8s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
boxlang-cfml@1 21 fullNull=false Test Results 1 files 30 suites 10s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
adobe@2023 21 fullNull=false Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
adobe@2023 21 fullNull=true Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
adobe@2025 21 fullNull=false Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 50db0b6. ♻️ This comment has been updated with latest results. |
#202) Reported by the maintainer running ./testbox/run --stream --verbose against BoxLang v1.17.0+58: every CLI run crashed immediately after the recent CLI-runner fix (#201) cleared the way to reach this code, with: KeyNotFoundException: The requested key [url] was not located in any scope or it's undefined at ...ScriptingRequestBoxContext.scopeFind at ...Testbox$cfc.invokeFunction_runRaw(TestBox.cfc:408) Root cause: runRaw() and dryRun() unconditionally reference the `url` scope to support web-request query-string test filters (?testBundles=, ?testSuites=, etc.). The `url` scope only exists in a real HTTP request context - it is never registered at all when TestBox runs via the BoxLang CLI. #200 ("support full null runtimes") added a `structKeyExists( url, "testBundles" )` guard, but that doesn't help here: resolving the bare `url` identifier itself is what throws - structKeyExists() never gets a chance to run, since BoxLang has to look up `url` as a scope before it can pass it as an argument. Fix: skip these URL-based filter blocks entirely when variables.IS_CLI is true (already computed at class init). CLI users already have --filter-bundles/--filter-suites/--filter-specs for the same purpose via BoxLangRunner.bx, so nothing is lost. Verified locally against BoxLang v1.17.0+58: reproduced the exact reported crash against the real merged development branch first (structKeyExists guard included), then confirmed the fix with the maintainer's exact command (./testbox/run --streamingj --verbose, 4/4 clean runs), plus --dry-run and --stream, which exercise both patched call sites (runRaw() and dryRun()). Co-authored-by: Claude <noreply@anthropic.com>
Summary
Regression coverage
Validation
Supports the full-null engine matrix work in coldbox-modules/quick#312.