Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Parse demo entry script for parity proof

rcourtman5b2005a64543
diff --git a/.github/workflows/deploy-demo-server.yml b/.github/workflows/deploy-demo-server.yml
index 81c34b74df..c4bb3d2c7d 100644
--- a/.github/workflows/deploy-demo-server.yml
+++ b/.github/workflows/deploy-demo-server.yml
@@ -271,7 +271,7 @@ jobs:
)
extract_entry_asset() {
- python3 -c 'import re, sys; html = sys.stdin.read(); match = re.search(r"/assets/index-[^\" ]*\\.js", html); sys.exit(1) if match is None else sys.stdout.write(match.group(0))'
+ python3 -c 'import re, sys; html = sys.stdin.read(); match = re.search(r"<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"", html); sys.exit(1) if match is None else sys.stdout.write(match.group(1))'
}
EXPECTED_ASSET="${{ steps.frontend.outputs.entry_asset }}"
diff --git a/.github/workflows/update-demo-server.yml b/.github/workflows/update-demo-server.yml
index f3f79d24a4..38670ff585 100644
--- a/.github/workflows/update-demo-server.yml
+++ b/.github/workflows/update-demo-server.yml
@@ -376,7 +376,7 @@ jobs:
esac
extract_entry_asset() {
- python3 -c 'import re, sys; html = sys.stdin.read(); match = re.search(r"/assets/index-[^\" ]*\\.js", html); sys.exit(1) if match is None else sys.stdout.write(match.group(0))'
+ python3 -c 'import re, sys; html = sys.stdin.read(); match = re.search(r"<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"", html); sys.exit(1) if match is None else sys.stdout.write(match.group(1))'
}
if ! REMOTE_ASSET="$(
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 69214ab771..dbb48de40d 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -186,8 +186,9 @@ dedicated preview service identity instead of defaulting back to the stable
public demo HTML serves the same frontend entry asset as the target service or
freshly built preview artifact rather than treating a passing `/api/health`
response as enough evidence that the public shell actually updated. That proof
-must use a deterministic HTML asset parser rather than brittle escaped shell
-regex that can fail differently over SSH than it does on the local runner.
+must use a deterministic HTML parser for the actual module entry script rather
+than brittle escaped shell regex or a first-match asset scrape that can fail
+differently over SSH or select the wrong preloaded chunk.
Those same governed release workflows also own the operator-facing wording for
that promotion metadata. Human-visible workflow inputs, summaries, and error
messages must describe the path as a prerelease or preview flow rather than
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index 9e668a87d4..03fac85d5d 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -124,6 +124,7 @@ func TestDeployDemoWorkflowFailsClosedForPreviewAndVerifiesFrontendParity(t *tes
`Preview demo deployments must not target the stable pulse service.`,
`Verify frontend parity`,
`extract_entry_asset()`,
+ `<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"`,
`Remote service is serving $REMOTE_ASSET but the build expected $EXPECTED_ASSET.`,
`Public demo is serving $PUBLIC_ASSET but the build expected $EXPECTED_ASSET.`,
}
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index b082510d68..a72457173d 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -233,11 +233,13 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertIn("Preview demo updates must not target the stable pulse service.", demo)
self.assertIn("Verify frontend parity", demo)
self.assertIn("extract_entry_asset()", demo)
+ self.assertIn(r'<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"', demo)
self.assertIn("Public demo is serving $PUBLIC_ASSET but the target service is serving $REMOTE_ASSET.", demo)
self.assertIn('SERVICE_NAME="pulse-v6-preview"', preview_deploy)
self.assertIn("Preview demo deployments must not target the stable pulse service.", preview_deploy)
self.assertIn("Verify frontend parity", preview_deploy)
self.assertIn("extract_entry_asset()", preview_deploy)
+ self.assertIn(r'<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"', preview_deploy)
self.assertIn("Public demo is serving $PUBLIC_ASSET but the build expected $EXPECTED_ASSET.", preview_deploy)
self.assertIn("control_plane.py --branch-for-version", helm)
self.assertIn("control_plane.py --branch-for-version", helm_pages)