Seeded Random Generation and Cross-Origin Isolation Safety for Windowed Modes - #157
Merged
Conversation
…repack the fish shells
…odes it cannot serve
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit a309818
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two independent additions land together in this PR:
@hyperfrontend/random-generator-utils— every distribution (uniform, gaussian, exponential, logarithmic, power-law, pseudo, uuid-v4) can now be driven from a seed via a new seeded source, giving reproducible draws. The koi pond demo adopts this in a follow-up PR: the demos install@hyperfrontend/random-generator-utilsfrom npm, and the seeded API is not on the registry until this PR merges and the publish job runs.@hyperfrontend/features— the host now detects when a declared windowed mode (e.g. popup) would silently break due to the origin's opener policy (COOP) or missing isolation headers, warns at config/build time, and fails a windowed mount fast when its window becomes unreachable instead of hanging silently.Supporting work: all koi-pond demo apps, clock, and heartbeat were repacked/re-vendored against
@hyperfrontend/features@0.9.0; demo source files across koi-pond, clock, and heartbeat received documentation/comment cleanup; a related showcase finding on seeded randomness was closed and a new one on isolated-origin popup breakage was opened/updated.Type of Change
✨ Feature
📝 Docs
♻️ Refactor
🔒 Security
Changes Made
create-random-generator,create-seeded-source) tolib-random-generator-utils, covering every existing distribution and uuid-v4demo-koi-libtarball and refresh its nine consumer lockfiles, which had drifted from the koi lib source since the demo freezelib-features: declare cross-origin isolation in feature config, expand it into served-origin headers, warn when declared modes outlive the origin's opener policy, and fail a windowed mount fast when its window stops being reachable@hyperfrontend/features@0.9.0with the v3 envelopeno-unsafe-builtin-methods/directive detection ineslint-rulesforhf:featureand triple-slash commentsTesting
create-random-generator/create-seeded-sourceand existing distribution generators (seeded determinism)lib-featuresisolation/opener-policy behavior:serve-reconciliation,serve-config,config-types,lifecycle.timeout,external-window.browsere2e-lib-random-generator-utilsno-plain-inline-commentseslint rule and comment-analysis util fixesAI Assistance
Claude was used to make these changes, following instructions and direct supervision.
Additional Notes
@hyperfrontend/featuresbumped to 0.9.0 (feature warnings/isolation headers are additive but consumers relying on windowed modes on isolated origins should review the new warnings).@hyperfrontend/random-generator-utilsgains a new seeded API surface (additive, non-breaking) and bumps to 0.2.0.The koi pond's use of that API was reverted out of this PR. The demos are self-contained npm consumers, so pinning an unpublished
0.2.0failednpm install, and becausepublishon main is gated onci-status, which needstypecheck, leaving it in would have blocked the publish that makes 0.2.0 real. The demo work re-lands once the package is on the registry.📝 CLA Requirement
By submitting this pull request, you acknowledge that:
For more information, see our Contributing Guide.
Thank you for contributing to hyperfrontend! 🚀