A cleanup script rollout exits zero on every device host and leaves the browser profile dirty
The scenario
CI ships a new cleanup script to every Linux device host. The script exits zero. The next Selenium session still finds the previous customer's cookies and extensions.
Model answer
What I'd say first:
I would halt that rollout and quarantine hosts that already ran it. The real problem is a cleanup script that reports success without wiping the browser profile.
How I'd work it:
- 1Stop the pipeline and stop the hub from booking browsers that this build already cleaned.
- 2Confirm the script's exit code is zero and that a fixture profile still has cookies, an extension, or a signed-in account afterward.
- 3Roll back to the last script that passes the fixture, then re-run the fixture on a canary host before any wider push.
- 4Tell the room exit zero was the bug, the fleet is not clean, and we will not resume booking until the post-check passes.
How I'd explain it:
The pipeline asked the script if it finished, not if the profile was empty. A script can delete the wrong directory, skip a new Chrome path, and still exit zero. The next customer inherits whatever was left. A wrong answer sounds like a green build means the fleet is clean. The build never opened the profile.
How I'd prevent it:
The release gate is a fixture session: sign in, run cleanup, assert no accounts, no cookies, no extra extensions. Exit code can be logged. It cannot promote the script. The rollout is canary-first, one host, then a lab, and a failed fixture quarantines that host.
The follow-up they'll ask
“The script exited zero, so the fleet is clean?”
No. Exit zero means the process ended, not that the profile is empty. This build left cookies and the pipeline applauded. I would halt the rollout, quarantine hosts that ran it, and promote only a script that passes a fixture account check. The right move is to test the disk, not the status code. A green build that never opens Chrome will ship the next leak. The fleet is dirty until the fixture says otherwise.
Common mistakes
- Promote on exit code
- Roll the script to every host at once
- Skip a signed-in fixture