fix: stabilize learning path, reliability and legacy Windows builds

Unify beginner syntax while preserving compatibility, repair ownership and parser guards, add verified distribution tooling and VC6 Windows 98 build inputs, and clarify documentation and release status. Preserve DOS build-input line endings and exclude generated binaries/caches.
This commit is contained in:
Hermes Agent
2026-10-20 22:40:19 +00:00
parent 8ea2f772cd
commit d555071406
73 changed files with 2403 additions and 730 deletions
+25 -26
View File
@@ -1,33 +1,32 @@
# Runtime Guards & Limits (Beta25)
# Current runtime guards
Claro includes optional safety limits to prevent hangs and memory abuse.
These are implemented guardrails, not a sandbox or a promise that arbitrary
scripts have bounded resource use.
## 1) Step limit (runaway protection)
Environment variable:
- `CLARO_STEP_LIMIT=200000`
- **Function/method calls:** at most 256 active calls. Excessive recursion raises
a Claro error. Other limits can stop a program earlier.
- **Expressions:** at most 128 nested parser levels, covering parentheses and
unary operations. Excessive nesting produces a diagnostic instead of
continuing recursive parsing.
- **Control blocks:** at most 128 additional nested control-block frames. The
runtime and syntax checker reject deeper blocks. Function-call frames have
their own guard.
- **HTTP response bodies:** limited to 1,048,576 bytes by the existing HTTP path.
Stops a program if it executes too many steps/lines.
Malformed expressions such as a lone `!`, an unclosed quote/parenthesis,
a missing operand, or trailing expression tokens are rejected by the runtime.
Use `NOT` for logical negation; `!=` remains a supported comparison.
## 2) File size limit
Environment variable:
- `CLARO_MAX_FILE_BYTES=16777216` (default 16 MiB)
## Not provided
Applies to:
- `READ FILE ...`
- `WRITE FILE ... WITH ...`
- `APPEND FILE ... WITH ...`
The former beta document described `CLARO_STEP_LIMIT`, `CLARO_MAX_FILE_BYTES`,
and `CLARO_MAX_JSON_BYTES`. Those environment controls are not implemented in
the current `src/claro.c`; do not depend on them. The original document is
preserved under [history](history/RUNTIME_LIMITS_BETA25.md).
## 3) JSON size limit
Environment variable:
- `CLARO_MAX_JSON_BYTES=8388608` (default 8 MiB)
Ordinary intentional loops can still run indefinitely. This checkpoint does
not establish a general JSON recursion limit, global file/output-size limit,
CPU budget, or untrusted-script protection. Scripts and `RUN COMMAND` execute
with the user's permissions.
Applies to:
- `PARSE JSON ...`
- `MAKE JSON ...`
- `MAKE JSON PRETTY ...`
## 4) Error output
Runtime errors include:
- `file:line: message`
- stack trace (CALL chain)
- and JSON parse errors include `Near: ...` snippet
See [reliability verification](RELIABILITY.md) for the tested scope.