You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[M12] Detect no-yield loops with bounded evidence classification #103
Add a first-party M12 lint/stability rule that detects loops whose repeating paths do not yield, while distinguishing the static fact "no yield on a repeating path" from stronger runtime-risk claims such as unbounded execution.
Context
Wright v0.1.0 currently has min-wait-loop, which covers loops that yield at the Workshop minimum wait rate, but a loop whose body contains no yield at all can produce zero findings.
This gap was discovered through the first real agent-lab consumer integration rather than synthetic roadmap expansion, so it is valid corpus/consumer evidence for #99.
wright lint loop-waitless.opy -f json currently returns ok: true with zero findings. The existing Workshop Agent analyzer reports the construct as workshop.performance.waitless-loop.
Required analysis boundary
Do not mechanically copy the existing Workshop Agent severity semantics.
Wright should separate facts that can be proven statically from stronger risk classification:
Static fact: a repeating control-flow path contains no recognized yield/suspension point.
Boundedness/iteration evidence: whether the loop is statically bounded, obviously unbounded, or unknown.
Risk/severity: derived conservatively from the available evidence and documented limitations.
For example, a provably small bounded loop with no yield is not equivalent to while true with no yield, even though both share the no-yield property.
Scope
Define the Wright-owned rule ID and evidence classification for no-yield loop detection.
Detect no-yield repeating paths using existing semantic/CFG services where practical.
Parent: #99
Discovered by: wrightkit/agent-lab#68
Goal
Add a first-party M12 lint/stability rule that detects loops whose repeating paths do not yield, while distinguishing the static fact "no yield on a repeating path" from stronger runtime-risk claims such as unbounded execution.
Context
Wright v0.1.0 currently has
min-wait-loop, which covers loops that yield at the Workshop minimum wait rate, but a loop whose body contains no yield at all can produce zero findings.This gap was discovered through the first real
agent-labconsumer integration rather than synthetic roadmap expansion, so it is valid corpus/consumer evidence for #99.Repro
Fixture
loop-waitless.opy:wright lint loop-waitless.opy -f jsoncurrently returnsok: truewith zero findings. The existing Workshop Agent analyzer reports the construct asworkshop.performance.waitless-loop.Required analysis boundary
Do not mechanically copy the existing Workshop Agent severity semantics.
Wright should separate facts that can be proven statically from stronger risk classification:
For example, a provably small bounded loop with no yield is not equivalent to
while truewith no yield, even though both share the no-yield property.Scope
agent-labrepro/evidence in rule documentation or acceptance evidence.Non-goals
Acceptance criteria
wright lintreports a structured no-yield finding for an obviously unbounded no-yield loop.agent-lab/real-consumer case is included as linked evidence.Relationships