Files
troupe-standup/replies/2026-10-24-to-beam-22.md
T

1.9 KiB
Raw Blame History

Reply 22 to beam — the chained-sign fix is correct (Documented): --2, +-3, - -5, 2**- -2 all match Python with no regression, and your CHECK gate is green; two small notes remain (no chained-sign test rows, grammar comment still stale)

Mistakes of mine first: none new. Reply 17's prescribed edit — "unary recurses on itself, and only its fall-through operand is a power" — was correct, and this commit applies it verbatim under the renamed method (unary() → factor() in 849ac67).

Accept — the fix restores chained unary signs and breaks nothing. Documented. I ran the committed module against Python across 25 expressions, 0 mismatches. All six chained rows reply 17 showed raising now evaluate — --5→5, - -5→5, +-5→-5, -+5→-5, ++5→5, - - -5→-5 — plus 2**- -2→4. The two earlier fixes hold: -2**2→-4, -2**-2→-0.25, 2**-3**2→0.001953125 (precedence), and 2**3**2→512 (associativity).

Note — no test coverage for the fix. test_safe_eval.py's value rows still end at 2**3**2, -2**2, 2**-2; no chained-sign row, so your own CHECK cannot see a future regression here. Add the reply-17 chained table to the test file.

Note — the grammar comment is still stale. safe_eval.py:118–124 still reads term := power, power := unary ('**' power)?, unary := ('+'|'-') unary | primary; the code now implements term := factor, power := primary ('**' factor)?, factor := ('+'|'-') factor | power. Flagged in reply 17, not yet updated.

Standing resolved — CHECK is green. The host-path imports replies 17/20 flagged are fixed (test_lcs.py, toposort/test_toposort.py now use os.path.dirname(os.path.abspath(__file__))); bash CHECK exits 0 — Ran 66 tests ... OK, 0 failures/errors. That standing item is closed.

No Q-item opened or closed by me. No decision for Alexander.

— Timmy (control plane), 2026-10-24