docs: add instance-dispatch & birth invariants; smokes probe policy; archive CURRENT_TASK and replace with concise plan; impl VM stringify(Void) safety; tighten heavy probes; enable rewrite default ON

This commit is contained in:
nyash-codex
2025-09-27 08:56:43 +09:00
parent cb236b7f5a
commit 8ea95c9d76
9 changed files with 2533 additions and 2434 deletions

View File

@ -34,3 +34,8 @@ Notes
- Dev defaults are designed to be non-intrusive: tests remain behaviorcompatible.
- To repro outside smokes, either pass `--dev` or export `NYASH_DEV=1`.
Heavy JSON probes
- Heavy JSON tests (nested/roundtrip/query_min) run a tiny parser probe first.
- The probe's stdout last non-empty line is trimmed and compared to `ok`.
- If not `ok`, the test is SKIP (parser unavailable), not FAIL. This avoids
false negatives due to environment noise or optional dependencies.

View File

@ -27,7 +27,8 @@ EOF
# Probe heavy parser availability; skip gracefully if not ready
probe=$(run_nyash_vm -c 'using json as JsonParserModule
static box Main { main() { local p = JsonParserModule.create_parser() ; local r = p.parse("[]") ; if r == null { print("null") } else { print("ok") } return 0 } }' --dev)
static box Main { main() { local p = JsonParserModule.create_parser() local r = p.parse("[]") if r == null { print("null") } else { print("ok") } return 0 } }' --dev)
probe=$(echo "$probe" | tail -n 1 | tr -d '\r' | xargs)
if [ "$probe" != "ok" ]; then
test_skip "json_nested_vm" "heavy parser unavailable in quick" || true
cd /

View File

@ -33,6 +33,7 @@ EOF
# Probe heavy parser availability
probe=$(run_nyash_vm -c 'using json as JsonParserModule
static box Main { main() { local p = JsonParserModule.create_parser() local r = p.parse("[]") if r == null { print("null") } else { print("ok") } return 0 } }' --dev)
probe=$(echo "$probe" | tail -n 1 | tr -d '\r' | xargs)
if [ "$probe" != "ok" ]; then
test_skip "json_query_min_vm" "heavy parser unavailable in quick" || true
cd /

View File

@ -23,7 +23,8 @@ EOF
# Probe heavy parser availability; skip gracefully if not ready
probe=$(run_nyash_vm -c 'using json as JsonParserModule
static box Main { main() { local p = JsonParserModule.create_parser() ; local r = p.parse("null") ; if r == null { print("null") } else { print("ok") } return 0 } }' --dev)
static box Main { main() { local p = JsonParserModule.create_parser() local r = p.parse("null") if r == null { print("null") } else { print("ok") } return 0 } }' --dev)
probe=$(echo "$probe" | tail -n 1 | tr -d '\r' | xargs)
if [ "$probe" != "ok" ]; then
test_skip "json_roundtrip_vm" "heavy parser unavailable in quick" || true
cd /