From cd08f53315b9429aecb8d8e0bde31f6a543163ef Mon Sep 17 00:00:00 2001 From: Brummel Date: Sun, 10 May 2026 02:14:38 +0200 Subject: [PATCH] test: fix env-pin globals assertion (builtins seed operators workspace-flat) --- crates/ailang-check/tests/env_construction_pin.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/ailang-check/tests/env_construction_pin.rs b/crates/ailang-check/tests/env_construction_pin.rs index 1ef019b..8c7bbb4 100644 --- a/crates/ailang-check/tests/env_construction_pin.rs +++ b/crates/ailang-check/tests/env_construction_pin.rs @@ -206,7 +206,16 @@ fn build_check_env_matches_inline_seeding() { // Per-call overlay fields must NOT be seeded by the helper. assert_eq!(env_helper.current_module, "", "current_module is overlay"); - assert!(env_helper.globals.is_empty(), "globals is overlay"); + // env.globals — partially workspace-flat (builtins operators + // installed by `builtins::install`) and partially overlay + // (per-module fns seeded by callers). The helper carries only + // the workspace-flat half; key-set must match the inline + // reproduction at this point. + assert_eq!( + env_helper.globals.keys().collect::>(), + env_inline.globals.keys().collect::>(), + "env.globals key-set differs (workspace-flat half from builtins)" + ); assert!(env_helper.imports.is_empty(), "imports is overlay"); assert!(env_helper.rigid_vars.is_empty(), "rigid_vars is overlay"); }