Skip to content

Commit f5c598d

Browse files
fix: demo not→! in code_gen_loop and self_improving_agent
code_gen_loop.omc: `if not run_result["ok"]` → `if !run_result["ok"]` self_improving_agent.omc: two `if not x` → `if !x` (run/test checks) substrate_rag.omc and recursive_improve.omc verified clean (no fixes). All four demos parse and execute correctly up to first llm_call boundary. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 559f182 commit f5c598d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/demos/code_gen_loop.omc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn code_gen_loop(task_description, eval_prompt_template, generations) {
8282
# Try to run it
8383
h run_result = safe_run(current_code, "")
8484
h run_status = "ok"
85-
if not run_result["ok"] { run_status = to_str(run_result["error"]) }
85+
if !run_result["ok"] { run_status = to_str(run_result["error"]) }
8686
print(str_concat(" Run status: ", run_status))
8787

8888
arr_push(history, {

examples/demos/self_improving_agent.omc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn run_test(code, test_case) {
4747
"__test_result"
4848
)
4949
h result = safe_eval(full_code)
50-
if not result["ok"] {
50+
if !result["ok"] {
5151
return {passed: false, error: result["error"], expected: test_case["expected"], got: null}
5252
}
5353
h passed = result["value"] == test_case["expected"]
@@ -59,7 +59,7 @@ fn run_all_tests(code, tests) {
5959
h i = 0
6060
while i < arr_len(tests) {
6161
h r = run_test(code, tests[i])
62-
if not r["passed"] {
62+
if !r["passed"] {
6363
arr_push(failures, {
6464
test_idx: i,
6565
expected: r["expected"],

0 commit comments

Comments
 (0)