Repository navigation
ios: report active v2 peer transport path #15182
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -948,16 +948,66 @@ PY_CAPTURE | |
| } | ||
| fi | ||
|
|
||
| # The simulator launch is detached, but the launcher also performs setup and | ||
| # attach work before it returns. Own that process group as well as notifyutil; | ||
| # otherwise a stalled launcher can keep the job alive after the report deadline. | ||
| run_release_gate_launch() { | ||
| local log_path="$1" | ||
| shift | ||
| /usr/bin/python3 - "$log_path" "$((REPORT_TIMEOUT + 30))" "$@" <<'PY_LAUNCH' | ||
| import signal | ||
|
Comment on lines
+951
to
+958
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '930,1020p' scripts/run-iroh-release-gate.sh
rg -n 'trap |mktemp|redact|ACCOUNT|account|release_gate_log' scripts/run-iroh-release-gate.shRepository: manaflow-ai/cmux Length of output: 5408 🏁 Script executed: sed -n '320,480p' scripts/run-iroh-release-gate.sh
sed -n '980,1055p' scripts/run-iroh-release-gate.sh
git diff --unified=80 2aa892bd8678e6d28c14cfadfdb729dadca0d72a 8b5cf5692f4670145430a5b5dc822ede4a62a064 -- scripts/run-iroh-release-gate.shRepository: manaflow-ai/cmux Length of output: 18968 Remove When Suggested fix trap - EXIT INT TERM
set +e
+ if [[ -n "${GATE_LAUNCH_LOG:-}" ]]; then
+ rm -f "$GATE_LAUNCH_LOG"
+ fi
if [[ -n "$REPORT_WAITER_PID" ]]; then🤖 Prompt for AI Agents |
||
| import subprocess | ||
| import sys | ||
|
|
||
| log_path, timeout_seconds, *command = sys.argv[1:] | ||
| with open(log_path, "wb") as output: | ||
| process = subprocess.Popen( | ||
| command, | ||
| stdout=output, | ||
| stderr=subprocess.STDOUT, | ||
| start_new_session=True, | ||
| ) | ||
| try: | ||
| return_code = process.wait(timeout=int(timeout_seconds)) | ||
| except subprocess.TimeoutExpired: | ||
| try: | ||
| os.killpg(process.pid, signal.SIGTERM) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Import When the launcher exceeds the deadline, 🤖 Prompt for AI Agents |
||
| except ProcessLookupError: | ||
| pass | ||
| try: | ||
| process.wait(timeout=5) | ||
| except subprocess.TimeoutExpired: | ||
| try: | ||
| os.killpg(process.pid, signal.SIGKILL) | ||
| except ProcessLookupError: | ||
| pass | ||
| process.wait() | ||
|
Comment on lines
+977
to
+984
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Terminate the process group after the grace period. If the launcher exits after 🤖 Prompt for AI Agents |
||
| raise SystemExit("Iroh release gate launcher timed out") | ||
|
|
||
| if return_code < 0: | ||
| raise SystemExit(128 - return_code) | ||
| raise SystemExit(return_code) | ||
| PY_LAUNCH | ||
| } | ||
|
|
||
| GATE_LAUNCH_LOG="$(mktemp "${TMPDIR:-/tmp}/cmux-iroh-launch-${TAG}.XXXXXX")" | ||
| launch_status=0 | ||
| CMUX_DEV_AUTH_REPLACE_SESSION="$([[ -n "$SOAK_PROFILE" ]] && printf 0 || printf 1)" \ | ||
| CMUX_ATTACH_MINT_MAX_ATTEMPTS=600 \ | ||
| CMUX_ATTACH_READY_TIMEOUT_SECONDS="${CMUX_IROH_RELEASE_GATE_ATTACH_READY_TIMEOUT_SECONDS:-90}" \ | ||
| CMUX_IROH_RELEASE_GATE_SCENARIO="$GATE_SCENARIO" \ | ||
| CMUX_IROH_SOAK_PROFILE="$SOAK_PROFILE" \ | ||
| CMUX_IROH_DISABLE_RELAY_CREDENTIAL_REFRESH="$([[ "$GATE_SCENARIO" == "relay_expiry" ]] && printf 1 || printf 0)" \ | ||
| ./scripts/mobile-dev-launch.sh "${MOBILE_LAUNCH_ARGS[@]}" \ | ||
| 2>&1 | sed -E \ | ||
| -e 's/^(==> dev sign-in account:).*/\1 [redacted]/' \ | ||
| -e 's/(signed in as )[^,)]+/\1[redacted]/' | ||
| run_release_gate_launch "$GATE_LAUNCH_LOG" ./scripts/mobile-dev-launch.sh "${MOBILE_LAUNCH_ARGS[@]}" || launch_status=$? | ||
| sed -E \ | ||
| -e 's/^(==> dev sign-in account:).*/\1 [redacted]/' \ | ||
| -e 's/(signed in as )[^,)]+/\1[redacted]/' \ | ||
| "$GATE_LAUNCH_LOG" | ||
| rm -f "$GATE_LAUNCH_LOG" | ||
| if (( launch_status )); then | ||
| echo "error: Iroh release gate launcher failed with status $launch_status" >&2 | ||
| exit "$launch_status" | ||
| fi | ||
|
|
||
| DATA_CONTAINER="$(xcrun simctl get_app_container "$SIMULATOR_ID" "$IOS_BUNDLE_ID" data)" | ||
| REPORT_PATH="$DATA_CONTAINER/Library/Caches/$REPORT_FILENAME" | ||
|
|
||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
rg -n 'settingsSnapshot\(|selectedTransportPath\(|enginesByPeer|selectedPeer|peerHex' ios/cmuxPackage/Sources/cmuxFeature/MobileIrxRuntimeComposition+Settings.swift ios/cmuxPackage/Sources/cmuxFeature/MobileIrxRuntimeComposition+Dial.swift scripts/run-iroh-release-gate.shRepository: manaflow-ai/cmux
Length of output: 3987
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 42721
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 42633
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 45670
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 42615
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 42535
Use an explicit selected-session policy for
selectedTransportPath().MobileIrxRuntimeComposition.selectedTransportPath()scans all current peer sessions and returns the first recognized path. Multiple peer sessions can coexist, while the release gate consumes onesnapshot.selectedTransportPathvalue without a peer identity. Dictionary traversal can therefore make another session’s direct or relay path determine the gate result.Use the composition’s canonical selected-session precedence instead of passing a workload
peerHexinto this settings boundary.🤖 Prompt for AI Agents