//! 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 this used to miss, and why the number moved once //! //! Problem `7df1a7de`. Until 2026-08-10 this read `static/*.js` and nothing //! else, and matched the literal text `window. =`. The typed core module //! defeats both halves at once: it lives in `frontend/src`, and //! `installLegacyBridge` assigns through an alias //! (`const w = window as unknown as Record; w.escapeHtml = …`). //! So its globals were invisible, and **moving a file out of `static/` while //! keeping its global lowered the seal without lowering the global surface**. //! A conversion batch could report progress it did not make, which is the one //! failure mode a ratchet exists to prevent. //! //! Both halves are fixed here: both trees are read, and an alias bound to //! `window` in a file is followed within that file. `HIGH_WATER` was restated //! once against the corrected measurement, which is not the same act as raising //! it. //! //! # The third gap, and the number moved a second time //! //! Problem `82315c45`, 2026-08-26. The two rules above both match an //! *assignment*, and a classic script does not need one: a bare top-level //! `function foo() {}` becomes a property of the global object just by being //! declared. Every `static/*.js` file is loaded by a plain `