Skip to content

fix: preserve managed GitHub exec on packaged Windows - #201712

Merged
RomneyDa merged 4 commits into
openclaw:mainfrom
bkudiess:bkudiess-managed-github-launcher
Nov 23, 2026
Merged

RomneyDa merged 4 commits into
openclaw:mainfrom
bkudiess:bkudiess-managed-github-launcher

Conversation

@bkudiess

@bkudiess bkudiess commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Related: #197437

What Problem This Solves

On packaged Windows installs, managed GitHub exec can refuse to run even after GitHub Identity is connected. The credential reader starts without the native dependency redirect already used by the Gateway.

User Impact

The private credential reader reuses the package's known startup redirect without changing the requested command's environment. Missing or malformed profiles still refuse execution. No new user configuration is required.

Why This Change Was Made

The resolver forwards only the package preload identified by the Gateway's startup arguments and verified against the package layout. It pins the two native redirect roots only for the credential child. Request environment overrides cannot supply those roots or arbitrary startup hooks. Failure diagnostics use fixed stage codes without credential data.

The environment-variable budget increases from current main's 464 to 466 for OPENCLAW_NATIVE_APP_ROOT and OPENCLAW_NATIVE_STAGED_ROOT. This preserves the two-name increase already reported as owner-approved by the contributor; no formal GitHub review approval is claimed.

Evidence

Real installed-package credential-reader comparison — Parallels ARM64

On Windows 11 Pro Dev build 26300, installed the signed ARM64 release v2026.11.10-beta.1-msix.0 and successfully ran clawctl setup. Ran baseline/candidate launch builders through clawctl pwsh under the package's isolated agent identity, using its provisioned Node 24.22.1, real immutable installed credential reader, vendor preload, and staged dependency roots. The reader was not mocked; only the token contents were synthetic.

  • Baseline ff4a6c70d6b42: both -Command and -EncodedCommand refused with the credential-unavailable diagnostic and empty stdout.
  • Candidate launch code from 25dc64eac1978: both forms ran the requested command, read the selected profile, preserved conflicting request root values, and cleared competing inherited GitHub token variables. Valid-case wall times: 2.830s and 2.342s.
  • Missing hosts.yml and a regular file instead of a profile directory both refused, through both PowerShell forms. All six candidate assertions passed. Synthetic fixture profiles were removed afterward.
  • Installed package: OpenClaw.Gateway_2026.11.999.10_arm64__kaa03rpbbqef6, not a development registration. Packaging commit 4f6903c877b96dd707f0a996867f4fabc0a56c1d; installed payload commit 995f9059b6e6fe3ba0865a3354924fd2bcbfceea.
  • Limits: this is launch-builder/installed-reader A/B, not an installed candidate-MSIX A/B or a model-driven Gateway E2E run. No real GitHub credential or authenticated API command was used. fs-safe reports ERR_DLOPEN_FAILED for its ARM64 native addon and succeeds through its supported .NET-helper fallback; native-addon loading is not claimed fixed. The installed reader remains the signed release, so candidate reader-stage diagnostics are not covered by this native run.

Conflict repair and review

Merged main 36bc0460f4200 in fcfdcd4a2c887. Resolved the budget conflict by retaining both main's launcher names and this PR's native-root names; regenerated both conflicting script bundles with their owner generator. The CLI bootstrap, launch builder, and credential-reader source are unchanged from the Parallels proof inputs.

Local ClawSweeper completed review of 36bc0460f4200..fcfdcd4a2c887: no blocking production-code or security finding. It identified a P3 Windows-test routing gap, addressed in daadf5a94c37a by adding the launcher regression suite to the explicit Windows CI inventory. Its missing-package-proof note did not include the separate installed-reader run documented above. No second hosted review is claimed.

Focused checks

  • node scripts/run-vitest.mjs src/agents/github-exec-launch.test.ts src/agents/bash-tools.exec-github-credential.test.ts src/infra/openclaw-cli-invocation.test.ts --maxWorkers=1 — 36 passed, 11 intentional Windows-only skips, 48.72s outer runner time.
  • pnpm tsgo:core — passed.
  • Focused oxlint of the four changed agent implementation/test files — passed.
  • Explicit format check of the seven changed code/docs files — passed.
  • pnpm runtime:scripts:gen and pnpm runtime:scripts:check — passed.
  • git diff origin/main --check — passed.
  • Environment-name budget check in CI advisory mode — passed with its growth warning; normal mode retains the budget-growth approval gate.
  • pnpm build:runtime — passed before main integration, 1m45s. This is prior-input build evidence, not a new-head build claim; current-head CI remains authoritative.

The previous head's CI gate passed. Current-head CI is pending after the conflict-repair push; no merge-readiness claim is based on the old green run.

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: M labels Nov 19, 2026
@bkudiess
bkudiess marked this pull request as ready for review November 19, 2026 08:09
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 9ab4b34ee4a5b013f3a38e8e635b62e4f1b04a42, but the PR head is now 25dc64eac1978a0f3af331b4d8463c5a1ff4aae0. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-19T08:26:45.217Z sha 9ab4b34 :: needs real behavior proof before merge. :: [P2] Normalize PTY line endings in the multiline diagnostic assertion

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 21, 2026
@RomneyDa
RomneyDa merged commit 6af45b6 into openclaw:main Nov 23, 2026
159 checks passed
obviyus added a commit that referenced this pull request Nov 24, 2026
…204315)

## Result

`test/scripts/installed-terminal-observer.test.ts` "qualifies only successful package-owned pre-handoff Node entries (historical=false)" passes again. The upgrade-survivor observer recognizes the daemon runtime probe that current builds launch.

## Cause

#201712 (`6af45b657fdb`, "preserve managed GitHub exec on packaged Windows") regenerated `src/infra/daemon-runtime-probe.generated.mjs` through its owning generator. The probe source hash changed from `a33dc774…` to `747c79c4…`. The observer accepts only reviewed probe bytes (`currentProbeSha256` in `scripts/e2e/lib/upgrade-survivor/installed-terminal-observer.mjs`), and the test pins the same hash. Neither was updated.

The probe change is deliberate: it is a generator output, not a hand edit. This PR updates both pins, the same way #203415, #200980 and #200530 did.

## Evidence

- `DAEMON_RUNTIME_PROBE_SOURCE` hash: `a33dc774…` at `6af45b657fdb^`; `747c79c4…` at `6af45b657fdb` and on current `main`.
- Scheduled run 45288712101 (small-30): `expected '747c79c4…' to be 'a33dc774…'`. The same failure reproduces locally on `main`.
- Head: `installed-terminal-observer.test.ts` 23 passed, 7 skipped. CI green on the head; local ClawSweeper: patch is correct, no findings.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
* fix: preserve managed GitHub exec on packaged Windows

Co-authored-by: Copilot App <[email protected]>

* test: normalize managed GitHub PTY diagnostic line endings

* test: include managed GitHub launcher in Windows CI

---------

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
(cherry picked from commit 6af45b6)

Release adaptation: preserve the release Windows CI shard list and add only the managed GitHub launcher suite; regenerate the runtime scripts and use the repository env-count collector (463, from 461). Carry 665c286 (#204315) as the two observer/test pins using the release-generated probe hash. cb77c4f was carried in the earlier macOS pick. 75cab7d is not applicable: it only removes an unrelated ratchet from package.json. The external Windows packaging launcher remains the native-redirect producer.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
* fix: preserve managed GitHub exec on packaged Windows

Co-authored-by: Copilot App <[email protected]>

* test: normalize managed GitHub PTY diagnostic line endings

* test: include managed GitHub launcher in Windows CI

---------

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
…01712 (openclaw#204315)

## Result

`test/scripts/installed-terminal-observer.test.ts` "qualifies only successful package-owned pre-handoff Node entries (historical=false)" passes again. The upgrade-survivor observer recognizes the daemon runtime probe that current builds launch.

## Cause

openclaw#201712 (`9c832cceeee5`, "preserve managed GitHub exec on packaged Windows") regenerated `src/infra/daemon-runtime-probe.generated.mjs` through its owning generator. The probe source hash changed from `a33dc774…` to `747c79c4…`. The observer accepts only reviewed probe bytes (`currentProbeSha256` in `scripts/e2e/lib/upgrade-survivor/installed-terminal-observer.mjs`), and the test pins the same hash. Neither was updated.

The probe change is deliberate: it is a generator output, not a hand edit. This PR updates both pins, the same way openclaw#203415, openclaw#200980 and openclaw#200530 did.

## Evidence

- `DAEMON_RUNTIME_PROBE_SOURCE` hash: `a33dc774…` at `9c832cceeee5^`; `747c79c4…` at `9c832cceeee5` and on current `main`.
- Scheduled run 45288712101 (small-30): `expected '747c79c4…' to be 'a33dc774…'`. The same failure reproduces locally on `main`.
- Head: `installed-terminal-observer.test.ts` 23 passed, 7 skipped. CI green on the head; local ClawSweeper: patch is correct, no findings.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
…204315)

## Result

`test/scripts/installed-terminal-observer.test.ts` "qualifies only successful package-owned pre-handoff Node entries (historical=false)" passes again. The upgrade-survivor observer recognizes the daemon runtime probe that current builds launch.

## Cause

#201712 (`6af45b657fdb`, "preserve managed GitHub exec on packaged Windows") regenerated `src/infra/daemon-runtime-probe.generated.mjs` through its owning generator. The probe source hash changed from `a33dc774…` to `747c79c4…`. The observer accepts only reviewed probe bytes (`currentProbeSha256` in `scripts/e2e/lib/upgrade-survivor/installed-terminal-observer.mjs`), and the test pins the same hash. Neither was updated.

The probe change is deliberate: it is a generator output, not a hand edit. This PR updates both pins, the same way #203415, #200980 and #200530 did.

## Evidence

- `DAEMON_RUNTIME_PROBE_SOURCE` hash: `a33dc774…` at `6af45b657fdb^`; `747c79c4…` at `6af45b657fdb` and on current `main`.
- Scheduled run 45288712101 (small-30): `expected '747c79c4…' to be 'a33dc774…'`. The same failure reproduces locally on `main`.
- Head: `installed-terminal-observer.test.ts` 23 passed, 7 skipped. CI green on the head; local ClawSweeper: patch is correct, no findings.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 665c286)
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime P1 High-priority user-facing bug, regression, or broken workflow. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants