Skip to content

ci(families): add isolation review guardrails - #2

Closed
chaofengw-nv wants to merge 2 commits into
yifeif-nv:agent/ai-native-horizontal-scalefrom
chaofengw-nv:ci/family-isolation-guard
Closed

ci(families): add isolation review guardrails#2
chaofengw-nv wants to merge 2 commits into
yifeif-nv:agent/ai-native-horizontal-scalefrom
chaofengw-nv:ci/family-isolation-guard

Conversation

@chaofengw-nv

Copy link
Copy Markdown

Background

PR NVIDIA/TensorRT-Model-Connect#1093 makes the model family the unit of ownership and fault isolation. Static architecture checks catch direct source dependencies, but they cannot prove runtime/source independence or consistently identify semantic family coupling introduced through shared tooling, benchmarks, examples, and validation code.

Exit Criteria

  • A selected family's GPU/TRT and E2E tests run without sibling-family source visibility.
  • Its runtime proof exposes only core, the selected backend, and that family's DSO.
  • Automated review preserves intentional model-specific duplication and evaluates family ownership, shared semantic neutrality, benchmark/validation integrity, and shared-change blast radius on every push.
  • Semantic checks remain advisory while their signal is calibrated; this PR does not make AI review the merge authority.

Implementation

  • Run each selected family proof from a temporary source root containing only core/builder, root test configuration, and the owning family. Reject family symlinks and disable user-site imports so sibling imports and file reuse fail at execution time.
  • Retain the existing isolated runtime root containing only core, TensorRT backend, and libtrtmc_model_<family>.so.
  • Add REVIEW.md as the repository-wide Standards/Spec review contract for automated and human reviewers.
  • Add four warning-level CodeRabbit custom checks plus focused instructions for family, tooling, benchmark, example, and validation paths. Reviews rerun on every push and report PASS, BLOCK, or HUMAN REVIEW REQUIRED.
  • Add source-quality regression tests for isolation behavior and for the required CodeRabbit policy.

Validation

  • ruff check --config ruff.toml tools/ci/context.py tools/ci/process.py tools/ci/e2e.py tools/tests/test_new_ci.py: passed.
  • PYTHONPATH=core/builder:apps/benchmark:. python3 -m pytest tools/tests/test_new_ci.py -q: 26 passed.
  • CI_BASE_REF=github/pr/1093 PYTHONPATH=core/builder:apps/benchmark:. python3 -m tools.ci pipeline source-quality: 107 passed on head 960389b955e5c4b822efec1121e075e6bfd333f1.
  • PYTHONPATH=core/builder:apps/benchmark:. python3 -m pytest -q -m "not gpu and not trt" -p no:cacheprovider: 339 passed, 274 skipped, 5 deselected on the same head.
  • .coderabbit.yaml validated against the current CodeRabbit v2 JSON schema.
  • Target-hardware E2E was not run locally; GitHub and protected CI remain required evidence.

Notes For Future Readers

Run each selected family E2E from a temporary source root containing only the shared build contracts and its owning family. Keep the existing runtime DSO isolation so sibling imports, file reads, links, and symlinks fail during the real proof.

Teach automated reviews that cross-family duplication is intentional, and cover both policies with source-quality tests.

Signed-off-by: chaofengw <chaofengw@nvidia.com>
Give CodeRabbit a repository-wide review contract and advisory checks for family ownership, shared semantic neutrality, benchmark validation integrity, and shared-change blast radius. Re-run reviews on every push and focus shared-path comments on evidence-backed behavior.

Keep the checks in warning mode while their signal is calibrated, and preserve the policy with source-quality regression tests.

Signed-off-by: chaofengw <chaofengw@nvidia.com>
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.

1 participant