Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Merge branch 'fix/tui-pty-harness' into ui/tui-fold-headers

Rach Pradhan23d7a6f10b17
diff --cc scripts/eval-tier1.sh
index 20c06bf6,8da013ab..efbf32c1
--- a/scripts/eval-tier1.sh
+++ b/scripts/eval-tier1.sh
@@@ -242,49 -243,13 +243,56 @@@ if wanted tuiguard; the
if python3 scripts/test-tui-typed-events.py zig-out/bin/graff; then :; else
record_fail tuiguard
fi
+ # The frame painter may never show anything but the current frame. Storms
+ # the window size, fills the screen with glyphs terminals measure
+ # differently from us, then reads the SCREEN back and compares it cell for
+ # cell against a forced full repaint of the same frame.
+ if python3 scripts/test-tui-painter.py zig-out/bin/graff; then :; else
+ record_fail tuiguard
+ fi
+ # Scrolling is a viewport SLICE of one cached layout, not a re-layout
+ # (TUI/layout_cache.zig). Reads the screen back on every scroll step and
+ # after every width change: the markers on screen must be a contiguous
+ # ascending run, which a stale block or a mis-offset slice cannot fake.
+ if python3 scripts/test-tui-layout-cache.py zig-out/bin/graff; then :; else
+ record_fail tuiguard
+ fi
+ # The viewport must not jump when the terminal changes width: drives
+ # TIOCSWINSZ across five widths mid-scroll and reads the screen back. With
+ # the logical scroll anchor removed the marker leaves the screen on the
+ # FIRST width change, so this is a real gate, not a smoke test.
+ if python3 scripts/test-tui-resize-anchor.py zig-out/bin/graff; then :; else
+ record_fail tuiguard
+ fi
+ # grok-build's one-column rule for ANIMATED chrome: watches the live blink
+ # on a background op's pending row and fails if the label beside it moves a
+ # column, or if a frame is not East-Asian-Narrow. TUI/glyphs.zig holds the
+ # same law for the frame sets; this is the pixels.
+ if python3 scripts/test-tui-chrome-width.py zig-out/bin/graff; then :; else
+ record_fail tuiguard
+ fi
+ # A wheel notch must be a scroll region + SU, not a screen rewrite — and a
+ # storm of them must still leave the screen equal to a forced full repaint.
+ # With the hint refused the probe fails on the FIRST notch (verified), so
+ # this is a gate on both halves, not a smoke test.
+ if python3 scripts/test-tui-scroll-paint.py zig-out/bin/graff; then :; else
+ record_fail tuiguard
+ fi
+ # Trackpad momentum must be COALESCED and BUDGETED, not queued. Drives 500
+ # SGR wheel reports twice — all at once, then spread over ~1s the way
+ # momentum really arrives — and reads the loop's own paint counters back.
+ # With the frame budget removed the paced storm paints 503 times instead of
+ # ~105, so this is a real gate, not a smoke test.
+ if python3 scripts/test-tui-event-pacing.py zig-out/bin/graff; then :; else
+ record_fail tuiguard
+ fi
+ # Same invariants, read off a VIRTUAL SCREEN instead of raw bytes
+ # (scripts/ptyharness.py): the VT interpreter's own selftest, the ported
+ # mode-balance check, and out-of-band screen corruption fed straight to the
- # tty. The self-heal assertion is expected-fail until fix/tui-painter lands.
++ # tty.
+ if python3 scripts/test-tui-screenstate.py zig-out/bin/graff; then :; else
+ record_fail tuiguard
+ fi
fi
fi