valent-pipeline 0.19.59 → 0.19.60
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/package.json +1 -1
- package/src/commands/crosscheck.js +7 -1
- package/src/lib/crosscheck.js +13 -1
- package/src/lib/evidence.js +0 -0
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ import { join } from 'path';
|
|
|
12
12
|
import { randomBytes } from 'crypto';
|
|
13
13
|
import { crosscheckVerdict, formatCrosscheck } from '../lib/crosscheck.js';
|
|
14
14
|
import { extractFencedBlock } from '../lib/handoff.js';
|
|
15
|
-
import { evidenceDir, latestPins, resolveRoot, utcCompact, latestAssert, authenticateBaseline } from '../lib/evidence.js';
|
|
15
|
+
import { evidenceDir, latestPins, resolveRoot, utcCompact, latestAssert, assertPassedCountsForLabel, authenticateBaseline } from '../lib/evidence.js';
|
|
16
16
|
|
|
17
17
|
const GATE_ARTIFACTS = {
|
|
18
18
|
judge: 'judge-decision.md',
|
|
@@ -67,6 +67,11 @@ export async function crosscheckCmd(options) {
|
|
|
67
67
|
// verify — the bare "newest assert" let a later red/acceptance assert shadow the qa-b green one.
|
|
68
68
|
const expect = options.expect === 'red' ? 'red' : 'green';
|
|
69
69
|
const got = latestAssert(evDir, { label: options.label || null, expect });
|
|
70
|
+
// Multi-suite label-multiplexing (2026-06-25): passed-counts of every green assert UNDER THE GATE'S
|
|
71
|
+
// LABEL, so the crosscheck can tell a real sibling-suite count (a run JUDGE legitimately counted)
|
|
72
|
+
// from a fabricated testsPassed. Gated on a label being bound — the unbound/legacy recount stays
|
|
73
|
+
// strict (it must not tolerate a count from an unrelated label). Single-run stories are unaffected.
|
|
74
|
+
const siblingPassedCounts = options.label ? assertPassedCountsForLabel(evDir, { label: options.label, expect }) : [];
|
|
70
75
|
// Baseline authentication feeds the preExistingExcluded rule (review pass-3 #5).
|
|
71
76
|
let baselineAuth = null;
|
|
72
77
|
const baselineCandidates = [join(evDir, 'baseline.json'), join(root, '.valent-pipeline', 'evidence-baseline.json')];
|
|
@@ -89,6 +94,7 @@ export async function crosscheckCmd(options) {
|
|
|
89
94
|
baselineAuth,
|
|
90
95
|
assertRequired: options.requireAssert === true,
|
|
91
96
|
expectedLabel: options.label || null,
|
|
97
|
+
siblingPassedCounts,
|
|
92
98
|
});
|
|
93
99
|
if (malformedInputs.length) {
|
|
94
100
|
result.mismatches.push(...malformedInputs);
|
package/src/lib/crosscheck.js
CHANGED
|
@@ -35,7 +35,7 @@ const OPEN_STATUSES = new Set(['open', 'fix-in-progress']);
|
|
|
35
35
|
* @returns {{ok:boolean, skipped:boolean, mismatches:Array<{field:string, claimed:*, actual:*}>,
|
|
36
36
|
* warnings:string[], recounted:object}}
|
|
37
37
|
*/
|
|
38
|
-
export function crosscheckVerdict({ reported = null, bugsBlock = null, assertVerdict = null, pin = null, diskVerdict = null, baselineAuth = null, assertRequired = false, expectedLabel = null }) {
|
|
38
|
+
export function crosscheckVerdict({ reported = null, bugsBlock = null, assertVerdict = null, pin = null, diskVerdict = null, baselineAuth = null, assertRequired = false, expectedLabel = null, siblingPassedCounts = [] }) {
|
|
39
39
|
const mismatches = [];
|
|
40
40
|
const warnings = [];
|
|
41
41
|
const recounted = {};
|
|
@@ -87,6 +87,18 @@ export function crosscheckVerdict({ reported = null, bugsBlock = null, assertVer
|
|
|
87
87
|
warnings.push(`${field}: self-reported ${reported[field]} but artifacts show ${actual} — under-report (safe direction: under-stating passes cannot sneak a ship), reconciled to the recount`);
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
+
// Multi-suite label-multiplexing (2026-06-25): when several DISTINCT green suites run under ONE
|
|
91
|
+
// label at one gate (e.g. acceptance + server-project, case sets the record-time auto-namespace
|
|
92
|
+
// did not split), the label-bound recount picks the LATEST assert, which may not be the suite
|
|
93
|
+
// JUDGE counted. A testsPassed OVER-claim that EXACTLY equals some OTHER green same-label
|
|
94
|
+
// assert's passed count is a real machine recount of a sibling run JUDGE counted — not padded
|
|
95
|
+
// green — so reconcile with a warning. A value matching NO real same-label assert stays a hard
|
|
96
|
+
// mismatch (the fabrication case the crosscheck exists to catch). Strictly safer than binding
|
|
97
|
+
// the recount to the run JUDGE *cites* (which would let the gate choose its own recount source).
|
|
98
|
+
if (field === 'testsPassed' && numeric && reported[field] > actual && Array.isArray(siblingPassedCounts) && siblingPassedCounts.includes(reported[field])) {
|
|
99
|
+
warnings.push(`testsPassed: self-reported ${reported[field]} but the label-bound assert shows ${actual} — matches a sibling green run under the same label (multi-suite label-multiplexing); reconciled to a real recount, not a fabrication`);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
90
102
|
mismatches.push({ field, claimed: reported[field], actual });
|
|
91
103
|
};
|
|
92
104
|
|
package/src/lib/evidence.js
CHANGED
|
Binary file
|