@sagentlab/navarch-runtime 0.1.53 → 0.1.54
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/dist/session.cjs +20 -11
- package/package.json +1 -1
package/dist/session.cjs
CHANGED
|
@@ -94,7 +94,7 @@ async function runSession(deps, claimed, sessionId) {
|
|
|
94
94
|
await api
|
|
95
95
|
.completeLease(leaseId, {
|
|
96
96
|
status: "failed",
|
|
97
|
-
report: verificationFailureReport(task.task_type, failureSummary),
|
|
97
|
+
report: verificationFailureReport(task.task_type, failureSummary, "crashed"),
|
|
98
98
|
failure_summary: failureSummary,
|
|
99
99
|
failed_before_start: true,
|
|
100
100
|
evidence_urls: [],
|
|
@@ -174,7 +174,7 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
174
174
|
const failureSummary = `Project ${task.project_id} has no GitHub repository URL. Set it in Project settings before dispatching work.`;
|
|
175
175
|
await api.completeLease(leaseId, {
|
|
176
176
|
status: "failed",
|
|
177
|
-
report: verificationFailureReport(task.task_type, failureSummary),
|
|
177
|
+
report: verificationFailureReport(task.task_type, failureSummary, "crashed"),
|
|
178
178
|
failure_summary: failureSummary,
|
|
179
179
|
failed_before_start: true,
|
|
180
180
|
evidence_urls: [],
|
|
@@ -294,7 +294,7 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
294
294
|
await api
|
|
295
295
|
.completeLease(leaseId, {
|
|
296
296
|
status: "failed",
|
|
297
|
-
report: verificationFailureReport(task.task_type, "Docker sandbox unavailable on this machine."),
|
|
297
|
+
report: verificationFailureReport(task.task_type, "Docker sandbox unavailable on this machine.", "crashed"),
|
|
298
298
|
failure_summary: "Docker sandbox unavailable on this machine.",
|
|
299
299
|
failed_before_start: true,
|
|
300
300
|
evidence_urls: [],
|
|
@@ -616,7 +616,7 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
616
616
|
const completion = {
|
|
617
617
|
status: mapping.leaseOutcome,
|
|
618
618
|
report: mapping.leaseOutcome === "failed"
|
|
619
|
-
? verificationFailureReport(task.task_type, redactedReport)
|
|
619
|
+
? verificationFailureReport(task.task_type, redactedReport, mapping.exitStatus)
|
|
620
620
|
: redactedReport,
|
|
621
621
|
evidence_urls: mapping.evidenceUrls,
|
|
622
622
|
...(deliveryFailureSummary
|
|
@@ -674,7 +674,7 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
674
674
|
status: "failed",
|
|
675
675
|
report: verificationFailureReport(task.task_type, remediable
|
|
676
676
|
? redactedRejection
|
|
677
|
-
: `${redactedRejection}\n\n---\n\n${completion.report}
|
|
677
|
+
: `${redactedRejection}\n\n---\n\n${completion.report}`, "failed"),
|
|
678
678
|
failure_summary: redactedRejection,
|
|
679
679
|
exit_status: "failed",
|
|
680
680
|
});
|
|
@@ -708,7 +708,7 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
708
708
|
status: "failed",
|
|
709
709
|
report: verificationFailureReport(task.task_type, lastCompletion
|
|
710
710
|
? `${lastCompletion.report}\n\n---\n\n${failureSummary}`
|
|
711
|
-
: failureSummary),
|
|
711
|
+
: failureSummary, "crashed"),
|
|
712
712
|
failure_summary: failureSummary,
|
|
713
713
|
failed_before_start: !adapterStarted,
|
|
714
714
|
evidence_urls: lastCompletion?.evidence_urls ?? [],
|
|
@@ -794,14 +794,23 @@ function sumReportedUsage(attempts, key) {
|
|
|
794
794
|
* does not open with `Verification verdict: FAIL` or `BLOCKED`
|
|
795
795
|
* (verification_verdict_invalid), and that gate applies to runtime-authored
|
|
796
796
|
* failure reports too. When the report carries no usable verdict — the agent
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
*
|
|
800
|
-
*
|
|
797
|
+
* exited non-zero, or opened with PASS despite the failed outcome — label it
|
|
798
|
+
* BLOCKED: the failure prevented an acceptance decision. Without this, the
|
|
799
|
+
* failure completion is itself rejected, the session crashes, and the lease
|
|
800
|
+
* dangles until expiry.
|
|
801
|
+
*
|
|
802
|
+
* A `killed` or `crashed` exit is left unlabelled: the control plane accepts
|
|
803
|
+
* those verdict-less as the runtime's own failure and routes them through
|
|
804
|
+
* failure attribution (an infrastructure retry). A BLOCKED label there would
|
|
805
|
+
* misreport a transient timeout as a verifier verdict and escalate it to a
|
|
806
|
+
* human; the control plane discards such a label, so posting it only muddies
|
|
807
|
+
* the session report.
|
|
801
808
|
*/
|
|
802
|
-
function verificationFailureReport(taskType, report) {
|
|
809
|
+
function verificationFailureReport(taskType, report, exitStatus) {
|
|
803
810
|
if (taskType !== "verify")
|
|
804
811
|
return report;
|
|
812
|
+
if (exitStatus === "killed" || exitStatus === "crashed")
|
|
813
|
+
return report;
|
|
805
814
|
const verdict = (0, exit_conditions_cjs_1.leadingVerificationVerdict)(report);
|
|
806
815
|
if (verdict === "fail" || verdict === "blocked")
|
|
807
816
|
return report;
|
package/package.json
CHANGED