Repository navigation
fix(mecatui): kitty mascot never rendered on Ghostty — downscale before transmit + spec-level verifier - #165
Merged
Conversation
…le before transmit + spec-level verifier
Same class of staticcheck SA5011 failure as #185: a t.Fatalf nil-check without a trailing return makes staticcheck flag the next line as a possible nil pointer dereference. Adds the missing return after each t.Fatal in the three engine-module test files CI flagged. - engine/adapter/eventsource/review_test.go (result nil-check) - engine/adapter/sessnap/sessnap_test.go (restoredCall nil-check) - engine/agent/childregistry_internal_test.go (registry entry nil-check)
JAORMX
force-pushed
the
fix/mecatui-kitty-mascot-ghostty-render
branch
from
June 25, 2026 06:39
02625eb to
40539e3
Compare
The #174 docs split created 11 docs/usage/*.md leaf files that had inbound links from the usage.md landing page's TOC but no outbound links onward — each was a 'dead-end' under matlatl's graduated-structure check. mecatl's .matlatl.yml promotes dead-ends from Info to Warning, and the CI docs gate runs --strict, so warnings fail the build. Adds a short 'See also' cross-link block to the tail of each dead-end file, linking to a natural sibling and back to the operator-guide index. This is the minimal fix: one outbound link clears the finding per file. Regenerates llms.txt (task docs:llms) for the changed markdown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The welcome-splash kitty mascot (the mecatito dog, issue #44) painted nothing on Ghostty. The previous fix (
a=t→a=T, commit1282545) was necessary but not sufficient:TransmitMascotsent the full 1254×1254 PNG (~1 MB across ~265 base64 chunks) even though it displays at ~60×30 cells. Two things compound:a=T/U=1/U+10EEEE virtual-placement pattern mecatl uses is known-buggy on Ghostty 1.3.1 stable (ghostty-org/ghostty#13056): a large multi-chunk transmit renders at only a fraction of its intended width, fixed only on Ghostty tip.q=2(response suppression) on every chunk, a dropped/malformed chunk in that huge payload paints nothing — silent failure, no error surfaces.The fix
Downscale before transmit.
downscaleMascotbox-downscales the mascot to the targetcols×rowscell footprint before PNG re-encoding, reusing the same alpha-weighted box-average the half-block path uses (buildGrid), so the two renders sample the dog identically and the terminal does no pixel scaling.Payload: ~1 MB (265 chunks) → ~4.3 KB (1 chunk) — a 246× reduction, sidestepping the worst of the Ghostty virtual-placement bug.
The reliability layer
The existing tests only checked the control-key strings (
a=T,U=1,c=,r=,i=,f=100) — none ever proved the bytes a terminal actually consumes are self-consistent. That is exactly the class issue #44'sa=tbug slipped past: the control keys parsed fine,f=100claimed PNG, yet a terminal painted nothing.TestTransmitAndPlaceholderAgreeis a spec-level verifier that reassembles the escape the way a terminal does and asserts the full render contract against the real image bytes:cols × rows*2)i=matches the ID encoded in thePlaceholderGrid's foreground SGR color (the precise contract that broke undera=t— a mismatch means the grid references an image the terminal never placed)c=×r=Mutation-verified — breaking the downscale, the transmit ID, or the grid ID each turns the verifier red with a precise message; restoring turns it green.
TestTransmitMascotPayloadBounded(≤100 KB ceiling) pins the downscale-before-transmit so a regression to the ~1 MB multi-chunk transmit fails CI.Test plan
task lintgreentask testgreen (full suite, race, engine-standalone, api-compat)task docs:checkgreen (0 broken links/anchors)go run ./cmd/mecademoprints a full offline session unchangedCloses #44 (for real this time).
🤖 This PR was authored by mecatl.