Skip to content

Support GitHub Enterprise hosts in managed agent runtime - #16654

Open
warp-agent-staging[bot] wants to merge 2 commits into
masterfrom
factory/ghes-runtime
Open

warp-agent-staging[bot] wants to merge 2 commits into
masterfrom
factory/ghes-runtime

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add the required runtime companion for GitHub Enterprise Server support. Repository execution now carries a validated host and instance through eager/deferred checkout, fork substitution, mirror/cache keys, prewarm assignment, and recovery snapshots.

Explicit GitHub credential metadata configures every selected host in gh/hosts.yml. Refresh merges hosts independently; explicit removals delete the affected Git/CLI credentials. Unknown hosts do not become GitHub implicitly, and commit identity does not borrow another host's author.

Managed sandbox task runs and standby processes enter private Git, gh, and glab configuration without changing HOME. Unix re-execs to preserve the PID targeted by Direct cancellation; Windows launches a scoped child. Normal returns remove the private directory. Forced process termination can leave owner-only temporary files for host cleanup. Inherited Git configuration and process-wide GitHub token overrides are excluded; task environment overlays cannot restore those overrides.

Review guide

Start with warp_cli::agent host validation and execution-config decoding, then checkout/preparation identity. Review driver/git_credentials.rs for refresh/removal and the authentication scope and Unix PID preservation, including the startup hook in app/src/lib.rs.

The server must deploy its additive contract before this runtime. GHES run admission must remain disabled until a compatible runtime image is deployed. This PR does not enable onboarding or complete the real-host acceptance gate.

Linked Issue

Related: https://github.com/warpdotdev/warp-server/issues/20785 (shared issue; do not close from this companion).
Server/UI companion: https://github.com/warpdotdev/warp-server/pull/20786.
Approved technical spec, runtime contract section 5.

  • The linked issue is labeled ready-to-spec or ready-to-implement. Shared issue currently has the factory label only; its status belongs to the aggregate owner.
  • Where appropriate, screenshots or a short video of the implementation are included below. Real GHES verification is blocked as described under Testing.

Testing

  • cargo nextest run -p warp_cli -p cloud_object_models -p warp_graphql -j 2 -E 'test(repository) | test(cloud_environment) | test(task_git_credentials) | test(execution_config) | test(prewarmed_sandbox_config)' --no-fail-fast: 55 passed.
  • cargo nextest run -p warp --lib -j 2 -E 'test(ai::agent_sdk::driver::git_credentials) | test(ai::agent_sdk::driver::environment) | test(ai::agent_sdk::execution_config) | test(ai::agent_sdk::environment_snapshot) | test(server::server_api::ai::tests::git_credentials) | test(server::server_api::ai::tests::factory_git_credentials) | test(server::server_api::ai::tests::legacy_git_credentials) | test(server::server_api::ai::tests::execution_bootstrap)' --no-fail-fast: 163 passed.
  • After the Unix PID-preservation revision, cargo nextest run -p warp --lib -j 2 -E 'test(ai::agent_sdk::driver::git_credentials)' --no-fail-fast: 44 passed.
  • cargo clippy -p warp -p warp_cli -p cloud_object_models -p warp_graphql --all-targets --tests -j 2 -- -D warnings: passed.
  • ./script/format, then git diff --check: passed. No full presubmit.
  • Draft PR CI skips Compute workflow parameters by design; the aggregate check reports Job params had unexpected status skipped (expected: success). Full cross-platform CI has not run.

The scoped tests include real Git subprocess checks for SSH-to-HTTPS routing, encoded credentials, shared-HOME isolation, inherited-token removal, auth-directory cleanup on normal return, and Unix PID preservation. Linux was the observed platform; Windows/macOS execution remains unverified locally.

A broader API run passed 219/228 tests; nine unrelated artifact/header tests failed because Namespace workload-token issuance returned nsc access denied. This is not a claim that the broader suite passed.

  • I have manually tested my changes locally with ./script/run. No real GHES host or completed server onboarding was available. The opted-in finished-flow video and clone/push/PR/refresh/revocation acceptance still require the server companion and authorized GHES access.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

…kout

Carry validated host and instance identity through execution, forks, deferred preparation, mirrors, and recovery. Isolate managed Git and forge CLI credentials from a shared runner HOME and refresh or remove each host independently.

Co-Authored-By: Warp Agent <agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Oct 27, 2026
@warp-agent-staging warp-agent-staging Bot added the factory:eng-factory-slim Label associated to the "eng-factory-slim" factory label Oct 27, 2026
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-staging-factory on this PR to send it follow-up work.

View run View conversation View on Slack

Re-exec on Unix so worker cancellation still targets the runtime itself. Hold normal-return credential cleanup in the runtime scope and test PID preservation.

Co-Authored-By: Warp Agent <agent@warp.dev>
@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review October 27, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed factory:eng-factory-slim Label associated to the "eng-factory-slim" factory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants