Skip to content

Implement Zag Script, zagd planning, and Linux x86 milestones - #2

Open
micahcooley wants to merge 424 commits into
mainfrom
zag-v2-machine-control
Open

Implement Zag Script, zagd planning, and Linux x86 milestones#2
micahcooley wants to merge 424 commits into
mainfrom
zag-v2-machine-control

Conversation

@micahcooley

@micahcooley micahcooley commented Jul 19, 2026

Copy link
Copy Markdown
Member

What changed

  • adds the built-in Zag Script profile, generated entry point, bounded reclaiming runtime, typed conveniences, inspection, hardening, and strict promotion diagnostics
  • adds the file-driven zagd daemon with inotify snapshots, semantic cache validation, bounded deterministic planning, checksum-bound suggestions, automatic unspecified Script defaults, and an optional persistent systemd user service
  • adds explicit generic/native x86-64 policy, runtime feature dispatch, and the current fail-closed i686 ELF32/ABI milestone including scalar structs by value
  • expands JSON scalar parsing with floats, null, and validated Unicode escape decoding

Authority and safety

Regular Zag remains advisory and source-preserving. Zag Script applies defaults only where source choices are unspecified. Foreground compilation remains authoritative without zagd. Unsupported i686 and optimizer behavior fails closed and remains documented.

Validation

  • native bootstrap reproducibility: 6/6
  • native compiler: 133/133
  • native GPU: 5/5
  • i686 focused gate: 25/25
  • x86 CPU profiles: 25/25
  • x86 target policy: 7/7
  • Zag Script, JSON, planner, daemon, semantic background, and persistent-service focused suites passed
  • native authority, WASM emission, and total-proof gates passed

Remaining documented boundaries

This PR does not claim universal memory safety, a complete ownership system, universal deep optimization, full foreign i686 ABI coverage, ARM support, or full x86-family completion.


View with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is enabled.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 518 files, which is 418 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 89eae3cd-dde4-4b89-9f86-f9c5190b98c4

📥 Commits

Reviewing files that changed from the base of the PR and between 8d6fedf and 67cad46.

⛔ Files ignored due to path filters (10)
  • artifacts/baseline/bootstrap.log is excluded by !**/*.log
  • artifacts/baseline/native.log is excluded by !**/*.log
  • artifacts/baseline/native_authority.log is excluded by !**/*.log
  • artifacts/baseline/native_gpu.log is excluded by !**/*.log
  • artifacts/baseline/native_total.log is excluded by !**/*.log
  • artifacts/baseline/run_tests.log is excluded by !**/*.log
  • artifacts/baseline/semantics.log is excluded by !**/*.log
  • zag-poc/docs/V2_SUPPORT_MATRIX.generated.md is excluded by !**/*.generated.*
  • zag-poc/tests/wasm_invoke_host/Cargo.lock is excluded by !**/*.lock
  • zag-poc/zenith.log is excluded by !**/*.log
📒 Files selected for processing (539)
  • .github/workflows/ci.yml
  • .gitignore
  • README.md
  • zag-poc/.gitignore
  • zag-poc/BOOTSTRAP.md
  • zag-poc/CHANGELOG.md
  • zag-poc/COMPATIBILITY.md
  • zag-poc/INSTALL.md
  • zag-poc/Makefile
  • zag-poc/README.md
  • zag-poc/RELEASES.md
  • zag-poc/VERSIONING.md
  • zag-poc/benchmarks/README.md
  • zag-poc/benchmarks/run_zagscript.sh
  • zag-poc/bootstrap.sh
  • zag-poc/docs/DYNAMIC_SYSTEM_ABI.md
  • zag-poc/docs/GPU_COMPILER_DRIVER_BOUNDARY.md
  • zag-poc/docs/SELFHOST_MEMORY_POLICY.md
  • zag-poc/docs/V2_ABI.md
  • zag-poc/docs/V2_ALLOCATOR_GUIDE.md
  • zag-poc/docs/V2_AUDIT.md
  • zag-poc/docs/V2_CONCURRENCY_GUIDE.md
  • zag-poc/docs/V2_CONCURRENCY_MODEL.md
  • zag-poc/docs/V2_CPU_CONTROL_GUIDE.md
  • zag-poc/docs/V2_EFFECT_MODEL.md
  • zag-poc/docs/V2_FFI_GUIDE.md
  • zag-poc/docs/V2_FINAL_VERIFICATION.md
  • zag-poc/docs/V2_GPU_GUIDE.md
  • zag-poc/docs/V2_GPU_MODEL.md
  • zag-poc/docs/V2_IMPLEMENTATION_PLAN.md
  • zag-poc/docs/V2_LANGUAGE_SPEC.md
  • zag-poc/docs/V2_MEMORY_MODEL.md
  • zag-poc/docs/V2_MIGRATION.md
  • zag-poc/docs/V2_SAFETY_TOOLING.md
  • zag-poc/docs/V2_TARGET_SUPPORT.md
  • zag-poc/docs/V2_UNSAFE_MODEL.md
  • zag-poc/docs/X86_FEATURES.md
  • zag-poc/docs/X86_TARGET_POLICY.md
  • zag-poc/docs/ZAGD_ARCHITECTURE.md
  • zag-poc/docs/ZAGD_GUIDE.md
  • zag-poc/docs/ZAGD_RESOURCE_POLICY.md
  • zag-poc/docs/ZAGSCRIPT_GUIDE.md
  • zag-poc/docs/ZAGSCRIPT_HARDENING.md
  • zag-poc/docs/ZAGSCRIPT_IMPLEMENTATION_AUDIT.md
  • zag-poc/docs/ZAGSCRIPT_PROCESS_BOUNDARY.md
  • zag-poc/docs/ZAGSCRIPT_SEMANTICS.md
  • zag-poc/examples/gpu_isolation_report.zag
  • zag-poc/examples/heap_lifecycle.zag
  • zag-poc/examples/hot_demo.zag
  • zag-poc/examples/hotreload_demo.sh
  • zag-poc/examples/script_collections.zag
  • zag-poc/examples/script_comment_scanner.zag
  • zag-poc/examples/script_files.zag
  • zag-poc/examples/script_first_steps.zag
  • zag-poc/examples/script_harden.zag
  • zag-poc/examples/script_hello.zag
  • zag-poc/examples/script_json.zag
  • zag-poc/examples/script_process.zag
  • zag-poc/examples/wasm_ret42.zag
  • zag-poc/examples/zagd.conf
  • zag-poc/posit_p2_difftest.c
  • zag-poc/programs/arena.zag
  • zag-poc/prove.sh
  • zag-poc/prove_smt.sh
  • zag-poc/release.sh
  • zag-poc/run_tests.sh
  • zag-poc/selfhost/analyze.zag
  • zag-poc/selfhost/ast.zag
  • zag-poc/selfhost/astjson.zag
  • zag-poc/selfhost/codegen.zag
  • zag-poc/selfhost/codegen_test.zag
  • zag-poc/selfhost/cuda_ptx.zag
  • zag-poc/selfhost/fmt.zag
  • zag-poc/selfhost/gfx1010.zag
  • zag-poc/selfhost/glsl.zag
  • zag-poc/selfhost/lex.zag
  • zag-poc/selfhost/mlir.zag
  • zag-poc/selfhost/msl.zag
  • zag-poc/selfhost/native/aarch64.zag
  • zag-poc/selfhost/native/aarch64_smoke.zag
  • zag-poc/selfhost/native/acodegen.zag
  • zag-poc/selfhost/native/acodegen_smoke.zag
  • zag-poc/selfhost/native/aisa.zag
  • zag-poc/selfhost/native/elf.zag
  • zag-poc/selfhost/native/elf_arm64.zag
  • zag-poc/selfhost/native/elf_dynamic.zag
  • zag-poc/selfhost/native/elf_i686.zag
  • zag-poc/selfhost/native/foreground_cache.zag
  • zag-poc/selfhost/native/foreground_cache_test.zag
  • zag-poc/selfhost/native/hot_rt.zag
  • zag-poc/selfhost/native/i386_codegen.zag
  • zag-poc/selfhost/native/i386_codegen_source_test.zag
  • zag-poc/selfhost/native/isa.zag
  • zag-poc/selfhost/native/isa.zag.bak
  • zag-poc/selfhost/native/ncodegen.zag
  • zag-poc/selfhost/native/ncodegen.zag.bak
  • zag-poc/selfhost/native/ncodegen_env.zag
  • zag-poc/selfhost/native/ncodegen_generics.zag
  • zag-poc/selfhost/native/ncodegen_layout.zag
  • zag-poc/selfhost/native/ncodegen_runtime.zag
  • zag-poc/selfhost/native/ncodegen_scan.zag
  • zag-poc/selfhost/native/ncodegen_strings.zag
  • zag-poc/selfhost/native/ncodegen_types.zag
  • zag-poc/selfhost/native/optimize.zag
  • zag-poc/selfhost/native/peephole.zag
  • zag-poc/selfhost/native/process_result_abi_native_test.zag
  • zag-poc/selfhost/native/regalloc.zag
  • zag-poc/selfhost/native/runtime_test.zag
  • zag-poc/selfhost/native/script_lowering_native_test.zag
  • zag-poc/selfhost/native/thread_rt.zag
  • zag-poc/selfhost/native/wasm.zag
  • zag-poc/selfhost/native/x86.zag
  • zag-poc/selfhost/native/x86.zag.bak
  • zag-poc/selfhost/native/x86_cpu_profile.zag
  • zag-poc/selfhost/native/x86_cpu_profile_test.zag
  • zag-poc/selfhost/native/x86_test.zag
  • zag-poc/selfhost/native/znc.zag
  • zag-poc/selfhost/native/znc.zag.c
  • zag-poc/selfhost/native/znc_target.zag
  • zag-poc/selfhost/opencl_c.zag
  • zag-poc/selfhost/parse.zag
  • zag-poc/selfhost/parse_test.zag
  • zag-poc/selfhost/planner_authority.zag
  • zag-poc/selfhost/planner_authority_test.zag
  • zag-poc/selfhost/script_parser_probe.zag
  • zag-poc/selfhost/script_runtime.zag
  • zag-poc/selfhost/script_runtime_test.zag
  • zag-poc/selfhost/script_syntax.zag
  • zag-poc/selfhost/sema.zag
  • zag-poc/selfhost/semantic_manifest.zag
  • zag-poc/selfhost/semantic_manifest_format.zag
  • zag-poc/selfhost/semantic_manifest_publish.zag
  • zag-poc/selfhost/semantic_manifest_publish_test.zag
  • zag-poc/selfhost/semantic_manifest_test.zag
  • zag-poc/selfhost/smt.zag
  • zag-poc/selfhost/spirv.zag
  • zag-poc/selfhost/std/allocator.zag
  • zag-poc/selfhost/std/mmio.zag
  • zag-poc/selfhost/std/process.zag
  • zag-poc/selfhost/std/script_input.zag
  • zag-poc/selfhost/std/script_io.zag
  • zag-poc/selfhost/std/script_list.zag
  • zag-poc/selfhost/std/script_path.zag
  • zag-poc/selfhost/std/script_string.zag
  • zag-poc/selfhost/std/script_string_builder.zag
  • zag-poc/selfhost/typed.zag
  • zag-poc/selfhost/v2_edition.zag
  • zag-poc/selfhost/zagc.zag
  • zag-poc/selfhost/zagd.zag
  • zag-poc/selfhost/zagd_benchmark.zag
  • zag-poc/selfhost/zagd_daemon.zag
  • zag-poc/selfhost/zagd_identity.zag
  • zag-poc/selfhost/zagd_identity_test.zag
  • zag-poc/selfhost/zagd_incremental.zag
  • zag-poc/selfhost/zagd_incremental_test.zag
  • zag-poc/selfhost/zagd_linux.zag
  • zag-poc/selfhost/zagd_profile.zag
  • zag-poc/selfhost/zagd_profile_test.zag
  • zag-poc/selfhost/zagd_store.zag
  • zag-poc/selfhost/zagd_store_test.zag
  • zag-poc/selfhost/zir.zag
  • zag-poc/std/cuda_loader.zag
  • zag-poc/std/gfx1010_vm.zag
  • zag-poc/std/gpu.zag
  • zag-poc/std/gpu_platform.zag
  • zag-poc/std/json.zag
  • zag-poc/std/linux_drm.zag
  • zag-poc/std/linux_gpu_isolation.zag
  • zag-poc/std/metal_loader.zag
  • zag-poc/std/opencl_loader.zag
  • zag-poc/std/opengl_loader.zag
  • zag-poc/std/rt.zag
  • zag-poc/std/runtime.c
  • zag-poc/std/vulkan_loader.zag
  • zag-poc/tests/abi/offsets.zag
  • zag-poc/tests/analyzer/clean.zag
  • zag-poc/tests/analyzer/ineff.zag
  • zag-poc/tests/analyzer/leak_basic.zag
  • zag-poc/tests/analyzer/leak_discard.zag
  • zag-poc/tests/analyzer/pedantic.zag
  • zag-poc/tests/check_native_bootstrap_repro.sh
  • zag-poc/tests/check_optimizer_memory_hygiene.sh
  • zag-poc/tests/check_pure_zag_tree.sh
  • zag-poc/tests/continue_control.zag
  • zag-poc/tests/crash_corpus/empty_initializer.zag
  • zag-poc/tests/crash_corpus/invalid_top_level.zag
  • zag-poc/tests/crash_corpus/malformed_call.zag
  • zag-poc/tests/crash_corpus/malformed_hex.zag
  • zag-poc/tests/crash_corpus/missing_block_end.zag
  • zag-poc/tests/crash_corpus/missing_call_paren.zag
  • zag-poc/tests/crash_corpus/missing_nested_brace.zag
  • zag-poc/tests/crash_corpus/missing_param_paren.zag
  • zag-poc/tests/crash_corpus/unterminated_char.zag
  • zag-poc/tests/crash_corpus/unterminated_string.zag
  • zag-poc/tests/diag/e0002_total_panic.expected
  • zag-poc/tests/differential/t01_deep_expr.zag
  • zag-poc/tests/differential/t02_big_frame.zag
  • zag-poc/tests/differential/t03_big_struct.zag
  • zag-poc/tests/differential/t04_int_edges.zag
  • zag-poc/tests/differential/t05_u8_edges.zag
  • zag-poc/tests/differential/t06_many_args.zag
  • zag-poc/tests/differential/t07_indirect_args.zag
  • zag-poc/tests/differential/t08_clos_struct.zag
  • zag-poc/tests/differential/t09_opt_struct.zag
  • zag-poc/tests/differential/t10_union_slice.zag
  • zag-poc/tests/differential/t11_err_chain.zag
  • zag-poc/tests/differential/t12_iface_mixed.zag
  • zag-poc/tests/differential/t13_slice_stress.zag
  • zag-poc/tests/differential/t14_ret_struct_chain.zag
  • zag-poc/tests/differential/t15_generic_mix.zag
  • zag-poc/tests/differential/t16_float_edges.zag
  • zag-poc/tests/differential/t17_bool_ops.zag
  • zag-poc/tests/differential/t18_shift_ops.zag
  • zag-poc/tests/differential/t19_shift_edge.zag
  • zag-poc/tests/differential/t20_bitor_mix.zag
  • zag-poc/tests/differential/t21_clos_capture_fn.zag
  • zag-poc/tests/differential/t22_mixed_agg.zag
  • zag-poc/tests/differential/t23_sret_recursion.zag
  • zag-poc/tests/differential/t24_catch_loop.zag
  • zag-poc/tests/differential/t25_deep_calls.zag
  • zag-poc/tests/differential/t26_strcmp_edge.zag
  • zag-poc/tests/differential/t27_float_mutual.zag
  • zag-poc/tests/differential/t28_u8_wrap.zag
  • zag-poc/tests/differential/t29_whilelet_struct.zag
  • zag-poc/tests/differential/t30_opt_param.zag
  • zag-poc/tests/differential/t31_opt_field_assign.zag
  • zag-poc/tests/differential/t32_opt_union.zag
  • zag-poc/tests/differential/t33_struct_value_sem.zag
  • zag-poc/tests/differential/t35_iface_mutate.zag
  • zag-poc/tests/differential/t36_multi_tag.zag
  • zag-poc/tests/differential/t37_nested_captures.zag
  • zag-poc/tests/differential/t38_try_expr_pos.zag
  • zag-poc/tests/differential/t39_opt_slice.zag
  • zag-poc/tests/differential/t40_union_reassign.zag
  • zag-poc/tests/differential/t41_enum_fnval.zag
  • zag-poc/tests/differential/t42_clos_7args.zag
  • zag-poc/tests/differential/t43_bool_fn_cond.zag
  • zag-poc/tests/differential/t44_print_empty.zag
  • zag-poc/tests/differential/t45_struct_in_union_in_struct.zag
  • zag-poc/tests/differential/t46_div_by_zero.zag
  • zag-poc/tests/differential/t47_intmin_div.zag
  • zag-poc/tests/differential/t48_mod_by_zero.zag
  • zag-poc/tests/differential/t49_int_switch.zag
  • zag-poc/tests/differential/t50_catch_reuse.zag
  • zag-poc/tests/differential/t51_indirect_recursion.zag
  • zag-poc/tests/differential/t52_clos_independent.zag
  • zag-poc/tests/differential/t53_enum_bool_fields.zag
  • zag-poc/tests/differential/t54_cast_chain.zag
  • zag-poc/tests/differential/t55_deep_ifelse.zag
  • zag-poc/tests/differential/t56_list_of_opt.zag
  • zag-poc/tests/differential/t57_two_ifaces.zag
  • zag-poc/tests/differential/t58_ptr_compare.zag
  • zag-poc/tests/dynamic_vulkan_test.zag
  • zag-poc/tests/exec_runtime_lifetime.zag
  • zag-poc/tests/fixtures/cabi_object_add.zag
  • zag-poc/tests/fixtures/cabi_object_float.zag
  • zag-poc/tests/fixtures/cabi_object_import.zag
  • zag-poc/tests/fixtures/cabi_object_import_float.zag
  • zag-poc/tests/fixtures/cabi_object_import_uncalled.zag
  • zag-poc/tests/fixtures/cabi_object_main.zag
  • zag-poc/tests/generate_v2_support_matrix.sh
  • zag-poc/tests/gfx1010_vm.zag
  • zag-poc/tests/gfx1010_vm_blend.zag
  • zag-poc/tests/gfx1010_vm_depth.zag
  • zag-poc/tests/gfx1010_vm_fill.zag
  • zag-poc/tests/gpu_isolation.zag
  • zag-poc/tests/gpu_platform.zag
  • zag-poc/tests/gpu_std.zag
  • zag-poc/tests/i686_abi_pressure.zag
  • zag-poc/tests/i686_alloc_failure.zag
  • zag-poc/tests/i686_calls.zag
  • zag-poc/tests/i686_compiler_abi_entry.zag
  • zag-poc/tests/i686_compiler_abi_helper.zag
  • zag-poc/tests/i686_compiler_entry.zag
  • zag-poc/tests/i686_compiler_helper.zag
  • zag-poc/tests/i686_control_flow.zag
  • zag-poc/tests/i686_divide_by_zero.zag
  • zag-poc/tests/i686_error_union.zag
  • zag-poc/tests/i686_f32.zag
  • zag-poc/tests/i686_float.zag
  • zag-poc/tests/i686_float_struct_abi_entry.zag
  • zag-poc/tests/i686_float_struct_abi_helper.zag
  • zag-poc/tests/i686_i32_ir.zag
  • zag-poc/tests/i686_i64.zag
  • zag-poc/tests/i686_i64_abi_entry.zag
  • zag-poc/tests/i686_i64_abi_helper.zag
  • zag-poc/tests/i686_i64_divide_by_zero.zag
  • zag-poc/tests/i686_i64_remainder_by_zero.zag
  • zag-poc/tests/i686_import_lib.zag
  • zag-poc/tests/i686_import_runtime.zag
  • zag-poc/tests/i686_integer_arithmetic.zag
  • zag-poc/tests/i686_large_frame.zag
  • zag-poc/tests/i686_link_driver.zag
  • zag-poc/tests/i686_literal.zag
  • zag-poc/tests/i686_narrow_abi_entry.zag
  • zag-poc/tests/i686_narrow_abi_helper.zag
  • zag-poc/tests/i686_narrow_struct_abi_entry.zag
  • zag-poc/tests/i686_narrow_struct_abi_helper.zag
  • zag-poc/tests/i686_nested_struct_abi_entry.zag
  • zag-poc/tests/i686_nested_struct_abi_helper.zag
  • zag-poc/tests/i686_pointer.zag
  • zag-poc/tests/i686_pointer_index.zag
  • zag-poc/tests/i686_print.zag
  • zag-poc/tests/i686_reject_abi.zag
  • zag-poc/tests/i686_reject_arity.zag
  • zag-poc/tests/i686_reject_call_area_limit.zag
  • zag-poc/tests/i686_reject_catch_non_error.zag
  • zag-poc/tests/i686_reject_duplicate.zag
  • zag-poc/tests/i686_reject_effect.zag
  • zag-poc/tests/i686_reject_fallthrough.zag
  • zag-poc/tests/i686_reject_frame_limit.zag
  • zag-poc/tests/i686_reject_i64_range.zag
  • zag-poc/tests/i686_reject_index_type.zag
  • zag-poc/tests/i686_reject_narrow_literal.zag
  • zag-poc/tests/i686_reject_pointer.zag
  • zag-poc/tests/i686_reject_pointer_arithmetic.zag
  • zag-poc/tests/i686_reject_pointer_index_signed.zag
  • zag-poc/tests/i686_reject_pointer_integer_cast.zag
  • zag-poc/tests/i686_reject_recursive_struct.zag
  • zag-poc/tests/i686_reject_slice_mutation.zag
  • zag-poc/tests/i686_reject_struct_return.zag
  • zag-poc/tests/i686_reject_try_non_error.zag
  • zag-poc/tests/i686_reject_type_mismatch.zag
  • zag-poc/tests/i686_reject_u64_negative.zag
  • zag-poc/tests/i686_reject_u64_range.zag
  • zag-poc/tests/i686_reject_usize_implicit.zag
  • zag-poc/tests/i686_reject_usize_literal_range.zag
  • zag-poc/tests/i686_reject_usize_negative.zag
  • zag-poc/tests/i686_return_paths.zag
  • zag-poc/tests/i686_slice_abi.zag
  • zag-poc/tests/i686_slice_index.zag
  • zag-poc/tests/i686_slice_oob_negative.zag
  • zag-poc/tests/i686_slice_oob_usize.zag
  • zag-poc/tests/i686_struct.zag
  • zag-poc/tests/i686_struct_arg.zag
  • zag-poc/tests/i686_struct_return.zag
  • zag-poc/tests/i686_syscall_lifecycle.zag
  • zag-poc/tests/i686_usize_semantics.zag
  • zag-poc/tests/i686_write.zag
  • zag-poc/tests/i686_write_error.zag
  • zag-poc/tests/i686_znc_no_zagd.sh
  • zag-poc/tests/linux_drm.zag
  • zag-poc/tests/module_alias_generic/alias_first.zag
  • zag-poc/tests/module_alias_generic/flat_second.zag
  • zag-poc/tests/module_alias_generic/main.zag
  • zag-poc/tests/process_bounded_native.zag
  • zag-poc/tests/process_timeout_blocker.zag
  • zag-poc/tests/run_abi_layout.sh
  • zag-poc/tests/run_allocator_lifetime.sh
  • zag-poc/tests/run_analyzer.sh
  • zag-poc/tests/run_arena_allocator.sh
  • zag-poc/tests/run_arm64_selfhost.sh
  • zag-poc/tests/run_compat_cuda.sh
  • zag-poc/tests/run_compat_metal.sh
  • zag-poc/tests/run_compat_opencl.sh
  • zag-poc/tests/run_compat_opengl.sh
  • zag-poc/tests/run_compat_vulkan.sh
  • zag-poc/tests/run_crash_corpus.sh
  • zag-poc/tests/run_differential.sh
  • zag-poc/tests/run_docs_consistency.sh
  • zag-poc/tests/run_dynamic_abi.sh
  • zag-poc/tests/run_exec_runtime_lifetime.sh
  • zag-poc/tests/run_fixed_buffer_runtime.sh
  • zag-poc/tests/run_foreground_cache.sh
  • zag-poc/tests/run_foreground_cache_integration.sh
  • zag-poc/tests/run_fuzz_smoke.sh
  • zag-poc/tests/run_gfx1010_vm.sh
  • zag-poc/tests/run_gpu_isolation.sh
  • zag-poc/tests/run_gpu_platform.sh
  • zag-poc/tests/run_gpu_runtime.sh
  • zag-poc/tests/run_gpu_std.sh
  • zag-poc/tests/run_hot_reload.sh
  • zag-poc/tests/run_i686_minimal.sh
  • zag-poc/tests/run_i686_multi_object.sh
  • zag-poc/tests/run_i686_release_gate.sh
  • zag-poc/tests/run_linux_drm.sh
  • zag-poc/tests/run_metal_mac.sh
  • zag-poc/tests/run_mmio_region.sh
  • zag-poc/tests/run_native.sh
  • zag-poc/tests/run_native_arm64.sh
  • zag-poc/tests/run_native_authority.sh
  • zag-poc/tests/run_native_edge.sh
  • zag-poc/tests/run_native_gpu.sh
  • zag-poc/tests/run_native_memory_regression.sh
  • zag-poc/tests/run_native_total.sh
  • zag-poc/tests/run_native_wasm.sh
  • zag-poc/tests/run_no_artifact_errors.sh
  • zag-poc/tests/run_optimize.sh
  • zag-poc/tests/run_optimize_preview.sh
  • zag-poc/tests/run_planner_authority.sh
  • zag-poc/tests/run_process_bounded_native.sh
  • zag-poc/tests/run_process_result_abi.sh
  • zag-poc/tests/run_programs.sh
  • zag-poc/tests/run_regular_zag_compat.sh
  • zag-poc/tests/run_script_allocation_accounting.sh
  • zag-poc/tests/run_script_allocator_policy.sh
  • zag-poc/tests/run_script_beginner.sh
  • zag-poc/tests/run_script_capabilities.sh
  • zag-poc/tests/run_script_cli.sh
  • zag-poc/tests/run_script_frontend.sh
  • zag-poc/tests/run_script_json.sh
  • zag-poc/tests/run_script_lifetime.sh
  • zag-poc/tests/run_script_list.sh
  • zag-poc/tests/run_script_process_boundary.sh
  • zag-poc/tests/run_script_python_shape.sh
  • zag-poc/tests/run_script_runtime_integration.sh
  • zag-poc/tests/run_script_string_builder.sh
  • zag-poc/tests/run_selfhost.sh
  • zag-poc/tests/run_selfhost_features.sh
  • zag-poc/tests/run_semantic_manifest_diamond.sh
  • zag-poc/tests/run_semantic_manifest_e2e.sh
  • zag-poc/tests/run_semantics.sh
  • zag-poc/tests/run_std_namespace.sh
  • zag-poc/tests/run_stdlib.sh
  • zag-poc/tests/run_tooling.sh
  • zag-poc/tests/run_typed_authority.sh
  • zag-poc/tests/run_v1_compatibility_gate.sh
  • zag-poc/tests/run_v2_aggregate_provenance.sh
  • zag-poc/tests/run_v2_atomic_exchange.sh
  • zag-poc/tests/run_v2_atomic_orders.sh
  • zag-poc/tests/run_v2_atomic_storage.sh
  • zag-poc/tests/run_v2_edition.sh
  • zag-poc/tests/run_v2_effect_adversarial.sh
  • zag-poc/tests/run_v2_kernel_effects.sh
  • zag-poc/tests/run_v2_option_rejection.sh
  • zag-poc/tests/run_v2_release_gate.sh
  • zag-poc/tests/run_v2_support_matrix.sh
  • zag-poc/tests/run_v2_try_borrow.sh
  • zag-poc/tests/run_x86_64_cabi_object.sh
  • zag-poc/tests/run_x86_andn.sh
  • zag-poc/tests/run_x86_atomic_futex.sh
  • zag-poc/tests/run_x86_byte_swap.sh
  • zag-poc/tests/run_x86_cpu_profile.sh
  • zag-poc/tests/run_x86_leading_zeros.sh
  • zag-poc/tests/run_x86_popcount.sh
  • zag-poc/tests/run_x86_prefetch.sh
  • zag-poc/tests/run_x86_simd_add_i32x4.sh
  • zag-poc/tests/run_x86_simd_bitwise_i32x4.sh
  • zag-poc/tests/run_x86_simd_sub_i32x4.sh
  • zag-poc/tests/run_x86_sse2_memcpy.sh
  • zag-poc/tests/run_x86_target_policy.sh
  • zag-poc/tests/run_x86_thread_spawn.sh
  • zag-poc/tests/run_x86_trailing_zeros.sh
  • zag-poc/tests/run_x86_volatile_widths.sh
  • zag-poc/tests/run_zagd_background_semantics.sh
  • zag-poc/tests/run_zagd_benchmark_policy.sh
  • zag-poc/tests/run_zagd_buffer_lifetime.sh
  • zag-poc/tests/run_zagd_config_template.sh
  • zag-poc/tests/run_zagd_core.sh
  • zag-poc/tests/run_zagd_daemon.sh
  • zag-poc/tests/run_zagd_deep_integration.sh
  • zag-poc/tests/run_zagd_executor.sh
  • zag-poc/tests/run_zagd_identity.sh
  • zag-poc/tests/run_zagd_incremental.sh
  • zag-poc/tests/run_zagd_memory_stress.sh
  • zag-poc/tests/run_zagd_product.sh
  • zag-poc/tests/run_zagd_profile.sh
  • zag-poc/tests/run_zagd_user_service.sh
  • zag-poc/tests/run_zagd_watcher_correctness.sh
  • zag-poc/tests/run_zagscript_examples.sh
  • zag-poc/tests/run_zagscript_fuzz_smoke.sh
  • zag-poc/tests/run_zagscript_install_layout.sh
  • zag-poc/tests/run_zagscript_master_gate.sh
  • zag-poc/tests/run_zagscript_release_gate.sh
  • zag-poc/tests/script_frontend/args_strings.zag
  • zag-poc/tests/script_frontend/basic.zag
  • zag-poc/tests/script_frontend/beginner_collections.zag
  • zag-poc/tests/script_frontend/cli_markerless.zag
  • zag-poc/tests/script_frontend/conflicting_main.zag
  • zag-poc/tests/script_frontend/duplicate.zag
  • zag-poc/tests/script_frontend/harden_declarations.zag
  • zag-poc/tests/script_frontend/import_root.zag
  • zag-poc/tests/script_frontend/library_script.zag
  • zag-poc/tests/script_frontend/list.zag
  • zag-poc/tests/script_frontend/list_mixed_bad.zag
  • zag-poc/tests/script_frontend/materialized_args.zag
  • zag-poc/tests/script_frontend/path_helpers.zag
  • zag-poc/tests/script_frontend/prelude.zag
  • zag-poc/tests/script_frontend/prelude_override.zag
  • zag-poc/tests/script_frontend/println_int.zag
  • zag-poc/tests/script_frontend/process_bounded.zag
  • zag-poc/tests/script_frontend/python_shape.zag
  • zag-poc/tests/script_frontend/reserved_symbol.zag
  • zag-poc/tests/script_frontend/string_builder.zag
  • zag-poc/tests/script_frontend/string_builder_limit.zag
  • zag-poc/tests/script_frontend/string_concat_budget.zag
  • zag-poc/tests/script_frontend/top_level_return.zag
  • zag-poc/tests/script_frontend/uncaught_error.zag
  • zag-poc/tests/script_json.zag
  • zag-poc/tests/semantic/accept_hex_literal.zag
  • zag-poc/tests/semantic/import_const_flat.zag
  • zag-poc/tests/semantic/import_const_qualified.zag
  • zag-poc/tests/semantic/import_const_values.zag
  • zag-poc/tests/semantic/reject_closure_escape.zag
  • zag-poc/tests/semantic/reject_hex_literal.zag
  • zag-poc/tests/semantic/scoping_capture_shadow.zag
  • zag-poc/tests/std_namespace.zag
  • zag-poc/tests/string_builder_strict.zag
  • zag-poc/tests/wasm_invoke.js
  • zag-poc/tests/wasm_invoke_host/.gitignore
  • zag-poc/tests/wasm_invoke_host/Cargo.toml
  • zag-poc/tests/wasm_invoke_host/src/main.rs
  • zag-poc/tests/wasmtime_run.sh
  • zag-poc/tests/x86_andn.zag
  • zag-poc/tests/x86_atomic_futex.zag
  • zag-poc/tests/x86_byte_swap.zag
  • zag-poc/tests/x86_leading_zeros.zag
  • zag-poc/tests/x86_popcount.zag
  • zag-poc/tests/x86_prefetch.zag
  • zag-poc/tests/x86_profile_abi.zag
  • zag-poc/tests/x86_simd_add_i32x4.zag
  • zag-poc/tests/x86_simd_bitwise_i32x4.zag
  • zag-poc/tests/x86_simd_sub_i32x4.zag
  • zag-poc/tests/x86_sse2_memcpy.zag
  • zag-poc/tests/x86_thread_spawn.zag
  • zag-poc/tests/x86_trailing_zeros.zag
  • zag-poc/tests/x86_volatile_widths.zag
  • zag-poc/tests/zagd_benchmark_policy.zag
  • zag-poc/tests/zagd_core.zag
  • zag-poc/tests/zagd_executor.zag
  • zag-poc/tests/zagd_finalist_delay.zag
  • zag-poc/tests/zagd_finalist_mismatch.zag
  • zag-poc/tests/zagd_finalist_noisy.zag
  • zag-poc/tests/zagd_finalist_slow.zag
  • zag-poc/tests/zagd_finalist_witness.zag
  • zag-poc/tests/zagd_linux_test.zag
  • zag-poc/tests/zagd_semantic_fixture.zag
  • zag-poc/tools/zagd-user-service.sh
  • zag-poc/zagc
  • zag-poc/zagd
  • zag-poc/znc
  • zag-poc/znc-target
  • zag-poc/znc.backup.broken-i8
  • zag-poc/znc.backup.pre-getenv
  • zag-poc/znc.pre-capturefix.bak
  • zag-poc/znc.pre-execcap.bak
  • zag-poc/znc.preprim.bak
  • zag-poc/znc.scalar-add
  • zag-poc/znc.scalar-shift

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch zag-v2-machine-control

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist

