3d8157de7ba1d2e846856deda743e0aae39b0dda
braney
  Tue Aug 25 16:31:36 2026 -0700
docent: use the shared Playwright install instead of a private ~/pwrec tree, refs #38188

PW_ENV in docent.mk and in the tests makefile named $(HOME)/pwrec, a tree that
only existed in one home directory, so nobody else could run docent or its
tests without setting the variable by hand. Both now default to
/hive/groups/browser/uiTest/pw, one pinned copy of playwright, chromium,
ffmpeg and js-yaml shared by every browser-driving test in the tree. A new
PW_DIR variable still points either makefile at a private install.

Nothing in docent.js changes except two comment lines. All nine docent tests
and all three derivation baselines pass against the shared pin.

diff --git src/hg/utils/docent/docent.mk src/hg/utils/docent/docent.mk
index 8775d3ec6f7..d7be259d845 100644
--- src/hg/utils/docent/docent.mk
+++ src/hg/utils/docent/docent.mk
@@ -18,32 +18,35 @@
 #     make FAST=1 BP1 # figures only, no video -- roughly a third of the wall clock
 #     make -j6        # scenarios in parallel (each run gets its own browser + cart)
 #     make list       # list the base names discovered
 #     make clean      # remove generated mp4s and stills/
 #
 # Override before the include: FIGDIR (where mp4s land, default ..), PW_ENV (the
 # Playwright runtime), SCRIPTS/BASES (to build an explicit subset).
 
 DOCENT  ?= $(HOME)/kent/src/hg/utils/docent/docent.js
 SCRIPTS ?= $(wildcard *.docent.yaml)
 BASES   ?= $(SCRIPTS:.docent.yaml=)
 FIGDIR  ?= ..
 MP4S    := $(addprefix $(FIGDIR)/,$(addsuffix .mp4,$(BASES)))
 
 # Shared Playwright/Chromium install. Anywhere you have playwright + js-yaml works;
-# at UCSC this is the ~/pwrec tree.
-PW_ENV  ?= PLAYWRIGHT_BROWSERS_PATH=$(HOME)/pwrec/browsers NODE_PATH=$(HOME)/pwrec/node_modules
+# at UCSC this is /hive/groups/browser/uiTest/pw, one pinned copy for every
+# browser-driving test in the tree (see its README.md for the pin). Override
+# PW_ENV to point at a private install.
+PW_DIR  ?= /hive/groups/browser/uiTest/pw
+PW_ENV  ?= PLAYWRIGHT_BROWSERS_PATH=$(PW_DIR)/browsers NODE_PATH=$(PW_DIR)/node_modules
 
 # FAST=1 -> figures only: no dwells, no cursor animation, no screen recording, no mp4.
 # Same stills, about a third of the wall clock. Use it while iterating on figure content;
 # drop it for the final build that has to produce the videos.
 FAST_ENV = $(if $(FAST),DOCENT_FAST=1 ,)
 
 .PHONY: all list clean hires $(BASES)
 
 all: $(MP4S)
 
 $(FIGDIR)/%.mp4: %.docent.yaml $(DOCENT)
 	$(FAST_ENV)$(PW_ENV) node $(DOCENT) $<
 
 # hires: the same tours rendered for print -- SCALE times the pixels (a wider server image
 # drawn with a bigger track font, the HTML zoomed to match), stills only, written to their