From 488e25930bd395bf51f35f18af54f73d666e12de Mon Sep 17 00:00:00 2001 From: RayPals Date: Mon, 1 Jun 2026 00:54:19 +0200 Subject: [PATCH] Add docs/SAFETY.md from Claro v1.17.26 zip --- docs/SAFETY.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/SAFETY.md diff --git a/docs/SAFETY.md b/docs/SAFETY.md new file mode 100644 index 0000000..38eb0fc --- /dev/null +++ b/docs/SAFETY.md @@ -0,0 +1,27 @@ +# Safety & Hardening (Beta24) + +## 1) Execution step limit +Claro can optionally stop runaway programs (infinite loops) using a step limit. + +Set an environment variable: + +- `CLARO_STEP_LIMIT=200000` + +If the program exceeds that many executed lines/steps, Claro stops with an error. + +To disable the limit: +- unset the variable, or set it to `0`. + +## 2) Safer container access +LIST bounds errors now report the index and list size: +- `Index out of range: 10 (LIST size 3)` + +MAP lookups return NONE when the key is not found. + +## 3) Why this exists +Claro is designed for: +- learners +- classroom environments +- scripts that should fail safely + +Safety limits help prevent “hangs forever” and provide clearer error messages.