Support execution-host context when resolving cloud config (#38086)

## What changed

- Add a scoped `AbsolutePathBufGuard::with_home_directory` override so `~`
  paths can resolve against an explicitly supplied home directory while
  preserving the existing base-directory behavior. Nested overrides restore
  the previous home directory.
- Expose `compose_requirements_for_hostname` so callers can evaluate
  `remote_sandbox_config` for a supplied execution-host hostname.
- Cover cloud bundle conversion with execution-host path expansion and
  hostname-specific sandbox requirements.

GitOrigin-RevId: 6fd486992b45ff92e22bb4073b888252b544f285
This commit is contained in:
sayan-oai
2026-08-11 23:31:26 +00:00
committed by copyberry
parent 52d9218424
commit f4936d7aba
5 changed files with 166 additions and 3 deletions
@@ -63,8 +63,8 @@ pub fn compose_requirements(
compose_requirements_with_hostname_resolver(layers, crate::host_name)
}
#[cfg(test)]
pub(super) fn compose_requirements_for_hostname(
/// Composes requirements using an explicitly supplied execution-host hostname.
pub fn compose_requirements_for_hostname(
layers: impl IntoIterator<Item = RequirementsLayerEntry>,
hostname: Option<&str>,
) -> Result<Option<ConfigRequirementsWithSources>, RequirementsCompositionError> {