@resolveio/server-lib 22.3.236 → 22.3.237
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/methods/ai-terminal.js +342 -206
- package/methods/ai-terminal.js.map +1 -1
- package/package.json +1 -1
- package/util/ai-qa-policy.js +21 -88
- package/util/ai-qa-policy.js.map +1 -1
- package/util/ai-run-evidence-adapters.js +236 -256
- package/util/ai-run-evidence-adapters.js.map +1 -1
- package/util/ai-run-evidence.js +30 -15
- package/util/ai-run-evidence.js.map +1 -1
- package/util/ai-runner-qa-tools.js +103 -2078
- package/util/ai-runner-qa-tools.js.map +1 -1
- package/util/support-runner-v5.d.ts +38 -13
- package/util/support-runner-v5.js +423 -735
- package/util/support-runner-v5.js.map +1 -1
package/util/ai-run-evidence.js
CHANGED
|
@@ -318,14 +318,14 @@ function buildAIQaRun(input) {
|
|
|
318
318
|
}
|
|
319
319
|
var passedBusinessAssertions = businessAssertions.filter(function (assertion) { return passed(assertion.status); });
|
|
320
320
|
if (passedBusinessAssertions.length) {
|
|
321
|
-
gateResults.push(makeGate('qa_business_assertion', 'Business assertion', 'pass', 'At least one
|
|
321
|
+
gateResults.push(makeGate('qa_business_assertion', 'Business assertion', 'pass', 'At least one diagnosis-mapped workflow/data assertion passed.', collectBusinessAssertionArtifactPaths(passedBusinessAssertions), now, { passed_assertions: passedBusinessAssertions.map(function (assertion) { return assertion.assertion; }) }));
|
|
322
322
|
return { outcome: 'business_assertion_passed', infraChecks: infraChecks, compile: compile, routeProbes: routeProbes, businessAssertions: businessAssertions, artifacts: artifacts, gateResults: gateResults, updatedAt: now };
|
|
323
323
|
}
|
|
324
324
|
if (routeProbes.some(function (probe) { return passed(probe.status); })) {
|
|
325
|
-
gateResults.push(makeGate('qa_business_assertion', 'Business assertion', 'blocked', 'Browser route loaded, but no
|
|
325
|
+
gateResults.push(makeGate('qa_business_assertion', 'Business assertion', 'blocked', 'Browser route loaded, but no diagnosis-mapped business assertion passed. Route-only proof cannot accept the run.', [], now));
|
|
326
326
|
return { outcome: 'route_only_pass', infraChecks: infraChecks, compile: compile, routeProbes: routeProbes, businessAssertions: businessAssertions, artifacts: artifacts, gateResults: gateResults, updatedAt: now };
|
|
327
327
|
}
|
|
328
|
-
gateResults.push(makeGate('qa_business_assertion', 'Business assertion', 'blocked', 'No
|
|
328
|
+
gateResults.push(makeGate('qa_business_assertion', 'Business assertion', 'blocked', 'No diagnosis-mapped QA assertion was recorded.', [], now));
|
|
329
329
|
return { outcome: 'incomplete', infraChecks: infraChecks, compile: compile, routeProbes: routeProbes, businessAssertions: businessAssertions, artifacts: artifacts, gateResults: gateResults, updatedAt: now };
|
|
330
330
|
}
|
|
331
331
|
function normalizeQaRun(input) {
|
|
@@ -382,7 +382,7 @@ function classifyAIRunOutcome(input) {
|
|
|
382
382
|
return {
|
|
383
383
|
outcome: 'manual_handoff',
|
|
384
384
|
reason: "Support autoloop parked before another repair loop because no new evidence was recorded: ".concat(blockedSupportAutoloopNoProgressGate_1.reason),
|
|
385
|
-
nextAction: 'Collect new material evidence, rerun read-only diagnosis or
|
|
385
|
+
nextAction: 'Collect new material evidence, rerun read-only diagnosis or business proof, then resume only if the blocker fingerprint changes.',
|
|
386
386
|
gates: gates,
|
|
387
387
|
warnings: warnings,
|
|
388
388
|
recordedAt: now
|
|
@@ -503,7 +503,7 @@ function classifyAIRunOutcome(input) {
|
|
|
503
503
|
return {
|
|
504
504
|
outcome: 'manual_handoff',
|
|
505
505
|
reason: "Support autoloop parked before another repair loop because no new evidence was recorded: ".concat(blockedSupportAutoloopNoProgressGate.reason),
|
|
506
|
-
nextAction: 'Collect new material evidence, rerun read-only diagnosis or
|
|
506
|
+
nextAction: 'Collect new material evidence, rerun read-only diagnosis or business proof, then resume only if the blocker fingerprint changes.',
|
|
507
507
|
gates: gates,
|
|
508
508
|
warnings: warnings,
|
|
509
509
|
recordedAt: now
|
|
@@ -693,7 +693,7 @@ function classifyAIRunOutcome(input) {
|
|
|
693
693
|
recordedAt: now
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
var blockedSupportIssueClassProbePlanGate = gates.find(function (gate) { return gate.key === 'support_issue_class_probe_plan' && (gate.status === 'blocked' || gate.status === 'fail'); });
|
|
696
|
+
var blockedSupportIssueClassProbePlanGate = gates.find(function (gate) { return (gate.key === 'support_business_proof_plan' || gate.key === 'support_issue_class_probe_plan') && (gate.status === 'blocked' || gate.status === 'fail'); });
|
|
697
697
|
if (input.source === 'support_ticket' && blockedSupportIssueClassProbePlanGate) {
|
|
698
698
|
var claimedSuccess = input.explicitAccepted === true
|
|
699
699
|
|| input.scorecardPassed === true
|
|
@@ -702,9 +702,9 @@ function classifyAIRunOutcome(input) {
|
|
|
702
702
|
return {
|
|
703
703
|
outcome: claimedSuccess ? 'false_pass' : 'qa_incomplete',
|
|
704
704
|
reason: claimedSuccess
|
|
705
|
-
? "Support run claimed success without a valid
|
|
706
|
-
: "Support business proof is blocked until the
|
|
707
|
-
nextAction: 'Generate or repair the
|
|
705
|
+
? "Support run claimed success without a valid business proof plan: ".concat(blockedSupportIssueClassProbePlanGate.reason)
|
|
706
|
+
: "Support business proof is blocked until the business proof plan validates: ".concat(blockedSupportIssueClassProbePlanGate.reason),
|
|
707
|
+
nextAction: 'Generate or repair the support business proof plan from the diagnosis proof_plan, then rerun the proof QA chosen from the current ticket evidence.',
|
|
708
708
|
gates: gates,
|
|
709
709
|
warnings: warnings,
|
|
710
710
|
recordedAt: now
|
|
@@ -729,8 +729,8 @@ function classifyAIRunOutcome(input) {
|
|
|
729
729
|
return {
|
|
730
730
|
outcome: input.scorecardPassed === true ? 'false_pass' : 'qa_incomplete',
|
|
731
731
|
reason: input.scorecardPassed === true
|
|
732
|
-
? 'Scorecard or workflow status passed without
|
|
733
|
-
: 'QA has not recorded
|
|
732
|
+
? 'Scorecard or workflow status passed without diagnosis-mapped business assertion proof.'
|
|
733
|
+
: 'QA has not recorded diagnosis-mapped business assertion proof.',
|
|
734
734
|
nextAction: 'Add before/action/after workflow proof with screenshot/data assertions before acceptance.',
|
|
735
735
|
gates: gates,
|
|
736
736
|
warnings: warnings,
|
|
@@ -802,7 +802,7 @@ function classifyAIRunOutcome(input) {
|
|
|
802
802
|
nextAction: nextAction === 'create_pr'
|
|
803
803
|
? 'Create the proof-backed support PR; merge, release, deploy, and customer reply remain separately gated.'
|
|
804
804
|
: nextAction === 'run_business_proof_qa'
|
|
805
|
-
? 'Run
|
|
805
|
+
? 'Run business proof QA until AIQaBusinessAssertion, before/action/after proof, and screenshot/trace evidence pass.'
|
|
806
806
|
: nextAction === 'run_a_grade_pr_review'
|
|
807
807
|
? 'Run strict A-grade PR review; do not merge, release, deploy, or send the customer reply until execution, artifact, pull_request, business-proof, and screenshot/trace evidence pass.'
|
|
808
808
|
: 'Continue only the bounded owner-scoped support workflow until PR readiness or a new blocker/scope change.',
|
|
@@ -826,6 +826,21 @@ function classifyAIRunOutcome(input) {
|
|
|
826
826
|
recordedAt: now
|
|
827
827
|
};
|
|
828
828
|
}
|
|
829
|
+
var blockedSupportBusinessProofPlanGate = gates.find(function (gate) { return gate.key === 'support_business_proof_plan' && (gate.status === 'blocked' || gate.status === 'fail'); });
|
|
830
|
+
if (input.source === 'support_ticket' && blockedSupportBusinessProofPlanGate) {
|
|
831
|
+
var claimedSuccess = input.explicitAccepted === true
|
|
832
|
+
|| scorecardPassed
|
|
833
|
+
|| statusLooksPassed("".concat(input.status || '', " ").concat(input.phase || ''))
|
|
834
|
+
|| hasBusinessPass;
|
|
835
|
+
return {
|
|
836
|
+
outcome: claimedSuccess ? 'false_pass' : 'qa_incomplete',
|
|
837
|
+
reason: "Support business proof plan is not valid: ".concat(blockedSupportBusinessProofPlanGate.reason),
|
|
838
|
+
nextAction: 'Create a valid business-proof plan from the current diagnosis before accepting QA or customer resolution.',
|
|
839
|
+
gates: gates,
|
|
840
|
+
warnings: warnings,
|
|
841
|
+
recordedAt: now
|
|
842
|
+
};
|
|
843
|
+
}
|
|
829
844
|
var blockedAICoderNextActionContractGate = gates.find(function (gate) { return gate.key === 'aicoder_next_action_contract' && (gate.status === 'blocked' || gate.status === 'fail'); });
|
|
830
845
|
if (input.source === 'aicoder_app' && blockedAICoderNextActionContractGate) {
|
|
831
846
|
var claimedSuccess = input.explicitAccepted === true
|
|
@@ -845,11 +860,11 @@ function classifyAIRunOutcome(input) {
|
|
|
845
860
|
}
|
|
846
861
|
if (scorecardPassed && !hasBusinessPass) {
|
|
847
862
|
warnings.push('scorecard_pass_without_business_assertion');
|
|
848
|
-
addGateOnce(gates, makeGate('business_assertion_required', 'Business assertion', 'blocked', 'Scorecard passed, but no
|
|
863
|
+
addGateOnce(gates, makeGate('business_assertion_required', 'Business assertion', 'blocked', 'Scorecard passed, but no diagnosis-mapped business assertion proof was recorded.', [], now));
|
|
849
864
|
return {
|
|
850
865
|
outcome: 'false_pass',
|
|
851
866
|
reason: 'Scorecard-only proof is not acceptance.',
|
|
852
|
-
nextAction: 'Record
|
|
867
|
+
nextAction: 'Record workflow/data proof mapped to the current diagnosis, then reclassify the run.',
|
|
853
868
|
gates: gates,
|
|
854
869
|
warnings: warnings,
|
|
855
870
|
recordedAt: now
|
|
@@ -859,7 +874,7 @@ function classifyAIRunOutcome(input) {
|
|
|
859
874
|
if ((input.explicitAccepted === true || statusLooksPassed(statusPhase) || scorecardPassed) && hasBusinessPass) {
|
|
860
875
|
return {
|
|
861
876
|
outcome: 'accepted',
|
|
862
|
-
reason: 'Run has terminal success signal and
|
|
877
|
+
reason: 'Run has terminal success signal and diagnosis-mapped business assertion proof.',
|
|
863
878
|
nextAction: 'No repair action required.',
|
|
864
879
|
gates: gates,
|
|
865
880
|
warnings: warnings,
|