-
-
Notifications
You must be signed in to change notification settings - Fork 39
feat: HMR dev-sessions, ESM resolver hardening, dev-mode runtime globals #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
NathanWalker
wants to merge
14
commits into
main
Choose a base branch
from
feat/hmr-dev-sessions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8badcce
feat: HMR dev-sessions, ESM resolver hardening, dev-mode runtime globals
NathanWalker 5740bd7
fix: visionos build deprecation
NathanWalker 7f4e853
feat: HMR robustness and additional tests
NathanWalker 7ceffe6
ci: unit test improvements
NathanWalker a11c8ab
ci: unit test adjustments
NathanWalker 697fa41
ci: modern unit test runner target
NathanWalker e642777
test: per-suite progress beacon (not per-spec) so it can't flood the …
NathanWalker 47d3b3a
test: make DefaultHTTPServer tolerate errors
NathanWalker 78c7384
ci: capture native stacks on runtime-suite hang; bound test-server st…
NathanWalker 5dd6277
test: quarantine TNS Workers teardown stress spec (CI deadlock, refs …
NathanWalker ceb1153
fix(worker): surface worker entry-script load errors to worker.onerror
NathanWalker 4289539
test: green the runtime suite — quarantine HTTP-ESM identity specs + …
NathanWalker 70dc3e6
ci: unit test failure handling
NathanWalker ada922f
refactor(runtime): key module registries by v8::Isolate, not thread_l…
NathanWalker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/usr/bin/env bash | ||
| # Background hang sampler for CI. | ||
| # | ||
| # The runtime unit-test suite has intermittently DEADLOCKED on the constrained | ||
| # CI runner (a worker-teardown lock cycle that does not reproduce on | ||
| # many-core dev machines). When that happens the app stays alive but the JS | ||
| # thread is wedged, so nothing is POSTed and the watchdog fails at 600s — with | ||
| # no native stack to explain WHY. NativeScript's console.log goes to stdout (not | ||
| # os_log), so the unified-log archive doesn't capture it either. | ||
| # | ||
| # This script periodically `sample`s the TestRunner *app* process while the test | ||
| # runs, leaving per-thread native backtraces behind. If the suite hangs, the | ||
| # later snapshots show every thread's stack (main blocked on a lock + whatever | ||
| # the worker threads are doing) — i.e. the actual lock cycle. The files are | ||
| # written into the diagnostics dir that the workflow uploads as `test-diagnostics`. | ||
| # | ||
| # Best-effort: it never fails the build, and it exits on its own (the Xcode test | ||
| # step also kills it via a trap when xcodebuild returns). `sample` needs no sudo. | ||
| set -u | ||
|
|
||
| DIAG="${1:?usage: sample-hung-app.sh <diagnostics-dir>}" | ||
| mkdir -p "$DIAG" | ||
|
|
||
| # ~25 minutes of coverage: build (~6m) + the test phase including a full 600s | ||
| # hang + teardown. pgrep finds nothing during the build, so those ticks no-op. | ||
| for i in $(seq 1 25); do | ||
| sleep 60 | ||
| # Exact-name match: the app is "TestRunner"; the XCUITest host is | ||
| # "TestRunnerTests-Runner" — we want the app, where the JS thread lives. | ||
| pid="$(pgrep -x TestRunner 2>/dev/null | head -1 || true)" | ||
| [ -z "${pid:-}" ] && continue | ||
| out="$DIAG/sample-app-$(printf '%02d' "$i").txt" | ||
| # 4s sample of all threads. -mayDie tolerates the process exiting mid-sample. | ||
| sample "$pid" 4 -mayDie -fullPaths -file "$out" >/dev/null 2>&1 || true | ||
| done | ||
|
|
||
| exit 0 |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
Normalize paths before matching path-scoped allowlist entries.
Line 101 authorizes any raw URL with a trailing-slash entry prefix, so an allowlist entry like
https://cdn.example.com/app/also matcheshttps://cdn.example.com/app/../admin.js. If the fetch layer or server normalizes dot segments, this escapes the intended path scope. Parse/canonicalize the URL path before matching, or reject encoded/plain dot segments before applying the prefix rule.🤖 Prompt for AI Agents