FAILURE MAP
← Case archive

FA-11536 / Static analysis soundness / Open access

An inner lint suppression leaks into a sibling scope · case 01

An inner lint suppression leaks into a sibling scope.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Disabling a diagnostic mutates one shared suppression set across scope exits.

THE FAILURE

Disabling a diagnostic mutates one shared suppression set across scope exits.

Unsuccessful approach: Clearing suppressions on scope exit also removes suppressions inherited from an outer scope.

Case contract

Process balanced enter/exit, disable(code), and emit(code) events. Disable applies from that point through the current lexical scope and descendants. Return emitted unsuppressed codes in order.

Why this case matters

A deterministic offline analysis model exposing a specific soundness or precision boundary; it does not implement a complete language analyzer.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    disabled=set(); output=[]
    for op,code in events:
        if op=='disable': disabled.add(code)
        elif op=='emit' and code not in disabled: output.append(code)
    return output
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='L'+str(N)
check('local ends at exit',solve([('enter',''),('disable',x),('exit',''),('emit',x)]),[x])
check('outer survives exit',solve([('disable',x),('enter',''),('exit',''),('emit',x)]),[])
check('inherit outer',solve([('disable',x),('enter',''),('emit',x),('exit','')]),[])
check('other code unaffected',solve([('disable',x),('emit','other')]),['other'])
check('earlier diagnostic retained',solve([('emit',x),('disable',x),('emit',x)]),[x])
check('empty events',solve([]),[])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
local ends at exit[]['L1']Failed
outer survives exit[][]Passed
inherit outer[][]Passed
other code unaffected['other']['other']Passed
earlier diagnostic retained['L1']['L1']Passed
empty events[][]Passed

SHA-256 / 9f649874c1af68a3cb5f92d062b1f7bb7e535168ba6de1355cb8e01be8573ec1

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    disabled=set(); output=[]
    for op,code in events:
        if op=='disable': disabled.add(code)
        elif op=='exit': disabled.clear()
        elif op=='emit' and code not in disabled: output.append(code)
    return output
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='L'+str(N)
check('local ends at exit',solve([('enter',''),('disable',x),('exit',''),('emit',x)]),[x])
check('outer survives exit',solve([('disable',x),('enter',''),('exit',''),('emit',x)]),[])
check('inherit outer',solve([('disable',x),('enter',''),('emit',x),('exit','')]),[])
check('other code unaffected',solve([('disable',x),('emit','other')]),['other'])
check('earlier diagnostic retained',solve([('emit',x),('disable',x),('emit',x)]),[x])
check('empty events',solve([]),[])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
local ends at exit['L1']['L1']Passed
outer survives exit['L1'][]Failed
inherit outer[][]Passed
other code unaffected['other']['other']Passed
earlier diagnostic retained['L1']['L1']Passed
empty events[][]Passed

SHA-256 / 34366825e34fcc54a97a1855a750b43b45e108cde820b0ffca5340720b3b949d

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:48.723822+00:00.

Case digest / 01a8f9491a6fa70b73c0522b631e746c25735356fe1cb96ae0c3648e41844a32