Verifier borrow/provenance work, new phase3 shield_index conformance cases, dev-intervals/dev-lru/dev-shards tasks with evaluate.py harness, and agent skill/hook config.
30 lines
776 B
Bash
Executable File
30 lines
776 B
Bash
Executable File
#!/bin/sh
|
|
# Public test: the example from the task statement.
|
|
rec=$(aji run --fuel 400000000 --grant input=io.read --grant out=io.write --grant heap=mem.alloc:4194304 --stdin 'capacity 2
|
|
put a 1
|
|
put b 2
|
|
get a
|
|
put c 3
|
|
peek b
|
|
dump
|
|
get b
|
|
stats
|
|
put a 9
|
|
get a
|
|
del zz
|
|
' main.aji)
|
|
got=$(printf '%s' "$rec" | python3 -c 'import json,sys; r=json.load(sys.stdin); print(r.get("stdout","") if r.get("status")=="returned" else "<status "+str(r.get("status"))+">", end="")') || { echo "FAIL: no run record"; echo "$rec"; exit 1; }
|
|
expected=$(printf "%s" 'ok
|
|
ok
|
|
1
|
|
evict b
|
|
miss
|
|
c a
|
|
miss
|
|
size 2 hits 1 misses 1 evictions 1
|
|
ok
|
|
9
|
|
miss
|
|
')
|
|
if [ "$got" = "$expected" ]; then echo PASS; else echo "FAIL"; echo "--- expected"; printf '%s' "$expected"; echo "--- got"; printf '%s' "$got"; exit 1; fi
|