@xenos1996/usa 2.26.2 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/engine/audit-config.d.ts +66 -0
  2. package/dist/engine/audit-config.d.ts.map +1 -0
  3. package/dist/engine/audit-config.js +148 -0
  4. package/dist/engine/audit-config.js.map +1 -0
  5. package/dist/engine/audit-types.d.ts +44 -0
  6. package/dist/engine/audit-types.d.ts.map +1 -0
  7. package/dist/engine/audit-types.js +2 -0
  8. package/dist/engine/audit-types.js.map +1 -0
  9. package/dist/engine/audit-warnings.d.ts +56 -0
  10. package/dist/engine/audit-warnings.d.ts.map +1 -0
  11. package/dist/engine/audit-warnings.js +116 -0
  12. package/dist/engine/audit-warnings.js.map +1 -0
  13. package/dist/engine/audit.d.ts +14 -38
  14. package/dist/engine/audit.d.ts.map +1 -1
  15. package/dist/engine/audit.js +9 -500
  16. package/dist/engine/audit.js.map +1 -1
  17. package/dist/engine/evaluate-packs.d.ts +37 -0
  18. package/dist/engine/evaluate-packs.d.ts.map +1 -0
  19. package/dist/engine/evaluate-packs.js +144 -0
  20. package/dist/engine/evaluate-packs.js.map +1 -0
  21. package/dist/engine/invariants.d.ts +8 -0
  22. package/dist/engine/invariants.d.ts.map +1 -1
  23. package/dist/engine/invariants.js +11 -0
  24. package/dist/engine/invariants.js.map +1 -1
  25. package/dist/engine/pack-selection.d.ts +21 -0
  26. package/dist/engine/pack-selection.d.ts.map +1 -0
  27. package/dist/engine/pack-selection.js +63 -0
  28. package/dist/engine/pack-selection.js.map +1 -0
  29. package/dist/engine/report-build.d.ts +22 -0
  30. package/dist/engine/report-build.d.ts.map +1 -0
  31. package/dist/engine/report-build.js +67 -0
  32. package/dist/engine/report-build.js.map +1 -0
  33. package/dist/foundation/interview.d.ts.map +1 -1
  34. package/dist/foundation/interview.js +16 -5
  35. package/dist/foundation/interview.js.map +1 -1
  36. package/package.json +9 -8
  37. package/rules/core/code-quality.yaml +12 -2
  38. package/rules/core/provenance-attestation.yaml +5 -0
  39. package/rules/core/testing-assurance.yaml +19 -4
@@ -137,11 +137,22 @@ rules:
137
137
  patterns:
138
138
  - 'reports/**/*mut*'
139
139
  - 'reports/mutation/**'
140
+ # Stryker's default config file has been `stryker.config.*` since v6;
141
+ # `stryker.conf.*` is the pre-6 name and is kept for older projects.
142
+ - 'stryker.config.*'
140
143
  - 'stryker.conf.*'
141
144
  - '.stryker.conf.*'
142
145
  - '.mutmut*'
143
146
  - 'mutants/**'
144
- why: 'Coverage tells you which lines ran, not whether the test would have failed if the line were wrong; a mutation config or report proves the question was asked.'
147
+ # A committed harness that mutates and asserts is evidence too — and
148
+ # stronger evidence than a config file, which proves only that someone
149
+ # installed a tool. USA mutates every rule check and asserts its own
150
+ # fixture flips (tests/integration/auditor-mutation.test.ts, ~100
151
+ # probes in every CI run); no third-party tool name appears anywhere in
152
+ # the repo, so the tool-only globs scored that work as absent.
153
+ - 'tests/**/*mutation*'
154
+ - 'tests/**/mutation/**'
155
+ why: 'Coverage tells you which lines ran, not whether the test would have failed if the line were wrong; a mutation config, report, or committed mutation harness proves the question was asked.'
145
156
  remediation: 'Run mutation testing on the highest-risk module first and keep the config or report in the repo.'
146
157
  references: ['Mutation-Testing']
147
158
 
@@ -178,7 +189,11 @@ rules:
178
189
  class: operations
179
190
  check:
180
191
  kind: grep_present
181
- pattern: '(retries\s*:\s*[1-9]|"retries"\s*:\s*[1-9]|retries=[1-9]|--retries[ =][1-9]|rerun-failed|flaky-test-retry|retry-on-failure)'
192
+ # A declared budget of zero is a budget, and a stricter one than 2:
193
+ # the project has decided a flaky test is a failure, not a rerun. The
194
+ # earlier `[1-9]` required paying for retries, so the most honest
195
+ # answer a deterministic suite can give was scored as absent.
196
+ pattern: '(retr(?:y|ies)\s*:\s*\d|retries=\d|--retries[ =]\d|rerun-failed|flaky-test-retry|retry-on-failure)'
182
197
  include:
183
198
  [
184
199
  'playwright.config.*',
@@ -190,8 +205,8 @@ rules:
190
205
  '.github/workflows/*.yaml',
191
206
  '.gitlab-ci.yml',
192
207
  ]
193
- why: 'A retries setting proves the project pays for reruns; it proves nothing about whether the tests are flaky or stable — only that the budget exists.'
194
- remediation: 'Declare an explicit retry budget (e.g. retries: 2 on CI) and track which tests consume it; quarantine chronic consumers.'
208
+ why: 'A declared retry budget says what the project does when a test fails twice: rerun it, or treat it as a defect. Either answer is a policy; silence means nobody decided.'
209
+ remediation: 'Declare the budget explicitly. Prefer retries: 0 and fix flakes; if reruns are unavoidable, set retries: 2 on CI only, track which tests consume it, and quarantine chronic consumers.'
195
210
  references: ['Google-Testing-Blog:Flaky']
196
211
 
197
212
  - id: TAS-010