Fix cloud workspace sidebar directory and git provenance
Merged
AU
2mo ago+307+307+012345678901234567890123456789-23-23-01234567890123456789
Cloud workspace sidebar rows could inherit the Mac launch directory, branch, and pull-request metadata because cmux-tui bindings and projections were outside the existing remote-directory provenance boundary. This change keeps Cloud rows tied to trusted machine state.
The fix:
- Treat
cloudVMBindingand non-localcloudProjectedResourcepanels as remote directory provenance. - Reject local cwd fallback and local
git/ghprobing for Cloud panels, including passive reports and restore paths. - Feed cmux-tui terminal
cwdvalues from accepted Cloud snapshots through the trusted remote-directory path; clear stale remote directory state when a terminal has no cwd or a non-terminal projection replaces it. - Keep Cloud branch and PR rows empty until trusted remote metadata exists.
- Preserve the invariant across new bindings, projection reconciliation, and session restore, while retaining existing local and SSH behavior.
- Keep projection membership indexed so provenance checks do not rescan the catalog for every sidebar row.
Fixes #12347.
Validation
- Regression commit
4742ba78b6adds the failing Cloud provenance coverage;edc46c4997implements the fix. - Passed
python3 scripts/swift_file_length_budget.py. - Passed
./scripts/lint-pbxproj-test-wiring.sh. - Passed
python3 scripts/check-workspace-package-groups.py --checkandpython3 scripts/check-package-resolved-policy.py. - Tagged fleet build was attempted with
CMUX_DEV_BACKEND_MODE=offthroughreload-cloud.sh. The build reached Swift compilation but was blocked by three pre-existingorigin/mainerrors inCmuxTuiSurfaceProvider+Environment.swift(waitForScreenmissing and an obsoletefallbackTabIDargument); no error was reported in this issue's changed files. - No live app was launched or user workspace disturbed.