Skip to content

[Bug] Linux desktop cleanup test misses detached-child SIGTERM marker in CI #10366

Closed

Description

@kaoru0822-kitauji

Before submitting

  • I searched open and closed issues and related PRs.
  • I removed credentials and sensitive target data.

Area

Other: Linux CI test reliability / process lifecycle.

Observed behavior

Source tests in PR #10362 failed in DesktopApplicationCapture.test.ts → asks the process group and token carriers outside it to exit before killing them. The preceding assertion accepted session.cleanup = { verified: true, reason: null }; the next assertion found group-term but no setsid-term marker. One test failed while 29,285 passed and 19 skipped.

Reproduction

Observed GitHub Actions execution: npm run test:fast -- --reporter=default --reporter=blob, checkout cdf3f104a8617b4a1f38437d9229de7db3b78239 (PR head fc2a092a07541275e869302f1b80d3215fd4ff1a, base bbe2bcc979be747698d9ad9ce87af017b92e0f10). The failure was inspected from the completed job log; no local Linux reproduction has completed. One unchanged-head Source tests retry passed, giving one failure and one success at the same revision. This establishes intermittence, not its cause; broader frequency is NOT_ENOUGH_INFO.

Proposed focused reproduction: npm run test:local -- src/application/desktop/DesktopApplicationCapture.test.ts on Linux. This command is proposed, not reported as executed locally.

Expected behavior

The lifecycle test should establish that its process-group child and detached token carrier are ready, then verify graceful termination without depending on scheduling. Retain both SIGTERM-marker assertions and the verified cleanup assertion; do not weaken coverage or add blanket retries.

Impact and scope

Observed: one required Source tests job failed. The tested PR only changes a JavaScript bundler collector and adds built-project regressions; the failing fixture and termination implementation are identical to base. That source comparison does not establish the cause. No real desktop application failure or leaked process is established by the missing marker.

REA version

Source revisions above; package version 6.9.0.

Runtime and platform

GitHub-hosted Ubuntu 26.04, Node 24.22.1. The job's setup output reports npm 11.19.1.

Target and artifact context

The test's synthetic shell application, one same-group child and one setsid sh child; no external application or browser.

Interface

Other: source test suite.

Earliest failure stage

Cleanup, cancellation, or lifecycle.

Relevant output or evidence

Expected: ArrayContaining ["group-term", "setsid-term"]
Received: ["bin", "group-term", "home", "out"]
DesktopApplicationCapture.test.ts:678

The job log records the exact failed assertion and test totals. The fixture installs shell TERM traps; its first case waits 1.5 seconds after a state-file write, while the companion failure-path case does not wait for explicit child readiness. Production termination selects observed token carriers and then waits up to five seconds. These are source observations, not a diagnosis.

Analysis or suspected cause

NOT_ENOUGH_INFO: handler readiness, observed carrier coverage, signal delivery, and marker-write timing have not been separated. Readiness or sampling timing is a hypothesis. Investigate at the producing fixture/ownership boundary before changing production cleanup or test expectations. A successful retry would establish intermittence, not correctness or a root-cause fix.

Activity

  1. added
    bug
    triage
    on Nov 13, 2026
  2. kaoru0822-kitauji commented on Nov 13, 2026

    @kaoru0822-kitauji
    CollaboratorAuthor

    The single unchanged-head retry of Source tests passed. This gives one failure and one success at the same tested revision, establishing intermittence without identifying its cause. No lifecycle implementation, fixture assertion, workflow retry policy or readiness requirement was changed. The original failed job remains linked above. Local Linux reproduction is still unavailable; no root-cause fix is claimed.

  3. kaoru0822-kitauji commented on Nov 13, 2026

    @kaoru0822-kitauji
    CollaboratorAuthor

    Working on fixture readiness in session c7-01a1d00b, branch test/10366-desktop-child-readiness-c7-01a1d00b. I will replace the process-family fixture's state-write/elapsed-time readiness guess with acknowledgments emitted after each child's TERM handler is installed, covering successful and failed sessions. Both termination-marker assertions and verified cleanup remain. I will test a delayed handler explicitly; this does not yet establish the cause of the original intermittent CI failure. Production termination and ownership rules are outside this scope.

  4. kaoru0822-kitauji commented on Nov 13, 2026

    @kaoru0822-kitauji
    CollaboratorAuthor

    Ready-for-review #10383 replaces the fixture's readiness guesses with post-handler acknowledgments, including a controlled startup barrier in both successful and failed sessions. Hosted Linux source tests at PR head f606963dd passed: both affected cases executed (1,993 ms / 2,009 ms), preserving both TERM markers, verified cleanup and failed-session content removal; all 32 capture-file tests passed. Full source lane: 29,346 passed / 21 skipped. Remaining portable CI is pending. This verifies the structural fixture correction, not the cause/frequency of the original natural intermittent failure; production termination is unchanged.

  5. added 3 commits that reference this issue on Nov 14, 2026
    393bf9a
    d4a4fd3
    6e1387a
  6. added a commit that references this issue on Nov 14, 2026
    97c7582
  7. added
    area: tests
    on Nov 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

    area: testsbugtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions