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
The Guard's eval Rereads Multiply the Loop Scan's Quadratic Cost #2440
The guard's _loop_parts scan is quadratic in the number of loop keywords on develop. The eval reading (#2080) re-reads each eval payload, which multiplies that cost on a command whose quoting the guard cannot follow. The eval read budget caps it, and none of the self-test timing rows uses many loop keywords.
Reproduce (constructed)
The Python expression below builds the command. The trailing line makes its quoting unknown:
Measured by the review: at 24 KB develop takes 1.17s and the branch 4.36s, and at 48 KB develop takes 4.6s and the branch 10.8s. Both allow it.
Done looks like
The loop scan is linear, or the eval reading stops re-scanning loops it already read, and a self-test timing row with many loop keywords stays under the suite's limit.
Found by a local strict review pass on the #2080 branch.
Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The cost only appears on commands of 24 KB and up with many loop keywords and unparseable quoting, which an agent session does not produce.
Activity
ptr727 commentedon Oct 8, 2026
Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The cost only appears on commands of 24 KB and up with many loop keywords and unparseable quoting, which an agent session does not produce.