Copy link
Copy Markdown

Note

The number of changes in this pull request is too large for Gemini Code Assist to generate a review.

micahcooley and others added 13 commits July 19, 2026 05:06
…erings

The arm64 self-hosting CI step aborted twice on this branch. First the
backend could not lower constructs this PR added, so the gen1
cross-compile failed with "unsupported constructs". After those were
lowered, the gen2 self-compile ran out of memory under qemu-user because
every allocation took its own mmap and each was rounded up to a full
page, so the 100 KB znc source blew past 8 GiB.

acodegen:
- lower _zag_slice_ptr, _zag_raw_syscall (AArch64 svc convention), and
  fail-closed stubs for the x86 cpuid/xgetbv intrinsics, plus their
  return types in ac_expr_type
- handle prefix statements and a trailing return inside a
  switch-expression arm (ac_lower_arm_value), mirroring the x86 backend
- replace the one-mmap-per-allocation __malloc with a 64 MiB arena/bump
  allocator, dropping gen2 peak RSS from over 8 GiB to about 0.5 GiB
- reserve 16 bytes at the start of the data segment for the allocator's
  cursor and end globals

elf_arm64:
- mark the data PT_LOAD read/write so the allocator globals are writable

Rebuilt the x86 znc seed to fixpoint. Local results: arm64 self-host
5/5, arm64 suite 99/0, differential 57/0, native 133/0, bootstrap
reproducibility 6/6.

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
micahcooley and others added 30 commits July 27, 2026 08:39
Modularize the native codegen by extracting ncodegen.zag into seven
focused files: ncodegen_env (environment/slots), ncodegen_generics
(monomorphization), ncodegen_layout (type layout), ncodegen_runtime
(numeric runtime detection), ncodegen_scan (frame sizing),
ncodegen_strings (literal decoding), and ncodegen_types (type
predicates).

Add GPU shader backend emitters for CUDA PTX, GLSL, MSL, OpenCL C,
and SPIR-V, plus runtime loaders for CUDA, Metal, OpenCL, OpenGL,
and Vulkan.  Include compatibility-tier and runtime test scripts
for each backend.

Update analyze, sema, lex, parse, ast, typed, and znc.zag to
support the new backends and modular codegen.  Rebuild the znc
bootstrap binary.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Language/compiler:
- sema.zag: improved effect analysis and callee resolution
- typed.zag: enhanced type checking for v2 edition features
- ncodegen.zag: additional codegen improvements
- isa.zag: new SIMD bitwise i32x4 instructions
- x86.zag: x86 backend support for new instructions

Tests:
- Added run_x86_simd_bitwise_i32x4.sh and test source
- Expanded v2 edition, effect adversarial, and kernel effects tests
- Updated docs consistency and release gate tests

Documentation:
- Updated V2 language spec, memory model, safety tooling, effect model
- Updated allocator guide, CPU control guide, GPU model docs
- Updated support matrix and implementation plan

Bootstrap seed:
- Updated znc seed binary to current self-hosting fixpoint

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant