@promptdriven/runtime-client 1.2.1 → 1.2.2
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
CHANGED
|
@@ -498,7 +498,7 @@ async function readBaselineReport(context, plan, identity) {
|
|
|
498
498
|
try { saved = await read(join(folder,'batch.json')); }
|
|
499
499
|
catch { partial=true;warn('Some saved Check batches are unreadable or corrupt.');continue; }
|
|
500
500
|
if (diagnosticBatch(saved)) continue;
|
|
501
|
-
if (saved?.intent !== 'check' && (Object.hasOwn(saved ?? {},'intent') || !Array.isArray(saved?.rows) || !saved.rows.every(row=>isObject(row) && validSavedCheck(row)))) continue;
|
|
501
|
+
if (saved?.intent !== 'check' && (Object.hasOwn(saved ?? {},'intent') || !Array.isArray(saved?.rows) || !saved.rows.every(row=>isObject(row) && validSavedCheck(row, { allowServerDefault: false })))) continue;
|
|
502
502
|
if (saved.version !== 1 || saved.batch !== name || !Array.isArray(saved.rows) || typeof saved.root !== 'string') {
|
|
503
503
|
partial=true;warn('Some saved Check batches have invalid original identity.');continue;
|
|
504
504
|
}
|
|
@@ -577,7 +577,7 @@ async function readBaselineReport(context, plan, identity) {
|
|
|
577
577
|
const ownSnapshots = snapshots.filter(story=>Array.isArray(story?.tests) && story.tests.includes(row.test));
|
|
578
578
|
const snapshot = ownSnapshots[0];
|
|
579
579
|
const sent = row.request_ids.length > 0;
|
|
580
|
-
if (sent && !validSavedCheck(row)) { inconsistent();continue; }
|
|
580
|
+
if (sent && !validSavedCheck(row, { allowServerDefault: saved.intent === 'check' })) { inconsistent();continue; }
|
|
581
581
|
const originalFootprint = originalSource?.stories?.find(story=>story.tests?.includes(row.test));
|
|
582
582
|
const duplicate = saved.rows.filter(other=>other?.test === row.test).length !== 1;
|
|
583
583
|
const storyName = typeof row.story === 'string' ? row.story : null;
|
|
@@ -738,7 +738,7 @@ async function readSavedStoryEvidence({ root, comparisonRoot = root, withTests =
|
|
|
738
738
|
const legacy = !Object.hasOwn(batch, 'intent');
|
|
739
739
|
if (batch.intent !== 'check') {
|
|
740
740
|
if (!legacy) continue;
|
|
741
|
-
if (!batch.rows.every(row => isObject(row) && validSavedCheck(row))) { legacyHint(); continue; }
|
|
741
|
+
if (!batch.rows.every(row => isObject(row) && validSavedCheck(row, { allowServerDefault: false }))) { legacyHint(); continue; }
|
|
742
742
|
}
|
|
743
743
|
const valid = batch.rows.every(row => isObject(row) && relativeFile(row.test) && relativeFile(row.story) && Array.isArray(row.request_ids));
|
|
744
744
|
if (!valid) { warning(path, Error('invalid Story identity')); continue; }
|
|
@@ -5595,7 +5595,7 @@ async function recoverRestarts(context) {
|
|
|
5595
5595
|
lintDiagnostics(context, lint, context.rows);
|
|
5596
5596
|
const selected = [];
|
|
5597
5597
|
for (const row of admitted) {
|
|
5598
|
-
if (context.interrupted || rowExpired(context, row) || !validSavedCheck(row)) continue;
|
|
5598
|
+
if (context.interrupted || rowExpired(context, row) || !validSavedCheck(row, { allowServerDefault: context.intent === 'check' })) continue;
|
|
5599
5599
|
const transient = drops.includes(row);
|
|
5600
5600
|
const decision = evaluateCheckBudget({
|
|
5601
5601
|
max_total_calls: context.maxTotalCalls ?? null,
|