web-cli: cache-session test fails intermittently and reddens unrelated pull requests

Open
#599 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, node.js
Domain
cli, testing-qa

Research direction

Start with test/cache-session.test.mjs around lines 95-111, where the test checks isAlive(second.pid) right after closing the second session. Then read the session close path in plugins/web to see whether close resolves before the browser process exits. The race has not been reproduced yet, so first try running the test in a loop to trigger it. Done means the test passes reliably across repeated runs without changing what it asserts.

Written by the indexing model from the issue text.

Description

bug

web-cli-browser fails now and then on pull requests that don't touch plugins/web, always in the same test:

test at test/cache-session.test.mjs:95:1
✖ session cache records pages and replays shared assets (34156ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  true !== false
      at cache-session.test.mjs:111:10

Where it showed up

  • Three of eight pull requests opened today, none of which change the CLI: #590 (docs), #592 (Renovate config), #595 (a run-workflow skill). The other five passed on the same base.
  • Two of the last eight runs on main: 43192652569 and 42823333429.
  • Nine of the open pull requests had a failed web-cli-browser when I looked this morning.

Why it matters

It marks unrelated pull requests red, and once checks are required or Renovate merges on green (#592), it blocks them.

I have not found the cause. Line 111 is assert.equal(isAlive(second.pid), false): the process of the second session is still alive when the test checks it right after the close. That looks like a race between close returning and the process exiting, but I have not reproduced it locally.

Dominant language
JavaScript
Stars
324
Forks
99
Avg merge
2d 7h
Merged PRs (30d)
121

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from adobe/skills

All issues in adobe/skills

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.