Skip to content

test: drop source-shape tests from #2851 to unbreak main - #2863

Closed
cjagwani wants to merge 2 commits into
mainfrom
hotfix/2681-drop-source-shape-tests
Closed

test: drop source-shape tests from #2851 to unbreak main#2863
cjagwani wants to merge 2 commits into
mainfrom
hotfix/2681-drop-source-shape-tests

Conversation

@cjagwani

@cjagwani cjagwani commented May 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Hotfix. Main is red on the source-shape-test-budget hook because #2851 merged at 22:23 UTC just after #2829 enforced maxSourceShapeCases=0 at 21:30 UTC. My PR's CI ran under the old regime; the merge landed under the new policy.

This drops the 11 source-shape (toMatch) assertions in test/repro-2681-group-writable.test.ts. They violated the new policy.

Why deletion is the right hotfix

The structural-invariant assertions were redundant with behavioral CI we already have:

  • build-sandbox-images — proves the Dockerfile + Dockerfile.base + chmod changes BUILD correctly
  • test-e2e-sandbox — sandbox lifecycle works end-to-end (group-writable dir gets created)
  • test-e2e-gateway-isolation — proves gateway-as-different-UID can perform mutable config writes

If a future change reverts the chmod g+w or the gateway group membership, test-e2e-gateway-isolation would catch it because gateway writes to OpenClaw config would fail.

Failing job (before hotfix)

https://github.com/NVIDIA/NemoClaw/actions/runs/25235761538/job/74001520150

Source-shape test budget exceeded: 11 cases > 0.
Replace source-text assertions with behavior tests, then ratchet the budget.

After hotfix

$ npx tsx scripts/find-source-shape-tests.ts --check
No source-shape tests detected.

Follow-up

A behavior-based regression test for #2681 (e.g. inside test-e2e-gateway-isolation that explicitly attempts a write from gateway UID) can land as a separate PR if the existing e2e coverage proves insufficient.

Type of Change

  • Code change (feature, bug fix, or refactor)

AI Disclosure

  • AI-assisted — tool: Claude Code

Summary by CodeRabbit

  • Tests
    • Removed an outdated regression test.
    • Updated startup test harness to include a new no-op stub for permission-related setup used by diagnostics tests.

#2851 merged just after #2829 enforced maxSourceShapeCases=0.
The 11 toMatch assertions in test/repro-2681-group-writable.test.ts
violated the new policy, breaking main on the source-shape budget hook.

Behavioral coverage of the group-writable contract is provided by:
- build-sandbox-images (Dockerfile syntax + chmod application)
- test-e2e-sandbox (sandbox lifecycle including writes)
- test-e2e-gateway-isolation (gateway-as-different-UID writes)

A proper behavior-based regression test for #2681 can land as a
follow-up if the existing e2e coverage proves insufficient.
@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

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: 5063b1ba-23ed-49a7-9d90-e20249cae29d

📥 Commits

Reviewing files that changed from the base of the PR and between b00a2dd and 1e3e8af.

📒 Files selected for processing (1)
  • test/nemoclaw-start.test.ts
✅ Files skipped from review due to trivial changes (1)
  • test/nemoclaw-start.test.ts

📝 Walkthrough

Walkthrough

Removed a regression test file that validated group-writable permission behavior; added a no-op normalize_mutable_config_perms stub to the Nemoclaw startup test harness.

Changes

Cohort / File(s) Summary
Deleted test
test/repro-2681-group-writable.test.ts
Removed a comprehensive regression test that verified Dockerfile group additions, setgid and group-writable permissions, .config-hash chmod to 664, mutation persistence checks, nemoclaw-start.sh normalize_mutable_config_perms() behavior, and shields.ts unlock chmod expectations.
Modified test harness
test/nemoclaw-start.test.ts
Added a no-op stub definition for normalize_mutable_config_perms in the injected startup script stubs used by the test harness (single-line addition).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped through tests and nudged a tiny line,
A stub now waits where checks once used to shine.
One file gone, one helper stays quietly bright—
May reviewers find the change polite. ✨

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: removing source-shape tests from test/repro-2681-group-writable.test.ts that were blocking main due to policy violation from #2851/#2829.
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 hotfix/2681-drop-source-shape-tests

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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

The runPreGatewaySetup helper stubs every helper the script invokes;
#2851 added a normalize_mutable_config_perms call but no stub, so the
test bash run hits an undefined function under set -euo pipefail and
exits 127.
@copy-pr-bot

copy-pr-bot Bot commented May 1, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cv cv closed this May 1, 2026
@wscurran wscurran added the chore Build, CI, dependency, or tooling maintenance label Jun 8, 2026
@cv
cv deleted the hotfix/2681-drop-source-shape-tests branch June 28, 2026 00:24
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.

3 participants