test: workspace_pin module count 3→4 (kernel_stub auto-injection)

Follow-up to 9339279 — the implement-orchestrator caught the
e2e.rs module-count assertion but missed this in-source pin in
workspace_pin.rs. The loader now injects two built-in kernel-
tier modules (`prelude` and `kernel_stub`); the user's ws_main
+ ws_lib bring the total to 4.

Also asserts both built-ins are present by name so a future
retirement of `kernel_stub` (planned for when the raw-buf
milestone lands a real second kernel-tier consumer) trips this
pin in lockstep, not as a silent off-by-one.
This commit is contained in:
2026-05-28 18:45:38 +02:00
parent 138157767e
commit a844de3f7a
+7 -3
View File
@@ -49,9 +49,13 @@ fn loads_example_workspace_happy_path() {
assert_eq!(ws.entry, "ws_main");
assert!(ws.modules.contains_key("ws_main"));
assert!(ws.modules.contains_key("ws_lib"));
// the loader auto-injects the `prelude` module,
// so the count is the user's two modules plus prelude.
assert_eq!(ws.modules.len(), 3);
// the loader auto-injects two built-in kernel-tier modules
// (`prelude` and `kernel_stub` — see prep.3 of the
// kernel-extension-mechanics milestone), so the count is the
// user's two modules plus those two.
assert_eq!(ws.modules.len(), 4);
assert!(ws.modules.contains_key("prelude"));
assert!(ws.modules.contains_key("kernel_stub"));
}
#[test]