Repository navigation
Support GitHub Enterprise hosts in managed agent runtime - #16654
Open
warp-agent-staging[bot] wants to merge 2 commits into
Open
warp-agent-staging[bot] wants to merge 2 commits into
warp-agent-staging[bot] wants to merge 2 commits into
Conversation
…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>
Contributor
Author
|
This PR was generated with Warp. Comment |
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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



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::agenthost validation and execution-config decoding, then checkout/preparation identity. Reviewdriver/git_credentials.rsfor refresh/removal and the authentication scope and Unix PID preservation, including the startup hook inapp/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.
ready-to-specorready-to-implement. Shared issue currently has the factory label only; its status belongs to the aggregate owner.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.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, thengit diff --check: passed. No full presubmit.Compute workflow parametersby design; the aggregate check reportsJob 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../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