Commit Graph

2 Commits (dev)

Author SHA1 Message Date
mula.liu 937d955937 Record what the Windows box proved, and keep the proof repeatable
`win-tui-capture.sh` drives the real binary over `ssh -tt`, which is the only
way to render the TUI the way a Windows console does: sshd allocates a
pseudoconsole, crossterm takes its Windows backend, and the bytes it emits are
decoded back into a frame locally. The existing smoke script cannot do this
because it forks its own pty, which is POSIX-only.

It now takes a key sequence, so the interesting case — a populated list, not an
empty panel — is the one that gets checked, and it keeps the fullest frame
rather than the last one, because quitting wipes the screen. It reports where a
replacement character appeared, since mid-stream means the console could not
draw the glyph and at the tail only means ssh truncated a frame on disconnect.

`win-hwcheck.ps1` measures the volume before and after a real deletion, counts
entries in the shell's Recycle Bin, and asserts the two agree; that is what
caught the missing undo flag. Its fixtures clean themselves up.

Windows moves from "cross-compile only" to verified on real hardware in the
roadmap. UAC elevation, the long-path manifest, and publishing stay pending.
2026-10-15 18:55:01 +08:00
mula.liu 7584811e91 Measure what NTFS actually allocated, and unbreak the /Applications test
Real Windows 10 hardware turned up two failures the macOS and cross-compile
checks could not see:

- squid-core::fs reported every file's logical length as its allocated size,
  because `allocated_bytes` returned 0 on non-Unix and `on_disk()` then fell
  back to logical. NTFS only answers the allocation question through a handle,
  so ask `GetFileInformationByHandleEx(FileStandardInfo)` for files big enough
  to distort a total. Files below the cutoff keep counting as their length,
  which is also what keeps MFT-resident entries — they report an allocation of
  0 — from shrinking a cache cleanup down to nothing.
- the "a plain user can still uninstall into /Applications" safety test hard
  coded a Unix path, so on Windows it asserted that a folder the policy never
  looked at was refused. The fixture now comes from the policy's own shared
  install folder, `/Applications` on Unix and the machine-wide program-data
  folders on Windows.

Also added:

- `a_written_file_reports_what_the_volume_gave_it`, the cross-platform
  invariant the missing backend silently violated.
- the sparse-file test now marks its file sparse via `fsutil` on Windows and
  skips when the volume will not cooperate, instead of pretending a hole
  exists.
- `scripts/win-sync.sh`, `scripts/win-check.ps1` and `scripts/win-hwcheck.ps1`
  for iterating against a LAN Windows host over SSH without git credentials.
2026-10-15 16:43:41 +08:00