Week 19 of 2026

Development log of Tad Better Behavior

2 items
  1. tbb.nu: Send more details about a non-record updates
  2. Describe the issue with invalid observation

tbb.nu: Send more details about a non-record updates

On by Tad Lispy

If a step of a Nushell interpreter returns a record, it's going to be merged into the interpreter state. Anything that is not a record needs to be ignored. The ignored value is observed via Snippet message.

While working od Devlog Excavator I've run into a problem, where a bullean true was returned and sent as a snippet, but without being stringified. I.e. the JSON payload contained literal true. This is not a valid type, and TBB was terminating the interpreter.

To prevent this kind of thing, now this kind of values are send together with a description. That way observe snippet function will always produce a JSON string that TBB can consume.

index 0bf7a1d..40e7bf8 100644
--- a/lib/tbb.nu
+++ b/lib/tbb.nu
@@ -25,6 +25,7 @@ export def run [
=            $state | merge $state_update
=        } else {
=            $state_update
+            | describe --detailed
=            | observe snippet --caption "The value returned by the step is not a record; Not updating"
=            $state
=        }

Describe the issue with invalid observation

On by Tad Lispy

index 0fbd6d3..311b6ab 100644
--- a/spec/failing-interpreters.md
+++ b/spec/failing-interpreters.md
@@ -85,3 +85,10 @@ This is currently **not implemented**.
=Similarly, if a single step is never reported as success of failure, the interpreter process should be terminated, and **the step** marked as failed.
=
=This is currently **not implemented**.
+
+
+## Invalid observation sent
+
+While working on `tbb.nu` (the Nushell interpreter library) I ran into the issue where the interpreter sent wrong data in a Snippet observation. The value, instead of being a string was a boolean. The interpreter was terminated, and there was a trace of the issue, but only at the top of the report. There was no error summary at the bottom. Also no step was marked as failing. The last step was green, and the rest were not evaluated. The offending step was in a delegated scenario, which might have been a relevant factor.
+
+TODO: Reproduce and assert that the error is properly reported (in a step status and a report summary).