@resolveio/server-lib 22.3.242 → 22.3.243

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "22.3.242",
3
+ "version": "22.3.243",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "package": "./build_package.sh",
@@ -86,16 +86,6 @@ export interface ResolveIOSupportSimilarCaseSelection {
86
86
  generatedAt: string;
87
87
  }
88
88
  export type ResolveIOSupportDiagnosisEvidencePackStatus = 'needs_diagnosis' | 'diagnosis_ready' | 'blocked';
89
- export interface ResolveIOSupportIssueClassProbeCatalogEntry {
90
- issue_class: ResolveIOSupportIssueClass;
91
- probe_type: ResolveIOSupportV5StepType;
92
- failure_class: ResolveIOSupportV5FailureClass;
93
- action: string;
94
- proof_required: string;
95
- required_artifacts: string[];
96
- acceptance_gate: 'aiqa_business_assertion';
97
- false_pass_blockers: string[];
98
- }
99
89
  export interface ResolveIOSupportDiagnosisEvidencePack {
100
90
  packId: string;
101
91
  status: ResolveIOSupportDiagnosisEvidencePackStatus;
@@ -109,12 +99,10 @@ export interface ResolveIOSupportDiagnosisEvidencePack {
109
99
  diagnosisValid: boolean;
110
100
  diagnosisStatus: ResolveIOSupportDiagnosisGateStatus;
111
101
  validationBlockers: string[];
112
- issueClassHint?: ResolveIOSupportIssueClass;
113
102
  ownerFileHints: string[];
114
103
  activeMicrotaskId?: string;
115
104
  similarCaseSelection: ResolveIOSupportSimilarCaseSelection;
116
105
  businessProofGuidance: string[];
117
- issueClassProbeCatalog?: ResolveIOSupportIssueClassProbeCatalogEntry[];
118
106
  proofMatrix?: ResolveIOSupportDiagnosisProofMatrix;
119
107
  structuredFacts: Record<string, any>;
120
108
  generatedAt: string;
@@ -1410,6 +1410,13 @@ function normalizeSupportSimilarCaseSelection(value, input) {
1410
1410
  }
1411
1411
  return selectResolveIOSupportSimilarCaseHints(input);
1412
1412
  }
1413
+ function omitSupportSimilarCaseTaxonomyForPrompt(entries) {
1414
+ return entries.map(function (entry) {
1415
+ var sanitized = __assign({}, entry);
1416
+ delete sanitized.issueClass;
1417
+ return __assign(__assign({}, sanitized), { structuredSignals: cleanList(entry.structuredSignals, 10, 160).filter(function (signal) { return !/issue[_ -]?class|taxonomy|category/i.test(signal); }), advisoryOnly: true });
1418
+ });
1419
+ }
1413
1420
  function buildResolveIOSupportDiagnosisEvidencePack(input) {
1414
1421
  var _a, _b, _c, _d, _e, _f, _g, _h;
1415
1422
  if (input === void 0) { input = {}; }
@@ -1438,6 +1445,7 @@ function buildResolveIOSupportDiagnosisEvidencePack(input) {
1438
1445
  now: input.now
1439
1446
  };
1440
1447
  var similarCaseSelection = normalizeSupportSimilarCaseSelection(input.similarCaseHints, similarInput);
1448
+ var promptSafeSimilarCaseSelection = __assign(__assign({}, similarCaseSelection), { ranked: omitSupportSimilarCaseTaxonomyForPrompt(similarCaseSelection.ranked), similarTickets: omitSupportSimilarCaseTaxonomyForPrompt(similarCaseSelection.similarTickets), similarCommits: omitSupportSimilarCaseTaxonomyForPrompt(similarCaseSelection.similarCommits) });
1441
1449
  var status = validation.valid
1442
1450
  ? 'diagnosis_ready'
1443
1451
  : validation.status === 'blocked'
@@ -1465,7 +1473,7 @@ function buildResolveIOSupportDiagnosisEvidencePack(input) {
1465
1473
  validationBlockers: validation.blockers,
1466
1474
  ownerFileHints: ownerFileHints.slice(0, 12),
1467
1475
  activeMicrotaskId: activeMicrotask === null || activeMicrotask === void 0 ? void 0 : activeMicrotask.microtaskId,
1468
- similarCaseSelection: similarCaseSelection,
1476
+ similarCaseSelection: promptSafeSimilarCaseSelection,
1469
1477
  businessProofGuidance: [
1470
1478
  'There is no support-runner proof category menu. Choose the proof from the customer complaint, observed behavior, code path, and data evidence.',
1471
1479
  'Use only checks that directly prove or falsify this customer complaint.',
@@ -1485,7 +1493,7 @@ function buildResolveIOSupportDiagnosisEvidencePack(input) {
1485
1493
  reproductionEvidenceTypes: ((_f = validation.evidenceQuality) === null || _f === void 0 ? void 0 : _f.reproductionEvidenceTypes) || [],
1486
1494
  rootCauseEvidenceTypes: ((_g = validation.evidenceQuality) === null || _g === void 0 ? void 0 : _g.rootCauseEvidenceTypes) || [],
1487
1495
  artifactBackedEvidenceCount: ((_h = validation.evidenceQuality) === null || _h === void 0 ? void 0 : _h.artifactBackedEvidenceCount) || 0,
1488
- similarHintCount: similarCaseSelection.ranked.length,
1496
+ similarHintCount: promptSafeSimilarCaseSelection.ranked.length,
1489
1497
  similarHintsAdvisoryOnly: true,
1490
1498
  productRepairBlockedUntilDiagnosisPassed: validation.valid !== true
1491
1499
  },
@@ -7148,7 +7156,6 @@ function buildResolveIOSupportV5MicrotaskPrompt(input) {
7148
7156
  var diagnosisEvidencePack = buildResolveIOSupportDiagnosisEvidencePack({
7149
7157
  bundle: input.bundle,
7150
7158
  similarCaseHints: input.similarCaseHints,
7151
- issueClass: diagnosisGate === null || diagnosisGate === void 0 ? void 0 : diagnosisGate.issue_class,
7152
7159
  ownerFiles: (diagnosisGate === null || diagnosisGate === void 0 ? void 0 : diagnosisGate.owner_files) || targetFiles,
7153
7160
  text: input.bundle.supportV5ScopeDigest || input.bundle.supportV5SupervisorState.currentGoal
7154
7161
  });
@@ -7325,20 +7332,14 @@ function buildResolveIOSupportV5MicrotaskPrompt(input) {
7325
7332
  input.lane === 'qa' ? {
7326
7333
  name: 'qa_browser_evidence_contract',
7327
7334
  text: [
7328
- 'QA lane first action after preflight: collect fresh browser evidence for the active row, not a proof review of existing route/auth artifacts.',
7329
- 'Use the already-running localhost harness and staged env. Before any shell command, run `source .resolveio-support-tools/env.sh 2>/dev/null || source ../.resolveio-support-tools/env.sh 2>/dev/null || true`; then use `$RESOLVEIO_SUPPORT_QA_CLIENT_URL`, `$RESOLVEIO_SUPPORT_QA_SERVER_URL`, `$PUPPETEER_EXECUTABLE_PATH`, and `$CHROME_BIN`.',
7330
- 'Required auth replay helper inside every Puppeteer row script: `const storage=JSON.parse(fs.readFileSync("qa-artifacts/auth-bootstrap-storage-state.json","utf8")); const entries=[...(Array.isArray(storage.localStorageEntries)?storage.localStorageEntries:[]), ...(Array.isArray(storage.localStorage)?storage.localStorage:Object.entries(storage.localStorage||{}).map(([key,value])=>({key,value}))), ...((storage.origins||[]).flatMap(o=>o.localStorage||[]))].map(e=>({key:e.key||e.name,value:e.value})).filter(e=>e.key); const clientUrl=process.env.RESOLVEIO_SUPPORT_QA_CLIENT_URL||process.env.RESOLVEIO_RUNNER_QA_CLIENT_URL; const rowRoute="<ACTIVE_QA_ROUTE>"; await page.goto(clientUrl,{waitUntil:"domcontentloaded"}); await page.evaluate(items=>{localStorage.clear(); for(const item of items)localStorage.setItem(item.key,item.value);}, entries); await page.goto(new URL(rowRoute, clientUrl).href,{waitUntil:"domcontentloaded"});` Replace `<ACTIVE_QA_ROUTE>` with the active row route.',
7331
- 'Allowed first command shape: one bounded `node`/Puppeteer row script that reads `qa-artifacts/auth-bootstrap-storage-state.json`, opens `$RESOLVEIO_SUPPORT_QA_CLIENT_URL`, seeds localStorage, navigates to the active QA route with `new URL(activeRoute, clientUrl).href`, drives the visible workflow, captures screenshot/caption, and updates the active matrix row. A `/home` proof is invalid for a locked non-home route.',
7332
- 'Forbidden in QA lane after preflight: build/install/startup/watch commands, `mongod`, `run-local-qa.sh`, and broad source discovery. If build/startup/dependency is suspected, return blocked/needs-fix with existing qa-artifacts log paths.',
7333
- 'Before passing, confirm `qa-artifacts/auth-bootstrap-result.json` used the ticket reporter or named affected user when available. If it used generic admin/dev while `qa-live-data-seed-result.json.selected.qa_user_context` names a reporter/affected user, rerun auth as that user or return needs-fix.',
7334
- 'Drive the visible customer workflow for this one row. Capture a new customer-facing screenshot/caption and update `qa-artifacts/qa-coverage-matrix.json` with workflow, route, data id/name, assertion, screenshot path, caption, and pass/failed/blocked status.',
7335
- 'Also write `qa-artifacts/aiqa-business-assertion.json` with one AIQaBusinessAssertion object: assertion, status, workflow, route, before, action, expected, after/observed, dataProof or mongoDelta, artifactPaths, and metadata.supportDiagnosisProof=true only when it maps to the active SupportDiagnosisGate proof_plan.',
7336
- 'After selecting any visible control value, read the visible control text back from the DOM. If it is still a placeholder/loading/empty value, do not click the final action and do not mark pass. Capture the blocker screenshot/DOM text and return needs-fix.',
7337
- 'If the row needs persisted data proof, create that proof yourself in the same bounded QA command by querying localhost QA Mongo through process.env.MONGO_URL after the visible UI action. Write the result under qa-artifacts/ as JSON and reference that path in the matrix. Do not ask for a missing post-action DB artifact while the local QA stack is running; either write it or return needs-fix with the exact query/script error.',
7338
- 'If the active row names multiple concrete records, prove every named record. Do not pass by proving only one representative record.',
7339
- 'For customer-reported data bugs, use production-seeded localhost records from `qa-live-data-seed-result.json`. If the exact named record is missing from the seed, fail the row as a seed/query blocker instead of testing a substitute record.',
7340
- 'Route-ready, auth-bootstrap, shell, header-only, and empty-list screenshots do not satisfy this microtask. If the row cannot be proven, capture the blocker screenshot/DOM state and return needs-fix with that exact blocker.',
7341
- 'Do not run compile/startup/npm install, do not spawn another server/client/Mongo, and do not inspect broad source trees before the first browser evidence command.'
7335
+ 'QA lane after preflight: collect fresh evidence for the active proof_plan row. Do not re-triage the ticket or expand into unrelated workflows.',
7336
+ 'Use the existing staged QA harness and env. Do not run build/install/startup/watch commands, spawn duplicate server/client/Mongo/browser processes, or browse broad source trees unless the active blocker is explicitly infra/preflight.',
7337
+ 'Let the model choose the browser/data/DOM/Mongo proof technique from the diagnosis, changed files, UI, and available local QA data. The runner must not force a proof category, route recipe, selector recipe, collection, or keyword bucket.',
7338
+ 'Drive the customer-reported action or the closest falsifiable local equivalent from the diagnosis. If auth, route, seed data, or an external dependency prevents that, capture the concrete blocker artifact and return needs-fix or blocked with the exact reason.',
7339
+ 'Update `qa-artifacts/qa-coverage-matrix.json` while preserving either supported schema: array rows or object.rows. The row must include workflow, route/screen when applicable, data used, assertion, artifact path, caption, and pass/failed/blocked status.',
7340
+ 'Write `qa-artifacts/aiqa-business-assertion.json` with one AIQaBusinessAssertion tied to the active SupportDiagnosisGate proof_plan: assertion, status, workflow, route if applicable, before or unavailable reason, action, expected, observed/after, dataProof or mongoDelta when useful, artifactPaths, and metadata.supportDiagnosisProof=true.',
7341
+ 'Only mark pass when the artifact proves the diagnosed business assertion. Route-ready, auth-only, shell/header/empty screenshots, stale matrix rows, and model claims are valid blocker evidence but not pass evidence.',
7342
+ 'Keep the QA command bounded and evidence-first: either produce fresh proof artifacts or return the smallest exact blocker the runner should repair next.'
7342
7343
  ].join('\n')
7343
7344
  } : {
7344
7345
  name: 'non_qa_noop',