Skip to content

test(cli): restore source-shape guard#3636

Merged
cjagwani merged 3 commits into
refactor/delete-unused-codefrom
test/source-shape-real-detector
May 16, 2026
Merged

test(cli): restore source-shape guard#3636
cjagwani merged 3 commits into
refactor/delete-unused-codefrom
test/source-shape-real-detector

Conversation

@cv
Copy link
Copy Markdown
Collaborator

@cv cv commented May 16, 2026

Summary

Reintroduces the source-shape guard as a stacked follow-up to #3632, but fixes the detector so it catches Node assert.* source-text assertions instead of reporting a false zero. It then completes the source-shape purge by removing the detected source-text assertions from test/onboard.test.ts and ratcheting the budget back to zero.

Related Issue

Stacked on #3632.

Changes

  • Restored scripts/find-source-shape-tests.ts, source-shape:* npm scripts, and the prek source-shape budget hook.
  • Added detection for assert.match, assert.doesNotMatch, assert.ok, and related Node assert-style source-text assertions.
  • Avoided counting temp Dockerfile fixture behavior tests as source-shape offenders.
  • Removed all detected source-shape tests from test/onboard.test.ts where behavior is covered by existing helper/integration tests.
  • Ratcheted the source-shape budget back to zero.

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
  • make 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)

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

Summary by CodeRabbit

  • Tests

    • Enhanced test validation infrastructure to track and enforce limits on source-shape test cases across the codebase.
    • Updated test coverage with new behavioral assertions and removed outdated static-source regression checks.
  • Chores

    • Added development tools and CI configuration to support automated source-shape test monitoring and budgeting.

Review Change Stack

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this May 16, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3e88b741-8c06-4e6f-b77c-94498eb31bfa

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:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/source-shape-real-detector

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/refactor/delete-unused-code
Head: HEAD
Confidence: high

Required E2E

  • None. No E2E is recommended. The PR is limited to CI/test-quality tooling, package.json development scripts, a CI budget file, and unit-test maintenance. It does not change runtime/user-flow code for installer/onboarding, sandbox lifecycle, credentials, security boundaries, network policy, inference routing, deployment, or real assistant behavior.

Optional E2E

  • None.

New E2E recommendations

  • None.

cv added 2 commits May 15, 2026 17:32
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv requested a review from cjagwani May 16, 2026 01:41
Copy link
Copy Markdown
Contributor

@cjagwani cjagwani left a comment

Choose a reason for hiding this comment

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

approved

@cjagwani cjagwani merged commit ba50754 into refactor/delete-unused-code May 16, 2026
28 of 29 checks passed
@cv cv mentioned this pull request May 16, 2026
15 tasks
@coderabbitai coderabbitai Bot mentioned this pull request May 16, 2026
12 tasks
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.

2 participants