Found while fixing #607 (PR #690); pre-existing and mechanically unrelated to that fix, so filed separately rather than bundled.
flushDebugOutput(effCtx) is called once, in the single-file branch of cmd/ailang/main_run_exec.go:574. executeBatchItem never calls it.
So under ailang run --batch, every Debug ghost-effect log is collected into the per-item effect context and then discarded when that item's context goes out of scope. Debug output works when you run a file directly and silently vanishes when you run the same file in a batch — which is the worst shape for a debugging facility, since the batch case is exactly when you need it.
Measured: grep -rn flushDebugOutput cmd/ailang/ returns the definition (run_helpers.go:715) and exactly one call site (main_run_exec.go:574), inside the non-batch else branch.
Suggested acceptance
executeBatchItem flushes debug output per item (labelled with the input, so N items do not produce an unattributable stream).
- A test running a batch of 2 where both items emit Debug output and both appear.
- Neutering the flush must red that test.
Related: #607, PR #690, #691.
Found while fixing #607 (PR #690); pre-existing and mechanically unrelated to that fix, so filed separately rather than bundled.
flushDebugOutput(effCtx)is called once, in the single-file branch ofcmd/ailang/main_run_exec.go:574.executeBatchItemnever calls it.So under
ailang run --batch, every Debug ghost-effect log is collected into the per-item effect context and then discarded when that item's context goes out of scope. Debug output works when you run a file directly and silently vanishes when you run the same file in a batch — which is the worst shape for a debugging facility, since the batch case is exactly when you need it.Measured:
grep -rn flushDebugOutput cmd/ailang/returns the definition (run_helpers.go:715) and exactly one call site (main_run_exec.go:574), inside the non-batchelsebranch.Suggested acceptance
executeBatchItemflushes debug output per item (labelled with the input, so N items do not produce an unattributable stream).Related: #607, PR #690, #691.