Check the host session against the cases the Go and Rust fzt share (FZT2-10) #175

Merged
merge-queue merged 5 commits from FZT2-10-shared-cases into main 2026-12-01 01:49:51 -08:00
Owner

fzt now exists in Rust too (fzt v0.2.124's rust/), for tuimail, spotify-player and fisch's coach to build in instead of loading fzt.dll, and the two are held identical by shared cases in fzt's testdata/host. This PR is the Go side of that: it writes the cases and checks this repository's host session against them.

Added

  • host/suite_test.go. TestSharedCases replays every case in the fzt version go.mod requires (47 written, 120 random) and fails when a frame differs from the recorded one (a hash of the JSON fztlib writes). FZT_SUITE_RECORD=<fzt checkout> records them again after a change, FZT_SUITE_FUZZ/FZT_SUITE_OUT write fresh random cases for the Rust side to replay, and FZT_SUITE_DUMP=<case> prints a case's frames.
  • The written cases cover search and picks, folders, Escape and Backspace unwinding, normal mode and h j k l, Tab completion and stepping, Shift+Enter, ancestor matching, the hyphen/space rule, the : palette and host commands, tag mode, checklists, prompts, the / pop-up, scrolling and resizing, empty and broken menus, unknown keys, yaml.v3's spellings and Unicode.
  • CLAUDE.md: a change here to what a frame holds, how keys act, the palette (fzt-frontend) or tui's scrolling changes the Rust fzt too, and how to record.
  • go.mod: fzt v0.2.124 (the first with the cases); gopkg.in/yaml.v3 becomes a direct requirement (the random menus are written with it).

Left alone: the host session, fztlib and everything else; only tests and docs change.

Checked: the check passes against v0.2.124's cases; the Rust crate passes the same cases in fzt's CI.

Work package: https://openproject.home.romaine.life/wp/FZT2-10

🤖 Generated with Claude Code

fzt now exists in Rust too (fzt v0.2.124's `rust/`), for tuimail, spotify-player and fisch's coach to build in instead of loading fzt.dll, and the two are held identical by shared cases in fzt's `testdata/host`. This PR is the Go side of that: it writes the cases and checks this repository's host session against them. **Added** - `host/suite_test.go`. `TestSharedCases` replays every case in the fzt version `go.mod` requires (47 written, 120 random) and fails when a frame differs from the recorded one (a hash of the JSON fztlib writes). `FZT_SUITE_RECORD=<fzt checkout>` records them again after a change, `FZT_SUITE_FUZZ`/`FZT_SUITE_OUT` write fresh random cases for the Rust side to replay, and `FZT_SUITE_DUMP=<case>` prints a case's frames. - The written cases cover search and picks, folders, Escape and Backspace unwinding, normal mode and h j k l, Tab completion and stepping, Shift+Enter, ancestor matching, the hyphen/space rule, the `:` palette and host commands, tag mode, checklists, prompts, the `/` pop-up, scrolling and resizing, empty and broken menus, unknown keys, yaml.v3's spellings and Unicode. - `CLAUDE.md`: a change here to what a frame holds, how keys act, the palette (fzt-frontend) or `tui`'s scrolling changes the Rust fzt too, and how to record. - `go.mod`: fzt v0.2.124 (the first with the cases); `gopkg.in/yaml.v3` becomes a direct requirement (the random menus are written with it). **Left alone**: the host session, fztlib and everything else; only tests and docs change. **Checked**: the check passes against v0.2.124's cases; the Rust crate passes the same cases in fzt's CI. Work package: https://openproject.home.romaine.life/wp/FZT2-10 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Take fzt v0.2.124, which holds the shared cases
Some checks failed
Suite release / module (pull_request) Has been skipped
Suite release / deliver (pull_request) Has been skipped
Suite default / check-rules (pull_request) Successful in 18s
merge-queue / group testing it with the 9 modules that use it
Suite go / check-test-linux (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite release / build (go, windows-amd64-c-shared) (, go-windows-amd64-c-shared, false, windows-latest, windows-amd64-c-shared, go) (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
merge-queue merging in main, settling go.mod and go.sum
Suite default / scope (pull_request) Successful in 11s
Suite default / check-fetches (pull_request) Has been skipped
Suite release / reserve (pull_request) Has been skipped
Suite go / scope (pull_request) Successful in 14s
Suite release / scope (pull_request) Successful in 17s
Suite release / build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite default / check-logs (pull_request) Successful in 18s
Suite default / reused-checks (pull_request) Has been cancelled
Suite release / deliver-prune (pull_request) Has been skipped
Suite release / check-manifest (pull_request) Has been skipped
Suite go / check-format (pull_request) Has been cancelled
Suite go / check-test-windows (pull_request) Has been cancelled
Suite go / reused-checks (pull_request) Has been cancelled
Suite release / check-package (pull_request) Has been cancelled
Suite release / reused-checks (pull_request) Has been cancelled
Suite release / check-build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Has been cancelled
Suite release / check-build (go, windows-amd64-c-shared) (, go-windows-amd64-c-shared, false, windows-latest, windows-amd64-c-shared, go) (pull_request) Has been cancelled
cca8677047
Merge remote-tracking branch 'origin/main' into merge-up
All checks were successful
Suite default / scope (pull_request) Successful in 16s
Suite default / check-fetches (pull_request) Has been skipped
Suite go / scope (pull_request) Successful in 15s
Suite go / check-test-linux (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite release / scope (pull_request) Successful in 18s
Suite release / module (pull_request) Has been skipped
Suite release / reserve (pull_request) Has been skipped
Suite release / check-manifest (pull_request) Has been skipped
Suite release / build (go, windows-amd64-c-shared) (, go-windows-amd64-c-shared, false, windows-latest, windows-amd64-c-shared, go) (pull_request) Has been skipped
Suite release / build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite release / deliver (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite default / check-logs (pull_request) Successful in 15s
Suite release / deliver-prune (pull_request) Has been skipped
Suite default / check-rules (pull_request) Successful in 17s
Suite go / check-format (pull_request) Successful in 21s
Suite default / reused-checks (pull_request) Successful in 18s
Suite release / check-build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Successful in 32s
Suite go / check-test-windows (pull_request) Successful in 2m40s
Suite go / reused-checks (pull_request) Successful in 5s
merge-queue / group passed with the 9 modules that use it
Suite release / check-build (go, windows-amd64-c-shared) (, go-windows-amd64-c-shared, false, windows-latest, windows-amd64-c-shared, go) (pull_request) Successful in 1m53s
Suite release / check-package (pull_request) Successful in 17s
Suite release / reused-checks (pull_request) Successful in 11s
merge-queue landed on main
8ea865ea83
# Conflicts:
#	go.mod
#	go.sum
merge-queue deleted branch FZT2-10-shared-cases 2026-12-01 01:49:51 -08:00
Sign in to join this conversation.
No description provided.