Skip to content

test(cli): stub docker in follow log tests - #4622

Merged
cv merged 2 commits into
mainfrom
fix/ci-cli-preset-exit-code
Jun 1, 2026
Merged

test(cli): stub docker in follow log tests#4622
cv merged 2 commits into
mainfrom
fix/ci-cli-preset-exit-code

Conversation

@cv

@cv cv commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stubs a healthy Docker daemon in the two long-running logs --follow CLI tests. This keeps the tests on the intended streaming/signal path instead of depending on the host runner's Docker daemon state.

Changes

  • Added writeHealthyDockerStub(localBin) to the logs --follow source-exit test setup.
  • Added the same Docker stub to the SIGTERM child-drain follow-mode test setup.

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)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification run:

npm test -- --run test/cli.test.ts -t "keeps logs --follow running when one log source exits|waits for logs --follow children to stop after SIGTERM"
npx prek run --files test/cli.test.ts

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Tests
    • Improved CLI test reliability for the logs follow feature by enhancing Docker daemon verification in test environments.

Note: This release contains no user-facing changes.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Jun 1, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 88275c8a-a1f2-4dd4-bb35-45ba1f7f1d41

📥 Commits

Reviewing files that changed from the base of the PR and between 41b2b97 and 52cfec1.

📒 Files selected for processing (1)
  • test/cli.test.ts

📝 Walkthrough

Walkthrough

Two logs --follow CLI tests now stub a healthy Docker daemon before spawning the process. This ensures the Docker info preflight check passes in hermetic test environments, preventing the follow-log behavior from being short-circuited by daemon unavailability.

Changes

logs --follow test hermiticity

Layer / File(s) Summary
Docker daemon health stubs in logs --follow tests
test/cli.test.ts
The "keeps logs --follow running when one log source exits" and "waits for logs --follow children to stop after SIGTERM" tests call writeHealthyDockerStub(localBin) before CLI spawn to ensure Docker health preflight succeeds.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4605: Main PR that introduced Docker daemon preflight checks in logs.ts, requiring these test stubs to prevent flaky test failures from daemon unavailability.

Suggested labels

Docker, fix

Poem

🐰 A healthy docker daemon stub,
Keeps tests from failing in their hub,
Two hermetic checks now pass with grace,
Follow logs shine in their safe place!
No outage ghosts will interrupt,
The testing flow is now corrupt-proof.

🚥 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 accurately describes the main change: stubbing Docker in CLI follow log tests to ensure proper test isolation and behavior verification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-cli-preset-exit-code

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

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. No E2E is recommended because this PR changes only a CLI test harness/fixture in test/cli.test.ts. It cannot affect NemoClaw runtime behavior or real assistant user flows; normal unit/CI tests are the appropriate validation.

Optional E2E

  • None.

New E2E recommendations

  • None.

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: None
Optional scenario E2E: None

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required scenario E2E

  • None. Changed file is a non-scenario unit/CLI test outside test/e2e-scenario/ and does not affect scenario E2E workflows, metadata, runtime, suites, or scenario-relevant helper code.

Optional scenario E2E

  • None.

Relevant changed files

  • None.

@cv
cv marked this pull request as ready for review June 1, 2026 22:27
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 0 worth checking, 0 nice ideas
Top item: No actionable findings

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@cv
cv merged commit b936b2a into main Jun 1, 2026
30 checks passed
@cv
cv deleted the fix/ci-cli-preset-exit-code branch June 1, 2026 22:54
@wscurran wscurran added the chore Build, CI, dependency, or tooling maintenance label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants