Commit 860962d
authored
test(e2e): ratchet live assertion surface (#10935)
## Outcome
NemoClaw now inventories direct and transitive live E2E assertions
without executing live test modules. A checked-in baseline and PR growth
guard prevent assertion growth while Epic #10920 reduces the suite.
## Reason
The live E2E suite had no deterministic assertion inventory. Assertions
could move into companion modules or change syntax without making the
increased failure surface visible.
### Related issues
Closes #10934
Part of #10920
## Changes
- Add a TypeScript-parser census for Vitest matchers, Node assertions,
named assertion helpers, failure guards, object-field assertions, and
detectable generated probes.
- Resolve live companion imports statically and report direct,
transitive, per-file, and unique-suite totals without loading live
modules.
- Add a compact current-main baseline that preserves the fixed Epic
#10920 reference and records the lower post-#10722 main state.
- Run the ratchet from `npm run checks:repository` and reject baseline
increases through the existing PR growth guard.
- Document the assertion-disposition and baseline-update workflow in
`test/README.md`.
The new mechanism is required by Epic #10920. Repository checks and
E2E-remediation PRs consume it. A direct assertion count is insufficient
because it can be reduced by moving assertions into helpers or other
assertion forms. `test/repository/e2e-assertion-census.test.ts` protects
the parser, import graph, path controls, census, and ratchet.
## Verification
- `npx vitest run --project integration
test/repository/e2e-assertion-census.test.ts
test/repository/checks-runner.test.ts
test/automation/pull-requests/growth-guardrails.test.ts` — 3 files and
66 tests passed.
- `npm run typecheck:cli` — passed.
- `npm run checks:repository` — passed, including the new
1,977-direct-expect baseline across 86 live test files.
- Commit hooks — pre-commit, commit-msg, and pre-push passed. The
published commit is GitHub Verified.
- No live E2E run applies because this change analyzes source and does
not change live behavior.
- The diff contains no secrets, API keys, or credentials.
## Review notes
`npm run check` completed every pre-commit and repository-wide
governance check, then one existing CLI coverage worker did not exit
after the active workers finished. The run was stopped and is not
claimed as passing.
`npm run test:changed` passed its targeted growth-guard test, then
selected 1,682 unrelated CLI, plugin, and E2E-support files. It reported
62 failures from existing host state, unavailable macOS commands such as
`ip`, and parallel timeout paths. None involved the changed census,
ratchet, runner-registration, or growth-guard tests. Required GitHub CI
remains the authoritative broad gate for this PR.
---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added tooling to scan end-to-end tests and track assertion counts.
- Added configurable assertion budgets with reporting, JSON export,
validation, and update commands.
- Added safeguards for assertion growth, missing files, renamed tests,
and budget violations.
- **CI & Quality**
- Integrated assertion-budget checks into repository validation and
growth guardrails.
- Added baseline metadata covering current end-to-end test assertion
limits.
- Added comprehensive coverage for budget enforcement and diagnostic
reporting.
- **Documentation**
- Documented the live end-to-end assertion ratchet process and approved
budget updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>1 parent d4eff54 commit 860962d
10 files changed
Lines changed: 1684 additions & 9 deletions
File tree
- ci
- scripts/checks
- test
- automation/pull-requests
- helpers
- repository
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
0 commit comments