Skip to content

Keep private source hygiene checks out of public tests - #33

Merged
zhouaihui merged 1 commit into
inclusionAI:mainfrom
zhouaihui:fix/private-source-hygiene
Nov 16, 2026
Merged

zhouaihui merged 1 commit into
inclusionAI:mainfrom
zhouaihui:fix/private-source-hygiene

Conversation

@zhouaihui

@zhouaihui zhouaihui commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Remove the environment-specific source hygiene scanner and its internal identifiers from public tests. Retain all seven general runtime validation, trust policy, patch provenance and CI contracts in tests/source/test_runtime_source_contracts.py, which CI continues to discover automatically. Private hygiene checks remain outside the repository.

Verification

  • Isolated Linux venv, Python 3.12.3 and pytest 8.4.2: seven public source contracts and two local hygiene checks passed (9 total). AST comparison confirms the retained tests and helper are unchanged.
  • The local scanner rejects the original leaking file and accepts the cleaned source.
  • Passed repository lint, Python compilation and maintained documentation link checks.
  • Built and audited wheels and sdists for all three packages. Content scans passed for all six artifacts, including checks that the old test and private helper files are absent.
  • Source hashes match the Linux validation snapshot. GPU/runtime tests were not run for this test-only change. Historical Git content is outside this patch.

Compatibility and provenance

  • No public config, checkpoint or export behavior changes; no new dependencies.
  • Existing ASpec test implementation and license header retained; no upstream implementation changes.

This change edits one test module, tests/source/test_runtime_source_contracts.py. Git reports the change as a rename with 1 insertion and 84 deletions. The retained file has 150 lines and seven test functions. Its module docstring now describes runtime validation, patch provenance, and CPU CI contracts.

The deleted lines are the public source hygiene checks, according to the raw summary. The returned output does not show those deleted lines, so their exact content is not verified here.

Retained tests:

  • Production runtime validation under aspec/ does not use assert. CuTe @cute.jit and @cute.kernel functions are exempt.
  • Host-side asserts are not exempted by the CuTe rule.
  • trust_remote_code never defaults to True in production code.
  • The current SGLang v0.5.21 patch has registered provenance in docs/framework/REFERENCES.md, and its license file exists.
  • CI workflow runs python -m pytest.
  • The EAGLE4 validation modules under tools/validation/ contain no assert statements.
  • CI runs python -m pytest -q tests/cpu, and the three EAGLE4 CPU test files exist.

Compatibility:

  • The diff changes no production code, public configuration, checkpoint format, or export behavior.
  • The diff adds no dependencies.
  • The affected behavior is test coverage only. The retained tests read repository files, including the CI workflow.

Verification:

  • The author reports that nine tests passed: seven public contracts and two local hygiene checks. This run did not reproduce that result.
  • The author reports that lint, Python compilation, documentation link checks, and wheel and sdist content scans passed. These are not verified here.
  • No CI result for the current head is available in the evidence.
  • GPU and runtime tests were not run, according to the author.

Unverified scope:

  • The private hygiene checks now live outside the repository. Their behavior is not verified in this review.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The module description now names runtime validation, patch provenance, and CPU CI contracts. The module no longer contains checks that scan public files for private-environment or archive markers or assert that the archive directory is absent.

Changes: Runtime source contract tests

Layer / File(s) Summary
Runtime contract test scope
tests/source/test_runtime_source_contracts.py
The module description now names runtime validation, patch provenance, and CPU CI contracts. The public-tree and root-file inventories, marker scans, and archive directory assertion were removed.

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

Change: Other

Suggested reviewers: longxmas

Merge Risk: Minimal · up to c76c5

This is a test-only cleanup that removes private-environment hygiene checks from the public test suite. It does not change runtime behavior, configuration, or shipped artifacts, and no actionable merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: private source hygiene checks are removed from the public test suite. The raw summary confirms the scanner, its file-tree and text-marker scans, constants, and helper …
Description check Passed The description follows the repository template. It has Outcome, Verification, and Compatibility and provenance sections. Outcome states the removed scanner and the retained contracts. Verification li…
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.
Full details: Title check

Explanation

The title names the main change: private source hygiene checks are removed from the public test suite. The raw summary confirms the scanner, its file-tree and text-marker scans, constants, and helper were removed from tests/source/test_runtime_source_contracts.py. The title is specific, one sentence, and matches the objectives.

Full details: Description check

Explanation

The description follows the repository template. It has Outcome, Verification, and Compatibility and provenance sections. Outcome states the removed scanner and the retained contracts. Verification lists the Linux venv test run, lint, compilation, link checks, artifact content scans, and states that GPU/runtime tests were not run. Compatibility states no public config, checkpoint, or export changes and no new dependencies. The provenance bullet on upstream source and license-text updates is answered only partly, since it says the license header is retained but does not state an upstream revision. The description does not attach credentials, auth files, private data, or weights. These gaps are minor and do not block merge.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 11f6c03 and c76c5ef.

Files selected for processing: 1

  • tests/source/test_runtime_source_contracts.py

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

@icavan icavan 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.

LGTM

@zhouaihui
zhouaihui merged commit 0216039 into inclusionAI:main Nov 16, 2026
3 checks passed
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