//! Forward fence, the frontend-globals ratchet. //! //! The legacy `static/*.js` files register behavior as `window. = fn` //! globals (the pre-module `data-action` dispatcher pattern). The frontend //! restructure (`_private/docs/mnw/frontend/`) migrates these into typed ES //! modules under `frontend/src`. This seal keeps the count monotonically //! non-increasing: adding a new global fails the build, and every migrated file //! must lower `HIGH_WATER`. Same idea as the migration HIGH_WATER seal. //! //! When you remove globals, lower `HIGH_WATER` to the new count (the failure //! message reports it). Never raise it. //! //! # What counts as a global //! //! Both trees are read, `static/*.js` and `frontend/src`, and an alias bound to //! `window` in a file is followed within that file: a typed module assigning //! through `const w = window as unknown as Record` is counted //! like a direct `window.x =`. Without that, moving a file out of `static/` //! while keeping its global lowers the seal without lowering the global //! surface, and a conversion batch reports progress it did not make. //! //! A bare top-level `function foo() {}` in a classic script is a global too, //! with no assignment to match. Every `static/*.js` file is loaded by a plain //! `