Phase 21.5 optimization readiness - C-level performance target: - MirBuilder: JsonFrag purify toggle (HAKO_MIR_BUILDER_JSONFRAG_PURIFY=1) - Normalizer: extended f64 canonicalization + dedupe improvements - loop_opts_adapter: JsonFrag path refinement for crate EXE compatibility Infrastructure improvements: - provider_registry: add diagnostics + ring-1 providers (array/console/map/path) - mir_interpreter: add normalization/purify feature gates - tools/selfhost_exe_stageb.sh: new end-to-end Stage-B→crate EXE pipeline - tools/perf/microbench.sh: performance measurement tooling Smoke tests (phase2100): - Extend timeout 15s→120s for heavy crate EXE builds - Add stageb_loop_jsonfrag_crate_exe_canary_vm.sh (target test) - Add s3_backend_selector_crate_exe_vm_parity_return42_canary_vm.sh Documentation: - ENV_VARS.md: add Phase 21.5 optimization toggles - README updates: clarify crate backend strategy - phase215-optimization.md: new optimization roadmap This commit sets the stage for Phase 21.5 critical optimization: achieving C-level performance to decide hakorune's future viability.
24 lines
661 B
Bash
24 lines
661 B
Bash
#!/usr/bin/env bash
|
|
# canary.sh — Common helpers for canary scripts (JSON extract / token checks)
|
|
# Library only; safe to source from any test harness or standalone script.
|
|
|
|
# Extract content between [MIR_BEGIN] and [MIR_END] tags from stdin
|
|
extract_mir_between_tags() {
|
|
awk '/\[MIR_BEGIN\]/{f=1;next}/\[MIR_END\]/{f=0}f'
|
|
}
|
|
|
|
# Require that all given tokens appear in stdin; prints a FAIL line and
|
|
# exits with non-zero status if any token is missing.
|
|
require_tokens() {
|
|
local content
|
|
content=$(cat)
|
|
for tk in "$@"; do
|
|
if ! grep -Fq -- "$tk" <<<"$content"; then
|
|
echo "[FAIL] token missing: $tk" >&2
|
|
return 1
|
|
fi
|
|
done
|
|
return 0
|
|
}
|
|
|