mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-25 19:03:14 +01:00
The LB strip lists still named files by their pre-PSR-4 www/ paths, so those entries matched nothing and the files kept shipping under Public/: Public/admin/api.php, Public/admin/proxy_api.php, Public/stream/auth.php and Public/stream/probe.php reached every LB. auth.php and probe.php are routed by the LB nginx but fatal there on the stripped Domain/User. LB_DIRS still listed the removed resources/ and www/ trees, and LB_DIRS_TO_REMOVE listed the non-existent Domain/Auth. The gate never noticed, because it only checked the SENSITIVE prefixes. Makefile: - Drop the dead entries (resources, www, Domain/Auth, GeoLite2-City.mmdb, the nine www/* files). - Strip the MAIN-only files that no LB route or LB code needs: the four endpoints above, PlayerV2, AdminAPIWrapper, ResellerAPIWrapper, ActiveCodeApiController, ResellerApiDispatcher, ResellerTableRenderer, Cli/migration_logic.php and DbMigrateCommand (on an LB it would run MAIN's schema migrations). The viewer-API controllers still ship because the LB nginx still routes them; they go later with the routes. - lb_delete_files_list now always writes the LB deleted_files.txt as the LB-scoped git deletions plus every stripped code file (Cli, Core, Domain, Infrastructure, Public, Streaming; never bin/config/content). An update only deletes listed files, so without this the files newly stripped here would stay on LBs that are already installed. The retired resources/ and www/ trees stay in the git-deletion scope (LB_RETIRED_DIRS), so their old entries are still applied. lb_configs/nginx.conf: stop routing /stream/auth, /stream/probe and /probe.php. They now get nginx's 404 instead of a PHP fatal. MAIN nginx is unchanged. verify-lb-archive.sh now also fails when: - an LB_* entry matches no tracked path (STALE); - a script the LB nginx executes is stripped (MISSING): every SCRIPT_FILENAME, and Public/<scope>/<handler>.php for each handler the /stream/ and /admin/ gateway locations accept. SENSITIVE covers the new strips, CacheHandlerCommand and CacheEngineCronJob. The manifest lookups now use here-strings, because under pipefail an early `grep -q` exit could SIGPIPE the writer and hide a leak. LbArchiveGateTest runs the real script with each failure mode injected through MAKEFLAGS. Behaviour: the LB archive loses 26 files that no LB route reaches (or that fatal there today), and the next LB update deletes them. It also deletes any lingering Domain/User or Domain/Device files. Fresh LBs never had those, so an older LB that still carries them loses rtmp and viewer-API paths that only worked because of them, just like a fresh LB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQHeypQpfAXTdCysmi7b6a