Skip to content

Fix remote CI environment routing#22197

Closed
starr-openai wants to merge 1 commit into
mainfrom
starr/rust-ci-full-linux-remote-path-fixes-full-ci
Closed

Fix remote CI environment routing#22197
starr-openai wants to merge 1 commit into
mainfrom
starr/rust-ci-full-linux-remote-path-fixes-full-ci

Conversation

@starr-openai
Copy link
Copy Markdown
Contributor

Summary

  • ignore ambient .git markers in sticky/world-writable directories during project root discovery
  • resolve turn diff display roots through the selected environment filesystem
  • make remote routing tests inspect the tool output they actually care about
  • emit failed unified-exec end events when process startup fails

Context

The rust-ci-full / Tests — ubuntu-24.04 - x86_64-unknown-linux-gnu (remote) lane was repeatedly picking up remote-only path/startup failures. This narrows the repair to the environment-routing and remote-test harness pieces that removed those deterministic failures from the target lane.

Validation

  • git diff --check
  • monitored rust-ci-full on the branch; the prior deterministic remote-env/view-image/apply-patch/unified-exec startup failures stopped recurring, while unrelated flakes still appeared in the target lane
  • no local Codex tests run

Co-authored-by: Codex <noreply@openai.com>
@starr-openai starr-openai requested a review from a team as a code owner May 11, 2026 19:40
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7fc6966bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

use std::os::unix::fs::MetadataExt;

dir.parent().is_none()
|| dir.metadata().is_ok_and(|metadata| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Classify remote project markers with the remote filesystem

find_project_root first checks marker existence via ExecutorFileSystem, but the ambient-dir test then calls dir.metadata() on the local host path. For a remote cwd under a sticky/world-writable directory, the remote .git marker is accepted whenever the same local path is missing/not sticky, so project config can be rooted at the wrong ambient directory.

Useful? React with 👍 / 👎.

use std::os::unix::fs::MetadataExt;

dir.parent().is_none()
|| dir.metadata().is_ok_and(|metadata| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid local stat when loading remote repo skills

Repo skill discovery uses the selected ExecutorFileSystem for .git lookup, then decides whether to ignore it with dir.metadata() against the local filesystem. In remote sessions this can classify the remote ancestor using unrelated host permissions, causing ambient remote .git markers to expose the wrong .agents/skills tree or hide a valid one.

Useful? React with 👍 / 👎.

use std::os::unix::fs::MetadataExt;

dir.parent().is_none()
|| dir.metadata().is_ok_and(|metadata| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve remote git roots without host metadata

get_git_repo_root_with_fs is meant to operate on the provided executor filesystem, but the ambient marker check uses local dir.metadata(). When the remote workspace is under a sticky/world-writable directory that differs from the host, the remote .git marker is not ignored (or a valid remote repo is skipped), breaking trust/diff root resolution.

Useful? React with 👍 / 👎.

@starr-openai
Copy link
Copy Markdown
Contributor Author

Superseded by stacked PRs: #22199, #22201, #22200, #22202.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant