@elench/testkit 0.1.43 → 0.1.45

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.
package/README.md CHANGED
@@ -70,6 +70,11 @@ export default defineTestkitSetup({
70
70
  },
71
71
  reporting: {
72
72
  knownFailuresFile: "testkit.known-failures.json",
73
+ issueValidation: {
74
+ provider: "github",
75
+ mode: "warn",
76
+ cacheTtlSeconds: 900,
77
+ },
73
78
  },
74
79
  services: {
75
80
  api: service({
@@ -145,6 +150,7 @@ for:
145
150
  - test-local migrate / seed overrides
146
151
  - named HTTP suite profiles
147
152
  - known-failure annotation merge for enriched status/run artifacts
153
+ - optional GitHub-backed known-failure issue validation
148
154
  - repo-declared suite/file skip policies with explicit reasons
149
155
  - telemetry upload configuration
150
156
 
@@ -155,6 +161,29 @@ If `reporting.knownFailuresFile` is configured, `testkit` enriches
155
161
  - per-file `triage` metadata (issue, classification, description)
156
162
  - top-level `triageSummary` counts for known vs untriaged failures
157
163
 
164
+ Known-failure entry authoring uses this contract:
165
+
166
+ - `title`
167
+ - exact issue-tracker title for the linked issue
168
+ - shared issues may reuse the same title across multiple local entries
169
+ - `description`
170
+ - product-local bug slice or route-family summary
171
+ - this is where file-specific nuance belongs
172
+ - `whyFailing`
173
+ - underlying technical cause of the failure
174
+
175
+ If `reporting.issueValidation` is also configured, `testkit` validates known-failure
176
+ issue references against GitHub and adds top-level `knownFailuresIssueValidation`
177
+ data to the run/status artifacts. The most important stale-triage signal is:
178
+
179
+ - a known-failure test still fails, but the linked GitHub issue is closed
180
+
181
+ In `mode: "error"`, exact GitHub metadata drift is also treated as a validation
182
+ failure:
183
+
184
+ - title does not match the linked issue title
185
+ - local open/closed state does not match the linked issue state
186
+
158
187
  ## Authoring
159
188
 
160
189
  HTTP suites:
@@ -15,6 +15,7 @@ import {
15
15
  normalizeRuntimeMaxConcurrentTasks,
16
16
  normalizeRuntimeInstances,
17
17
  } from "../runner/execution-config.mjs";
18
+ import { normalizeKnownFailureIssueValidationConfig } from "../known-failures/github.mjs";
18
19
 
19
20
  const TESTKIT_K6_BIN = "TESTKIT_K6_BIN";
20
21
  const DEFAULT_LOCAL_IMAGE = "pgvector/pgvector:pg16";
@@ -184,8 +185,11 @@ function normalizeReportingConfig(value) {
184
185
  throw new Error('testkit.setup.ts reporting.knownFailuresFile must be a non-empty string');
185
186
  }
186
187
 
188
+ const issueValidation = normalizeKnownFailureIssueValidationConfig(value.issueValidation);
189
+
187
190
  return {
188
191
  knownFailuresFile,
192
+ issueValidation,
189
193
  };
190
194
  }
191
195