Skip to content

fix(sandbox): retry cold glibc probes - #8389

Open
senthilr-nv wants to merge 19 commits into
mainfrom
codex/fix-cold-glibc-probe
Open

fix(sandbox): retry cold glibc probes#8389
senthilr-nv wants to merge 19 commits into
mainfrom
codex/fix-cold-glibc-probe

Conversation

@senthilr-nv

@senthilr-nv senthilr-nv commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

A cold Docker run could return no glibc probe output and leave its probe container behind.
The probe now removes that container and makes one bounded second attempt.
Non-empty incompatible output still fails without another attempt.

Related Issue

Fixes #8375

Changes

  • Give each glibc probe attempt a UUID-based Docker container name.
  • Keep the first attempt bound at 20 seconds.
  • Run docker rm -f after an empty result, then make one attempt bound at 120 seconds.
  • Preserve immediate rejection for non-empty incompatible output.
  • Cover cleanup, distinct names, both time bounds, and incompatible output with focused unit tests.
  • Add a Docker-backed lifecycle regression that creates a retained first probe, verifies its removal, and accepts the distinct retry.
  • Run the lifecycle regression in the hosted and self-hosted Docker image workflows.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: The change restores the base-image ABI compatibility behavior already documented in docs/reference/commands.mdx. No command, flag, configuration, output, error, default, workflow, or supported surface changes.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Independent nine-category security review passed with no findings for production commit aac928729219ead63ca62010fdba8f1f454dc4c1 and base SHA bf429e90e5b217632356e2d918bfc333e5b8e959. The later commit fd0b2ad6b97068cf22b20694c169f21b9a674081 changes only regression coverage and its Docker-capable CI wiring. Required checks and automated review remain separate requirements.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: No waiver is recorded.

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: Internal retry and retained-container cleanup for cold Docker glibc probes, with unit and CI-only lifecycle regression coverage; no public command, configuration, output, schema, compatibility requirement, or documented workflow changed.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit: Not applicable; scripts/prepare-dgx-station-host.sh does not change.
  • Station profile/scenario: Not applicable.
  • Result: Not applicable.
  • Supporting evidence: Not applicable.

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub — all 19 commits appear as Verified.
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable — normal hooks passed for fd0b2ad6b.
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 17 focused tests pass; the opt-in live Docker lifecycle test is skipped locally as designed and runs in Docker-capable CI.
  • Applicable broad gate passed — required GitHub Actions for refreshed head 833fc102d are pending; no waiver is recorded.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only) — not applicable; no documentation file changed.
  • Doc pages follow the style guide (doc changes only) — not applicable.
  • New doc pages include SPDX header and frontmatter (new pages only) — not applicable.

Sensitive-Path Security Review

Independent review found no security finding for production commit aac928729219ead63ca62010fdba8f1f454dc4c1 against base SHA bf429e90e5b217632356e2d918bfc333e5b8e959.

  1. Secrets and credentials: PASS. No credential, environment, or sensitive logging changed.
  2. Input validation and data sanitization: PASS. Docker remains argv-only with shell execution disabled; image references remain one argument.
  3. Authentication and authorization: PASS. No identity, permission, ownership, or authority changed.
  4. Dependencies and third-party libraries: PASS. node:crypto is built in; no package, image pin, registry, or dependency metadata changed.
  5. Error handling and logging: PASS. Cleanup and both attempts are bounded; the terminal result remains fail closed without new logging.
  6. Cryptography and data protection: PASS. UUID is only a collision-resistant temporary container identifier.
  7. Configuration and security headers: PASS. No schema, network policy, port, capability, privilege, header, or minimum-glibc requirement changed.
  8. Security testing: PASS. Unit and Docker lifecycle tests cover cleanup, distinct names, both time bounds, incompatible output, and retained-container removal.
  9. System security: PASS. Cleanup precedes the second attempt, names do not collide across process lifetimes, and Docker privileges are unchanged.

Required checks and independent maintainer approval remain separate merge requirements.

GitHub Actions

GitHub Actions is authoritative for PR commit 833fc102df5caa2c511cf15b3b781d40c293c08d against base SHA df56c02b28ec4882c4c98006cdb5dd0809319291.
Required checks are pending.
No check waiver is recorded.


Signed-off-by: Senthil Ravichandran senthilr@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved base-image compatibility checks by retrying glibc detection when the initial probe returns no output.
    • Ensured failed probe containers are cleaned up before retries.
    • Improved compatibility with Docker commands that include additional arguments.
    • Added fallback timeouts to improve reliability when probing slow or unresponsive containers.
  • Tests

    • Added end-to-end coverage for probe retries, cleanup behavior, and Docker container lifecycle handling.
    • Expanded automated validation across gateway isolation and sandbox image workflows.

@senthilr-nv senthilr-nv added area: packaging Packages, images, registries, installers, or distribution area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression v0.0.104 labels Aug 5, 2026
@senthilr-nv senthilr-nv self-assigned this Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The glibc compatibility probe now retries empty Docker output with a longer timeout, uses unique retained-container names, and cleans up failed probes. Tests, Docker mocks, and CI jobs validate the retry lifecycle.

Changes

Glibc compatibility probing

Layer / File(s) Summary
Retry and cleanup implementation
src/lib/sandbox-base-image/image-compatibility.ts
The probe uses 20-second and 120-second timeouts, unique container names, forced cleanup, and returns the first parsed result.
Probe mocks and retry coverage
src/lib/sandbox-base-image/image-compatibility.test.ts, test/helpers/onboard-script-mocks.cjs, src/lib/agent/base-image-hermes-resolution.test.ts
Mocks accept flexible Docker command arguments. Tests cover command-sensitive output, retries, cleanup, incompatible output, and generated container names.
Docker lifecycle CI coverage
test/image-compatibility-docker-lifecycle.test.ts, .github/workflows/pr-self-hosted.yaml, .github/workflows/sandbox-images-and-e2e.yaml
Gateway isolation jobs install dependencies, verify the production image, and run the Docker lifecycle regression test. The integration test verifies cleanup before retry success.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant getImageGlibcVersion
  participant Docker
  CI->>getImageGlibcVersion: Run lifecycle regression test
  getImageGlibcVersion->>Docker: Start named glibc probe
  Docker-->>getImageGlibcVersion: Empty output or timeout
  getImageGlibcVersion->>Docker: Force-remove failed probe container
  getImageGlibcVersion->>Docker: Retry with a new container name
  Docker-->>getImageGlibcVersion: Parseable glibc output
  getImageGlibcVersion-->>CI: Report compatibility result
Loading

Suggested reviewers: cv, apurvvkumaria

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes retry failed probes, use longer timeouts, remove retained containers, preserve incompatible-version handling, and add regression coverage for issue #8375.
Out of Scope Changes check ✅ Passed The workflow, mock, unit-test, and Docker lifecycle changes directly support the glibc probe retry and cleanup objectives.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: retrying cold Docker glibc probes.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-cold-glibc-probe

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 833fc10 in the codex/fix-cold-glibc... branch remains at 96%, unchanged from commit df56c02 in the main branch.


Updated August 07, 2026 06:28 UTC

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/sandbox-base-image/image-compatibility.test.ts`:
- Around line 84-87: Update the cleanup assertion in the sandbox image
compatibility test to verify the complete forced-removal command, including
["rm", "-f", containerNames[0]], rather than only the container name. Also
assert the cleanup options that preserve the retained-container requirement,
ensuring failed probe containers are force-removed.

In `@src/lib/sandbox-base-image/image-compatibility.ts`:
- Line 37: Update the containerName generation in the glibc probe to remove
reliance on process.pid and use a collision-resistant identifier unique across
processes and lifetimes, such as a UUID or cryptographically random value, while
preserving the existing probe prefix and sequence context as appropriate.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9bb2440d-d45e-4800-85ae-55a453d17d39

📥 Commits

Reviewing files that changed from the base of the PR and between c6713c9 and 7120139.

📒 Files selected for processing (4)
  • src/lib/agent/base-image-hermes-resolution.test.ts
  • src/lib/sandbox-base-image/image-compatibility.test.ts
  • src/lib/sandbox-base-image/image-compatibility.ts
  • test/helpers/onboard-script-mocks.cjs

Comment thread src/lib/sandbox-base-image/image-compatibility.test.ts Outdated
Comment thread src/lib/sandbox-base-image/image-compatibility.ts Outdated
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections match; Nemotron reported the same number of blockers, 1 fewer warning, the same number of suggestions.
1 terminology difference from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • retained container at src/lib/sandbox-base-image/image-compatibility.test.ts:70: selected only by the second-opinion lane as define.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — glibc probe at .github/workflows/pr-self-hosted.yaml:150: Keep "glibc probe" for the Docker lifecycle regression.
  • justified — retained first probe at test/image-compatibility-docker-lifecycle.test.ts:27: Keep "retained first probe" in the test title to name the cleanup scenario.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite against this exact revision.

Recommended E2E: None

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Cover cleanup after both glibc probe attempts return empty output

  • Location: src/lib/sandbox-base-image/image-compatibility.test.ts:72
  • Category: tests
  • Problem: The retry test makes the second probe succeed and asserts cleanup only for the first empty attempt. It does not cover the terminal path where the second timed probe also returns no output.
  • Impact: A regression in cleanup after the second timed-out probe could leave a Docker container in created state while compatibility resolution returns null and triggers fallback behavior.
  • Recommendation: Add a focused unit test that returns empty output for both probes, expects null, and asserts two rm -f calls for two distinct probe names.
  • Verification: Read the mocked dockerCapture calls in the new test and confirm there are two run calls and two matching rm -f calls for distinct names.
  • Test coverage: In src/lib/sandbox-base-image/image-compatibility.test.ts, mock both docker run calls to return empty output; assert getImageGlibcVersion returns null and dockerCapture receives rm -f for each distinct generated probe name.
  • Evidence: src/lib/sandbox-base-image/image-compatibility.ts:36-62 loops over two probe timeouts and calls dockerCapture(['rm', '-f', containerName]) whenever output is empty. src/lib/sandbox-base-image/image-compatibility.test.ts:72-86 configures an empty first probe and successful second probe, then asserts one cleanup call. test/image-compatibility-docker-lifecycle.test.ts:27-103 retains only the first probe and makes the retry succeed.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict

Security review — exact head 8619d8d7dd9ed9dba7e3de6d027fbda2eaedb8bd against base c6713c9dd17a9682654713ccb6829b8714f1b307: PASS with no findings, subject to every repository merge gate.

Findings Table

No findings.

Detailed Analysis

  1. Secrets and Credentials — PASS. The patch changes no secret source, credential value, environment allowlist, or logging path.

  2. Input Validation and Data Sanitization — PASS. Docker execution remains argv-based. The image reference stays a single argument, and the generated container name uses randomUUID() under a fixed prefix rather than caller-controlled shell text.

  3. Authentication and Authorization — PASS. No identity, permission, ownership, or authorization boundary changes.

  4. Dependencies and Third-Party Libraries — PASS. No package, image pin, registry, or dependency version changes.

  5. Error Handling and Logging — PASS. An empty first probe triggers one bounded retry only after forced cleanup of the retained named container. Non-empty incompatible output is rejected immediately, and two empty probes still fail closed.

  6. Cryptography and Data Protection — PASS. randomUUID() is used only for collision-resistant temporary container identity. No cryptographic primitive, key handling, or protected-data flow changes.

  7. Configuration and Security Headers — PASS. No configuration schema, network policy, port, capability, privilege, or security-header change.

  8. Security Testing — PASS. Exact-head focused suites pass 16/16 and 32/32. Tests bind the full docker rm -f <name> cleanup command and timeout, distinct UUID-form probe names, the 20-second/120-second bounds, immediate incompatible-output rejection, and Docker mock argument handling.

  9. System Security — PASS. The glibc minimum remains authoritative. Cleanup reduces retained host container state, retry count is bounded, and the implementation does not broaden Docker privileges or runtime access.

Files Reviewed

  • src/lib/agent/base-image-hermes-resolution.test.ts
  • src/lib/sandbox-base-image/image-compatibility.test.ts
  • src/lib/sandbox-base-image/image-compatibility.ts
  • test/helpers/onboard-script-mocks.cjs

Provenance and Required Gates

Reproduced bug #8375 establishes the remediation scope without adding a supported product surface. All three commits are GitHub Verified. The effective patch has raw SHA-256 121cf353fd0ec61e9e0835a25db2b16aa4f541d3b076550ba7b74a5483ea88b1 and stable patch ID 554ed6d6fb0fee0e544564f20e156a9024fd6bc9. Existing exact-head documentation writer review records no docs needed; docs/reference/commands.mdx already owns the preserved compatibility contract.

Fresh required CI, protected E2E, unresolved-review resolution, and independent exact-head approval remain mandatory. This review waives none of those gates.

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict

Security revalidation — exact head 4c19d40326f6155ea856e1d07eee8ae726c122c3 against current base 1608281462923ff8282151c7be1a109ee262b4e9: PASS with no findings, subject to every repository merge gate.

Findings Table

No findings.

Detailed Analysis

  1. Secrets and Credentials — PASS. The effective PR patch is unchanged from the prior exact review. The base refresh adds no overlapping secret, credential, environment, or sensitive-logging path.

  2. Input Validation and Data Sanitization — PASS. The reviewed validation and command/path construction are unchanged. The new base delta does not alter an effective PR file.

  3. Authentication and Authorization — PASS. No identity, ownership, permission, or authorization boundary changed in the PR patch or its integration with the refreshed base.

  4. Dependencies and Third-Party Libraries — PASS. The PR's reviewed dependency and artifact identities are unchanged. Base PR #8387 adds verified llama.cpp GGUF acquisition in eight disjoint files and does not change this PR's dependency surface.

  5. Error Handling and Logging — PASS. The reviewed fail-closed behavior and diagnostics are unchanged; the base refresh introduces no overlapping error or logging path.

  6. Cryptography and Data Protection — PASS. The PR's reviewed cryptographic and protected-data behavior is unchanged. No new cross-patch data flow exists.

  7. Configuration and Security Headers — PASS. The effective PR patch preserves its reviewed configuration, network, privilege, capability, port, and header boundaries.

  8. Security Testing — PASS. Raw patch SHA-256 remains 121cf353fd0ec61e9e0835a25db2b16aa4f541d3b076550ba7b74a5483ea88b1 and stable patch ID remains 554ed6d6fb0fee0e544564f20e156a9024fd6bc9. Documentation writer revalidation passed at this exact head with no docs change needed. Prior targeted test evidence remains applicable; fresh exact-head GitHub Actions is authoritative.

  9. System Security — PASS. The signed refresh is conflict-free, preserves the reviewed patch byte-for-byte, and introduces no new runtime trust-boundary interaction with the disjoint base delta.

Provenance and Required Gates

This exact-head revalidation supplements the full prior nine-category review at #8389 (review). It applies the current rubric from .agents tree 7320c9e331ddbcd9ff83e0fce9387a004e3bd1aa.

Fresh required CI, protected E2E, the exact documentation receipt, unresolved-review resolution, GitHub commit verification, and an independent exact-head approval remain mandatory. This review waives none of those gates.

@cjagwani
cjagwani requested a review from cv August 5, 2026 20:25

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict

Security review — exact head 488f2720a56c71f0db9ef1a4b1dfc76ad28abf2f against current base b148bc13ee53b7a1f612d07e42275ec732e71877: PASS with no findings, subject to every repository merge gate.

Findings Table

No findings.

Detailed Analysis

  1. Secrets and Credentials — PASS. The effective PR patch is unchanged and adds no secret, credential source, environment exposure, or sensitive logging. The refreshed base introduces no overlapping credential path.

  2. Input Validation and Data Sanitization — PASS. Reviewed validation, command construction, and path handling remain unchanged. The portable-profile base delta has no exact file overlap with this PR.

  3. Authentication and Authorization — PASS. No identity, ownership, permission, or authorization boundary is widened by the PR patch or its integration with the refreshed base.

  4. Dependencies and Third-Party Libraries — PASS. The PR's reviewed dependency and artifact identities are unchanged. Base PRs #8333 and #8376 add disjoint E2E artifact restoration and portable experimental onboarding behavior.

  5. Error Handling and Logging — PASS. Reviewed fail-closed behavior and diagnostics remain unchanged; the signed integrations add no overlapping error or logging path.

  6. Cryptography and Data Protection — PASS. Reviewed cryptographic and protected-data behavior remains unchanged, with no new cross-patch data flow.

  7. Configuration and Security Headers — PASS. The effective PR patch preserves its reviewed configuration, network, privilege, capability, port, and header boundaries. The hidden portable profile does not bypass this PR's authority checks.

  8. Security Testing — PASS. Raw patch SHA-256 remains 121cf353fd0ec61e9e0835a25db2b16aa4f541d3b076550ba7b74a5483ea88b1 and stable patch ID remains 554ed6d6fb0fee0e544564f20e156a9024fd6bc9. The prior exact image-compatibility and sandbox-base-resolution evidence remains applicable. Exact-head documentation writer revalidation passed; fresh GitHub Actions is authoritative.

  9. System Security — PASS. Both signed refreshes are conflict-free, preserve the effective patch byte-for-byte, and introduce no new runtime trust-boundary interaction. For #7853 specifically, the portable profile supplies onboarding defaults but neither stages messaging credentials nor bypasses registry-driven credential-drift validation.

Provenance and Required Gates

The exact head preserves contributor history through signed merge commits and applies the current rubric from .agents tree 7320c9e331ddbcd9ff83e0fce9387a004e3bd1aa. This supplements the full prior nine-category review at #8389 (review).

Fresh required CI, protected E2E, the exact documentation receipt, unresolved-review resolution, GitHub commit verification, and an independent exact-head approval remain mandatory. This review waives none of those gates.

cv and others added 3 commits August 5, 2026 20:37
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
test/image-compatibility-docker-lifecycle.test.ts (1)

68-68: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use the established POSIX PATH separator.

Line 68 uses path.delimiter. This test runs on Linux CI, so use : to match the repository test convention.

Proposed change
-      process.env.PATH = `${fixtureDir}${path.delimiter}${originalPath}`;
+      process.env.PATH = `${fixtureDir}:${originalPath}`;

Based on learnings: use the established POSIX : separator in these Linux-only tests and do not replace it with path.delimiter.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/image-compatibility-docker-lifecycle.test.ts` at line 68, Update the
PATH construction in the test setup around the environment assignment to use the
established POSIX “:” separator instead of path.delimiter, preserving the
existing fixtureDir and originalPath ordering.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@test/image-compatibility-docker-lifecycle.test.ts`:
- Line 68: Update the PATH construction in the test setup around the environment
assignment to use the established POSIX “:” separator instead of path.delimiter,
preserving the existing fixtureDir and originalPath ordering.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c925717e-d92d-4289-9b0c-f32780a0fb99

📥 Commits

Reviewing files that changed from the base of the PR and between 8619d8d and fd0b2ad.

📒 Files selected for processing (3)
  • .github/workflows/pr-self-hosted.yaml
  • .github/workflows/sandbox-images-and-e2e.yaml
  • test/image-compatibility-docker-lifecycle.test.ts

@github-actions github-actions Bot added v0.0.105 Release target and removed v0.0.104 labels Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 3

🧹 Nitpick comments (1)
test/image-compatibility-docker-lifecycle.test.ts (1)

68-68: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the POSIX : separator for the Bash shim.

The shim runs through Bash, and this test runs on POSIX CI. path.delimiter makes the injected PATH depend on the host OS. Use : so the fixture directory remains a valid POSIX PATH entry.

Based on learnings, this repository uses : for PATH construction in Linux-only tests.

Suggested change
-      process.env.PATH = `${fixtureDir}${path.delimiter}${originalPath}`;
+      process.env.PATH = `${fixtureDir}:${originalPath}`;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/image-compatibility-docker-lifecycle.test.ts` at line 68, Update the
PATH assignment in the test setup to join fixtureDir and originalPath with the
POSIX “:” separator instead of path.delimiter, keeping the Bash shim’s PATH
valid on POSIX CI.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/image-compatibility-docker-lifecycle.test.ts`:
- Around line 90-100: Extract the cleanup logic from the finally block into a
named helper, and have it remove every probe container name recorded by the
Docker shim, including both the initial and retry probe names. Invoke this
helper from the finally path so cleanup still occurs when the test fails before
assertions complete, while preserving fixture-directory removal and PATH
restoration.
- Line 32: Update the environment setup around originalPath to also record
whether process.env.PATH was initially present, then restore that presence state
in the finally block: reinstate the saved value when present and delete
process.env.PATH when it was originally absent. Keep the existing test cleanup
behavior unchanged for other state.
- Around line 20-23: Increase the timeout configured through testTimeoutOptions
for the “removes a retained first probe before accepting the retry (`#8375`)” test
so it exceeds the 120-second imageMeetsMinimumGlibc retry duration and includes
setup and cleanup margin.

---

Nitpick comments:
In `@test/image-compatibility-docker-lifecycle.test.ts`:
- Line 68: Update the PATH assignment in the test setup to join fixtureDir and
originalPath with the POSIX “:” separator instead of path.delimiter, keeping the
Bash shim’s PATH valid on POSIX CI.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c8f93d6f-39ce-48e8-afa8-a9b78ee4dde1

📥 Commits

Reviewing files that changed from the base of the PR and between dd09a9f and bcc8c25.

📒 Files selected for processing (7)
  • .github/workflows/pr-self-hosted.yaml
  • .github/workflows/sandbox-images-and-e2e.yaml
  • src/lib/agent/base-image-hermes-resolution.test.ts
  • src/lib/sandbox-base-image/image-compatibility.test.ts
  • src/lib/sandbox-base-image/image-compatibility.ts
  • test/helpers/onboard-script-mocks.cjs
  • test/image-compatibility-docker-lifecycle.test.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/lib/agent/base-image-hermes-resolution.test.ts
  • src/lib/sandbox-base-image/image-compatibility.ts
  • .github/workflows/pr-self-hosted.yaml
  • test/helpers/onboard-script-mocks.cjs
  • src/lib/sandbox-base-image/image-compatibility.test.ts
  • .github/workflows/sandbox-images-and-e2e.yaml

Comment thread test/image-compatibility-docker-lifecycle.test.ts
Comment thread test/image-compatibility-docker-lifecycle.test.ts
Comment thread test/image-compatibility-docker-lifecycle.test.ts
@senthilr-nv
senthilr-nv requested review from prekshivyas and removed request for cv August 7, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: packaging Packages, images, registries, installers, or distribution area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression v0.0.105 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Brev][Sandbox] Cold glibc probe times out, rejects compatible published image, and triggers local rebuild

3 participants