Add a per-user opt-in flag for Rspack production assets

What does this MR do and why?

rspack_production_assets controls the production rollout of Rspack-built frontend assets. It's checked against a random per-request actor rather than the current user, so --user=<handle> has no effect on it and nobody can try Rspack assets in production on their own. Checking the rollout flag against the current user as well would skew its percentages for signed-in users.

This MR adds a second flag, rspack_production_assets_opt_in, checked against the current user and meant to be enabled only with --user. The rollout flag keeps its request actor, so its percentages still mean what they say.

How to set up and validate locally

The flag only applies in production, so it can't be tried end to end on GDK. Locally, run spec/helpers/webpack_helper_spec.rb.

After deploy, opt yourself in and check that pages load manifest.rspack.json assets:

/chatops gitlab run feature set rspack_production_assets_opt_in true --user=<handle>

Related to #631217

🤖 Generated with Claude Code

Edited by Stanislav Lashmanov

Merge request reports

Loading
Loading