Skip to content

Commit f61a1ca

Browse files
committed
fix(ownts): address review — real bugs + robustness (Codex + CodeRabbit)
Frontend correctness (Codex P2 + CodeRabbit Major): - Per-resource cleanup matching: `released` was kind-level, so two setIntervals with one clearInterval marked both released (a swallowed leak). Now matched to each acquire's own token/handler (_is_released) — the uncleared one still leaks. - Render-scope-only bindings: extract_effects walked every const/let/var in the file and attributed by name, so a like-named local inside a useEffect callback shadowed the real memoized dep and minted a false EFF001. Now only component-body depth-1 bindings count (_render_bindings + _body_brace, which also skips a destructured param list). - Top-level cleanup only: _split_cleanup accepted the first `return ... =>` anywhere; a nested callback's disposer wrongly suppressed OWN001. Now only the effect body's own (brace-depth 1) return is the cleanup. - Expression-bodied effects: `useEffect(() => fetch(url), [dep])` blindly hit _match_block and jumped to an unrelated `{` or ran off the end. _effect_callback now detects block vs expression bodies. Core robustness (CodeRabbit Major): - effects.py: a dep with no render-scope binding is STABLE only if identifier-like (`tenantId`, `props.id`); a forwarded non-identifier (`{}`, `new URL(x)`) is UNKNOWN, not silently STABLE. - ownir.py _effect_findings: validate each effect/binding shape and SKIP malformed entries (mirrors load()) instead of coercing `deps:"a"` into `("a",)` on the direct check_facts() path. Tests/CI/docs: - New fixture EffectEdges.tsx (partial timer cleanup + nested shadow) → 1 OWN001, pinned in test_ownts.py + a CI step; test_effects.py guards list derefs and adds a malformed-skip case (now 31 checks). - CI finding-count asserts are exact (grep -c on the code tag), not substrings. - Docs: P-020 marks only EFF001 shipped (EFF002 pending); Dashboard.tsx comments updated (3xOWN001 + 1 EFF001, EFF001 is a core analysis not a heuristic); README fences get a language tag (MD040). Full suite green (effects 31/31, ownir 194/194, explain); ruff + mypy --strict clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVeuchch67CtjSbizYm8gi
1 parent be54e45 commit f61a1ca

10 files changed

Lines changed: 263 additions & 75 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,8 @@ jobs:
10511051
|| { echo "FAIL: expected three OWN001 leaks"; exit 1; }
10521052
echo "$out" | grep -q "\[EFF001\].*request storm" \
10531053
|| { echo "FAIL: expected the EFF001 effect-storm verdict"; exit 1; }
1054-
echo "$out" | grep -qE "4 finding" \
1054+
# exact finding count (a code-tagged line each), not a substring of "4 finding"
1055+
[ "$(echo "$out" | grep -cE '\[(OWN|EFF|DI)[0-9]{3}\]')" -eq 4 ] \
10551056
|| { echo "FAIL: expected 3 OWN001 + 1 EFF001 = 4 findings"; exit 1; }
10561057
- name: EFF001 stability showcase — only provable storms fire (low FP)
10571058
run: |
@@ -1060,17 +1061,28 @@ jobs:
10601061
storm=$(python -m ownlang ownir "$RUNNER_TEMP/storm.facts.json" || true)
10611062
echo "$storm"
10621063
# the direct object dep and its derived alias fire; memo/ref/call/primitive/no-IO stay silent
1063-
echo "$storm" | grep -qE "2 finding" \
1064+
[ "$(echo "$storm" | grep -c '\[EFF001\]')" -eq 2 ] \
10641065
|| { echo "FAIL: expected exactly two EFF001 (object dep + derived alias)"; exit 1; }
10651066
echo "$storm" | grep -q "derives from" \
10661067
|| { echo "FAIL: expected the derivation (propagation) verdict"; exit 1; }
1068+
- name: Edge cases — partial timer cleanup + nested-scope shadow
1069+
run: |
1070+
python frontend/ownts/ownts.py frontend/ownts/examples/EffectEdges.tsx \
1071+
-o "$RUNNER_TEMP/edges.facts.json"
1072+
edges=$(python -m ownlang ownir "$RUNNER_TEMP/edges.facts.json" || true)
1073+
echo "$edges"
1074+
# only the SECOND, uncleared interval leaks; the memoized dep is not shadowed
1075+
[ "$(echo "$edges" | grep -cE '\[(OWN|EFF|DI)[0-9]{3}\]')" -eq 1 ] \
1076+
|| { echo "FAIL: expected exactly one OWN001 (the uncleared timer)"; exit 1; }
1077+
echo "$edges" | grep -q "pollB" \
1078+
|| { echo "FAIL: the leak must be the second (uncleared) interval"; exit 1; }
10671079
- name: The clean fixture (cleanups + useMemo'd dep) is silent
10681080
run: |
10691081
python frontend/ownts/ownts.py frontend/ownts/examples/DashboardClean.tsx \
10701082
-o "$RUNNER_TEMP/clean.facts.json"
10711083
clean=$(python -m ownlang ownir "$RUNNER_TEMP/clean.facts.json" || true)
10721084
echo "$clean"
1073-
echo "$clean" | grep -q "0 finding" \
1085+
[ "$(echo "$clean" | grep -cE '\[(OWN|EFF|DI)[0-9]{3}\]')" -eq 0 ] \
10741086
|| { echo "FAIL: cleaned-up + memoised effects must not fire"; exit 1; }
10751087
10761088
# The distribution surface (Уровень 1): the own-check.sh orchestrator walks a

‎docs/proposals/P-020-ownts-react-effects.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ has on the .NET side (P-013/P-015); 1/2/6/7 are this proposal's actual work.
156156

157157
## Open questions
158158

159-
1. **The new analysis for `EFF001/002`.** ✅ **Answered (implemented).** It is a
159+
1. **The new analysis for `EFF001`.** ✅ **Answered (implemented).** It is a
160160
genuinely new core analysis, not an `OWN001` acquire-site — and *not* a frontend
161161
verdict either. The resolution: the frontend emits per-binding **facts** (each
162162
render-scope binding's syntactic `init` kind + the names it references, the dep
@@ -166,6 +166,8 @@ has on the .NET side (P-013/P-015); 1/2/6/7 are this proposal's actual work.
166166
effect is `EFF001` iff it does IO **and** a dep is *provably* `UNSTABLE`
167167
(`UNKNOWN`/memoised/primitive clear it — low false positives). The gating
168168
discipline held: `EFF001` is its own core code (like `DI001`), never an `OWN001`.
169+
`EFF002` (network IO with no stable guard) is intended to reuse this same
170+
lattice but is **not yet implemented** — it remains the next increment.
169171
2. **Confidence tier.** `EFF001` clearly wants TS-mode type info (is the dep an
170172
object literal? does the body do IO?). What, if anything, survives into JS mode
171173
(P-017's heuristic tier) as a warning?

‎frontend/ownts/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ python frontend/ownts/test_ownts.py
3737
`DashboardClean.tsx` (every acquire has a cleanup `return`, and the unstable dep is
3838
`useMemo`'d) is silent.
3939

40-
```
40+
```text
4141
Dashboard.tsx:13: error: [OWN001] timer 'setInterval(() =>' ... never stopped ... (leak) [resource: timer]
4242
Dashboard.tsx:21: error: [OWN001] the result of '.subscribe(...)' is ignored ... (leak) [resource: subscription token]
4343
Dashboard.tsx:27: error: [OWN001] event '.addEventListener(...)' ... never unsubscribed ... (leak) [resource: subscription token]
@@ -71,7 +71,7 @@ each `useEffect`, its dep list, whether the body does IO, and a render-scope
7171
It does **not** pre-judge stability. The **core** runs an identity-stability lattice
7272
(`STABLE < UNKNOWN < UNSTABLE`) to a fixpoint over the references and decides:
7373

74-
```
74+
```text
7575
EFF001 fires ⟺ the effect does IO ∧ some dep is *provably* UNSTABLE
7676
```
7777

‎frontend/ownts/examples/Dashboard.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
//
55
// python frontend/ownts/ownts.py frontend/ownts/examples/Dashboard.tsx --check
66
//
7-
// Expect three OWN001 findings (EFF004 timer, EFF003 subscribe, EFF003 listener).
7+
// Expect three OWN001 findings (EFF004 timer, EFF003 subscribe, EFF003 listener)
8+
// plus one EFF001 effect-storm finding (the unstable `filters` dependency below).
89
import { useEffect } from "react";
910

1011
export function Dashboard({ tenantId }: { tenantId: string }) {
@@ -28,7 +29,7 @@ export function Dashboard({ tenantId }: { tenantId: string }) {
2829
// no `return () => window.removeEventListener("resize", onResize)` — leak
2930
}, []);
3031

31-
// EFF001 (frontend heuristic only — NOT a core OWN001): `filters` is a fresh
32+
// EFF001 (a separate core analysis — NOT an OWN001 leak): `filters` is a fresh
3233
// object identity every render, and the effect does IO -> request storm.
3334
const filters = { tenantId };
3435
useEffect(() => {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Edge cases the per-resource + render-scope fixes must get right (Codex/CodeRabbit):
2+
// python frontend/ownts/ownts.py frontend/ownts/examples/EffectEdges.tsx --check
3+
// Expect exactly ONE finding: OWN001 on the second, uncleared interval. No EFF001.
4+
import { useEffect, useMemo } from "react";
5+
6+
export function EdgeBoard({ id }: { id: string }) {
7+
// Two timers; only the first is cleared -> the SECOND still leaks. A kind-level
8+
// "is there any clearInterval?" check would wrongly mark both released.
9+
useEffect(() => {
10+
const a = setInterval(pollA, 1000);
11+
const b = setInterval(pollB, 2000);
12+
return () => clearInterval(a); // only `a` cleared; `b` leaks (one OWN001)
13+
}, []);
14+
15+
// The render-scope dep is memoized (stable). A like-named local INSIDE the effect
16+
// callback must not shadow it into a false EFF001 storm.
17+
const filters = useMemo(() => ({ id }), [id]);
18+
useEffect(() => {
19+
const filters = { id }; // nested-scope local — NOT the component's render scope
20+
fetch(`/api/${filters.id}`);
21+
}, [filters]); // refers to the stable outer (memoized) `filters`
22+
23+
return <div>edges</div>;
24+
}

‎frontend/ownts/ownts.py‎

Lines changed: 148 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -44,33 +44,79 @@
4444
# --- acquire catalog: how each React acquire maps onto a core resource kind -----
4545
#
4646
# Each acquire has (a) a regex that spots the acquire call, (b) the OwnIR `resource`
47-
# discriminator the core understands, (c) the cleanup verb that releases it, and
48-
# (d) the EFF id + tag for provenance. The `resource` value is the *only* field the
49-
# core acts on; `eff`/`profile` ride along as additive provenance the core ignores.
47+
# discriminator the core understands, and (c) the EFF id + tag for provenance. The
48+
# `resource` value is the *only* field the core acts on; `eff`/`profile` ride along
49+
# as additive provenance the core ignores. Whether a *specific* acquire is released
50+
# is decided per-resource by `_is_released` (matched to its own token/handler — not
51+
# a kind-level "is there any cleanup verb", which would mark every same-kind acquire
52+
# released as soon as one is cleaned up).
5053
@dataclass(frozen=True)
5154
class Acquire:
5255
name: str # human label, e.g. "setInterval"
5356
pattern: re.Pattern # spots the acquire call
5457
resource: str # OwnIR resource kind: timer / subscribe / subscription
55-
release: re.Pattern # the cleanup verb that releases it
5658
eff: str # Own.React catalog id
5759

5860
ACQUIRES: list[Acquire] = [
59-
Acquire("setInterval", re.compile(r"\bsetInterval\s*\("),
60-
"timer", re.compile(r"\bclearInterval\s*\("), "EFF004"),
61-
Acquire("setTimeout", re.compile(r"\bsetTimeout\s*\("),
62-
"timer", re.compile(r"\bclearTimeout\s*\("), "EFF004"),
63-
Acquire(".subscribe", re.compile(r"\.subscribe\s*\("),
64-
"subscribe", re.compile(r"\.unsubscribe\s*\(|\.remove\s*\("), "EFF003"),
61+
Acquire("setInterval", re.compile(r"\bsetInterval\s*\("), "timer", "EFF004"),
62+
Acquire("setTimeout", re.compile(r"\bsetTimeout\s*\("), "timer", "EFF004"),
63+
Acquire(".subscribe", re.compile(r"\.subscribe\s*\("), "subscribe", "EFF003"),
6564
Acquire("addEventListener", re.compile(r"\.addEventListener\s*\("),
66-
"subscription", re.compile(r"\.removeEventListener\s*\("), "EFF003"),
65+
"subscription", "EFF003"),
6766
]
6867

68+
69+
def _lhs_token(setup: str, pos: int) -> str | None:
70+
"""The variable an acquire's result is bound to, e.g. `id` in
71+
`const id = setInterval(...)` or `sub` in `const sub = obs.subscribe(...)`.
72+
Scoped to the current statement so an earlier `const` does not bleed in."""
73+
head = re.split(r"[;\n{}]", setup[:pos])[-1]
74+
m = re.search(r"(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=", head)
75+
return m.group(1) if m else None
76+
77+
78+
def _is_released(acq: Acquire, setup: str, pos: int, cleanup: str) -> bool:
79+
"""Whether THIS acquire (at `pos` in `setup`) is released by the effect's cleanup
80+
— matched to its own handle, so two `setInterval`s with one `clearInterval` leave
81+
the other a leak. A resource with no capturable handle (a bare `setInterval(...)`
82+
or an ignored `.subscribe(...)` result) can never be released → False."""
83+
if acq.resource == "timer":
84+
tok = _lhs_token(setup, pos)
85+
return bool(tok and re.search(
86+
rf"\bclear(?:Interval|Timeout)\s*\(\s*{re.escape(tok)}\b", cleanup))
87+
if acq.resource == "subscribe":
88+
tok = _lhs_token(setup, pos)
89+
return bool(tok and re.search(
90+
rf"\b{re.escape(tok)}\s*\.\s*(?:unsubscribe|remove)\s*\(", cleanup))
91+
if acq.resource == "subscription": # addEventListener(event, handler)
92+
hm = re.search(r"addEventListener\s*\(\s*[^,]+,\s*([A-Za-z_$][\w$.]*)",
93+
setup[pos:])
94+
handler = hm.group(1) if hm else None
95+
return bool(handler and re.search(
96+
rf"removeEventListener\s*\(\s*[^,]+,\s*{re.escape(handler)}\b", cleanup))
97+
return False
98+
6999
# A React component is a function whose name is Capitalized (the JSX convention).
70100
_COMPONENT = re.compile(
71-
r"(?:function\s+([A-Z]\w*)\s*\(|"
101+
r"(?:function\s+([A-Z]\w*)\b|"
72102
r"(?:const|let|var)\s+([A-Z]\w*)\s*=\s*(?:\([^)]*\)|\w+)\s*(?::[^=]+)?=>)"
73103
)
104+
105+
106+
def _body_brace(text: str, start: int) -> int:
107+
"""Index of a component's body `{`, scanning from `start` (just past the name or
108+
`=>`). Skips the parameter list by paren depth, so a destructured param
109+
`({ x }: { x: T })` is not mistaken for the body block."""
110+
depth = 0
111+
for i in range(start, len(text)):
112+
c = text[i]
113+
if c == "(":
114+
depth += 1
115+
elif c == ")":
116+
depth -= 1
117+
elif c == "{" and depth == 0:
118+
return i
119+
return -1
74120
_USE_EFFECT = re.compile(r"\buseEffect\s*\(")
75121

76122

@@ -169,35 +215,77 @@ def _component_at(text: str, idx: int) -> str:
169215
return name or "AnonymousComponent"
170216

171217

218+
def _expr_end(text: str, i: int) -> int:
219+
"""End index of an expression body — the first top-level `,` or `)` from `i`
220+
(so the `, [deps])` tail and the `useEffect(` close are not swallowed)."""
221+
depth = 0
222+
while i < len(text):
223+
c = text[i]
224+
if c in "([{":
225+
depth += 1
226+
elif c in ")]}":
227+
if depth == 0:
228+
return i
229+
depth -= 1
230+
elif c == "," and depth == 0:
231+
return i
232+
i += 1
233+
return i
234+
235+
236+
def _effect_callback(text: str, after_open: int) -> tuple[str, int, list[str] | None, int]:
237+
"""Parse `useEffect(<cb>, [deps])` from just past the `(`. Returns
238+
(body, body_start, deps, end). Handles BOTH a block `() => { ... }` and an
239+
expression `() => fetch(url)` callback — calling `_match_block` blindly on the
240+
latter would jump to an unrelated `{` or run off the end. `deps` is None when no
241+
dependency array is present; `body` includes the braces for a block callback."""
242+
arrow = text.find("=>", after_open)
243+
i = (arrow + 2) if arrow != -1 else after_open
244+
while i < len(text) and text[i] in " \t\r\n":
245+
i += 1
246+
if i < len(text) and text[i] == "{":
247+
end = _match_block(text, i)
248+
else:
249+
end = _expr_end(text, i)
250+
body = text[i:end]
251+
deps_m = re.search(r"\s*,\s*\[([^\]]*)\]", text[end:end + 200])
252+
deps = ([d.strip() for d in deps_m.group(1).split(",") if d.strip()]
253+
if deps_m else None)
254+
return body, i, deps, end
255+
256+
172257
def _split_cleanup(body: str) -> tuple[str, str]:
173-
"""Split an effect body into (setup, cleanup). Cleanup is the block of the
174-
`return () => { ... }` the effect hands back to React; setup is the rest."""
175-
m = re.search(r"return\s*(?:\(\s*\)|\w+)\s*=>", body)
176-
if not m:
177-
return body, ""
178-
brace = body.find("{", m.end())
179-
if brace == -1:
180-
# `return () => clearInterval(id)` — single-expression cleanup, no block.
181-
nl = body.find("\n", m.end())
182-
tail = body[m.end(): nl if nl != -1 else len(body)]
183-
return body[: m.start()], tail
184-
end = _match_block(body, brace)
185-
return body[: m.start()] + body[end:], body[brace:end]
258+
"""Split an effect block body into (setup, cleanup). Cleanup is the block of the
259+
effect's OWN top-level `return () => { ... }` — a `return ... =>` nested inside a
260+
callback (brace-depth > 1) is NOT the effect cleanup and must not suppress a
261+
leak. For an expression-bodied effect there is no cleanup."""
262+
for m in re.finditer(r"return\s*(?:\(\s*\)|\w+)\s*=>", body):
263+
prefix = body[:m.start()]
264+
if prefix.count("{") - prefix.count("}") != 1: # 1 == the effect body's own brace
265+
continue
266+
brace = body.find("{", m.end())
267+
if brace == -1:
268+
# `return () => clearInterval(id)` — single-expression cleanup, no block.
269+
nl = body.find("\n", m.end())
270+
tail = body[m.end(): nl if nl != -1 else len(body)]
271+
return body[: m.start()], tail
272+
end = _match_block(body, brace)
273+
return body[: m.start()] + body[end:], body[brace:end]
274+
return body, ""
186275

187276

188277
def extract(path: str) -> list[Component]:
189278
text = _strip_comments(open(path, encoding="utf-8").read())
190279
comps: dict[str, Component] = {}
191280
for eff in _USE_EFFECT.finditer(text):
192-
end = _match_block(text, eff.end())
193-
body = text[eff.end():end]
281+
body, body_start, _deps, _end = _effect_callback(text, eff.end())
194282
setup, cleanup = _split_cleanup(body)
195283
cname = _component_at(text, eff.start())
196284
comp = comps.setdefault(cname, Component(cname, path))
197285
for acq in ACQUIRES:
198286
for hit in acq.pattern.finditer(setup):
199-
line = text.count("\n", 0, eff.end() + hit.start()) + 1
200-
released = bool(acq.release.search(cleanup))
287+
line = text.count("\n", 0, body_start + hit.start()) + 1
288+
released = _is_released(acq, setup, hit.start(), cleanup)
201289
# the acquire expression, trimmed to the call head for a readable tag
202290
snippet = setup[hit.start():].splitlines()[0].strip().rstrip("{").strip()
203291
comp.resources.append(
@@ -272,27 +360,45 @@ def _classify_rhs(rhs: str) -> tuple[str, list[str]]:
272360
return "unknown", []
273361

274362

363+
def _render_bindings(text: str) -> dict[str, list[dict]]:
364+
"""The render-scope binding table per component: only bindings declared DIRECTLY
365+
in the component body (brace-depth 1). A `const filters = {...}` inside a
366+
`useEffect` callback, an event handler, or any nested block is NOT render scope —
367+
it must not shadow the real outer dependency of the same name and mint a false
368+
EFF001. Excluding a render-level `if`/`try` binding only costs a missed finding
369+
(the dep reads as stable), never a false one — the safe direction."""
370+
out: dict[str, list[dict]] = {}
371+
for cm in _COMPONENT.finditer(text):
372+
name = cm.group(1) or cm.group(2)
373+
brace = _body_brace(text, cm.end()) # skips a destructured param list
374+
if brace == -1:
375+
continue
376+
body_end = _match_block(text, brace)
377+
body = text[brace + 1:body_end]
378+
base = text.count("\n", 0, brace + 1) # 0-based line index of the body start
379+
binds: list[dict] = []
380+
for m in _BINDING.finditer(body):
381+
prefix = body[:m.start()]
382+
if prefix.count("{") != prefix.count("}"):
383+
continue # inside a nested block -> not the component's render scope
384+
kind, refs = _classify_rhs(m.group(2))
385+
binds.append({"name": m.group(1), "init": kind, "refs": refs,
386+
"line": base + prefix.count("\n") + 1})
387+
out[name] = binds
388+
return out
389+
390+
275391
def extract_effects(path: str) -> list[dict]:
276392
"""Extract the EFF001 stability facts: for each `useEffect`, its dependency list,
277393
whether its body does network IO, and the render-scope binding table of the
278394
component it lives in. The core's effects analysis turns these into a verdict."""
279395
text = _strip_comments(open(path, encoding="utf-8").read())
280-
# render-scope bindings, attributed to their enclosing component.
281-
binds_by_comp: dict[str, list[dict]] = {}
282-
for m in _BINDING.finditer(text):
283-
kind, refs = _classify_rhs(m.group(2))
284-
binds_by_comp.setdefault(_component_at(text, m.start()), []).append({
285-
"name": m.group(1), "init": kind, "refs": refs,
286-
"line": text.count("\n", 0, m.start()) + 1,
287-
})
396+
binds_by_comp = _render_bindings(text)
288397
effects: list[dict] = []
289398
for eff in _USE_EFFECT.finditer(text):
290-
end = _match_block(text, eff.end())
291-
body = text[eff.end():end]
292-
deps_m = re.search(r",\s*\[([^\]]*)\]\s*\)", text[end - 1:end + 200])
293-
if not deps_m: # no dep array -> not an EFF001 candidate (by-design re-run cadence)
399+
body, _start, deps, _end = _effect_callback(text, eff.end())
400+
if deps is None: # no dep array -> not an EFF001 candidate (by-design re-run cadence)
294401
continue
295-
deps = [d.strip() for d in deps_m.group(1).split(",") if d.strip()]
296402
cname = _component_at(text, eff.start())
297403
effects.append({
298404
"component": cname, "file": path,

‎frontend/ownts/test_ownts.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ def main() -> int:
4444
storm = codes("EffectStorm.tsx")
4545
assert storm == ["EFF001", "EFF001"], f"EffectStorm -> {storm}"
4646

47+
# Edge cases: two same-kind timers with only one cleared -> exactly ONE OWN001
48+
# (per-resource cleanup matching, not kind-level); a like-named local inside an
49+
# effect callback must NOT shadow the memoized render-scope dep into a false
50+
# EFF001 (render-scope-only bindings).
51+
edges = codes("EffectEdges.tsx")
52+
assert edges == ["OWN001"], f"EffectEdges -> {edges}"
53+
4754
print("OwnTS spike OK: leaky=3xOWN001+EFF001, clean=0, kinds=timer/subscribe/"
48-
"subscription, EffectStorm=2xEFF001 (core stability analysis, propagation "
49-
"+ conservative).")
55+
"subscription, EffectStorm=2xEFF001, EffectEdges=1xOWN001 (per-resource "
56+
"cleanup + render-scope-only bindings).")
5057
return 0
5158

5259

0 commit comments

Comments
 (0)