test(codegen): mark the #49 Str-leg RED pin #[ignore] pending the representation spec

The Str-leg pin (committed 04f75c8) is RED on main: a heap-Str loop
binder replaced by `recur` leaks every superseded slab (live=3). Closing
it turned out NOT to be a mechanical fix. The "clone the static seed"
approach only covers the common accumulator shape (a fresh `str_concat`
result each iteration); it does not cover a `recur` arg or loop result
that is itself static, nor a phi-join of (static, heap) Str whose runtime
value may be static — and `ailang_rc_dec` on a static-Str pointer is UB
(no rc_header; rc.c has no runtime guard, per
design/contracts/0011-str-abi.md). A correct fix needs the deliberate
"every Str in loop-carried state is heap" representation decision that
commit f488d31 flagged as pending — routed through brainstorm.

This `#[ignore]` keeps `main`'s `cargo test --workspace` green while that
design cycle runs. The assertion body — the live=0 contract — is
unchanged; the GREEN implementation removes the `#[ignore]`. The ADT-leg
guard stays an active green test. Forward-fix only; main HEAD untouched.

refs #49
This commit is contained in:
2026-05-31 11:21:52 +02:00
parent 04f75c8b71
commit 02775b58ca
@@ -101,7 +101,16 @@ fn build_run_stats(fixture: &str) -> (u64, u64, i64, String) {
/// The bug under test: a heap-Str loop binder replaced by `recur` leaks
/// every superseded `str_concat` slab. RED at HEAD (live=3).
///
/// Ignored pending the #49 representation spec: the fix is not a
/// mechanical patch — closing the leak for ALL Str loop-carried state
/// (the per-iteration intermediates, the loop result, and a phi-join of
/// static/heap Str) requires a deliberate "every Str in loop-carried
/// state is heap" representation decision, routed through `brainstorm`.
/// This `#[ignore]` keeps `main` green while that cycle runs; the GREEN
/// implementation removes it. The assertion (the contract) is unchanged.
#[test]
#[ignore = "RED until the #49 Str-loop-binder representation fix lands (see brainstorm spec)"]
fn alloc_rc_str_loop_binder_replaced_by_recur_does_not_leak() {
let (allocs, frees, live, stdout) =
build_run_stats("loop_recur_str_binder_no_leak_pin.ail");