Skip to content

Add a FIRE test for captured output and job exit in Lua #150

Done

Description

@tony

Summary

A caller can launch two jobs, read the same final pane from both, and still need to report different output and exit statuses. Add a FIRE test (Fidelity, Isolation, Recovery, Evidence) that exercises the Lua port's public API on an isolated tmux server.

Motivation

On Linux arm64 with native tmux 3.4, two jobs wrote progress A or progress B, then carriage return, erase-to-end-of-line and done. Both full plain captures matched. A pane-output sink saw the distinct prefixes while the children were alive. Their retained exit statuses were 0 and 7. The public reference case describes the observations. Build on the port's pane text wait integration tests.

Proposal

  1. Target two controlled children through the public API on a fixture-owned server. Give each a unique input token and have it acknowledge the token through an independent channel. Let the visible-text wait succeed on both jobs and check that the exit expectation still distinguishes them.
  2. Check the screen row, the output interval the API promises and the exit result separately. Name each observer and its target. A native tap supplies a reference for an output claim. Mark unavailable required evidence indeterminate.
  3. Substitute 0 for job B's reported 7. The exit assertion must fail even though the screen assertion still passes. Keep the replay inputs, expected and actual values, and the result of cleanup. Run this case in the port's native suite with libvt absent.

Verified witness

The witness passed on tmux 3.3a, 3.4 and 3.8. Its negative control caught the incorrect second exit status after the screen comparisons passed in Lua and Neovim. Witness PR · Original test results

Activity

  1. tony commented on Dec 5, 2026

    @tony
    ContributorAuthor

    The job-result concept has a runnable pair of syntax checks that both print done but exit 0 and 23. Its test runs each command outside tmux for comparison, then gets the result after the tmux pane has closed. This exercises the exit comparison in this issue. A check of the complete output interval still needs an independent stream witness. Test cases

  2. added
    p2
    area:tmuxtest
    topic:test-reliability
    on Dec 5, 2026
  3. tony commented on Dec 5, 2026

    @tony
    ContributorAuthor

    Both jobs acknowledged different input tokens, and the Lua text wait found done in each pane. The two complete screen captures matched byte for byte. A second tmux control client recorded different progress output, and the children recorded exit 0 and 7. Substituting 0 for the second result failed on both Lua and Neovim after the screen and output comparisons had passed. The regression passed on tmux 3.3a, 3.4 and 3.8.

    Pull request #208.

  4. added
    lua
    enhancement
    on Dec 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tmuxtestenhancementluap2topic:test-reliability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions