Skip to content

fix(test): accept ESRCH after Ollama proof descendant exits - #12797

Merged
rsliter merged 2 commits into
mainfrom
codex/fix-ollama-proof-proc-race
Oct 8, 2026
Merged

rsliter merged 2 commits into
mainfrom
codex/fix-ollama-proof-proc-race

Conversation

@rsliter

@rsliter rsliter commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

The Linux process ownership test accepts ESRCH when a reaped descendant disappears during a /proc/<pid>/stat read. It still rejects other read errors and requires any visible descendant to be dead or a zombie.

Reason

The reported failures on main returned ESRCH at an assertion that accepted only ENOENT. Both indicate that the descendant is gone during this procfs check.

Changes

  • Accept ENOENT and ESRCH from the descendant's procfs read.
  • Clarify the two points at which the descendant can disappear.

Verification

  • vitest run --project cli src/lib/onboard/ollama-systemd/executable-proof.test.ts: 30 passed, 1 skipped. The Linux-only process test is skipped on macOS and requires Linux CI.
  • oxfmt --check src/lib/onboard/ollama-systemd/executable-proof.test.ts: passed.
  • oxlint src/lib/onboard/ollama-systemd/executable-proof.test.ts: passed.
  • npm run validate:pr: passed.
  • git diff origin/main...HEAD --check: passed.
  • Confirmed the diff contains no secrets, API keys, or credentials.

Signed-off-by: Rebecca Sliter [email protected]

Summary by CodeRabbit

  • Tests
    • Updated a process-cleanup test to accept either of the expected errors when a reaped process disappears during inspection.

@rsliter rsliter self-assigned this Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 154ce974-16ee-4d7f-ab99-b541284d9202
📥 Commits

Reviewing files that changed from the base of the PR and between cccef30 and 37c391c.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 6212b90f-c378-422c-95b1-5a23d283a93c
📥 Commits

Reviewing files that changed from the base of the PR and between 1828f2a and cccef30.

📒 Files selected for processing (1)
  • src/lib/onboard/ollama-systemd/executable-proof.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Walkthrough

Walkthrough

The descendant cleanup test now accepts ENOENT or ESRCH when a procfs read encounters a reaped descendant that has disappeared.

Changes

Procfs cleanup assertion

Layer / File(s) Summary
Accept procfs disappearance errors
src/lib/onboard/ollama-systemd/executable-proof.test.ts
The cleanup assertion accepts ENOENT and ESRCH. Its comment covers disappearance before opening the procfs file or during the read.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Suggested reviewers: ericksoa

Merge Risk: ⚪ Minimal · up to cccef

This is a narrow test-only adjustment for procfs reporting a vanished descendant. No actionable merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main test fix: accepting ESRCH when the Ollama proof descendant exits.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-code-quality

github-code-quality Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 37c391c in the codex/fix-ollama-pro... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/fix-ollama-pro... 37c391c +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit 37c391c in the codex/fix-ollama-pro... branch is 86%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/fix-ollama-pro... 37c391c +/-
src/lib/onboard.ts 62% 46% -16%
src/lib/onboard...rchestration.ts 41% 32% -9%
src/lib/state/sandbox.ts 92% 84% -8%
src/lib/actions...ess-recovery.ts 65% 78% +13%
src/lib/inferen...file/cleanup.ts 73% 88% +15%
src/lib/state/l...diness-lease.ts 66% 82% +16%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/inferen...nvidia/index.ts 0% 84% +84%
src/lib/onboard...ternal-image.ts 0% 91% +91%

Updated October 08, 2026 12:19 UTC

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 37c391c. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@kaofelix
kaofelix self-requested a review October 8, 2026 12:56
@rsliter
rsliter merged commit 7d8446a into main Oct 8, 2026
87 of 90 checks passed
@rsliter
rsliter deleted the codex/fix-ollama-proof-proc-race branch October 8, 2026 13:08
prekshivyas pushed a commit that referenced this pull request Oct 8, 2026
…ng allocation (#12763)

## Outcome

Dashboard and Hermes API allocation skips ports whose forward ownership
cannot be verified and selects a verified available port. Other
observation errors still stop allocation. Unverified ports remain
occupied, and exhaustion diagnostics name every blocked port.

## Reason

One uncertain listener previously blocked allocation across the entire
range, even when other ports were free.

**Original author: @sandeepstele (Sandeep Satheesh).** This adopts
#12352 into NVIDIA/NemoClaw so required CI can access the reviewed
OpenShell SDK. Sandeep's original authored commit,
`9af8d39c4ab21f04cbd65182c121002bc502c197`, is preserved unchanged.
Rebecca's follow-up strengthens exhaustion coverage, explains
ownership-verification failures, documents read-only diagnostics and
escalation, and integrates required validation infrastructure.

### Related issues

Refs #11979. Adapter-side ownership detection is unchanged, so this does
not claim to resolve every reported cause.

## Changes

- Treat ownership-indeterminate ports as occupied while continuing the
existing allocation scan.
- Preserve fatal handling for other observation failures.
- Cover dashboard and Hermes fallback allocation, timeout failure, and
all eleven blocked dashboard ports in exhaustion diagnostics.
- Explain recovery for unverified and mixed port failures while
preserving occupied-port remedies. Include a blocked preferred port
outside the default range and its observed state or registered owner.
- Update sandbox operation and troubleshooting guidance to distinguish
verified new port allocation from registered-port recovery. Document
scoped forward and listener inspection, their ownership-proof limits,
and escalation while preserving unknown resources.

## Verification

Candidate: `061f4e4feeb014d86557a423595d88f8ce704935`.

- Integrated canonical main `5f765a1` to consume the merged Linux
process-cleanup test fix in #12797. The port implementation and its
tests remain unchanged.
- `node node_modules/vitest/vitest.mjs run --project cli
src/lib/onboard/dashboard-port.test.ts
src/lib/onboard/hermes-api-port.test.ts
src/lib/adapters/openshell/forward-cli.test.ts
src/lib/onboard/ollama-systemd/executable-proof.test.ts`: 206 tests
passed; one Linux-only test skipped on macOS and awaits Linux CI.
- `node node_modules/vitest/vitest.mjs run --project integration
test/automation/pull-requests/growth-guardrails.test.ts`: 7 tests
previously passed at `761972d`.
- Normal commit-message, publication-validation, CLI TypeScript and
checked-JavaScript hooks passed. Plugin push hooks skipped unaffected
paths.
- GitHub verified all nine PR commits, including the preserved original
contribution.
- `npm run docs`: passed after integration with zero errors, two
warnings and 125 validated routes. All six generated page variants were
inspected. The port-recovery wording is unchanged from the prior
independent documentation review, which found no blocking issues.
- The diff contains no secrets, API keys, or credentials.

## Review notes

Sensitive paths: `src/lib/onboard/dashboard-port.ts` and its
dashboard/Hermes tests. Existing review context is linked in [PR
#12352](#12352 (review))
for candidate `71ad0e56825c770da9d5797dfc31d5b2098fc02a`. This
replacement awaits its own required CI and independent review.

---
Signed-off-by: Sandeep Satheesh <[email protected]>
Signed-off-by: Rebecca Sliter <[email protected]>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Ports with unverified ownership are treated as occupied, allowing
allocation to continue to the next verified available port.
* When a range is exhausted, errors identify blocked ports and provide
applicable recovery guidance. If no candidate’s ownership can be
verified, the error directs users to inspect ownership before retrying.
* Foreign or registered ports remain unavailable. Other indeterminate
observation errors stop allocation.
* **Documentation**
* Updated sandbox and troubleshooting guides to explain verified port
selection, blocked states, ownership checks, and recovery guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Sandeep Satheesh <[email protected]>
Signed-off-by: Rebecca Sliter <[email protected]>
Co-authored-by: Sandeep Satheesh <[email protected]>
Co-authored-by: Rebecca Sliter <[email protected]>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance platform: linux Affects non-Ubuntu Linux environments labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance platform: linux Affects non-Ubuntu Linux environments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants