Skip to content

Bound release-test child lifetime when CI polling never completes #737

Closed

Description

@JacobStephens2

This was generated by AI during triage.

Historical observation

During the 2026-10-16 triage session, two scripts/release.sh 0.2.0 processes from a release-test worktree were found polling a fake gh after approximately 17 days. They were ended at the maintainer's direction. This report records that historical observation; no current reproduction was performed and the original processes are no longer available for inspection.

Current code and scope

In tests/release.rs, Release::command sets RELEASE_POLL_SECONDS=0. with_input spawns the release command and calls wait_with_output() without a test-level deadline or an owned child cleanup guard. Some script-function tests use Command::output() directly.

In scripts/release.sh, wait_for_workflow_runs waits until workflow runs are present and all completed. wait_for_release also waits for a run to appear and finish. The script header explicitly documents no overall timeout and resume-by-rerunning behavior. Indefinite production waiting is therefore an existing contract, not by itself proof of a production bug.

The observed surviving processes are consistent with missing test-child lifetime enforcement when a fixture never reaches a completed CI state or its harness dies. The original harness termination event and exact fake response have not been independently established.

Requested outcome

Build a focused fake-gh fixture for runs that remain missing or pending, and prove release tests fail within a bounded time with useful captured diagnostics. Ensure the script and its fixture-owned descendants cannot continue polling after that test ends or its harness is terminated. Cover normal exit, a test timeout, assertion unwinding, and abrupt fixture-harness death separately.

Keep cleanup scoped to the test's owned processes. Preserve production release resumption and the documented no-overall-timeout behavior unless the maintainer separately chooses a production timeout policy. Verify that a genuine failed CI run still exits with the PR left unmerged and untagged.

Related issues

Activity

  1. added
    bug
    needs-triage
    on Oct 17, 2026
  2. JacobStephens2 commented on Oct 21, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: A release test's script process never outlives its test

    Current behavior:
    The release tests run the release script against a fake gh, with the poll interval set to 0 seconds. The helper that feeds the script its input waits for it with no deadline. Nothing ends the script or its children if the test times out, panics, or its process dies.

    The release script deliberately has no overall timeout. It polls until the CI runs it waits for exist and have finished, and running it again resumes. So a fixture that never reports finished CI leaves the script polling in a tight loop for as long as the machine runs. On 2026-10-16, two release-script processes from a release-test worktree were found still polling a fake gh, about 17 days after their test. What orphaned them is unknown.

    Desired behavior:
    Every release test bounds the script it starts. A test whose fake CI never finishes fails within a bounded time, with the script's captured stdout and stderr in the failure. When a test ends, by passing, failing, timing out or panicking, the script and every process it started end too. So do they when the test process itself is killed. Production release behavior is unchanged: no overall timeout, and resuming by running the script again.

    Key interfaces:

    Acceptance criteria:

    • A fake-gh fixture whose workflow runs stay missing, and one whose runs stay pending, each make the test fail within a stated bound, with the script's output in the failure.
    • After a normal pass, a failed assertion, a timeout and a SIGKILL of the test process, no release-script process or descendant started by that test remains. A test that runs the fixture in a child process and kills it shows the last case.
    • A genuinely failed CI run still ends the script with the release PR unmerged and no tag pushed.
    • Existing release tests pass, and outside tests the script still has no overall timeout.

    Out of scope:

  3. added
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 21, 2026
  4. removed
    in-progress
    on Oct 22, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions