@ran-sh/dsh-crew 2.0.0 → 2.0.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
package/src/config-readiness.mjs
CHANGED
|
@@ -21,6 +21,30 @@ function verifiedHubJob(job) {
|
|
|
21
21
|
&& context.runtime_id.trim().length > 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
// The row that asks whether a run can be stopped, or stopped by its own clock,
|
|
25
|
+
// needs a run that was — a job that was cancelled or that timed out is the
|
|
26
|
+
// evidence, not a success. Nothing produced this row at all, so it could never
|
|
27
|
+
// become PASS no matter what the machine did.
|
|
28
|
+
const CANCELLATION_CODES = new Set(['CANCELLED', 'WORKFLOW_CANCELLED', 'ATTEMPT_TIMEOUT', 'GIT_TIMEOUT']);
|
|
29
|
+
|
|
30
|
+
function observedCancellation(job) {
|
|
31
|
+
if (job?.status === 'cancelled' || job?.phase === 'cancelled') return true;
|
|
32
|
+
const codes = [job?.failure?.reason_code, job?.failure?.source_code, job?.error_code, job?.error];
|
|
33
|
+
return codes.some((code) => typeof code === 'string' && CANCELLATION_CODES.has(code));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// The two DeepSeek rows are about that provider specifically, so they are not
|
|
37
|
+
// filtered by the currently selected route: a machine running its workers on
|
|
38
|
+
// another provider has no DeepSeek execution to show, and the row should say so
|
|
39
|
+
// rather than borrow someone else's.
|
|
40
|
+
const DEEPSEEK_PROVIDER = 'deepseek-official';
|
|
41
|
+
|
|
42
|
+
function deepseekSlotRan(jobs, slot) {
|
|
43
|
+
return jobs.some((job) => job?.provider === DEEPSEEK_PROVIDER
|
|
44
|
+
&& verifiedHubJob(job)
|
|
45
|
+
&& new RegExp(slot, 'i').test(String(job?.model ?? '')));
|
|
46
|
+
}
|
|
47
|
+
|
|
24
48
|
function hasBlockingProviderRecovery(body, currentSelections) {
|
|
25
49
|
if (!Object.hasOwn(body, 'recovery_transactions')) return false;
|
|
26
50
|
if (!Array.isArray(body.recovery_transactions)) return true;
|
|
@@ -115,6 +139,11 @@ export function buildHubExecutionRows(hubJobs = [], { currentSelections = null }
|
|
|
115
139
|
&& matchesCurrentRoute(job, currentSelections, 'reviewer')
|
|
116
140
|
&& verifiedHubJob(job)
|
|
117
141
|
&& job?.review_verdict === 'approve');
|
|
142
|
+
const cancellationObserved = jobs.some((job) => matchesCurrentRoute(
|
|
143
|
+
job,
|
|
144
|
+
currentSelections,
|
|
145
|
+
job?.role === 'reviewer' ? 'reviewer' : 'worker',
|
|
146
|
+
) && observedCancellation(job));
|
|
118
147
|
return [
|
|
119
148
|
workerPassed
|
|
120
149
|
? { id: 'model_execution', status: 'PASS', reason_code: 'REAL_EXECUTION_PASSED', evidence_source: 'hub-jobs' }
|
|
@@ -132,6 +161,15 @@ export function buildHubExecutionRows(hubJobs = [], { currentSelections = null }
|
|
|
132
161
|
reviewerPassed
|
|
133
162
|
? { id: 'reviewer_pipeline', status: 'PASS', reason_code: 'REAL_REVIEW_PASSED', evidence_source: 'hub-jobs' }
|
|
134
163
|
: { id: 'reviewer_pipeline', status: 'NOT_RUN', reason_code: 'NO_EXECUTION_EVIDENCE', evidence_source: 'none' },
|
|
164
|
+
cancellationObserved
|
|
165
|
+
? { id: 'cancellation_timeout_escalation', status: 'PASS', reason_code: 'CANCELLATION_OBSERVED', evidence_source: 'hub-jobs' }
|
|
166
|
+
: { id: 'cancellation_timeout_escalation', status: 'NOT_RUN', reason_code: 'NO_EXECUTION_EVIDENCE', evidence_source: 'none' },
|
|
167
|
+
deepseekSlotRan(jobs, 'flash')
|
|
168
|
+
? { id: 'deepseek_flash', status: 'PASS', reason_code: 'DEEPSEEK_FLASH_EXECUTED', evidence_source: 'hub-jobs' }
|
|
169
|
+
: { id: 'deepseek_flash', status: 'NOT_RUN', reason_code: 'NO_EXECUTION_EVIDENCE', evidence_source: 'none' },
|
|
170
|
+
deepseekSlotRan(jobs, 'pro')
|
|
171
|
+
? { id: 'deepseek_pro', status: 'PASS', reason_code: 'DEEPSEEK_PRO_EXECUTED', evidence_source: 'hub-jobs' }
|
|
172
|
+
: { id: 'deepseek_pro', status: 'NOT_RUN', reason_code: 'NO_EXECUTION_EVIDENCE', evidence_source: 'none' },
|
|
135
173
|
];
|
|
136
174
|
}
|
|
137
175
|
|
package/src/runtime-identity.mjs
CHANGED
|
@@ -36,7 +36,7 @@ export {
|
|
|
36
36
|
// included in the identity contract.
|
|
37
37
|
const RUNTIME_ID = randomUUID();
|
|
38
38
|
|
|
39
|
-
export const RUNTIME_VERSION = '2.0.
|
|
39
|
+
export const RUNTIME_VERSION = '2.0.2';
|
|
40
40
|
export const HUB_PROTOCOL_VERSION = 1;
|
|
41
41
|
|
|
42
42
|
export const HUB_CAPABILITIES = Object.freeze([
|