@resolveio/server-lib 22.3.196 → 22.3.197
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/.nodemon.json +5 -0
- package/.vscode/settings.json +21 -0
- package/AGENTS.md +195 -0
- package/README.md +22 -0
- package/build_package.sh +5 -0
- package/compileDTS.pl +64 -0
- package/docs/ai-assistant-nightly-eval.md +65 -0
- package/docs/ai-assistant-preflight-checklist.md +23 -0
- package/docs/ai-assistant-report-builder-bridge-playbook.md +115 -0
- package/eslint-plugin-custom/index.js +7 -0
- package/eslint-plugin-custom/rules/no-filter-zero-index.js +44 -0
- package/eslint.config.js +103 -0
- package/gulpfile.js +216 -0
- package/methodAndPublicationListGenerator.py +375 -0
- package/mongodbensurers.js +2 -0
- package/mongostop.js +3 -0
- package/package.json +1 -1
- package/scripts/cleanup-bypassed-callmethod-logs.js +616 -0
- package/settings.development.json +25 -0
- package/settings.development.redacted.json +25 -0
- package/src/.env +12 -0
- package/src/ai/assistant-core-heuristics.ts +379 -0
- package/src/ai/resolveio-platform-intelligence-memory-corpus.ts +185 -0
- package/src/ai/resolveio-platform-intelligence-memory.ts +325 -0
- package/{ai/resolveio-platform-intelligence-types.d.ts → src/ai/resolveio-platform-intelligence-types.ts} +20 -15
- package/src/ai/resolveio-platform-intelligence.ts +462 -0
- package/src/client-server-app.ts +12 -0
- package/src/collections/ai-run.collection.ts +117 -0
- package/src/collections/ai-terminal-conversation.collection.ts +91 -0
- package/src/collections/ai-terminal-issue-report.collection.ts +99 -0
- package/src/collections/ai-terminal-message.collection.ts +77 -0
- package/src/collections/app-setting.collection.ts +104 -0
- package/src/collections/app-status.collection.ts +58 -0
- package/src/collections/communication-metric.collection.ts +84 -0
- package/src/collections/counter.collection.ts +56 -0
- package/src/collections/cron-job-history.collection.ts +94 -0
- package/src/collections/cron-job.collection.ts +92 -0
- package/src/collections/customer-notification.collection.ts +131 -0
- package/src/collections/customer-portal-password.collection.ts +76 -0
- package/src/collections/email-history.collection.ts +134 -0
- package/src/collections/email-verified.collection.ts +62 -0
- package/src/collections/file.collection.ts +74 -0
- package/src/collections/flag-update.collection.ts +57 -0
- package/src/collections/flag.collection.ts +57 -0
- package/src/collections/log-method-latency.collection.ts +77 -0
- package/src/collections/log-subscription.collection.ts +80 -0
- package/src/collections/log.collection.ts +93 -0
- package/src/collections/logged-in-users.collection.ts +67 -0
- package/src/collections/monitor-cpu.collection.ts +65 -0
- package/src/collections/monitor-function.collection.ts +74 -0
- package/src/collections/monitor-memory.collection.ts +77 -0
- package/src/collections/monitor-mongo.collection.ts +71 -0
- package/src/collections/notification.collection.ts +57 -0
- package/src/collections/openai-usage-ledger.collection.ts +131 -0
- package/src/collections/report-builder-dashboard-builder.collection.ts +109 -0
- package/src/collections/report-builder-library.collection.ts +89 -0
- package/src/collections/report-builder-report.collection.ts +184 -0
- package/src/collections/user-group.collection.ts +89 -0
- package/src/collections/user-guide.collection.ts +57 -0
- package/src/collections/user.collection.ts +181 -0
- package/src/cron/cron.ts +117 -0
- package/src/fixtures/cron-jobs.ts +95 -0
- package/src/fixtures/init.ts +35 -0
- package/src/http/auth.ts +818 -0
- package/src/http/health.ts +7 -0
- package/src/http/home.ts +90 -0
- package/src/http/slow-query-publication.ts +49 -0
- package/src/index.ts +1 -0
- package/src/managers/ai-assistant-codex-manager.manager.ts +1131 -0
- package/src/managers/ai-run-evidence.manager.ts +264 -0
- package/src/managers/communication-metric.manager.ts +82 -0
- package/src/managers/cron.manager.ts +333 -0
- package/src/managers/customer-notification-content.manager.ts +236 -0
- package/src/managers/diagnostic-manager-bootstrap.ts +165 -0
- package/src/managers/error-auto-fix.manager.ts +2767 -0
- package/src/managers/local-log.manager.ts +113 -0
- package/src/managers/method.manager.ts +1857 -0
- package/src/managers/mongo.manager.ts +4575 -0
- package/src/managers/monitor.manager.ts +507 -0
- package/src/managers/openai-usage-ledger.manager.ts +112 -0
- package/src/managers/slow-query-verifier.manager.ts +3590 -0
- package/src/managers/slow-query.manager.ts +519 -0
- package/src/managers/subscription.manager.ts +3128 -0
- package/src/managers/websocket.manager.ts +746 -0
- package/src/managers/worker-dispatcher.manager.ts +1360 -0
- package/src/managers/worker-server.manager.ts +536 -0
- package/src/methods/accounts.ts +532 -0
- package/src/methods/ai-terminal.ts +23825 -0
- package/src/methods/app-settings.ts +114 -0
- package/src/methods/aws.ts +649 -0
- package/src/methods/collections.ts +641 -0
- package/src/methods/counters.ts +69 -0
- package/src/methods/cron-jobs.ts +2614 -0
- package/src/methods/customer-notifications.ts +458 -0
- package/src/methods/diagnostics.ts +616 -0
- package/src/methods/flag-updates.ts +7 -0
- package/src/methods/flags.ts +7 -0
- package/src/methods/logs.ts +657 -0
- package/src/methods/mongo-explorer.ts +1880 -0
- package/src/methods/monitor.ts +540 -0
- package/src/methods/pdf.ts +1236 -0
- package/src/methods/publications.ts +129 -0
- package/src/methods/report-builder.ts +3300 -0
- package/src/methods/support.ts +335 -0
- package/src/models/ai-run.model.ts +27 -0
- package/src/models/ai-terminal-conversation.model.ts +19 -0
- package/src/models/ai-terminal-issue-report.model.ts +21 -0
- package/src/models/ai-terminal-message.model.ts +24 -0
- package/src/models/app-setting.model.ts +17 -0
- package/{models/app-status.model.d.ts → src/models/app-status.model.ts} +3 -2
- package/{models/billing-logged-in-users.model.d.ts → src/models/billing-logged-in-users.model.ts} +5 -4
- package/src/models/collection-document.model.ts +24 -0
- package/src/models/communication-metric.model.ts +23 -0
- package/{models/counter.model.d.ts → src/models/counter.model.ts} +4 -3
- package/src/models/cron-job-history.model.ts +16 -0
- package/src/models/cron-job.model.ts +15 -0
- package/src/models/customer-notification.model.ts +28 -0
- package/src/models/customer-portal-password.model.ts +12 -0
- package/src/models/dialog.model.ts +25 -0
- package/{models/email-history.model.js → src/models/email-history.model.ts} +36 -4
- package/{models/email-verified.model.d.ts → src/models/email-verified.model.ts} +6 -5
- package/{models/file.model.d.ts → src/models/file.model.ts} +8 -7
- package/{models/flag-update.model.d.ts → src/models/flag-update.model.ts} +4 -3
- package/{models/flag.model.d.ts → src/models/flag.model.ts} +4 -3
- package/src/models/log-method-latency.model.ts +11 -0
- package/{models/log-subscription.model.d.ts → src/models/log-subscription.model.ts} +11 -9
- package/src/models/log.model.ts +19 -0
- package/{models/logged-in-users.model.d.ts → src/models/logged-in-users.model.ts} +6 -5
- package/{models/method-response.model.d.ts → src/models/method-response.model.ts} +7 -6
- package/src/models/method.model.ts +25 -0
- package/{models/monitor-cpu.model.d.ts → src/models/monitor-cpu.model.ts} +9 -7
- package/src/models/monitor-function.model.ts +16 -0
- package/src/models/monitor-memory.model.ts +17 -0
- package/src/models/monitor-mongo.model.ts +15 -0
- package/{models/notification.model.d.ts → src/models/notification.model.ts} +6 -4
- package/src/models/openai-usage-ledger.model.ts +56 -0
- package/src/models/pagination.model.ts +35 -0
- package/src/models/permission.model.ts +14 -0
- package/src/models/report-builder-dashboard-builder.model.ts +29 -0
- package/src/models/report-builder-library.model.ts +20 -0
- package/src/models/report-builder-report.model.ts +136 -0
- package/src/models/report-builder.model.ts +68 -0
- package/src/models/select-data-label.model.ts +9 -0
- package/src/models/server-message.model.ts +31 -0
- package/src/models/slow-query-report.model.ts +23 -0
- package/src/models/subscription.model.ts +73 -0
- package/src/models/support-ticket.model.ts +104 -0
- package/src/models/user-group.model.ts +24 -0
- package/{models/user-guide.model.d.ts → src/models/user-guide.model.ts} +5 -4
- package/src/models/user.model.ts +96 -0
- package/src/private/images/ResolveIO.png +0 -0
- package/src/publications/ai-terminal.ts +73 -0
- package/src/publications/app-settings.ts +25 -0
- package/src/publications/app-status.ts +13 -0
- package/src/publications/cron-jobs.ts +40 -0
- package/src/publications/customer-notifications.ts +101 -0
- package/src/publications/files.ts +33 -0
- package/src/publications/flags-update.ts +19 -0
- package/src/publications/flags.ts +19 -0
- package/src/publications/logs.ts +163 -0
- package/src/publications/notifications.ts +13 -0
- package/src/publications/report-builder-dashboard-builders.ts +39 -0
- package/src/publications/report-builder-libraries.ts +41 -0
- package/src/publications/report-builder-reports.ts +47 -0
- package/src/publications/super-admin.ts +13 -0
- package/src/publications/user-groups.ts +12 -0
- package/src/publications/user-guides.ts +12 -0
- package/src/resolveio-server-app.ts +617 -0
- package/src/server-app.ts +3354 -0
- package/src/services/codex-client.ts +1231 -0
- package/src/services/openai-client.ts +265 -0
- package/src/types/error-report.ts +26 -0
- package/src/types/js-tiktoken.d.ts +11 -0
- package/src/types/slow-query-report.ts +28 -0
- package/src/util/ai-qa-policy.ts +925 -0
- package/src/util/ai-run-evidence-adapters.ts +4642 -0
- package/src/util/ai-run-evidence-dashboard.ts +323 -0
- package/src/util/ai-run-evidence-eval.ts +1057 -0
- package/src/util/ai-run-evidence.ts +1185 -0
- package/src/util/ai-runner-artifacts.ts +586 -0
- package/src/util/ai-runner-manager-autopilot.ts +961 -0
- package/src/util/ai-runner-manager-policy.ts +4806 -0
- package/src/util/ai-runner-qa-auth.ts +821 -0
- package/src/util/ai-runner-qa-tools.ts +3045 -0
- package/src/util/aicoder-runner-v6.ts +2979 -0
- package/src/util/common.ts +649 -0
- package/src/util/customer-portal-password.ts +183 -0
- package/src/util/error-reporter.ts +332 -0
- package/src/util/error-tracking.ts +79 -0
- package/src/util/openai-usage-cost.ts +114 -0
- package/src/util/report-builder-unwinds.ts +180 -0
- package/src/util/runner-process-janitor.ts +219 -0
- package/src/util/schema-report-builder.ts +448 -0
- package/src/util/slow-query-reporter.ts +216 -0
- package/src/util/subscription-dependency-context.ts +1096 -0
- package/src/util/support-runner-v5.ts +6573 -0
- package/src/util/tokenizer.ts +38 -0
- package/src/workers/codex-runner.worker.ts +142 -0
- package/start_server.sh +5 -0
- package/tests/ai-assistant-corpus-build.ts +484 -0
- package/tests/ai-assistant-corpus-replay-e2e.ts +774 -0
- package/tests/ai-assistant-data-parity-e2e.ts +1989 -0
- package/tests/ai-assistant-eval-triage.ts +831 -0
- package/tests/ai-assistant-openai-e2e.ts +1061 -0
- package/tests/ai-assistant-openai-git-e2e.ts +155 -0
- package/tests/ai-assistant-preflight-matrix.ts +215 -0
- package/tests/ai-assistant-routing-eval.test.ts +560 -0
- package/tests/ai-assistant-snf-live-eval.ts +975 -0
- package/tests/ai-assistant-utils.test.ts +3057 -0
- package/tests/ai-manager-autopilot-snapshot.test.ts +193 -0
- package/tests/ai-manager-recovery-checkpoint.test.ts +1287 -0
- package/tests/ai-run-eval.test.ts +132 -0
- package/tests/ai-run-evidence.test.ts +2129 -0
- package/tests/ai-runner-contract.test.ts +488 -0
- package/tests/aicoder-runner-v6.test.ts +751 -0
- package/tests/error-reporter.test.ts +145 -0
- package/tests/method-publication-generator.test.ts +46 -0
- package/tests/report-builder-linking.test.ts +79 -0
- package/tests/resolveio-platform-intelligence.test.ts +352 -0
- package/tests/server-app-cron-owner.test.ts +127 -0
- package/tests/subscription-connect-race.test.ts +158 -0
- package/tests/subscription-dependency-context.test.ts +324 -0
- package/tests/subscription-manager-collection-tracking.test.ts +86 -0
- package/tests/subscription-manager-invalidation.test.ts +86 -0
- package/tests/support-runner-v5.test.ts +1473 -0
- package/tsconfig.json +34 -0
- package/ai/assistant-core-heuristics.d.ts +0 -11
- package/ai/assistant-core-heuristics.js +0 -356
- package/ai/assistant-core-heuristics.js.map +0 -1
- package/ai/resolveio-platform-intelligence-memory-corpus.d.ts +0 -3
- package/ai/resolveio-platform-intelligence-memory-corpus.js +0 -214
- package/ai/resolveio-platform-intelligence-memory-corpus.js.map +0 -1
- package/ai/resolveio-platform-intelligence-memory.d.ts +0 -20
- package/ai/resolveio-platform-intelligence-memory.js +0 -341
- package/ai/resolveio-platform-intelligence-memory.js.map +0 -1
- package/ai/resolveio-platform-intelligence-types.js +0 -4
- package/ai/resolveio-platform-intelligence-types.js.map +0 -1
- package/ai/resolveio-platform-intelligence.d.ts +0 -6
- package/ai/resolveio-platform-intelligence.js +0 -463
- package/ai/resolveio-platform-intelligence.js.map +0 -1
- package/client-server-app.d.ts +0 -1
- package/client-server-app.js +0 -68
- package/client-server-app.js.map +0 -1
- package/collections/ai-run.collection.d.ts +0 -3
- package/collections/ai-run.collection.js +0 -170
- package/collections/ai-run.collection.js.map +0 -1
- package/collections/ai-terminal-conversation.collection.d.ts +0 -2
- package/collections/ai-terminal-conversation.collection.js +0 -140
- package/collections/ai-terminal-conversation.collection.js.map +0 -1
- package/collections/ai-terminal-issue-report.collection.d.ts +0 -2
- package/collections/ai-terminal-issue-report.collection.js +0 -148
- package/collections/ai-terminal-issue-report.collection.js.map +0 -1
- package/collections/ai-terminal-message.collection.d.ts +0 -2
- package/collections/ai-terminal-message.collection.js +0 -121
- package/collections/ai-terminal-message.collection.js.map +0 -1
- package/collections/app-setting.collection.d.ts +0 -3
- package/collections/app-setting.collection.js +0 -103
- package/collections/app-setting.collection.js.map +0 -1
- package/collections/app-status.collection.d.ts +0 -3
- package/collections/app-status.collection.js +0 -57
- package/collections/app-status.collection.js.map +0 -1
- package/collections/communication-metric.collection.d.ts +0 -2
- package/collections/communication-metric.collection.js +0 -133
- package/collections/communication-metric.collection.js.map +0 -1
- package/collections/counter.collection.d.ts +0 -3
- package/collections/counter.collection.js +0 -56
- package/collections/counter.collection.js.map +0 -1
- package/collections/cron-job-history.collection.d.ts +0 -3
- package/collections/cron-job-history.collection.js +0 -137
- package/collections/cron-job-history.collection.js.map +0 -1
- package/collections/cron-job.collection.d.ts +0 -3
- package/collections/cron-job.collection.js +0 -92
- package/collections/cron-job.collection.js.map +0 -1
- package/collections/customer-notification.collection.d.ts +0 -3
- package/collections/customer-notification.collection.js +0 -130
- package/collections/customer-notification.collection.js.map +0 -1
- package/collections/customer-portal-password.collection.d.ts +0 -3
- package/collections/customer-portal-password.collection.js +0 -75
- package/collections/customer-portal-password.collection.js.map +0 -1
- package/collections/email-history.collection.d.ts +0 -3
- package/collections/email-history.collection.js +0 -134
- package/collections/email-history.collection.js.map +0 -1
- package/collections/email-verified.collection.d.ts +0 -3
- package/collections/email-verified.collection.js +0 -62
- package/collections/email-verified.collection.js.map +0 -1
- package/collections/file.collection.d.ts +0 -3
- package/collections/file.collection.js +0 -74
- package/collections/file.collection.js.map +0 -1
- package/collections/flag-update.collection.d.ts +0 -3
- package/collections/flag-update.collection.js +0 -57
- package/collections/flag-update.collection.js.map +0 -1
- package/collections/flag.collection.d.ts +0 -3
- package/collections/flag.collection.js +0 -57
- package/collections/flag.collection.js.map +0 -1
- package/collections/log-method-latency.collection.d.ts +0 -3
- package/collections/log-method-latency.collection.js +0 -77
- package/collections/log-method-latency.collection.js.map +0 -1
- package/collections/log-subscription.collection.d.ts +0 -3
- package/collections/log-subscription.collection.js +0 -80
- package/collections/log-subscription.collection.js.map +0 -1
- package/collections/log.collection.d.ts +0 -3
- package/collections/log.collection.js +0 -93
- package/collections/log.collection.js.map +0 -1
- package/collections/logged-in-users.collection.d.ts +0 -3
- package/collections/logged-in-users.collection.js +0 -67
- package/collections/logged-in-users.collection.js.map +0 -1
- package/collections/monitor-cpu.collection.d.ts +0 -3
- package/collections/monitor-cpu.collection.js +0 -65
- package/collections/monitor-cpu.collection.js.map +0 -1
- package/collections/monitor-function.collection.d.ts +0 -3
- package/collections/monitor-function.collection.js +0 -74
- package/collections/monitor-function.collection.js.map +0 -1
- package/collections/monitor-memory.collection.d.ts +0 -3
- package/collections/monitor-memory.collection.js +0 -77
- package/collections/monitor-memory.collection.js.map +0 -1
- package/collections/monitor-mongo.collection.d.ts +0 -3
- package/collections/monitor-mongo.collection.js +0 -71
- package/collections/monitor-mongo.collection.js.map +0 -1
- package/collections/notification.collection.d.ts +0 -3
- package/collections/notification.collection.js +0 -57
- package/collections/notification.collection.js.map +0 -1
- package/collections/openai-usage-ledger.collection.d.ts +0 -2
- package/collections/openai-usage-ledger.collection.js +0 -188
- package/collections/openai-usage-ledger.collection.js.map +0 -1
- package/collections/report-builder-dashboard-builder.collection.d.ts +0 -3
- package/collections/report-builder-dashboard-builder.collection.js +0 -109
- package/collections/report-builder-dashboard-builder.collection.js.map +0 -1
- package/collections/report-builder-library.collection.d.ts +0 -3
- package/collections/report-builder-library.collection.js +0 -87
- package/collections/report-builder-library.collection.js.map +0 -1
- package/collections/report-builder-report.collection.d.ts +0 -4
- package/collections/report-builder-report.collection.js +0 -184
- package/collections/report-builder-report.collection.js.map +0 -1
- package/collections/user-group.collection.d.ts +0 -4
- package/collections/user-group.collection.js +0 -89
- package/collections/user-group.collection.js.map +0 -1
- package/collections/user-guide.collection.d.ts +0 -3
- package/collections/user-guide.collection.js +0 -57
- package/collections/user-guide.collection.js.map +0 -1
- package/collections/user.collection.d.ts +0 -4
- package/collections/user.collection.js +0 -180
- package/collections/user.collection.js.map +0 -1
- package/cron/cron.d.ts +0 -14
- package/cron/cron.js +0 -216
- package/cron/cron.js.map +0 -1
- package/fixtures/cron-jobs.d.ts +0 -1
- package/fixtures/cron-jobs.js +0 -150
- package/fixtures/cron-jobs.js.map +0 -1
- package/fixtures/init.d.ts +0 -1
- package/fixtures/init.js +0 -91
- package/fixtures/init.js.map +0 -1
- package/http/auth.d.ts +0 -2
- package/http/auth.js +0 -951
- package/http/auth.js.map +0 -1
- package/http/health.d.ts +0 -1
- package/http/health.js +0 -11
- package/http/health.js.map +0 -1
- package/http/home.d.ts +0 -1
- package/http/home.js +0 -134
- package/http/home.js.map +0 -1
- package/http/slow-query-publication.d.ts +0 -2
- package/http/slow-query-publication.js +0 -99
- package/http/slow-query-publication.js.map +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -19
- package/index.js.map +0 -1
- package/managers/ai-assistant-codex-manager.manager.d.ts +0 -67
- package/managers/ai-assistant-codex-manager.manager.js +0 -1113
- package/managers/ai-assistant-codex-manager.manager.js.map +0 -1
- package/managers/ai-run-evidence.manager.d.ts +0 -36
- package/managers/ai-run-evidence.manager.js +0 -377
- package/managers/ai-run-evidence.manager.js.map +0 -1
- package/managers/communication-metric.manager.d.ts +0 -16
- package/managers/communication-metric.manager.js +0 -134
- package/managers/communication-metric.manager.js.map +0 -1
- package/managers/cron.manager.d.ts +0 -20
- package/managers/cron.manager.js +0 -534
- package/managers/cron.manager.js.map +0 -1
- package/managers/customer-notification-content.manager.d.ts +0 -55
- package/managers/customer-notification-content.manager.js +0 -158
- package/managers/customer-notification-content.manager.js.map +0 -1
- package/managers/diagnostic-manager-bootstrap.d.ts +0 -9
- package/managers/diagnostic-manager-bootstrap.js +0 -260
- package/managers/diagnostic-manager-bootstrap.js.map +0 -1
- package/managers/error-auto-fix.manager.d.ts +0 -149
- package/managers/error-auto-fix.manager.js +0 -3064
- package/managers/error-auto-fix.manager.js.map +0 -1
- package/managers/local-log.manager.d.ts +0 -18
- package/managers/local-log.manager.js +0 -88
- package/managers/local-log.manager.js.map +0 -1
- package/managers/method.manager.d.ts +0 -84
- package/managers/method.manager.js +0 -1964
- package/managers/method.manager.js.map +0 -1
- package/managers/mongo.manager.d.ts +0 -224
- package/managers/mongo.manager.js +0 -5000
- package/managers/mongo.manager.js.map +0 -1
- package/managers/monitor.manager.d.ts +0 -70
- package/managers/monitor.manager.js +0 -550
- package/managers/monitor.manager.js.map +0 -1
- package/managers/openai-usage-ledger.manager.d.ts +0 -30
- package/managers/openai-usage-ledger.manager.js +0 -142
- package/managers/openai-usage-ledger.manager.js.map +0 -1
- package/managers/slow-query-verifier.manager.d.ts +0 -144
- package/managers/slow-query-verifier.manager.js +0 -3857
- package/managers/slow-query-verifier.manager.js.map +0 -1
- package/managers/slow-query.manager.d.ts +0 -28
- package/managers/slow-query.manager.js +0 -468
- package/managers/slow-query.manager.js.map +0 -1
- package/managers/subscription.manager.d.ts +0 -169
- package/managers/subscription.manager.js +0 -3434
- package/managers/subscription.manager.js.map +0 -1
- package/managers/websocket.manager.d.ts +0 -73
- package/managers/websocket.manager.js +0 -673
- package/managers/websocket.manager.js.map +0 -1
- package/managers/worker-dispatcher.manager.d.ts +0 -120
- package/managers/worker-dispatcher.manager.js +0 -1266
- package/managers/worker-dispatcher.manager.js.map +0 -1
- package/managers/worker-server.manager.d.ts +0 -35
- package/managers/worker-server.manager.js +0 -582
- package/managers/worker-server.manager.js.map +0 -1
- package/methods/accounts.d.ts +0 -2
- package/methods/accounts.js +0 -624
- package/methods/accounts.js.map +0 -1
- package/methods/ai-terminal.d.ts +0 -338
- package/methods/ai-terminal.js +0 -23454
- package/methods/ai-terminal.js.map +0 -1
- package/methods/app-settings.d.ts +0 -2
- package/methods/app-settings.js +0 -169
- package/methods/app-settings.js.map +0 -1
- package/methods/aws.d.ts +0 -2
- package/methods/aws.js +0 -877
- package/methods/aws.js.map +0 -1
- package/methods/collections.d.ts +0 -2
- package/methods/collections.js +0 -719
- package/methods/collections.js.map +0 -1
- package/methods/counters.d.ts +0 -2
- package/methods/counters.js +0 -113
- package/methods/counters.js.map +0 -1
- package/methods/cron-jobs.d.ts +0 -2
- package/methods/cron-jobs.js +0 -2475
- package/methods/cron-jobs.js.map +0 -1
- package/methods/customer-notifications.d.ts +0 -2
- package/methods/customer-notifications.js +0 -528
- package/methods/customer-notifications.js.map +0 -1
- package/methods/diagnostics.d.ts +0 -2
- package/methods/diagnostics.js +0 -703
- package/methods/diagnostics.js.map +0 -1
- package/methods/flag-updates.d.ts +0 -2
- package/methods/flag-updates.js +0 -8
- package/methods/flag-updates.js.map +0 -1
- package/methods/flags.d.ts +0 -2
- package/methods/flags.js +0 -8
- package/methods/flags.js.map +0 -1
- package/methods/logs.d.ts +0 -2
- package/methods/logs.js +0 -751
- package/methods/logs.js.map +0 -1
- package/methods/mongo-explorer.d.ts +0 -2
- package/methods/mongo-explorer.js +0 -1808
- package/methods/mongo-explorer.js.map +0 -1
- package/methods/monitor.d.ts +0 -2
- package/methods/monitor.js +0 -543
- package/methods/monitor.js.map +0 -1
- package/methods/pdf.d.ts +0 -2
- package/methods/pdf.js +0 -1216
- package/methods/pdf.js.map +0 -1
- package/methods/publications.d.ts +0 -1
- package/methods/publications.js +0 -183
- package/methods/publications.js.map +0 -1
- package/methods/report-builder.d.ts +0 -2
- package/methods/report-builder.js +0 -3094
- package/methods/report-builder.js.map +0 -1
- package/methods/support.d.ts +0 -2
- package/methods/support.js +0 -430
- package/methods/support.js.map +0 -1
- package/models/ai-run.model.d.ts +0 -19
- package/models/ai-run.model.js +0 -4
- package/models/ai-run.model.js.map +0 -1
- package/models/ai-terminal-conversation.model.d.ts +0 -17
- package/models/ai-terminal-conversation.model.js +0 -4
- package/models/ai-terminal-conversation.model.js.map +0 -1
- package/models/ai-terminal-issue-report.model.d.ts +0 -19
- package/models/ai-terminal-issue-report.model.js +0 -4
- package/models/ai-terminal-issue-report.model.js.map +0 -1
- package/models/ai-terminal-message.model.d.ts +0 -22
- package/models/ai-terminal-message.model.js +0 -4
- package/models/ai-terminal-message.model.js.map +0 -1
- package/models/app-setting.model.d.ts +0 -16
- package/models/app-setting.model.js +0 -4
- package/models/app-setting.model.js.map +0 -1
- package/models/app-status.model.js +0 -4
- package/models/app-status.model.js.map +0 -1
- package/models/billing-logged-in-users.model.js +0 -4
- package/models/billing-logged-in-users.model.js.map +0 -1
- package/models/collection-document.model.d.ts +0 -21
- package/models/collection-document.model.js +0 -4
- package/models/collection-document.model.js.map +0 -1
- package/models/communication-metric.model.d.ts +0 -20
- package/models/communication-metric.model.js +0 -4
- package/models/communication-metric.model.js.map +0 -1
- package/models/counter.model.js +0 -4
- package/models/counter.model.js.map +0 -1
- package/models/cron-job-history.model.d.ts +0 -15
- package/models/cron-job-history.model.js +0 -4
- package/models/cron-job-history.model.js.map +0 -1
- package/models/cron-job.model.d.ts +0 -14
- package/models/cron-job.model.js +0 -4
- package/models/cron-job.model.js.map +0 -1
- package/models/customer-notification.model.d.ts +0 -26
- package/models/customer-notification.model.js +0 -4
- package/models/customer-notification.model.js.map +0 -1
- package/models/customer-portal-password.model.d.ts +0 -11
- package/models/customer-portal-password.model.js +0 -4
- package/models/customer-portal-password.model.js.map +0 -1
- package/models/dialog.model.d.ts +0 -23
- package/models/dialog.model.js +0 -4
- package/models/dialog.model.js.map +0 -1
- package/models/email-history.model.d.ts +0 -32
- package/models/email-history.model.js.map +0 -1
- package/models/email-verified.model.js +0 -4
- package/models/email-verified.model.js.map +0 -1
- package/models/file.model.js +0 -4
- package/models/file.model.js.map +0 -1
- package/models/flag-update.model.js +0 -4
- package/models/flag-update.model.js.map +0 -1
- package/models/flag.model.js +0 -4
- package/models/flag.model.js.map +0 -1
- package/models/log-method-latency.model.d.ts +0 -10
- package/models/log-method-latency.model.js +0 -4
- package/models/log-method-latency.model.js.map +0 -1
- package/models/log-subscription.model.js +0 -4
- package/models/log-subscription.model.js.map +0 -1
- package/models/log.model.d.ts +0 -17
- package/models/log.model.js +0 -4
- package/models/log.model.js.map +0 -1
- package/models/logged-in-users.model.js +0 -4
- package/models/logged-in-users.model.js.map +0 -1
- package/models/method-response.model.js +0 -4
- package/models/method-response.model.js.map +0 -1
- package/models/method.model.d.ts +0 -26
- package/models/method.model.js +0 -4
- package/models/method.model.js.map +0 -1
- package/models/monitor-cpu.model.js +0 -4
- package/models/monitor-cpu.model.js.map +0 -1
- package/models/monitor-function.model.d.ts +0 -14
- package/models/monitor-function.model.js +0 -4
- package/models/monitor-function.model.js.map +0 -1
- package/models/monitor-memory.model.d.ts +0 -15
- package/models/monitor-memory.model.js +0 -4
- package/models/monitor-memory.model.js.map +0 -1
- package/models/monitor-mongo.model.d.ts +0 -13
- package/models/monitor-mongo.model.js +0 -4
- package/models/monitor-mongo.model.js.map +0 -1
- package/models/notification.model.js +0 -4
- package/models/notification.model.js.map +0 -1
- package/models/openai-usage-ledger.model.d.ts +0 -30
- package/models/openai-usage-ledger.model.js +0 -4
- package/models/openai-usage-ledger.model.js.map +0 -1
- package/models/pagination.model.d.ts +0 -11
- package/models/pagination.model.js +0 -28
- package/models/pagination.model.js.map +0 -1
- package/models/permission.model.d.ts +0 -12
- package/models/permission.model.js +0 -4
- package/models/permission.model.js.map +0 -1
- package/models/report-builder-dashboard-builder.model.d.ts +0 -25
- package/models/report-builder-dashboard-builder.model.js +0 -4
- package/models/report-builder-dashboard-builder.model.js.map +0 -1
- package/models/report-builder-library.model.d.ts +0 -17
- package/models/report-builder-library.model.js +0 -4
- package/models/report-builder-library.model.js.map +0 -1
- package/models/report-builder-report.model.d.ts +0 -121
- package/models/report-builder-report.model.js +0 -4
- package/models/report-builder-report.model.js.map +0 -1
- package/models/report-builder.model.d.ts +0 -61
- package/models/report-builder.model.js +0 -4
- package/models/report-builder.model.js.map +0 -1
- package/models/select-data-label.model.d.ts +0 -9
- package/models/select-data-label.model.js +0 -4
- package/models/select-data-label.model.js.map +0 -1
- package/models/server-message.model.d.ts +0 -32
- package/models/server-message.model.js +0 -4
- package/models/server-message.model.js.map +0 -1
- package/models/slow-query-report.model.d.ts +0 -23
- package/models/slow-query-report.model.js +0 -4
- package/models/slow-query-report.model.js.map +0 -1
- package/models/subscription.model.d.ts +0 -31
- package/models/subscription.model.js +0 -4
- package/models/subscription.model.js.map +0 -1
- package/models/support-ticket.model.d.ts +0 -87
- package/models/support-ticket.model.js +0 -4
- package/models/support-ticket.model.js.map +0 -1
- package/models/user-group.model.d.ts +0 -20
- package/models/user-group.model.js +0 -4
- package/models/user-group.model.js.map +0 -1
- package/models/user-guide.model.js +0 -4
- package/models/user-guide.model.js.map +0 -1
- package/models/user.model.d.ts +0 -84
- package/models/user.model.js +0 -4
- package/models/user.model.js.map +0 -1
- package/private/images/ResolveIO.png +0 -0
- package/public_api.js +0 -127
- package/public_api.js.map +0 -1
- package/publications/ai-terminal.d.ts +0 -1
- package/publications/ai-terminal.js +0 -122
- package/publications/ai-terminal.js.map +0 -1
- package/publications/app-settings.d.ts +0 -2
- package/publications/app-settings.js +0 -28
- package/publications/app-settings.js.map +0 -1
- package/publications/app-status.d.ts +0 -2
- package/publications/app-status.js +0 -16
- package/publications/app-status.js.map +0 -1
- package/publications/cron-jobs.d.ts +0 -2
- package/publications/cron-jobs.js +0 -88
- package/publications/cron-jobs.js.map +0 -1
- package/publications/customer-notifications.d.ts +0 -2
- package/publications/customer-notifications.js +0 -161
- package/publications/customer-notifications.js.map +0 -1
- package/publications/files.d.ts +0 -2
- package/publications/files.js +0 -36
- package/publications/files.js.map +0 -1
- package/publications/flags-update.d.ts +0 -2
- package/publications/flags-update.js +0 -22
- package/publications/flags-update.js.map +0 -1
- package/publications/flags.d.ts +0 -2
- package/publications/flags.js +0 -22
- package/publications/flags.js.map +0 -1
- package/publications/logs.d.ts +0 -2
- package/publications/logs.js +0 -164
- package/publications/logs.js.map +0 -1
- package/publications/notifications.d.ts +0 -2
- package/publications/notifications.js +0 -16
- package/publications/notifications.js.map +0 -1
- package/publications/report-builder-dashboard-builders.d.ts +0 -2
- package/publications/report-builder-dashboard-builders.js +0 -42
- package/publications/report-builder-dashboard-builders.js.map +0 -1
- package/publications/report-builder-libraries.d.ts +0 -2
- package/publications/report-builder-libraries.js +0 -90
- package/publications/report-builder-libraries.js.map +0 -1
- package/publications/report-builder-reports.d.ts +0 -2
- package/publications/report-builder-reports.js +0 -50
- package/publications/report-builder-reports.js.map +0 -1
- package/publications/super-admin.d.ts +0 -2
- package/publications/super-admin.js +0 -16
- package/publications/super-admin.js.map +0 -1
- package/publications/user-groups.d.ts +0 -1
- package/publications/user-groups.js +0 -16
- package/publications/user-groups.js.map +0 -1
- package/publications/user-guides.d.ts +0 -1
- package/publications/user-guides.js +0 -16
- package/publications/user-guides.js.map +0 -1
- package/resolveio-server-app.d.ts +0 -70
- package/resolveio-server-app.js +0 -801
- package/resolveio-server-app.js.map +0 -1
- package/server-app.d.ts +0 -228
- package/server-app.js +0 -3566
- package/server-app.js.map +0 -1
- package/services/codex-client.d.ts +0 -128
- package/services/codex-client.js +0 -1629
- package/services/codex-client.js.map +0 -1
- package/services/openai-client.d.ts +0 -46
- package/services/openai-client.js +0 -318
- package/services/openai-client.js.map +0 -1
- package/types/error-report.d.ts +0 -25
- package/types/error-report.js +0 -4
- package/types/error-report.js.map +0 -1
- package/types/slow-query-report.d.ts +0 -27
- package/types/slow-query-report.js +0 -6
- package/types/slow-query-report.js.map +0 -1
- package/util/ai-qa-policy.d.ts +0 -124
- package/util/ai-qa-policy.js +0 -736
- package/util/ai-qa-policy.js.map +0 -1
- package/util/ai-run-evidence-adapters.d.ts +0 -109
- package/util/ai-run-evidence-adapters.js +0 -4141
- package/util/ai-run-evidence-adapters.js.map +0 -1
- package/util/ai-run-evidence-dashboard.d.ts +0 -84
- package/util/ai-run-evidence-dashboard.js +0 -336
- package/util/ai-run-evidence-dashboard.js.map +0 -1
- package/util/ai-run-evidence-eval.d.ts +0 -86
- package/util/ai-run-evidence-eval.js +0 -1018
- package/util/ai-run-evidence-eval.js.map +0 -1
- package/util/ai-run-evidence.d.ts +0 -244
- package/util/ai-run-evidence.js +0 -852
- package/util/ai-run-evidence.js.map +0 -1
- package/util/ai-runner-artifacts.d.ts +0 -82
- package/util/ai-runner-artifacts.js +0 -713
- package/util/ai-runner-artifacts.js.map +0 -1
- package/util/ai-runner-manager-autopilot.d.ts +0 -210
- package/util/ai-runner-manager-autopilot.js +0 -642
- package/util/ai-runner-manager-autopilot.js.map +0 -1
- package/util/ai-runner-manager-policy.d.ts +0 -787
- package/util/ai-runner-manager-policy.js +0 -3342
- package/util/ai-runner-manager-policy.js.map +0 -1
- package/util/ai-runner-qa-auth.d.ts +0 -5
- package/util/ai-runner-qa-auth.js +0 -822
- package/util/ai-runner-qa-auth.js.map +0 -1
- package/util/ai-runner-qa-tools.d.ts +0 -26
- package/util/ai-runner-qa-tools.js +0 -3029
- package/util/ai-runner-qa-tools.js.map +0 -1
- package/util/aicoder-runner-v6.d.ts +0 -424
- package/util/aicoder-runner-v6.js +0 -2325
- package/util/aicoder-runner-v6.js.map +0 -1
- package/util/common.d.ts +0 -31
- package/util/common.js +0 -683
- package/util/common.js.map +0 -1
- package/util/customer-portal-password.d.ts +0 -13
- package/util/customer-portal-password.js +0 -209
- package/util/customer-portal-password.js.map +0 -1
- package/util/error-reporter.d.ts +0 -52
- package/util/error-reporter.js +0 -326
- package/util/error-reporter.js.map +0 -1
- package/util/error-tracking.d.ts +0 -13
- package/util/error-tracking.js +0 -120
- package/util/error-tracking.js.map +0 -1
- package/util/openai-usage-cost.d.ts +0 -6
- package/util/openai-usage-cost.js +0 -103
- package/util/openai-usage-cost.js.map +0 -1
- package/util/report-builder-unwinds.d.ts +0 -15
- package/util/report-builder-unwinds.js +0 -156
- package/util/report-builder-unwinds.js.map +0 -1
- package/util/runner-process-janitor.d.ts +0 -27
- package/util/runner-process-janitor.js +0 -208
- package/util/runner-process-janitor.js.map +0 -1
- package/util/schema-report-builder.d.ts +0 -6
- package/util/schema-report-builder.js +0 -481
- package/util/schema-report-builder.js.map +0 -1
- package/util/slow-query-reporter.d.ts +0 -28
- package/util/slow-query-reporter.js +0 -226
- package/util/slow-query-reporter.js.map +0 -1
- package/util/subscription-dependency-context.d.ts +0 -34
- package/util/subscription-dependency-context.js +0 -1283
- package/util/subscription-dependency-context.js.map +0 -1
- package/util/support-runner-v5.d.ts +0 -1018
- package/util/support-runner-v5.js +0 -4615
- package/util/support-runner-v5.js.map +0 -1
- package/util/tokenizer.d.ts +0 -5
- package/util/tokenizer.js +0 -41
- package/util/tokenizer.js.map +0 -1
- package/workers/codex-runner.worker.d.ts +0 -1
- package/workers/codex-runner.worker.js +0 -192
- package/workers/codex-runner.worker.js.map +0 -1
- /package/{private → src/private}/email-templates/enrollment.html +0 -0
- /package/{private → src/private}/email-templates/forgot-password.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket-deleted.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket-modified.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket.html +0 -0
- /package/{public_api.d.ts → src/public_api.ts} +0 -0
|
@@ -0,0 +1,1473 @@
|
|
|
1
|
+
import * as assert from 'node:assert/strict';
|
|
2
|
+
import {
|
|
3
|
+
buildResolveIOSupportDiagnosisEvidencePack,
|
|
4
|
+
buildResolveIOSupportIssueClassProbePlan,
|
|
5
|
+
buildResolveIOSupportIssueClassProbes,
|
|
6
|
+
buildResolveIOSupportClarificationContract,
|
|
7
|
+
buildResolveIOSupportContinuationProofCheckpoint,
|
|
8
|
+
buildResolveIOSupportManagerExecutionPacket,
|
|
9
|
+
buildResolveIOSupportV5MicrotaskPrompt,
|
|
10
|
+
buildResolveIOSupportV5DiagnoseFirstPrompt,
|
|
11
|
+
buildResolveIOSupportV5Incident,
|
|
12
|
+
buildResolveIOSupportV5PromptBudget,
|
|
13
|
+
buildResolveIOSupportV5ScopeDigest,
|
|
14
|
+
changedFilesOutsideResolveIOSupportDiagnosisOwnerFiles,
|
|
15
|
+
decideResolveIOSupportCustomerReplyPolicy,
|
|
16
|
+
decideResolveIOSupportV5AutonomousNextAction,
|
|
17
|
+
decideResolveIOSupportV5RepairGate,
|
|
18
|
+
decideResolveIOSupportV5RepeatedFailureStop,
|
|
19
|
+
decideResolveIOSupportV5Continuation,
|
|
20
|
+
evaluateResolveIOSupportBusinessProofReadiness,
|
|
21
|
+
evaluateResolveIOSupportDiagnosisEvidenceQuality,
|
|
22
|
+
evaluateResolveIOSupportEvidenceFreshness,
|
|
23
|
+
evaluateResolveIOSupportPreflightGate,
|
|
24
|
+
extractResolveIOSupportDiagnosisGateFromText,
|
|
25
|
+
fingerprintResolveIOSupportV5Blocker,
|
|
26
|
+
initializeResolveIOSupportV5State,
|
|
27
|
+
recordResolveIOSupportV5MicrotaskUsage,
|
|
28
|
+
recordResolveIOSupportV5Step,
|
|
29
|
+
selectResolveIOSupportV5ActiveMicrotask,
|
|
30
|
+
selectResolveIOSupportSimilarCaseHints,
|
|
31
|
+
summarizeResolveIOSupportV5MicrotaskUsage,
|
|
32
|
+
validateResolveIOSupportClarificationContract,
|
|
33
|
+
validateResolveIOSupportCustomerReplyReadinessContract,
|
|
34
|
+
validateResolveIOSupportDiagnosisGate,
|
|
35
|
+
validateResolveIOSupportIssueClassProbePlan,
|
|
36
|
+
validateResolveIOSupportNextActionContract
|
|
37
|
+
} from '../src/util/support-runner-v5';
|
|
38
|
+
|
|
39
|
+
const initialized = initializeResolveIOSupportV5State({
|
|
40
|
+
jobId: 'job-1',
|
|
41
|
+
ticketId: 'ticket-1',
|
|
42
|
+
ticketNumber: '004999',
|
|
43
|
+
title: 'Support ticket #004999',
|
|
44
|
+
description: 'Fix BOL driver display and QA it.',
|
|
45
|
+
approvedScopeRequirements: ['BOL driver display', 'disabled driver canonical rejection'],
|
|
46
|
+
prBranch: 'feature/support-004999',
|
|
47
|
+
buildThreadKey: 'support:ticket-1:job:job-1:build',
|
|
48
|
+
qaThreadKey: 'support:ticket-1:job:job-1:qa',
|
|
49
|
+
now: '2026-06-06T00:00:00.000Z'
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
assert.equal(initialized.supportWorkflowVersion, 'v5');
|
|
53
|
+
assert.equal(initialized.supportV5SupervisorState.noEmailUnlessApproved, true);
|
|
54
|
+
assert.equal(initialized.supportV5LaneMemory.build.model, 'gpt-5.3-codex');
|
|
55
|
+
assert.equal(initialized.supportV5LaneMemory.qa.model, 'gpt-5.4-mini');
|
|
56
|
+
assert.equal(initialized.supportV5LaneMemory.build.threadKey, 'support:ticket-1:job:job-1:build');
|
|
57
|
+
assert.match(initialized.supportV5SupervisorState.approvedScope, /BOL driver display/);
|
|
58
|
+
assert.ok(initialized.supportV5MicrotaskLedger.length >= 4);
|
|
59
|
+
assert.equal(initialized.supportV5MicrotaskLedger[0].type, 'diagnosis_gate');
|
|
60
|
+
assert.equal(initialized.supportV5MicrotaskLedger[0].lane, 'build');
|
|
61
|
+
assert.equal(initialized.supportV5MicrotaskLedger[1].lane, 'build');
|
|
62
|
+
assert.equal(initialized.supportV5MicrotaskLedger[2].lane, 'qa');
|
|
63
|
+
assert.equal(initialized.supportV5MicrotaskLedger[0].threadKey, 'support:ticket-1:job:job-1:build');
|
|
64
|
+
assert.equal(initialized.supportV5MicrotaskLedger[2].threadKey, 'support:ticket-1:job:job-1:qa');
|
|
65
|
+
assert.equal(initialized.supportV5ActiveMicrotaskId, initialized.supportV5MicrotaskLedger[0].microtaskId);
|
|
66
|
+
assert.equal(selectResolveIOSupportV5ActiveMicrotask(initialized.supportV5MicrotaskLedger)?.type, 'diagnosis_gate');
|
|
67
|
+
assert.match(initialized.supportV5ScopeDigest || '', /Approved scope/);
|
|
68
|
+
assert.equal(validateResolveIOSupportDiagnosisGate(initialized.supportV5DiagnosisGate).valid, false);
|
|
69
|
+
assert.deepEqual(initialized.supportV5RecoveryDispatchHistory, []);
|
|
70
|
+
assert.equal(initialized.supportV5RecoveryDirective, undefined);
|
|
71
|
+
|
|
72
|
+
const initialDiagnosisEvidencePack = buildResolveIOSupportDiagnosisEvidencePack({
|
|
73
|
+
issueClass: 'filter_query_mismatch',
|
|
74
|
+
ownerFiles: ['server/src/publications/support-tickets.ts'],
|
|
75
|
+
text: 'Support ticket list customer filter returns rows for the wrong customer.',
|
|
76
|
+
now: '2026-06-06T00:00:00.000Z'
|
|
77
|
+
});
|
|
78
|
+
const initializedWithDiagnosisEvidencePack = initializeResolveIOSupportV5State({
|
|
79
|
+
jobId: 'job-pack',
|
|
80
|
+
ticketId: 'ticket-pack',
|
|
81
|
+
ticketNumber: '004998',
|
|
82
|
+
title: 'Support ticket #004998',
|
|
83
|
+
description: 'Preserve diagnosis evidence pack.',
|
|
84
|
+
existing: {
|
|
85
|
+
supportV5DiagnosisEvidencePack: initialDiagnosisEvidencePack
|
|
86
|
+
} as any,
|
|
87
|
+
now: '2026-06-06T00:00:00.000Z'
|
|
88
|
+
});
|
|
89
|
+
assert.equal(initializedWithDiagnosisEvidencePack.supportV5DiagnosisEvidencePack?.packId, initialDiagnosisEvidencePack.packId);
|
|
90
|
+
assert.equal(initializedWithDiagnosisEvidencePack.supportV5DiagnosisEvidencePack?.sourceEditsAllowed, false);
|
|
91
|
+
|
|
92
|
+
const validDiagnosis = {
|
|
93
|
+
issue_case: {
|
|
94
|
+
customer_complaint: 'Disabled drivers appear in the BOL driver dropdown.',
|
|
95
|
+
expected_result: 'Disabled drivers are excluded or rejected.',
|
|
96
|
+
observed_result: 'Disabled driver can be selected.',
|
|
97
|
+
route_module: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
98
|
+
account_customer_context: '004999 reporter, truck treating route fixture',
|
|
99
|
+
reproduction_status: 'reproduced' as const
|
|
100
|
+
},
|
|
101
|
+
issue_class: 'filter_query_mismatch' as const,
|
|
102
|
+
accepted_hypothesis: {
|
|
103
|
+
statement: 'The driver dropdown publication does not filter disabled users.',
|
|
104
|
+
falsifiable_test: 'Inspect the publication/method query and run the dropdown with a disabled driver fixture.',
|
|
105
|
+
evidence: ['Ticket names disabled driver selection.', 'Publication path returns drivers without active filter.']
|
|
106
|
+
},
|
|
107
|
+
rejected_alternatives: ['Route auth failure rejected because the BOL page hydrates.', 'Pure CSS issue rejected because persisted selected id changes.'],
|
|
108
|
+
failing_path: {
|
|
109
|
+
frontend: 'geochem/angular/app/bol/new/bol-new.component.ts driver select',
|
|
110
|
+
backend: 'geochem/server/src/publications/drivers.ts',
|
|
111
|
+
description: 'Frontend driver select consumes an unfiltered backend driver list.'
|
|
112
|
+
},
|
|
113
|
+
owner_files: [
|
|
114
|
+
'geochem/angular/app/bol/new/bol-new.component.ts',
|
|
115
|
+
'geochem/server/src/publications/drivers.ts'
|
|
116
|
+
],
|
|
117
|
+
proof_plan: {
|
|
118
|
+
before: 'Seed/identify a disabled driver available to the BOL route.',
|
|
119
|
+
action: 'Open the BOL route, open the driver dropdown, and attempt selecting the disabled driver.',
|
|
120
|
+
after: 'Disabled driver is absent or rejected and the active driver remains selected.',
|
|
121
|
+
business_assertion: 'Disabled driver cannot replace the selected active driver.',
|
|
122
|
+
route: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
123
|
+
data_assertion: 'Persisted BOL driver id remains active after save attempt.',
|
|
124
|
+
business_proof_contract: {
|
|
125
|
+
issue_class: 'filter_query_mismatch' as const,
|
|
126
|
+
setup_state: 'A BOL route has one active driver and one disabled driver in the candidate dataset.',
|
|
127
|
+
action_under_test: 'Open the driver dropdown and attempt to choose the disabled driver.',
|
|
128
|
+
expected_business_state_change: 'The disabled driver is excluded or rejected while the active driver remains selected.',
|
|
129
|
+
prohibited_false_pass: 'Route load, screenshot visibility, or a populated dropdown alone is not acceptance.',
|
|
130
|
+
proof_artifacts: ['browser trace', 'dropdown DOM snapshot', 'persisted BOL driver id check'],
|
|
131
|
+
data_or_dom_assertion: 'The disabled driver option is absent or blocked and the saved BOL driver id remains active.'
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
evidence: [
|
|
135
|
+
{ type: 'ticket' as const, summary: 'Ticket reports disabled driver selection in BOL workflow.' },
|
|
136
|
+
{ type: 'browser' as const, summary: 'BOL driver dropdown allowed the disabled driver before repair.', artifactPath: 'qa-artifacts/004999-disabled-driver-before.png' },
|
|
137
|
+
{ type: 'code' as const, summary: 'Publication lacks disabled-user filter.' }
|
|
138
|
+
],
|
|
139
|
+
status: 'passed' as const
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const validDiagnosisResult = validateResolveIOSupportDiagnosisGate(validDiagnosis);
|
|
143
|
+
assert.equal(validDiagnosisResult.valid, true);
|
|
144
|
+
assert.equal(validDiagnosisResult.normalized?.status, 'passed');
|
|
145
|
+
assert.equal(validDiagnosisResult.evidenceQuality?.hasReproductionEvidence, true);
|
|
146
|
+
assert.equal(validDiagnosisResult.evidenceQuality?.artifactBackedEvidenceCount, 1);
|
|
147
|
+
assert.equal(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].issue_class, 'filter_query_mismatch');
|
|
148
|
+
assert.match(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].expected_evidence, /dropdown DOM snapshot/);
|
|
149
|
+
assert.equal(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].failure_class, 'business');
|
|
150
|
+
assert.equal(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].acceptance_gate, 'aiqa_business_assertion');
|
|
151
|
+
assert.ok(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].required_artifacts.some((artifact) => /included\/excluded row proof|dropdown DOM snapshot/i.test(artifact)));
|
|
152
|
+
assert.equal(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].state_transition.assertion, validDiagnosis.proof_plan.business_proof_contract.data_or_dom_assertion);
|
|
153
|
+
|
|
154
|
+
const validProbePlan = buildResolveIOSupportIssueClassProbePlan(validDiagnosis, '2026-06-06T00:00:05.000Z');
|
|
155
|
+
const validProbePlanValidation = validateResolveIOSupportIssueClassProbePlan(validProbePlan, validDiagnosis);
|
|
156
|
+
assert.equal(validProbePlan.status, 'ready');
|
|
157
|
+
assert.equal(validProbePlanValidation.valid, true);
|
|
158
|
+
assert.equal(validProbePlan.activeProbe?.issue_class, validDiagnosis.issue_class);
|
|
159
|
+
assert.equal(validProbePlan.activeProbe?.route, validDiagnosis.proof_plan.route);
|
|
160
|
+
assert.equal(validProbePlan.acceptanceGate, 'aiqa_business_assertion');
|
|
161
|
+
assert.ok(validProbePlan.requiredArtifacts.some((artifact) => /dropdown DOM snapshot/i.test(artifact)));
|
|
162
|
+
assert.ok(validProbePlan.falsePassBlockers.some((blocker) => /route screenshot|filter control visible|route loaded|screenshot/i.test(blocker)));
|
|
163
|
+
|
|
164
|
+
const malformedProbePlan = validateResolveIOSupportIssueClassProbePlan({
|
|
165
|
+
...validProbePlan,
|
|
166
|
+
probes: [{
|
|
167
|
+
...(validProbePlan.activeProbe as any),
|
|
168
|
+
route: '',
|
|
169
|
+
required_artifacts: [],
|
|
170
|
+
state_transition: {
|
|
171
|
+
...(validProbePlan.activeProbe as any).state_transition,
|
|
172
|
+
assertion: ''
|
|
173
|
+
}
|
|
174
|
+
}]
|
|
175
|
+
}, validDiagnosis);
|
|
176
|
+
assert.equal(malformedProbePlan.valid, false);
|
|
177
|
+
assert.ok(malformedProbePlan.blockers.some((blocker) => /route or module/i.test(blocker)));
|
|
178
|
+
assert.ok(malformedProbePlan.blockers.some((blocker) => /at least two proof artifacts/i.test(blocker)));
|
|
179
|
+
assert.ok(malformedProbePlan.blockers.some((blocker) => /assertion is required/i.test(blocker)));
|
|
180
|
+
|
|
181
|
+
const similarCaseHints = selectResolveIOSupportSimilarCaseHints({
|
|
182
|
+
issueClass: validDiagnosis.issue_class,
|
|
183
|
+
ownerFiles: validDiagnosis.owner_files,
|
|
184
|
+
text: 'Disabled drivers should not appear in the BOL dropdown.',
|
|
185
|
+
candidates: [
|
|
186
|
+
{
|
|
187
|
+
source: 'airun',
|
|
188
|
+
id: 'run-accepted-1',
|
|
189
|
+
ticketNumber: '004333',
|
|
190
|
+
title: 'Disabled users leaked into driver dropdown',
|
|
191
|
+
outcome: 'accepted',
|
|
192
|
+
issueClass: 'filter_query_mismatch',
|
|
193
|
+
ownerFiles: ['geochem/server/src/publications/drivers.ts'],
|
|
194
|
+
commitSha: '1111111111111111111111111111111111111111'
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
source: 'airun',
|
|
198
|
+
id: 'run-rejected-1',
|
|
199
|
+
ticketNumber: '004334',
|
|
200
|
+
title: 'Rejected guess for dropdown',
|
|
201
|
+
outcome: 'rejected',
|
|
202
|
+
issueClass: 'filter_query_mismatch',
|
|
203
|
+
ownerFiles: ['geochem/server/src/publications/drivers.ts']
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
source: 'git_commit',
|
|
207
|
+
commitSha: '2222222222222222222222222222222222222222',
|
|
208
|
+
commitMessage: 'Filter disabled driver records before BOL selection',
|
|
209
|
+
ownerFiles: ['geochem/server/src/publications/drivers.ts']
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
source: 'support_ticket',
|
|
213
|
+
ticketNumber: '004335',
|
|
214
|
+
title: 'BOL page wording update',
|
|
215
|
+
outcome: 'accepted',
|
|
216
|
+
issueClass: 'missing_wrong_data',
|
|
217
|
+
ownerFiles: ['geochem/angular/app/bol/new/bol-new.component.ts']
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
now: '2026-06-06T00:00:10.000Z'
|
|
221
|
+
});
|
|
222
|
+
assert.equal(similarCaseHints.ranked[0].ticketNumber, '004333');
|
|
223
|
+
assert.ok(similarCaseHints.ranked[0].structuredSignals.some((signal) => /issue_class/.test(signal)));
|
|
224
|
+
assert.ok(similarCaseHints.ranked[0].structuredSignals.some((signal) => /owner_file_overlap/.test(signal)));
|
|
225
|
+
assert.equal(similarCaseHints.ranked.some((hint) => hint.ticketNumber === '004334'), false);
|
|
226
|
+
assert.equal(similarCaseHints.similarCommits.some((hint) => hint.commitSha === '2222222222222222222222222222222222222222'), true);
|
|
227
|
+
assert.equal(similarCaseHints.ranked.every((hint) => hint.advisoryOnly === true), true);
|
|
228
|
+
|
|
229
|
+
const missingDiagnosisEvidencePack = buildResolveIOSupportDiagnosisEvidencePack({
|
|
230
|
+
bundle: initialized,
|
|
231
|
+
similarCaseHints,
|
|
232
|
+
issueClass: validDiagnosis.issue_class,
|
|
233
|
+
ownerFiles: validDiagnosis.owner_files,
|
|
234
|
+
text: 'Disabled drivers should not appear in the BOL dropdown.',
|
|
235
|
+
now: '2026-06-06T00:00:20.000Z'
|
|
236
|
+
});
|
|
237
|
+
assert.equal(missingDiagnosisEvidencePack.status, 'needs_diagnosis');
|
|
238
|
+
assert.equal(missingDiagnosisEvidencePack.readOnly, true);
|
|
239
|
+
assert.equal(missingDiagnosisEvidencePack.sourceEditsAllowed, false);
|
|
240
|
+
assert.equal(missingDiagnosisEvidencePack.requiredOutputKey, 'support_diagnosis_gate');
|
|
241
|
+
assert.ok(missingDiagnosisEvidencePack.requiredFields.includes('accepted_hypothesis'));
|
|
242
|
+
assert.ok(missingDiagnosisEvidencePack.requiredEvidence.some((entry) => /falsifiable root-cause hypothesis/i.test(entry)));
|
|
243
|
+
assert.ok(missingDiagnosisEvidencePack.forbiddenActions.some((entry) => /similar tickets or commits as proof/i.test(entry)));
|
|
244
|
+
assert.equal(missingDiagnosisEvidencePack.similarCaseSelection.ranked[0].ticketNumber, '004333');
|
|
245
|
+
assert.equal(missingDiagnosisEvidencePack.similarCaseSelection.ranked.every((hint) => hint.advisoryOnly === true), true);
|
|
246
|
+
assert.equal(missingDiagnosisEvidencePack.issueClassProbeCatalog.length, 7);
|
|
247
|
+
|
|
248
|
+
const validDiagnosisEvidencePack = buildResolveIOSupportDiagnosisEvidencePack({
|
|
249
|
+
diagnosisGate: validDiagnosis,
|
|
250
|
+
similarCaseHints,
|
|
251
|
+
now: '2026-06-06T00:00:21.000Z'
|
|
252
|
+
});
|
|
253
|
+
assert.equal(validDiagnosisEvidencePack.status, 'diagnosis_ready');
|
|
254
|
+
assert.equal(validDiagnosisEvidencePack.diagnosisValid, true);
|
|
255
|
+
assert.equal(validDiagnosisEvidencePack.structuredFacts.productRepairBlockedUntilDiagnosisPassed, false);
|
|
256
|
+
assert.ok(validDiagnosisEvidencePack.ownerFileHints.includes('geochem/server/src/publications/drivers.ts'));
|
|
257
|
+
|
|
258
|
+
const weakDiagnosisEvidence = validateResolveIOSupportDiagnosisGate({
|
|
259
|
+
...validDiagnosis,
|
|
260
|
+
similar_tickets: similarCaseHints.similarTickets,
|
|
261
|
+
similar_commits: similarCaseHints.similarCommits,
|
|
262
|
+
evidence: [{ type: 'ticket' as const, summary: 'Customer says the driver dropdown is wrong.' }]
|
|
263
|
+
});
|
|
264
|
+
assert.equal(weakDiagnosisEvidence.valid, false);
|
|
265
|
+
assert.ok(weakDiagnosisEvidence.blockers.some((blocker) => /root-cause proof/i.test(blocker)));
|
|
266
|
+
assert.ok(weakDiagnosisEvidence.blockers.some((blocker) => /reproduction evidence/i.test(blocker)));
|
|
267
|
+
|
|
268
|
+
const unartifactedRuntimeEvidence = validateResolveIOSupportDiagnosisGate({
|
|
269
|
+
...validDiagnosis,
|
|
270
|
+
evidence: [
|
|
271
|
+
{ type: 'ticket' as const, summary: 'Ticket reports disabled driver selection.' },
|
|
272
|
+
{ type: 'browser' as const, summary: 'Browser reproduced the disabled driver selection.' },
|
|
273
|
+
{ type: 'code' as const, summary: 'Publication lacks disabled-user filter.' }
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
assert.equal(unartifactedRuntimeEvidence.valid, false);
|
|
277
|
+
assert.ok(unartifactedRuntimeEvidence.blockers.some((blocker) => /artifactPath/i.test(blocker)));
|
|
278
|
+
|
|
279
|
+
const classifiedCodeOnlyEvidence = validateResolveIOSupportDiagnosisGate({
|
|
280
|
+
...validDiagnosis,
|
|
281
|
+
issue_case: {
|
|
282
|
+
...validDiagnosis.issue_case,
|
|
283
|
+
reproduction_status: 'classified' as const
|
|
284
|
+
},
|
|
285
|
+
evidence: [
|
|
286
|
+
{ type: 'ticket' as const, summary: 'Ticket gives a complete failing data example.' },
|
|
287
|
+
{ type: 'code' as const, summary: 'Query inspection found the disabled-driver predicate missing.' }
|
|
288
|
+
]
|
|
289
|
+
});
|
|
290
|
+
assert.equal(classifiedCodeOnlyEvidence.valid, true);
|
|
291
|
+
assert.equal(evaluateResolveIOSupportDiagnosisEvidenceQuality(classifiedCodeOnlyEvidence.normalized).hasRootCauseEvidence, true);
|
|
292
|
+
|
|
293
|
+
const blockedDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
294
|
+
...validDiagnosis,
|
|
295
|
+
accepted_hypothesis: { statement: '', falsifiable_test: '', evidence: [] },
|
|
296
|
+
owner_files: ['geochem/angular/app']
|
|
297
|
+
});
|
|
298
|
+
assert.equal(blockedDiagnosis.valid, false);
|
|
299
|
+
assert.ok(blockedDiagnosis.blockers.some((blocker) => /accepted_hypothesis\.statement/.test(blocker)));
|
|
300
|
+
assert.ok(blockedDiagnosis.blockers.some((blocker) => /broad or unsafe/.test(blocker)));
|
|
301
|
+
|
|
302
|
+
const routeOnlyDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
303
|
+
...validDiagnosis,
|
|
304
|
+
proof_plan: {
|
|
305
|
+
before: 'The affected route is available.',
|
|
306
|
+
action: 'Open the support ticket route.',
|
|
307
|
+
after: 'The page loads and is visible.',
|
|
308
|
+
business_assertion: 'The route loads and the page is visible.',
|
|
309
|
+
route: '/support'
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
assert.equal(routeOnlyDiagnosis.valid, false);
|
|
313
|
+
assert.ok(routeOnlyDiagnosis.blockers.some((blocker) => /route-load|screenshot-only|business state/i.test(blocker)));
|
|
314
|
+
|
|
315
|
+
const missingProofContractDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
316
|
+
...validDiagnosis,
|
|
317
|
+
proof_plan: {
|
|
318
|
+
...validDiagnosis.proof_plan,
|
|
319
|
+
business_proof_contract: undefined
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
assert.equal(missingProofContractDiagnosis.valid, false);
|
|
323
|
+
assert.ok(missingProofContractDiagnosis.blockers.some((blocker) => /business_proof_contract is required/.test(blocker)));
|
|
324
|
+
|
|
325
|
+
const mismatchedProofContractDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
326
|
+
...validDiagnosis,
|
|
327
|
+
proof_plan: {
|
|
328
|
+
...validDiagnosis.proof_plan,
|
|
329
|
+
business_proof_contract: {
|
|
330
|
+
...validDiagnosis.proof_plan.business_proof_contract,
|
|
331
|
+
issue_class: 'upload_import' as const
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
assert.equal(mismatchedProofContractDiagnosis.valid, false);
|
|
336
|
+
assert.ok(mismatchedProofContractDiagnosis.blockers.some((blocker) => /must match diagnosis issue_class/.test(blocker)));
|
|
337
|
+
|
|
338
|
+
const safeCustomerReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
|
|
339
|
+
diagnosisGate: validDiagnosis,
|
|
340
|
+
outcomeLabel: 'accepted',
|
|
341
|
+
confidence: { level: 'high', category: 'repo_fix', shouldBlockPr: false },
|
|
342
|
+
businessAssertionStatus: 'pass',
|
|
343
|
+
businessProofArtifacts: ['qa-artifacts/disabled-driver-dropdown.png'],
|
|
344
|
+
releaseStatus: 'completed'
|
|
345
|
+
});
|
|
346
|
+
assert.equal(safeCustomerReplyPolicy.action, 'draft_resolution_reply');
|
|
347
|
+
assert.equal(safeCustomerReplyPolicy.canDraftCustomerReply, true);
|
|
348
|
+
assert.equal(safeCustomerReplyPolicy.canSendCustomerReply, false);
|
|
349
|
+
assert.equal(safeCustomerReplyPolicy.draftBasis?.issueClass, 'filter_query_mismatch');
|
|
350
|
+
assert.ok(safeCustomerReplyPolicy.draftBasis?.issueClassProbePlanId);
|
|
351
|
+
assert.equal(safeCustomerReplyPolicy.draftBasis?.issueClassProbePlanStatus, 'ready');
|
|
352
|
+
assert.equal(safeCustomerReplyPolicy.humanReviewPacket?.reviewType, 'customer_resolution_reply');
|
|
353
|
+
assert.equal(safeCustomerReplyPolicy.humanReviewPacket?.primaryAction, 'review_customer_reply');
|
|
354
|
+
assert.equal(safeCustomerReplyPolicy.humanReviewPacket?.customerFacingDraftAllowed, true);
|
|
355
|
+
assert.equal(safeCustomerReplyPolicy.humanReviewPacket?.customerSendAllowed, false);
|
|
356
|
+
assert.equal(safeCustomerReplyPolicy.humanReviewPacket?.requiresHumanApproval, true);
|
|
357
|
+
assert.equal(safeCustomerReplyPolicy.readinessContract?.status, 'draft_ready');
|
|
358
|
+
assert.equal(safeCustomerReplyPolicy.readinessContract?.primaryCommand, 'review_customer_reply');
|
|
359
|
+
assert.equal(safeCustomerReplyPolicy.readinessContract?.canDraftCustomerReply, true);
|
|
360
|
+
assert.equal(safeCustomerReplyPolicy.readinessContract?.canSendCustomerReply, false);
|
|
361
|
+
assert.equal(safeCustomerReplyPolicy.readinessContract?.requiresHumanApproval, true);
|
|
362
|
+
assert.equal(safeCustomerReplyPolicy.readinessContract?.proofBacked, true);
|
|
363
|
+
assert.equal(validateResolveIOSupportCustomerReplyReadinessContract(safeCustomerReplyPolicy.readinessContract).valid, true);
|
|
364
|
+
const unsafeAutoSendReadiness = validateResolveIOSupportCustomerReplyReadinessContract({
|
|
365
|
+
...safeCustomerReplyPolicy.readinessContract,
|
|
366
|
+
canSendCustomerReply: true
|
|
367
|
+
});
|
|
368
|
+
assert.equal(unsafeAutoSendReadiness.valid, false);
|
|
369
|
+
assert.ok(unsafeAutoSendReadiness.blockers.some((blocker) => /never allow automatic customer send/i.test(blocker)));
|
|
370
|
+
|
|
371
|
+
const malformedProbeReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
|
|
372
|
+
diagnosisGate: validDiagnosis,
|
|
373
|
+
issueClassProbePlan: malformedProbePlan.normalized,
|
|
374
|
+
outcomeLabel: 'accepted',
|
|
375
|
+
confidence: { level: 'high', category: 'repo_fix', shouldBlockPr: false },
|
|
376
|
+
businessAssertionStatus: 'pass',
|
|
377
|
+
businessProofArtifacts: ['qa-artifacts/disabled-driver-dropdown.png'],
|
|
378
|
+
releaseStatus: 'completed'
|
|
379
|
+
});
|
|
380
|
+
assert.equal(malformedProbeReplyPolicy.action, 'hold_internal');
|
|
381
|
+
assert.equal(malformedProbeReplyPolicy.canDraftCustomerReply, false);
|
|
382
|
+
assert.equal(malformedProbeReplyPolicy.reason, 'support_reply_requires_valid_issue_class_probe_plan');
|
|
383
|
+
assert.equal(malformedProbeReplyPolicy.humanReviewPacket?.primaryAction, 'repair_support_issue_class_probe_plan');
|
|
384
|
+
assert.ok(malformedProbeReplyPolicy.humanReviewPacket?.blockers.some((blocker) => /Issue-class probe/i.test(blocker)));
|
|
385
|
+
|
|
386
|
+
const missingHotfixProofReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
|
|
387
|
+
diagnosisGate: validDiagnosis,
|
|
388
|
+
outcomeLabel: 'accepted',
|
|
389
|
+
confidence: { level: 'high', category: 'repo_fix', shouldBlockPr: false },
|
|
390
|
+
businessAssertionStatus: 'pass',
|
|
391
|
+
businessProofArtifacts: ['qa-artifacts/disabled-driver-dropdown.png'],
|
|
392
|
+
releaseStatus: 'completed',
|
|
393
|
+
releaseEvidence: {
|
|
394
|
+
hotfix_commit_proof: {
|
|
395
|
+
required: true,
|
|
396
|
+
blocked: true,
|
|
397
|
+
passed: false,
|
|
398
|
+
missing_fields: ['gitCommitStatus=passed']
|
|
399
|
+
},
|
|
400
|
+
hotfix_evidence: {
|
|
401
|
+
status: 'incomplete',
|
|
402
|
+
manager_must_commit_before_hotfix: true,
|
|
403
|
+
missing_fields: ['gitCommitStatus=passed']
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
assert.equal(missingHotfixProofReplyPolicy.action, 'hold_internal');
|
|
408
|
+
assert.equal(missingHotfixProofReplyPolicy.canDraftCustomerReply, false);
|
|
409
|
+
assert.equal(missingHotfixProofReplyPolicy.reason, 'support_reply_blocked_until_release_or_hotfix_gate_finishes');
|
|
410
|
+
assert.equal(missingHotfixProofReplyPolicy.humanReviewPacket?.primaryAction, 'repair_release_hotfix_first');
|
|
411
|
+
assert.ok(missingHotfixProofReplyPolicy.humanReviewPacket?.blockers.some((blocker) => /hotfix_commit_proof|gitCommitStatus/i.test(blocker)));
|
|
412
|
+
assert.ok(missingHotfixProofReplyPolicy.requiredEvidence.some((entry) => /gitCommitStatus=passed/i.test(entry)));
|
|
413
|
+
assert.equal(missingHotfixProofReplyPolicy.readinessContract?.status, 'blocked_until_release_hotfix');
|
|
414
|
+
assert.equal(missingHotfixProofReplyPolicy.readinessContract?.primaryCommand, 'repair_release_hotfix_first');
|
|
415
|
+
assert.equal(missingHotfixProofReplyPolicy.readinessContract?.canDraftCustomerReply, false);
|
|
416
|
+
assert.equal(missingHotfixProofReplyPolicy.readinessContract?.releaseReady, false);
|
|
417
|
+
assert.equal(validateResolveIOSupportCustomerReplyReadinessContract(missingHotfixProofReplyPolicy.readinessContract).valid, true);
|
|
418
|
+
|
|
419
|
+
const matchedBusinessProofReadiness = evaluateResolveIOSupportBusinessProofReadiness({
|
|
420
|
+
diagnosisGate: validDiagnosis,
|
|
421
|
+
businessAssertions: [{
|
|
422
|
+
assertion: validDiagnosis.proof_plan.business_assertion,
|
|
423
|
+
status: 'pass',
|
|
424
|
+
workflow: validDiagnosis.proof_plan.business_proof_contract.action_under_test,
|
|
425
|
+
action: validDiagnosis.proof_plan.action,
|
|
426
|
+
expected: validDiagnosis.proof_plan.business_proof_contract.expected_business_state_change,
|
|
427
|
+
observed: 'The disabled driver option is absent and the active driver remains selected.',
|
|
428
|
+
dataProof: validDiagnosis.proof_plan.business_proof_contract.data_or_dom_assertion,
|
|
429
|
+
artifactPaths: ['qa-artifacts/disabled-driver-business-proof.json'],
|
|
430
|
+
metadata: { supportDiagnosisProof: true }
|
|
431
|
+
}]
|
|
432
|
+
});
|
|
433
|
+
assert.equal(matchedBusinessProofReadiness.ready, true);
|
|
434
|
+
assert.equal(matchedBusinessProofReadiness.status, 'passed');
|
|
435
|
+
assert.equal(matchedBusinessProofReadiness.artifactPaths[0], 'qa-artifacts/disabled-driver-business-proof.json');
|
|
436
|
+
assert.ok(matchedBusinessProofReadiness.proofFingerprint);
|
|
437
|
+
assert.ok(matchedBusinessProofReadiness.artifactFingerprint);
|
|
438
|
+
assert.equal(matchedBusinessProofReadiness.proofFreshness, 'fresh');
|
|
439
|
+
|
|
440
|
+
const staleBusinessProofReadiness = evaluateResolveIOSupportBusinessProofReadiness({
|
|
441
|
+
diagnosisGate: validDiagnosis,
|
|
442
|
+
previousProofFingerprint: matchedBusinessProofReadiness.proofFingerprint,
|
|
443
|
+
businessAssertions: [{
|
|
444
|
+
assertion: validDiagnosis.proof_plan.business_assertion,
|
|
445
|
+
status: 'pass',
|
|
446
|
+
workflow: validDiagnosis.proof_plan.business_proof_contract.action_under_test,
|
|
447
|
+
action: validDiagnosis.proof_plan.action,
|
|
448
|
+
expected: validDiagnosis.proof_plan.business_proof_contract.expected_business_state_change,
|
|
449
|
+
observed: 'The disabled driver option is absent and the active driver remains selected.',
|
|
450
|
+
dataProof: validDiagnosis.proof_plan.business_proof_contract.data_or_dom_assertion,
|
|
451
|
+
artifactPaths: ['qa-artifacts/disabled-driver-business-proof.json'],
|
|
452
|
+
metadata: { supportDiagnosisProof: true }
|
|
453
|
+
}]
|
|
454
|
+
});
|
|
455
|
+
assert.equal(staleBusinessProofReadiness.ready, false);
|
|
456
|
+
assert.equal(staleBusinessProofReadiness.status, 'stale');
|
|
457
|
+
assert.equal(staleBusinessProofReadiness.proofFreshness, 'same_as_previous');
|
|
458
|
+
assert.equal(staleBusinessProofReadiness.reason, 'support_business_proof_same_fingerprint_as_previous');
|
|
459
|
+
|
|
460
|
+
const routeOnlyBusinessProofReadiness = evaluateResolveIOSupportBusinessProofReadiness({
|
|
461
|
+
diagnosisGate: validDiagnosis,
|
|
462
|
+
outcomeLabel: 'accepted',
|
|
463
|
+
businessAssertionStatus: 'route_probe_pass',
|
|
464
|
+
businessProofArtifacts: ['qa-artifacts/route-loaded.png']
|
|
465
|
+
});
|
|
466
|
+
assert.equal(routeOnlyBusinessProofReadiness.ready, false);
|
|
467
|
+
assert.equal(routeOnlyBusinessProofReadiness.status, 'route_only');
|
|
468
|
+
assert.ok(routeOnlyBusinessProofReadiness.blockers.some((blocker) => /Route probe/i.test(blocker)));
|
|
469
|
+
|
|
470
|
+
const blockedAssertionReadiness = evaluateResolveIOSupportBusinessProofReadiness({
|
|
471
|
+
diagnosisGate: validDiagnosis,
|
|
472
|
+
businessAssertions: [{
|
|
473
|
+
assertion: 'The route loaded.',
|
|
474
|
+
status: 'pass',
|
|
475
|
+
artifactPaths: ['qa-artifacts/route-loaded.png'],
|
|
476
|
+
acceptanceBlocked: true,
|
|
477
|
+
metadata: { routeOnly: true }
|
|
478
|
+
}]
|
|
479
|
+
});
|
|
480
|
+
assert.equal(blockedAssertionReadiness.ready, false);
|
|
481
|
+
assert.equal(blockedAssertionReadiness.reason, 'support_business_proof_route_only_or_acceptance_blocked');
|
|
482
|
+
|
|
483
|
+
const routeOnlyReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
|
|
484
|
+
diagnosisGate: validDiagnosis,
|
|
485
|
+
outcomeLabel: 'accepted',
|
|
486
|
+
confidence: { level: 'high', category: 'repo_fix', shouldBlockPr: false },
|
|
487
|
+
businessAssertionStatus: 'route_probe_pass',
|
|
488
|
+
businessProofArtifacts: ['qa-artifacts/route-loaded.png'],
|
|
489
|
+
releaseStatus: 'completed'
|
|
490
|
+
});
|
|
491
|
+
assert.equal(routeOnlyReplyPolicy.action, 'hold_internal');
|
|
492
|
+
assert.equal(routeOnlyReplyPolicy.reason, 'support_reply_rejects_route_only_business_proof');
|
|
493
|
+
assert.equal(routeOnlyReplyPolicy.readinessContract?.status, 'blocked_until_business_proof');
|
|
494
|
+
assert.equal(routeOnlyReplyPolicy.readinessContract?.primaryCommand, 'run_support_v5_business_proof_qa_row');
|
|
495
|
+
assert.equal(routeOnlyReplyPolicy.readinessContract?.canDraftCustomerReply, false);
|
|
496
|
+
assert.equal(validateResolveIOSupportCustomerReplyReadinessContract(routeOnlyReplyPolicy.readinessContract).valid, true);
|
|
497
|
+
|
|
498
|
+
const staleReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
|
|
499
|
+
diagnosisGate: validDiagnosis,
|
|
500
|
+
outcomeLabel: 'accepted',
|
|
501
|
+
confidence: { level: 'high', category: 'repo_fix', shouldBlockPr: false },
|
|
502
|
+
businessAssertions: [{
|
|
503
|
+
assertion: validDiagnosis.proof_plan.business_assertion,
|
|
504
|
+
status: 'pass',
|
|
505
|
+
workflow: validDiagnosis.proof_plan.business_proof_contract.action_under_test,
|
|
506
|
+
action: validDiagnosis.proof_plan.action,
|
|
507
|
+
expected: validDiagnosis.proof_plan.business_proof_contract.expected_business_state_change,
|
|
508
|
+
observed: 'The disabled driver option is absent and the active driver remains selected.',
|
|
509
|
+
dataProof: validDiagnosis.proof_plan.business_proof_contract.data_or_dom_assertion,
|
|
510
|
+
artifactPaths: ['qa-artifacts/disabled-driver-business-proof.json'],
|
|
511
|
+
metadata: { supportDiagnosisProof: true }
|
|
512
|
+
}],
|
|
513
|
+
previousProofFingerprint: matchedBusinessProofReadiness.proofFingerprint,
|
|
514
|
+
releaseStatus: 'completed'
|
|
515
|
+
});
|
|
516
|
+
assert.equal(staleReplyPolicy.action, 'hold_internal');
|
|
517
|
+
assert.equal(staleReplyPolicy.reason, 'support_reply_requires_business_assertion_pass');
|
|
518
|
+
assert.ok(staleReplyPolicy.humanReviewPacket?.blockers.some((blocker) => /new proof\/artifact fingerprint/i.test(blocker)));
|
|
519
|
+
|
|
520
|
+
const lowConfidenceReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
|
|
521
|
+
diagnosisGate: validDiagnosis,
|
|
522
|
+
outcomeLabel: 'accepted',
|
|
523
|
+
confidence: { level: 'medium', category: 'repo_fix', shouldBlockPr: false },
|
|
524
|
+
businessAssertionStatus: 'pass',
|
|
525
|
+
businessProofArtifacts: ['qa-artifacts/disabled-driver-dropdown.png'],
|
|
526
|
+
releaseStatus: 'completed'
|
|
527
|
+
});
|
|
528
|
+
assert.equal(lowConfidenceReplyPolicy.action, 'hold_internal');
|
|
529
|
+
assert.equal(lowConfidenceReplyPolicy.reason, 'support_reply_requires_high_confidence');
|
|
530
|
+
|
|
531
|
+
const clarificationReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
|
|
532
|
+
diagnosisGate: {
|
|
533
|
+
...validDiagnosis,
|
|
534
|
+
issue_case: {
|
|
535
|
+
...validDiagnosis.issue_case,
|
|
536
|
+
reproduction_status: 'blocked' as const,
|
|
537
|
+
reproduction_blocker: 'Need the exact BOL number where the disabled driver appears.'
|
|
538
|
+
},
|
|
539
|
+
accepted_hypothesis: { statement: '', falsifiable_test: '', evidence: [] }
|
|
540
|
+
},
|
|
541
|
+
confidence: { level: 'low' }
|
|
542
|
+
});
|
|
543
|
+
assert.equal(clarificationReplyPolicy.action, 'ask_clarification');
|
|
544
|
+
assert.equal(clarificationReplyPolicy.canSendCustomerReply, false);
|
|
545
|
+
assert.match(clarificationReplyPolicy.clarificationQuestion || '', /exact BOL number/);
|
|
546
|
+
assert.equal(clarificationReplyPolicy.clarificationContract?.status, 'ready');
|
|
547
|
+
assert.equal(clarificationReplyPolicy.clarificationContract?.missingField, 'reproduction_blocker');
|
|
548
|
+
assert.equal(clarificationReplyPolicy.clarificationContract?.oneQuestionOnly, true);
|
|
549
|
+
assert.equal(clarificationReplyPolicy.clarificationContract?.customerSendAllowed, false);
|
|
550
|
+
assert.equal(clarificationReplyPolicy.clarificationContract?.parksTicketUntilCustomerReply, true);
|
|
551
|
+
assert.ok(clarificationReplyPolicy.clarificationContract?.nextCommands.includes('park_ticket_until_customer_reply'));
|
|
552
|
+
assert.equal(clarificationReplyPolicy.humanReviewPacket?.reviewType, 'customer_clarification');
|
|
553
|
+
assert.equal(clarificationReplyPolicy.humanReviewPacket?.primaryAction, 'review_customer_clarification');
|
|
554
|
+
assert.match(clarificationReplyPolicy.humanReviewPacket?.question || '', /exact BOL number/);
|
|
555
|
+
assert.equal(clarificationReplyPolicy.humanReviewPacket?.customerSendAllowed, false);
|
|
556
|
+
assert.ok(clarificationReplyPolicy.humanReviewPacket?.forbiddenActions.some((action) => /guessed reproduction path/i.test(action)));
|
|
557
|
+
assert.equal(clarificationReplyPolicy.readinessContract?.status, 'clarification_required');
|
|
558
|
+
assert.equal(clarificationReplyPolicy.readinessContract?.primaryCommand, 'review_customer_clarification');
|
|
559
|
+
assert.equal(clarificationReplyPolicy.readinessContract?.clarificationRequired, true);
|
|
560
|
+
assert.equal(clarificationReplyPolicy.readinessContract?.canSendCustomerReply, false);
|
|
561
|
+
assert.equal(validateResolveIOSupportCustomerReplyReadinessContract(clarificationReplyPolicy.readinessContract).valid, true);
|
|
562
|
+
|
|
563
|
+
const validClarificationContract = validateResolveIOSupportClarificationContract(
|
|
564
|
+
buildResolveIOSupportClarificationContract(
|
|
565
|
+
clarificationReplyPolicy.clarificationContract ? {
|
|
566
|
+
...validDiagnosis,
|
|
567
|
+
issue_case: {
|
|
568
|
+
...validDiagnosis.issue_case,
|
|
569
|
+
reproduction_status: 'blocked' as const,
|
|
570
|
+
reproduction_blocker: 'Need the exact BOL number where the disabled driver appears.'
|
|
571
|
+
}
|
|
572
|
+
} : undefined,
|
|
573
|
+
['issue_case.reproduction_blocker is required when reproduction_status=blocked']
|
|
574
|
+
)
|
|
575
|
+
);
|
|
576
|
+
assert.equal(validClarificationContract.valid, true);
|
|
577
|
+
assert.equal(validClarificationContract.normalized.oneQuestionOnly, true);
|
|
578
|
+
|
|
579
|
+
const multiQuestionClarificationContract = validateResolveIOSupportClarificationContract({
|
|
580
|
+
...validClarificationContract.normalized,
|
|
581
|
+
question: 'Which BOL number is affected? Which account should we use?'
|
|
582
|
+
});
|
|
583
|
+
assert.equal(multiQuestionClarificationContract.valid, false);
|
|
584
|
+
assert.ok(multiQuestionClarificationContract.blockers.some((blocker) => /exactly one customer question/i.test(blocker)));
|
|
585
|
+
|
|
586
|
+
const diagnosisJson = JSON.stringify({ support_diagnosis_gate: validDiagnosis });
|
|
587
|
+
assert.equal(extractResolveIOSupportDiagnosisGateFromText(`\`\`\`json\n${diagnosisJson}\n\`\`\``)?.issue_class, 'filter_query_mismatch');
|
|
588
|
+
|
|
589
|
+
const diagnosedBundle = recordResolveIOSupportV5Step(initialized, {
|
|
590
|
+
stepType: 'diagnosis_gate',
|
|
591
|
+
outcome: 'pass',
|
|
592
|
+
lane: 'build',
|
|
593
|
+
summary: diagnosisJson,
|
|
594
|
+
diagnosisGate: validDiagnosis,
|
|
595
|
+
now: '2026-06-06T00:00:30.000Z'
|
|
596
|
+
});
|
|
597
|
+
assert.equal(diagnosedBundle.supportV5DiagnosisGate?.status, 'passed');
|
|
598
|
+
assert.deepEqual(diagnosedBundle.supportV5MicrotaskLedger[1].targetFiles, validDiagnosis.owner_files);
|
|
599
|
+
assert.equal(diagnosedBundle.supportV5IssueClassProbePlan?.status, 'ready');
|
|
600
|
+
assert.equal(diagnosedBundle.supportV5IssueClassProbePlan?.activeProbe?.issue_class, validDiagnosis.issue_class);
|
|
601
|
+
assert.equal(diagnosedBundle.supportV5MicrotaskLedger[2].contextRefs.includes('supportV5IssueClassProbePlan'), true);
|
|
602
|
+
assert.equal(diagnosedBundle.supportV5LaneMemory.qa.activeQaRow?.workflow, validDiagnosis.proof_plan.business_proof_contract.action_under_test);
|
|
603
|
+
assert.equal(diagnosedBundle.supportV5LaneMemory.qa.activeQaRow?.assertion, validDiagnosis.proof_plan.business_proof_contract.data_or_dom_assertion);
|
|
604
|
+
assert.equal(diagnosedBundle.supportV5RecoveryPlan?.recoveryClass, 'advance_after_proof');
|
|
605
|
+
assert.equal(diagnosedBundle.supportV5RecoveryCheckpoint?.recoveryClass, 'advance_after_proof');
|
|
606
|
+
assert.equal(diagnosedBundle.supportV5RecoveryAction?.checkpointId, diagnosedBundle.supportV5RecoveryCheckpoint?.checkpointId);
|
|
607
|
+
const failedPuppeteerPreflight = evaluateResolveIOSupportPreflightGate({
|
|
608
|
+
required: true,
|
|
609
|
+
checks: [
|
|
610
|
+
{ name: 'puppeteer_module', status: 'fail', summary: 'Cannot require puppeteer from the QA workspace.', artifactPath: 'qa-artifacts/preflight/puppeteer.log' },
|
|
611
|
+
{ name: 'chrome_executable', status: 'pass', summary: 'Chrome executable exists.' },
|
|
612
|
+
{ name: 'mongo_connection', status: 'pass', summary: 'Mongo ping ok.' }
|
|
613
|
+
],
|
|
614
|
+
recordedAt: '2026-06-06T00:00:35.000Z'
|
|
615
|
+
});
|
|
616
|
+
assert.equal(failedPuppeteerPreflight.status, 'infra_failed');
|
|
617
|
+
assert.equal(failedPuppeteerPreflight.failureClass, 'infra');
|
|
618
|
+
assert.equal(failedPuppeteerPreflight.blocksProductRepair, true);
|
|
619
|
+
assert.equal(failedPuppeteerPreflight.nextCommand, 'run_support_v5_infra_repair');
|
|
620
|
+
assert.ok(failedPuppeteerPreflight.requiredEvidence.some((entry) => /Puppeteer\/Chrome\/server\/client\/Mongo/i.test(entry)));
|
|
621
|
+
const compilePreflight = evaluateResolveIOSupportPreflightGate({
|
|
622
|
+
required: true,
|
|
623
|
+
compileResult: {
|
|
624
|
+
status: 'fail',
|
|
625
|
+
summary: 'Angular compile failed on support ticket bundle.',
|
|
626
|
+
artifactPath: 'qa-artifacts/preflight/compile.log'
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
assert.equal(compilePreflight.status, 'compile_failed');
|
|
630
|
+
assert.equal(compilePreflight.failureClass, 'compile');
|
|
631
|
+
assert.equal(compilePreflight.nextCommand, 'run_support_v5_compile_repair');
|
|
632
|
+
const persistedPreflightBundle = recordResolveIOSupportV5Step(diagnosedBundle, {
|
|
633
|
+
stepType: 'compile_check',
|
|
634
|
+
outcome: 'needs_repair',
|
|
635
|
+
lane: 'qa',
|
|
636
|
+
summary: 'Compile preflight failed before repair loop.',
|
|
637
|
+
preflightGate: compilePreflight,
|
|
638
|
+
failureClass: 'compile',
|
|
639
|
+
now: '2026-06-06T00:00:36.000Z'
|
|
640
|
+
});
|
|
641
|
+
assert.equal(persistedPreflightBundle.supportV5PreflightGate?.status, 'compile_failed');
|
|
642
|
+
assert.equal(persistedPreflightBundle.supportV5StepHistory[persistedPreflightBundle.supportV5StepHistory.length - 1].preflightGate?.nextCommand, 'run_support_v5_compile_repair');
|
|
643
|
+
const diagnosisMicrotaskId = diagnosedBundle.supportV5MicrotaskLedger.find((task) => task.type === 'diagnosis_gate')?.microtaskId;
|
|
644
|
+
const buildMicrotasksAfterDiagnosis = diagnosedBundle.supportV5MicrotaskLedger.filter((task) => task.lane === 'build' && task.type !== 'diagnosis_gate');
|
|
645
|
+
assert.ok(diagnosisMicrotaskId);
|
|
646
|
+
assert.ok(buildMicrotasksAfterDiagnosis.length > 0);
|
|
647
|
+
assert.ok(buildMicrotasksAfterDiagnosis.every((task) => task.dependsOn.includes(diagnosisMicrotaskId || '')));
|
|
648
|
+
assert.ok(buildMicrotasksAfterDiagnosis.every((task) => task.dependsOn.length === new Set(task.dependsOn).size));
|
|
649
|
+
assert.equal(changedFilesOutsideResolveIOSupportDiagnosisOwnerFiles(validDiagnosis, [
|
|
650
|
+
'geochem/angular/app/bol/new/bol-new.component.ts',
|
|
651
|
+
'geochem/server/src/methods/unrelated.ts'
|
|
652
|
+
]).length, 1);
|
|
653
|
+
|
|
654
|
+
const initialAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
655
|
+
bundle: initialized
|
|
656
|
+
});
|
|
657
|
+
assert.equal(initialAutonomousDecision.action, 'run_diagnosis_gate');
|
|
658
|
+
assert.equal(initialAutonomousDecision.canRunAutonomously, true);
|
|
659
|
+
assert.equal(initialAutonomousDecision.canEditProductCode, false);
|
|
660
|
+
assert.equal(initialAutonomousDecision.rootCauseReadiness.status, 'diagnosis_required');
|
|
661
|
+
assert.equal(initialAutonomousDecision.rootCauseReadiness.rootCauseFirstSatisfied, false);
|
|
662
|
+
assert.equal(initialAutonomousDecision.rootCauseReadiness.nextGate, 'diagnosis');
|
|
663
|
+
assert.equal(initialAutonomousDecision.evidenceFreshness.status, 'missing');
|
|
664
|
+
assert.equal(initialAutonomousDecision.evidenceFreshness.mustCollectNewEvidence, false);
|
|
665
|
+
assert.equal(initialAutonomousDecision.continuationProofCheckpoint.action, 'run_diagnosis_gate');
|
|
666
|
+
assert.equal(initialAutonomousDecision.continuationProofCheckpoint.blocksProductRepairUntilChangedEvidence, true);
|
|
667
|
+
assert.ok(initialAutonomousDecision.continuationProofCheckpoint.requiredResetEvidence.some((entry) => /SupportDiagnosisGate/i.test(entry)));
|
|
668
|
+
assert.equal(initialAutonomousDecision.nextActionContract.action, 'run_diagnosis_gate');
|
|
669
|
+
assert.equal(initialAutonomousDecision.nextActionContract.safeToAutoRun, true);
|
|
670
|
+
assert.equal(initialAutonomousDecision.nextActionContract.canRunWithoutCodexMonitor, true);
|
|
671
|
+
assert.equal(initialAutonomousDecision.nextActionContract.codexFallbackRequired, false);
|
|
672
|
+
assert.equal(initialAutonomousDecision.nextActionContract.rootCauseFirstSatisfied, false);
|
|
673
|
+
assert.ok(initialAutonomousDecision.nextActionContract.preconditions.some((entry) => /read-only/i.test(entry)));
|
|
674
|
+
assert.ok(initialAutonomousDecision.nextActionContract.expectedStateTransition.includes('SupportDiagnosisGate changes'));
|
|
675
|
+
assert.equal(validateResolveIOSupportNextActionContract(initialAutonomousDecision.nextActionContract).valid, true);
|
|
676
|
+
assert.equal(initialAutonomousDecision.managerExecutionPacket.status, 'auto_ready');
|
|
677
|
+
assert.equal(initialAutonomousDecision.managerExecutionPacket.executeNow, true);
|
|
678
|
+
assert.equal(initialAutonomousDecision.managerExecutionPacket.retryScope, 'diagnosis_only');
|
|
679
|
+
assert.equal(initialAutonomousDecision.managerExecutionPacket.canRunWithoutCodexMonitor, true);
|
|
680
|
+
assert.ok(initialAutonomousDecision.managerExecutionPacket.proofRequiredBeforeContinuation.some((entry) => /SupportDiagnosisGate changes/i.test(entry)));
|
|
681
|
+
assert.ok(initialAutonomousDecision.forbiddenActions.some((action) => /No source edits/i.test(action)));
|
|
682
|
+
|
|
683
|
+
const blockedReproductionDiagnosis = {
|
|
684
|
+
...validDiagnosis,
|
|
685
|
+
issue_case: {
|
|
686
|
+
...validDiagnosis.issue_case,
|
|
687
|
+
reproduction_status: 'blocked' as const,
|
|
688
|
+
reproduction_blocker: 'Need the exact BOL number where the disabled driver appears.'
|
|
689
|
+
},
|
|
690
|
+
accepted_hypothesis: { statement: '', falsifiable_test: '', evidence: [] }
|
|
691
|
+
};
|
|
692
|
+
const clarificationAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
693
|
+
bundle: {
|
|
694
|
+
...initialized,
|
|
695
|
+
supportV5DiagnosisGate: blockedReproductionDiagnosis
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
assert.equal(clarificationAutonomousDecision.action, 'ask_customer_clarification');
|
|
699
|
+
assert.equal(clarificationAutonomousDecision.primaryCommand, 'review_customer_clarification');
|
|
700
|
+
assert.equal(clarificationAutonomousDecision.canRunAutonomously, false);
|
|
701
|
+
assert.equal(clarificationAutonomousDecision.canRunModel, false);
|
|
702
|
+
assert.equal(clarificationAutonomousDecision.canEditProductCode, false);
|
|
703
|
+
assert.equal(clarificationAutonomousDecision.canDraftCustomerReply, true);
|
|
704
|
+
assert.equal(clarificationAutonomousDecision.rootCauseReadiness.status, 'customer_clarification_required');
|
|
705
|
+
assert.equal(clarificationAutonomousDecision.rootCauseReadiness.nextGate, 'customer_reply');
|
|
706
|
+
assert.equal(clarificationAutonomousDecision.rootCauseReadiness.requiresHumanDecision, true);
|
|
707
|
+
assert.equal(clarificationAutonomousDecision.nextActionContract.safeToAutoRun, false);
|
|
708
|
+
assert.equal(clarificationAutonomousDecision.nextActionContract.canRunWithoutCodexMonitor, false);
|
|
709
|
+
assert.equal(clarificationAutonomousDecision.nextActionContract.codexFallbackRequired, false);
|
|
710
|
+
assert.equal(clarificationAutonomousDecision.nextActionContract.codexFallbackReason, 'human_decision_required_not_codex_fallback');
|
|
711
|
+
assert.match(clarificationAutonomousDecision.humanReviewPacket.question || '', /exact BOL number/);
|
|
712
|
+
assert.ok(clarificationAutonomousDecision.forbiddenActions.some((action) => /guessed reproduction path/i.test(action)));
|
|
713
|
+
|
|
714
|
+
const ownerScopedAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
715
|
+
bundle: diagnosedBundle,
|
|
716
|
+
changedFiles: ['geochem/angular/app/bol/new/bol-new.component.ts']
|
|
717
|
+
});
|
|
718
|
+
assert.equal(ownerScopedAutonomousDecision.action, 'run_owner_scoped_repair');
|
|
719
|
+
assert.equal(ownerScopedAutonomousDecision.canEditProductCode, true);
|
|
720
|
+
assert.equal(ownerScopedAutonomousDecision.rootCauseReadiness.status, 'owner_scoped_repair_ready');
|
|
721
|
+
assert.equal(ownerScopedAutonomousDecision.rootCauseReadiness.rootCauseFirstSatisfied, true);
|
|
722
|
+
assert.equal(ownerScopedAutonomousDecision.rootCauseReadiness.canEditProductCode, true);
|
|
723
|
+
assert.equal(ownerScopedAutonomousDecision.rootCauseReadiness.ownerFilesReady, true);
|
|
724
|
+
assert.deepEqual(ownerScopedAutonomousDecision.ownerFiles, validDiagnosis.owner_files);
|
|
725
|
+
assert.equal(ownerScopedAutonomousDecision.issueClassProbes[0].acceptance_gate, 'aiqa_business_assertion');
|
|
726
|
+
assert.equal(ownerScopedAutonomousDecision.rootCauseReadiness.issueClassProbes?.[0].failure_class, 'business');
|
|
727
|
+
assert.match(ownerScopedAutonomousDecision.primaryCommand, /owner_scoped_repair/);
|
|
728
|
+
assert.equal(ownerScopedAutonomousDecision.continuationProofCheckpoint.action, 'run_owner_scoped_repair');
|
|
729
|
+
assert.equal(ownerScopedAutonomousDecision.continuationProofCheckpoint.blocksProductRepairUntilChangedEvidence, false);
|
|
730
|
+
assert.equal(ownerScopedAutonomousDecision.continuationProofCheckpoint.status, 'waiting_for_proof');
|
|
731
|
+
assert.equal(ownerScopedAutonomousDecision.nextActionContract.safeToAutoRun, true);
|
|
732
|
+
assert.equal(ownerScopedAutonomousDecision.nextActionContract.canRunWithoutCodexMonitor, true);
|
|
733
|
+
assert.equal(ownerScopedAutonomousDecision.nextActionContract.codexFallbackRequired, false);
|
|
734
|
+
assert.equal(ownerScopedAutonomousDecision.nextActionContract.costRisk, 'expensive_model');
|
|
735
|
+
assert.equal(ownerScopedAutonomousDecision.nextActionContract.decisionBasis.diagnosisValid, true);
|
|
736
|
+
assert.equal(ownerScopedAutonomousDecision.nextActionContract.decisionBasis.ownerFilesReady, true);
|
|
737
|
+
assert.ok(ownerScopedAutonomousDecision.nextActionContract.stopConditions.some((entry) => /outside diagnosis owner_files/i.test(entry)));
|
|
738
|
+
assert.equal(validateResolveIOSupportNextActionContract(ownerScopedAutonomousDecision.nextActionContract).valid, true);
|
|
739
|
+
assert.equal(ownerScopedAutonomousDecision.managerExecutionPacket.status, 'auto_ready');
|
|
740
|
+
assert.equal(ownerScopedAutonomousDecision.managerExecutionPacket.retryScope, 'owner_files_only');
|
|
741
|
+
assert.equal(ownerScopedAutonomousDecision.managerExecutionPacket.maxAttemptsBeforeFreshEvidence, 1);
|
|
742
|
+
assert.deepEqual(ownerScopedAutonomousDecision.managerExecutionPacket.ownerFiles, validDiagnosis.owner_files);
|
|
743
|
+
|
|
744
|
+
const malformedOwnerRepairContract = validateResolveIOSupportNextActionContract({
|
|
745
|
+
...ownerScopedAutonomousDecision.nextActionContract,
|
|
746
|
+
rootCauseFirstSatisfied: false,
|
|
747
|
+
ownerFiles: []
|
|
748
|
+
});
|
|
749
|
+
assert.equal(malformedOwnerRepairContract.valid, false);
|
|
750
|
+
assert.ok(malformedOwnerRepairContract.blockers.some((blocker) => /rootCauseFirstSatisfied|ownerFiles/i.test(blocker)));
|
|
751
|
+
const blockedOwnerRepairPacket = buildResolveIOSupportManagerExecutionPacket({
|
|
752
|
+
...ownerScopedAutonomousDecision.nextActionContract,
|
|
753
|
+
rootCauseFirstSatisfied: false,
|
|
754
|
+
ownerFiles: []
|
|
755
|
+
});
|
|
756
|
+
assert.equal(blockedOwnerRepairPacket.status, 'blocked');
|
|
757
|
+
assert.equal(blockedOwnerRepairPacket.executeNow, false);
|
|
758
|
+
|
|
759
|
+
const outOfScopeAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
760
|
+
bundle: diagnosedBundle,
|
|
761
|
+
changedFiles: ['geochem/server/src/methods/unrelated.ts']
|
|
762
|
+
});
|
|
763
|
+
assert.equal(outOfScopeAutonomousDecision.action, 'revise_diagnosis_scope');
|
|
764
|
+
assert.equal(outOfScopeAutonomousDecision.canEditProductCode, false);
|
|
765
|
+
assert.ok(outOfScopeAutonomousDecision.blockers.some((blocker) => /outside diagnosis owner_files/i.test(blocker)));
|
|
766
|
+
|
|
767
|
+
const infraAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
768
|
+
bundle: diagnosedBundle,
|
|
769
|
+
failureClass: 'infra',
|
|
770
|
+
blocker: 'Puppeteer executable missing.'
|
|
771
|
+
});
|
|
772
|
+
assert.equal(infraAutonomousDecision.action, 'repair_infra_only');
|
|
773
|
+
assert.equal(infraAutonomousDecision.canRunAutonomously, true);
|
|
774
|
+
assert.equal(infraAutonomousDecision.canEditProductCode, false);
|
|
775
|
+
assert.equal(infraAutonomousDecision.canRunModel, false);
|
|
776
|
+
assert.equal(infraAutonomousDecision.rootCauseReadiness.status, 'infra_repair_only');
|
|
777
|
+
assert.equal(infraAutonomousDecision.rootCauseReadiness.infraOnly, true);
|
|
778
|
+
assert.equal(infraAutonomousDecision.rootCauseReadiness.canEditProductCode, false);
|
|
779
|
+
assert.equal(infraAutonomousDecision.evidenceFreshness.status, 'infra_ignored');
|
|
780
|
+
assert.equal(infraAutonomousDecision.evidenceFreshness.productRepairFailure, false);
|
|
781
|
+
|
|
782
|
+
const preflightBlockedAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
783
|
+
bundle: diagnosedBundle,
|
|
784
|
+
preflightGate: failedPuppeteerPreflight
|
|
785
|
+
});
|
|
786
|
+
assert.equal(preflightBlockedAutonomousDecision.action, 'repair_infra_only');
|
|
787
|
+
assert.equal(preflightBlockedAutonomousDecision.primaryCommand, 'run_support_v5_infra_repair');
|
|
788
|
+
assert.equal(preflightBlockedAutonomousDecision.canRunModel, false);
|
|
789
|
+
assert.equal(preflightBlockedAutonomousDecision.canEditProductCode, false);
|
|
790
|
+
assert.equal(preflightBlockedAutonomousDecision.preflightGate.status, 'infra_failed');
|
|
791
|
+
assert.equal(preflightBlockedAutonomousDecision.rootCauseReadiness.preflightReady, false);
|
|
792
|
+
assert.equal(preflightBlockedAutonomousDecision.rootCauseReadiness.rootCauseFirstSatisfied, false);
|
|
793
|
+
assert.equal(preflightBlockedAutonomousDecision.nextActionContract.decisionBasis.preflightStatus, 'infra_failed');
|
|
794
|
+
assert.ok(preflightBlockedAutonomousDecision.nextActionContract.successEvidence.some((entry) => /Puppeteer\/Chrome\/server\/client\/Mongo/i.test(entry)));
|
|
795
|
+
|
|
796
|
+
const compilePreflightAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
797
|
+
bundle: diagnosedBundle,
|
|
798
|
+
preflightGate: compilePreflight
|
|
799
|
+
});
|
|
800
|
+
assert.equal(compilePreflightAutonomousDecision.action, 'repair_infra_only');
|
|
801
|
+
assert.equal(compilePreflightAutonomousDecision.label, 'Repair Compile Only');
|
|
802
|
+
assert.equal(compilePreflightAutonomousDecision.primaryCommand, 'run_support_v5_compile_repair');
|
|
803
|
+
assert.equal(compilePreflightAutonomousDecision.canRunModel, false);
|
|
804
|
+
assert.equal(compilePreflightAutonomousDecision.nextActionContract.decisionBasis.preflightFailureClass, 'compile');
|
|
805
|
+
assert.ok(compilePreflightAutonomousDecision.requiredEvidence.some((entry) => /compile command output/i.test(entry)));
|
|
806
|
+
|
|
807
|
+
const missingRequiredPreflightAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
808
|
+
bundle: diagnosedBundle,
|
|
809
|
+
preflightGate: { required: true }
|
|
810
|
+
});
|
|
811
|
+
assert.equal(missingRequiredPreflightAutonomousDecision.action, 'repair_infra_only');
|
|
812
|
+
assert.equal(missingRequiredPreflightAutonomousDecision.primaryCommand, 'run_support_v5_preflight');
|
|
813
|
+
assert.equal(missingRequiredPreflightAutonomousDecision.canRunModel, false);
|
|
814
|
+
assert.ok(missingRequiredPreflightAutonomousDecision.requiredEvidence.some((entry) => /support preflight result/i.test(entry)));
|
|
815
|
+
|
|
816
|
+
const pendingReleaseDoesNotPreemptRepairDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
817
|
+
bundle: diagnosedBundle,
|
|
818
|
+
releaseStatus: 'pending_manual'
|
|
819
|
+
});
|
|
820
|
+
assert.equal(pendingReleaseDoesNotPreemptRepairDecision.action, 'run_owner_scoped_repair');
|
|
821
|
+
assert.equal(pendingReleaseDoesNotPreemptRepairDecision.canEditProductCode, true);
|
|
822
|
+
|
|
823
|
+
const releaseNeedsCommittedHotfixDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
824
|
+
bundle: diagnosedBundle,
|
|
825
|
+
releaseStatus: 'failed',
|
|
826
|
+
unresolvedBlockers: ['Duplicate deploy loop after a backend runner hotfix.']
|
|
827
|
+
});
|
|
828
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.action, 'repair_release_hotfix_first');
|
|
829
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.primaryCommand, 'record_hotfix_evidence');
|
|
830
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.canEditProductCode, false);
|
|
831
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.canRunModel, false);
|
|
832
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.canPrepareHotfixPatch, true);
|
|
833
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.canHotfixBackend, false);
|
|
834
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.liveHotfixBlockedUntilCommit, true);
|
|
835
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.rootCauseReadiness.status, 'release_hotfix_required');
|
|
836
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.rootCauseReadiness.nextGate, 'release');
|
|
837
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.hotfixContinuation?.action, 'record_hotfix_evidence');
|
|
838
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.requiredEvidence.some((entry) => /sourceCommitSha.*githubCommitUrl.*gitCommitStatus.*gitPushStatus/i.test(entry)));
|
|
839
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.blockers.some((blocker) => /Hotfix evidence is missing/i.test(blocker)));
|
|
840
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.forbiddenActions.some((action) => /committed and pushed to GitHub/i.test(action)));
|
|
841
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.forbiddenActions.some((action) => /gitPushStatus/i.test(action)));
|
|
842
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.nextCommands.indexOf('commit_and_push_hotfix_to_github') >= 0);
|
|
843
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.nextCommands.indexOf('commit_and_push_hotfix_to_github') < releaseNeedsCommittedHotfixDecision.nextCommands.indexOf('apply_backend_hotfix_only_after_commit_proof'));
|
|
844
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.nextActionContract.action, 'repair_release_hotfix_first');
|
|
845
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.nextActionContract.safeToAutoRun, true);
|
|
846
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.nextActionContract.canRunWithoutCodexMonitor, true);
|
|
847
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.nextActionContract.codexFallbackRequired, false);
|
|
848
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.nextActionContract.decisionBasis.hotfixCommitRequired, true);
|
|
849
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.nextActionContract.decisionBasis.liveHotfixBlockedUntilCommit, true);
|
|
850
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.nextActionContract.stopConditions.some((entry) => /sourceCommitSha.*githubCommitUrl.*gitCommitStatus.*gitPushStatus/i.test(entry)));
|
|
851
|
+
assert.equal(validateResolveIOSupportNextActionContract(releaseNeedsCommittedHotfixDecision.nextActionContract).valid, true);
|
|
852
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.managerExecutionPacket.status, 'auto_ready');
|
|
853
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.managerExecutionPacket.primaryCommand, 'record_hotfix_evidence');
|
|
854
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.managerExecutionPacket.retryScope, 'release_hotfix_only');
|
|
855
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.managerExecutionPacket.proofRequiredBeforeContinuation.some((entry) => /sourceCommitSha.*githubCommitUrl.*gitCommitStatus.*gitPushStatus/i.test(entry)));
|
|
856
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.hotfixDurabilityContract?.status, 'waiting_for_commit_proof');
|
|
857
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.hotfixDurabilityContract?.liveHotfixBlockedUntilCommit, true);
|
|
858
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.hotfixDurabilityContract?.canHotfixBackend, false);
|
|
859
|
+
assert.equal(releaseNeedsCommittedHotfixDecision.hotfixDurabilityContract?.nextSafeAction, 'commit_and_push_hotfix_to_github');
|
|
860
|
+
assert.ok(releaseNeedsCommittedHotfixDecision.hotfixDurabilityContract?.missingCommitProofFields.includes('sourceCommitSha'));
|
|
861
|
+
|
|
862
|
+
const releaseAfterCommittedHotfixDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
863
|
+
bundle: diagnosedBundle,
|
|
864
|
+
releaseStatus: 'failed',
|
|
865
|
+
unresolvedBlockers: ['Release gate failed before hotfix evidence was recorded.'],
|
|
866
|
+
releaseGatePassed: true,
|
|
867
|
+
hotfixEvidence: {
|
|
868
|
+
channel: 'backend_js',
|
|
869
|
+
target: {
|
|
870
|
+
host: 'backend.resolveio.com',
|
|
871
|
+
path: '/var/app/current/http/support.js'
|
|
872
|
+
},
|
|
873
|
+
compiledArtifactPath: 'dist/http/support.js',
|
|
874
|
+
remoteChecksumBefore: '1111111111111111111111111111111111111111111111111111111111111111',
|
|
875
|
+
remoteChecksumAfter: '2222222222222222222222222222222222222222222222222222222222222222',
|
|
876
|
+
sourceCommitSha: 'dd20c124012757ff7d66c682e4b7aad45c402d87',
|
|
877
|
+
githubCommitUrl: 'https://github.com/resolveio/resolveio-all/commit/dd20c124012757ff7d66c682e4b7aad45c402d87',
|
|
878
|
+
gitCommitStatus: 'passed',
|
|
879
|
+
gitPushStatus: 'passed',
|
|
880
|
+
restartEvidence: 'nodejs restarted on backend.resolveio.com and workers',
|
|
881
|
+
healthCheckStatus: 'passed',
|
|
882
|
+
selfTestStatus: 'passed',
|
|
883
|
+
releaseGateStatus: 'passed'
|
|
884
|
+
}
|
|
885
|
+
});
|
|
886
|
+
assert.equal(releaseAfterCommittedHotfixDecision.action, 'repair_release_hotfix_first');
|
|
887
|
+
assert.equal(releaseAfterCommittedHotfixDecision.primaryCommand, 'continue_support_runner_after_committed_hotfix');
|
|
888
|
+
assert.equal(releaseAfterCommittedHotfixDecision.hotfixContinuation?.action, 'continue_runner');
|
|
889
|
+
assert.equal(releaseAfterCommittedHotfixDecision.hotfixContinuation?.canContinueRun, true);
|
|
890
|
+
assert.equal(releaseAfterCommittedHotfixDecision.canPrepareHotfixPatch, true);
|
|
891
|
+
assert.equal(releaseAfterCommittedHotfixDecision.canHotfixBackend, true);
|
|
892
|
+
assert.equal(releaseAfterCommittedHotfixDecision.liveHotfixBlockedUntilCommit, false);
|
|
893
|
+
assert.equal(releaseAfterCommittedHotfixDecision.nextActionContract.decisionBasis.liveHotfixBlockedUntilCommit, false);
|
|
894
|
+
assert.equal(releaseAfterCommittedHotfixDecision.nextActionContract.codexFallbackRequired, false);
|
|
895
|
+
assert.equal(releaseAfterCommittedHotfixDecision.hotfixDurabilityContract?.status, 'ready_for_continuation');
|
|
896
|
+
assert.equal(releaseAfterCommittedHotfixDecision.hotfixDurabilityContract?.commitProofPassed, true);
|
|
897
|
+
assert.deepEqual(releaseAfterCommittedHotfixDecision.hotfixDurabilityContract?.missingCommitProofFields, []);
|
|
898
|
+
|
|
899
|
+
const completedDiagnosedBundle = {
|
|
900
|
+
...diagnosedBundle,
|
|
901
|
+
supportV5ActiveMicrotaskId: undefined,
|
|
902
|
+
supportV5MicrotaskLedger: diagnosedBundle.supportV5MicrotaskLedger.map((task) => ({
|
|
903
|
+
...task,
|
|
904
|
+
status: 'pass' as const
|
|
905
|
+
}))
|
|
906
|
+
};
|
|
907
|
+
const replyAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
908
|
+
bundle: completedDiagnosedBundle,
|
|
909
|
+
outcomeLabel: 'accepted',
|
|
910
|
+
confidence: { level: 'high', category: 'business_proof', shouldBlockPr: false },
|
|
911
|
+
businessAssertionStatus: 'pass',
|
|
912
|
+
businessProofArtifacts: ['qa-artifacts/disabled-driver-dropdown.png'],
|
|
913
|
+
releaseStatus: 'completed'
|
|
914
|
+
});
|
|
915
|
+
assert.equal(replyAutonomousDecision.action, 'draft_customer_reply');
|
|
916
|
+
assert.equal(replyAutonomousDecision.canDraftCustomerReply, true);
|
|
917
|
+
assert.equal(replyAutonomousDecision.canSendCustomerReply, false);
|
|
918
|
+
assert.equal(replyAutonomousDecision.businessProofReadiness.ready, true);
|
|
919
|
+
assert.equal(replyAutonomousDecision.rootCauseReadiness.status, 'customer_reply_draft_ready');
|
|
920
|
+
assert.equal(replyAutonomousDecision.rootCauseReadiness.canDraftCustomerReply, true);
|
|
921
|
+
assert.equal(replyAutonomousDecision.rootCauseReadiness.businessProofReady, true);
|
|
922
|
+
assert.equal(replyAutonomousDecision.humanReviewPacket.reviewType, 'customer_resolution_reply');
|
|
923
|
+
assert.equal(replyAutonomousDecision.humanReviewPacket.primaryAction, 'review_customer_reply');
|
|
924
|
+
assert.equal(replyAutonomousDecision.humanReviewPacket.customerFacingDraftAllowed, true);
|
|
925
|
+
assert.equal(replyAutonomousDecision.humanReviewPacket.customerSendAllowed, false);
|
|
926
|
+
assert.equal(validateResolveIOSupportNextActionContract(replyAutonomousDecision.nextActionContract).valid, true);
|
|
927
|
+
assert.equal(replyAutonomousDecision.managerExecutionPacket.status, 'auto_ready');
|
|
928
|
+
assert.equal(replyAutonomousDecision.managerExecutionPacket.retryScope, 'customer_draft_only');
|
|
929
|
+
assert.equal(replyAutonomousDecision.canSendCustomerReply, false);
|
|
930
|
+
|
|
931
|
+
const hotfixBlockedReplyAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
932
|
+
bundle: completedDiagnosedBundle,
|
|
933
|
+
outcomeLabel: 'accepted',
|
|
934
|
+
confidence: { level: 'high', category: 'business_proof', shouldBlockPr: false },
|
|
935
|
+
businessAssertionStatus: 'pass',
|
|
936
|
+
businessProofArtifacts: ['qa-artifacts/disabled-driver-dropdown.png'],
|
|
937
|
+
releaseStatus: 'completed',
|
|
938
|
+
hotfixEvidence: {
|
|
939
|
+
channel: 'backend_js',
|
|
940
|
+
target: {
|
|
941
|
+
host: 'backend.resolveio.com',
|
|
942
|
+
path: '/var/app/current/http/support.js'
|
|
943
|
+
},
|
|
944
|
+
compiledArtifactPath: 'dist/http/support.js',
|
|
945
|
+
remoteChecksumAfter: '2222222222222222222222222222222222222222222222222222222222222222',
|
|
946
|
+
sourceCommitSha: 'dd20c124012757ff7d66c682e4b7aad45c402d87',
|
|
947
|
+
githubCommitUrl: 'https://github.com/resolveio/resolveio-all/commit/dd20c124012757ff7d66c682e4b7aad45c402d87',
|
|
948
|
+
gitPushStatus: 'passed',
|
|
949
|
+
restartEvidence: 'nodejs restarted on backend.resolveio.com and workers',
|
|
950
|
+
healthCheckStatus: 'passed',
|
|
951
|
+
selfTestStatus: 'passed'
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
assert.equal(hotfixBlockedReplyAutonomousDecision.action, 'repair_release_hotfix_first');
|
|
955
|
+
assert.equal(hotfixBlockedReplyAutonomousDecision.reason, 'support_v5_reply_blocked_by_hotfix_evidence');
|
|
956
|
+
assert.equal(hotfixBlockedReplyAutonomousDecision.canDraftCustomerReply, false);
|
|
957
|
+
assert.equal(hotfixBlockedReplyAutonomousDecision.liveHotfixBlockedUntilCommit, true);
|
|
958
|
+
assert.ok(hotfixBlockedReplyAutonomousDecision.requiredEvidence.some((entry) => /gitCommitStatus=passed/i.test(entry)));
|
|
959
|
+
assert.ok(hotfixBlockedReplyAutonomousDecision.forbiddenActions.some((entry) => /customer resolution/i.test(entry)));
|
|
960
|
+
|
|
961
|
+
const routeOnlyAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
962
|
+
bundle: completedDiagnosedBundle,
|
|
963
|
+
outcomeLabel: 'accepted',
|
|
964
|
+
confidence: { level: 'high', category: 'route_probe', shouldBlockPr: false },
|
|
965
|
+
businessAssertionStatus: 'route_probe_pass',
|
|
966
|
+
businessProofArtifacts: ['qa-artifacts/route-loaded.png'],
|
|
967
|
+
releaseStatus: 'completed'
|
|
968
|
+
});
|
|
969
|
+
assert.equal(routeOnlyAutonomousDecision.action, 'run_business_proof_qa');
|
|
970
|
+
assert.equal(routeOnlyAutonomousDecision.canRunQa, true);
|
|
971
|
+
assert.equal(routeOnlyAutonomousDecision.canRunModel, false);
|
|
972
|
+
assert.equal(routeOnlyAutonomousDecision.businessProofReadiness.status, 'route_only');
|
|
973
|
+
assert.equal(routeOnlyAutonomousDecision.rootCauseReadiness.status, 'business_proof_required');
|
|
974
|
+
assert.equal(routeOnlyAutonomousDecision.rootCauseReadiness.canRunBusinessProofQa, true);
|
|
975
|
+
assert.equal(routeOnlyAutonomousDecision.rootCauseReadiness.businessProofReady, false);
|
|
976
|
+
assert.ok(routeOnlyAutonomousDecision.requiredEvidence.some((entry) => /filter_query_mismatch/.test(entry)));
|
|
977
|
+
assert.ok(routeOnlyAutonomousDecision.requiredEvidence.some((entry) => /included\/excluded row proof|dropdown DOM snapshot/i.test(entry)));
|
|
978
|
+
assert.ok(routeOnlyAutonomousDecision.forbiddenActions.some((action) => /businessProofReadiness\.ready=true/.test(action)));
|
|
979
|
+
assert.equal(routeOnlyAutonomousDecision.humanReviewPacket.reviewType, 'business_proof_qa');
|
|
980
|
+
assert.equal(routeOnlyAutonomousDecision.humanReviewPacket.primaryAction, 'run_support_v5_business_proof_qa_row');
|
|
981
|
+
|
|
982
|
+
const staleProofAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
983
|
+
bundle: completedDiagnosedBundle,
|
|
984
|
+
outcomeLabel: 'accepted',
|
|
985
|
+
confidence: { level: 'high', category: 'business_proof', shouldBlockPr: false },
|
|
986
|
+
businessAssertions: [{
|
|
987
|
+
assertion: validDiagnosis.proof_plan.business_assertion,
|
|
988
|
+
status: 'pass',
|
|
989
|
+
workflow: validDiagnosis.proof_plan.business_proof_contract.action_under_test,
|
|
990
|
+
action: validDiagnosis.proof_plan.action,
|
|
991
|
+
expected: validDiagnosis.proof_plan.business_proof_contract.expected_business_state_change,
|
|
992
|
+
observed: 'The disabled driver option is absent and the active driver remains selected.',
|
|
993
|
+
dataProof: validDiagnosis.proof_plan.business_proof_contract.data_or_dom_assertion,
|
|
994
|
+
artifactPaths: ['qa-artifacts/disabled-driver-business-proof.json'],
|
|
995
|
+
metadata: { supportDiagnosisProof: true }
|
|
996
|
+
}],
|
|
997
|
+
previousProofFingerprint: matchedBusinessProofReadiness.proofFingerprint,
|
|
998
|
+
releaseStatus: 'completed'
|
|
999
|
+
});
|
|
1000
|
+
assert.equal(staleProofAutonomousDecision.action, 'run_business_proof_qa');
|
|
1001
|
+
assert.equal(staleProofAutonomousDecision.businessProofReadiness.status, 'stale');
|
|
1002
|
+
assert.equal(staleProofAutonomousDecision.rootCauseReadiness.businessProofStatus, 'stale');
|
|
1003
|
+
assert.equal(staleProofAutonomousDecision.rootCauseReadiness.proofFreshness, 'same_as_previous');
|
|
1004
|
+
assert.equal(staleProofAutonomousDecision.rootCauseReadiness.canRelease, false);
|
|
1005
|
+
assert.equal(staleProofAutonomousDecision.rootCauseReadiness.canDraftCustomerReply, false);
|
|
1006
|
+
assert.ok(staleProofAutonomousDecision.blockers.some((blocker) => /new proof\/artifact fingerprint/i.test(blocker)));
|
|
1007
|
+
|
|
1008
|
+
const missingDiagnosisRepairGate = decideResolveIOSupportV5RepairGate({
|
|
1009
|
+
diagnosisGate: undefined,
|
|
1010
|
+
activeStepType: 'build_repair'
|
|
1011
|
+
});
|
|
1012
|
+
assert.equal(missingDiagnosisRepairGate.action, 'diagnose_only');
|
|
1013
|
+
assert.equal(missingDiagnosisRepairGate.recoveryPlan.recoveryClass, 'diagnosis_only');
|
|
1014
|
+
assert.equal(missingDiagnosisRepairGate.recoveryPlan.productRepairAllowed, false);
|
|
1015
|
+
assert.ok(missingDiagnosisRepairGate.recoveryPlan.requiredEvidence.includes('accepted_hypothesis'));
|
|
1016
|
+
assert.equal(missingDiagnosisRepairGate.recoveryCheckpoint.recoveryClass, 'diagnosis_only');
|
|
1017
|
+
assert.equal(missingDiagnosisRepairGate.recoveryCheckpoint.productRepairAllowed, false);
|
|
1018
|
+
assert.equal(missingDiagnosisRepairGate.recoveryAction.mode, 'read_only_diagnosis');
|
|
1019
|
+
assert.equal(missingDiagnosisRepairGate.recoveryAction.allowedDispatchAction, 'run_read_only_diagnosis');
|
|
1020
|
+
assert.equal(missingDiagnosisRepairGate.recoveryAction.productRepairAllowed, false);
|
|
1021
|
+
assert.equal(missingDiagnosisRepairGate.recoveryAction.proofRequiredBeforeContinuation, true);
|
|
1022
|
+
const allowedRepairGate = decideResolveIOSupportV5RepairGate({
|
|
1023
|
+
diagnosisGate: validDiagnosis,
|
|
1024
|
+
activeStepType: 'build_repair',
|
|
1025
|
+
changedFiles: ['geochem/angular/app/bol/new/bol-new.component.ts']
|
|
1026
|
+
});
|
|
1027
|
+
assert.equal(allowedRepairGate.action, 'allow_product_repair');
|
|
1028
|
+
assert.equal(allowedRepairGate.recoveryPlan.recoveryClass, 'product_code_repair');
|
|
1029
|
+
assert.equal(allowedRepairGate.recoveryPlan.productRepairAllowed, true);
|
|
1030
|
+
assert.equal(allowedRepairGate.recoveryCheckpoint.recoveryClass, 'product_code_repair');
|
|
1031
|
+
assert.equal(allowedRepairGate.recoveryCheckpoint.productRepairAllowed, true);
|
|
1032
|
+
const outOfScopeRepairGate = decideResolveIOSupportV5RepairGate({
|
|
1033
|
+
diagnosisGate: validDiagnosis,
|
|
1034
|
+
activeStepType: 'build_repair',
|
|
1035
|
+
changedFiles: ['geochem/server/src/methods/unrelated.ts']
|
|
1036
|
+
});
|
|
1037
|
+
assert.equal(outOfScopeRepairGate.action, 'reject_out_of_scope');
|
|
1038
|
+
assert.equal(outOfScopeRepairGate.recoveryPlan.recoveryClass, 'diagnosis_revision');
|
|
1039
|
+
assert.ok(outOfScopeRepairGate.recoveryPlan.forbiddenActions.some((action) => /outside owner_files/.test(action)));
|
|
1040
|
+
const infraRepairGate = decideResolveIOSupportV5RepairGate({
|
|
1041
|
+
diagnosisGate: validDiagnosis,
|
|
1042
|
+
activeStepType: 'build_repair',
|
|
1043
|
+
failureClass: 'infra',
|
|
1044
|
+
blocker: 'Puppeteer failed to launch.'
|
|
1045
|
+
});
|
|
1046
|
+
assert.equal(infraRepairGate.action, 'infra_repair_only');
|
|
1047
|
+
assert.equal(infraRepairGate.recoveryPlan.recoveryClass, 'infra_repair');
|
|
1048
|
+
assert.equal(infraRepairGate.recoveryPlan.expensiveModelAllowed, false);
|
|
1049
|
+
assert.ok(infraRepairGate.recoveryPlan.forbiddenActions.some((action) => /product-code model repair/.test(action)));
|
|
1050
|
+
assert.equal(infraRepairGate.recoveryCheckpoint.recoveryClass, 'infra_repair');
|
|
1051
|
+
assert.equal(infraRepairGate.recoveryCheckpoint.productRepairAllowed, false);
|
|
1052
|
+
const preflightRepairGate = decideResolveIOSupportV5RepairGate({
|
|
1053
|
+
diagnosisGate: validDiagnosis,
|
|
1054
|
+
activeStepType: 'build_repair',
|
|
1055
|
+
preflightGate: compilePreflight
|
|
1056
|
+
});
|
|
1057
|
+
assert.equal(preflightRepairGate.action, 'infra_repair_only');
|
|
1058
|
+
assert.equal(preflightRepairGate.canEditProductCode, false);
|
|
1059
|
+
assert.equal(preflightRepairGate.preflightGate.status, 'compile_failed');
|
|
1060
|
+
assert.equal(preflightRepairGate.recoveryPlan.recoveryClass, 'compile_repair');
|
|
1061
|
+
assert.equal(preflightRepairGate.recoveryPlan.expensiveModelAllowed, false);
|
|
1062
|
+
const repeatedRepairGate = decideResolveIOSupportV5RepairGate({
|
|
1063
|
+
diagnosisGate: validDiagnosis,
|
|
1064
|
+
activeStepType: 'build_repair',
|
|
1065
|
+
failureClass: 'product_code',
|
|
1066
|
+
blocker: 'same blocker',
|
|
1067
|
+
evidenceHash: 'same',
|
|
1068
|
+
history: [
|
|
1069
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '1' },
|
|
1070
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '2' }
|
|
1071
|
+
],
|
|
1072
|
+
maxRepeatedNoProgress: 2
|
|
1073
|
+
});
|
|
1074
|
+
assert.equal(repeatedRepairGate.action, 'park_repeated_failure');
|
|
1075
|
+
assert.equal(repeatedRepairGate.recoveryPlan.recoveryClass, 'blocked_until_new_evidence');
|
|
1076
|
+
assert.ok(repeatedRepairGate.recoveryPlan.loopResetEvidence.some((evidence) => /changed evidence hash/.test(evidence)));
|
|
1077
|
+
assert.equal(repeatedRepairGate.recoveryCheckpoint.status, 'parked');
|
|
1078
|
+
assert.equal(repeatedRepairGate.recoveryCheckpoint.allowedAction, 'collect_new_evidence_only');
|
|
1079
|
+
assert.equal(repeatedRepairGate.recoveryEvidenceProbe.evidenceOnly, true);
|
|
1080
|
+
assert.equal(repeatedRepairGate.recoveryEvidenceProbe.productRepairAllowed, false);
|
|
1081
|
+
assert.ok(repeatedRepairGate.recoveryEvidenceProbe.steps.some((step) => step.kind === 'rerun_same_gate'));
|
|
1082
|
+
assert.equal(repeatedRepairGate.recoveryAction.mode, 'collect_evidence');
|
|
1083
|
+
assert.equal(repeatedRepairGate.recoveryAction.productRepairAllowed, false);
|
|
1084
|
+
assert.equal(repeatedRepairGate.recoveryAction.retryPolicy.requireNewEvidence, true);
|
|
1085
|
+
|
|
1086
|
+
const staleEvidenceFreshness = evaluateResolveIOSupportEvidenceFreshness({
|
|
1087
|
+
history: [
|
|
1088
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same blocker', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '1' },
|
|
1089
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same blocker', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '2' }
|
|
1090
|
+
],
|
|
1091
|
+
failureClass: 'product_code',
|
|
1092
|
+
blocker: 'same blocker',
|
|
1093
|
+
evidenceHash: 'same',
|
|
1094
|
+
limit: 2
|
|
1095
|
+
});
|
|
1096
|
+
assert.equal(staleEvidenceFreshness.status, 'stale_repeated');
|
|
1097
|
+
assert.equal(staleEvidenceFreshness.mustCollectNewEvidence, true);
|
|
1098
|
+
assert.equal(staleEvidenceFreshness.canRetry, false);
|
|
1099
|
+
assert.ok(staleEvidenceFreshness.requiredResetEvidence.some((evidence) => /changed evidence hash|new artifact path|business\/compile\/infra\/release proof/i.test(evidence)));
|
|
1100
|
+
|
|
1101
|
+
const staleContinuationProofCheckpoint = buildResolveIOSupportContinuationProofCheckpoint({
|
|
1102
|
+
action: 'collect_new_evidence',
|
|
1103
|
+
reason: staleEvidenceFreshness.reason,
|
|
1104
|
+
evidenceFreshness: staleEvidenceFreshness,
|
|
1105
|
+
requiredEvidence: staleEvidenceFreshness.requiredResetEvidence
|
|
1106
|
+
});
|
|
1107
|
+
assert.equal(staleContinuationProofCheckpoint.status, 'waiting_for_new_evidence');
|
|
1108
|
+
assert.equal(staleContinuationProofCheckpoint.successRequiresNewEvidence, true);
|
|
1109
|
+
assert.equal(staleContinuationProofCheckpoint.blocksProductRepairUntilChangedEvidence, true);
|
|
1110
|
+
assert.equal(staleContinuationProofCheckpoint.startingEvidenceHash, 'same');
|
|
1111
|
+
assert.ok(staleContinuationProofCheckpoint.requiredResetEvidence.some((evidence) => /changed evidence hash|new artifact path|business\/compile\/infra\/release proof/i.test(evidence)));
|
|
1112
|
+
|
|
1113
|
+
const repeatedAutonomousDecision = decideResolveIOSupportV5AutonomousNextAction({
|
|
1114
|
+
bundle: {
|
|
1115
|
+
...diagnosedBundle,
|
|
1116
|
+
supportV5StepHistory: [
|
|
1117
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same blocker', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '1' },
|
|
1118
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same blocker', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '2' }
|
|
1119
|
+
]
|
|
1120
|
+
},
|
|
1121
|
+
failureClass: 'product_code',
|
|
1122
|
+
blocker: 'same blocker',
|
|
1123
|
+
evidenceHash: 'same'
|
|
1124
|
+
});
|
|
1125
|
+
assert.equal(repeatedAutonomousDecision.action, 'collect_new_evidence');
|
|
1126
|
+
assert.equal(repeatedAutonomousDecision.canEditProductCode, false);
|
|
1127
|
+
assert.equal(repeatedAutonomousDecision.evidenceFreshness.mustCollectNewEvidence, true);
|
|
1128
|
+
assert.equal(repeatedAutonomousDecision.continuationProofCheckpoint.status, 'waiting_for_new_evidence');
|
|
1129
|
+
assert.equal(repeatedAutonomousDecision.continuationProofCheckpoint.blocksProductRepairUntilChangedEvidence, true);
|
|
1130
|
+
assert.equal(repeatedAutonomousDecision.nextActionContract.action, 'collect_new_evidence');
|
|
1131
|
+
assert.equal(repeatedAutonomousDecision.nextActionContract.safeToAutoRun, true);
|
|
1132
|
+
assert.equal(repeatedAutonomousDecision.nextActionContract.canRunWithoutCodexMonitor, true);
|
|
1133
|
+
assert.equal(repeatedAutonomousDecision.nextActionContract.decisionBasis.sameFailureCount, 2);
|
|
1134
|
+
assert.equal(repeatedAutonomousDecision.humanDecisionRequest?.required, true);
|
|
1135
|
+
assert.equal(repeatedAutonomousDecision.humanDecisionRequest?.status, 'auto_dispatch_allowed');
|
|
1136
|
+
assert.equal(repeatedAutonomousDecision.humanDecisionRequest?.preferredChoiceId, 'run_bounded_evidence_probe');
|
|
1137
|
+
assert.equal(repeatedAutonomousDecision.humanDecisionRequest?.autoDispatchAllowed, true);
|
|
1138
|
+
assert.equal(repeatedAutonomousDecision.humanDecisionRequest?.evidence.sameFailureCount, 2);
|
|
1139
|
+
assert.ok(repeatedAutonomousDecision.humanDecisionRequest?.choices.some((choice) => choice.choiceId === 'run_bounded_evidence_probe' && choice.action === 'collect_new_evidence' && choice.allowedWithoutCodexMonitor === true));
|
|
1140
|
+
assert.ok(repeatedAutonomousDecision.humanDecisionRequest?.blockedUntil.some((entry) => /blockerFingerprint|evidenceHash|business|compile|infra|release proof/i.test(entry)));
|
|
1141
|
+
assert.ok(repeatedAutonomousDecision.nextActionContract.stopConditions.some((entry) => /Reset requires:.*changed evidence hash|Reset requires:.*new artifact path|same failure class/i.test(entry)));
|
|
1142
|
+
assert.equal(validateResolveIOSupportNextActionContract(repeatedAutonomousDecision.nextActionContract).valid, true);
|
|
1143
|
+
assert.equal(repeatedAutonomousDecision.managerExecutionPacket.status, 'auto_ready');
|
|
1144
|
+
assert.equal(repeatedAutonomousDecision.managerExecutionPacket.retryScope, 'evidence_only');
|
|
1145
|
+
assert.equal(repeatedAutonomousDecision.managerExecutionPacket.maxAttemptsBeforeFreshEvidence, 1);
|
|
1146
|
+
assert.ok(repeatedAutonomousDecision.managerExecutionPacket.blockers.some((blocker) => /same_failure|changed_evidence|support_v5/i.test(blocker)));
|
|
1147
|
+
assert.ok(repeatedAutonomousDecision.forbiddenActions.some((action) => /product-code repair|another repair loop|blockerFingerprint|evidenceHash/i.test(action)));
|
|
1148
|
+
|
|
1149
|
+
const materialEvidenceFreshness = evaluateResolveIOSupportEvidenceFreshness({
|
|
1150
|
+
history: [
|
|
1151
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same blocker', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', artifactPaths: ['qa-artifacts/old.log'], recordedAt: '1' }
|
|
1152
|
+
],
|
|
1153
|
+
failureClass: 'product_code',
|
|
1154
|
+
blocker: 'same blocker',
|
|
1155
|
+
evidenceHash: 'after-business-proof',
|
|
1156
|
+
artifactPaths: ['qa-artifacts/old.log', 'qa-artifacts/business-proof-after.png'],
|
|
1157
|
+
limit: 2
|
|
1158
|
+
});
|
|
1159
|
+
assert.equal(materialEvidenceFreshness.status, 'material_evidence');
|
|
1160
|
+
assert.equal(materialEvidenceFreshness.materialEvidence, true);
|
|
1161
|
+
assert.equal(materialEvidenceFreshness.canRetry, true);
|
|
1162
|
+
assert.equal(materialEvidenceFreshness.loopBudgetShouldReset, true);
|
|
1163
|
+
|
|
1164
|
+
const withFailure = recordResolveIOSupportV5Step(initialized, {
|
|
1165
|
+
stepType: 'qa_row',
|
|
1166
|
+
outcome: 'needs_repair',
|
|
1167
|
+
lane: 'qa',
|
|
1168
|
+
model: 'gpt-5.4-mini',
|
|
1169
|
+
threadKey: 'support:ticket-1:job:job-1:qa',
|
|
1170
|
+
promptTokenEstimate: 1200,
|
|
1171
|
+
runtimeMs: 45000,
|
|
1172
|
+
summary: 'Row 2 failed.',
|
|
1173
|
+
blocker: 'Screenshot shell-only for row 2',
|
|
1174
|
+
artifactPaths: ['qa-artifacts/row-2.jpg'],
|
|
1175
|
+
activeQaRow: {
|
|
1176
|
+
index: 2,
|
|
1177
|
+
workflow: 'Disabled driver cannot replace selected active driver',
|
|
1178
|
+
route: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
1179
|
+
status: 'failed'
|
|
1180
|
+
},
|
|
1181
|
+
now: '2026-06-06T00:01:00.000Z'
|
|
1182
|
+
});
|
|
1183
|
+
|
|
1184
|
+
assert.equal(withFailure.supportV5StepHistory.length, 1);
|
|
1185
|
+
assert.equal(withFailure.supportV5Budget.loopCount, 1);
|
|
1186
|
+
assert.equal(withFailure.supportV5LaneMemory.qa.activeBlocker, 'Screenshot shell-only for row 2');
|
|
1187
|
+
assert.equal(withFailure.supportV5SupervisorState.currentQaRow?.index, 2);
|
|
1188
|
+
assert.deepEqual(decideResolveIOSupportV5Continuation(withFailure).action, 'continue');
|
|
1189
|
+
|
|
1190
|
+
let repeated = withFailure;
|
|
1191
|
+
repeated = recordResolveIOSupportV5Step(repeated, {
|
|
1192
|
+
stepType: 'qa_row',
|
|
1193
|
+
outcome: 'needs_repair',
|
|
1194
|
+
lane: 'qa',
|
|
1195
|
+
blocker: 'Screenshot shell-only for row 2',
|
|
1196
|
+
summary: 'Still shell-only.',
|
|
1197
|
+
now: '2026-06-06T00:02:00.000Z'
|
|
1198
|
+
});
|
|
1199
|
+
repeated = recordResolveIOSupportV5Step(repeated, {
|
|
1200
|
+
stepType: 'qa_row',
|
|
1201
|
+
outcome: 'needs_repair',
|
|
1202
|
+
lane: 'qa',
|
|
1203
|
+
blocker: 'Screenshot shell-only for row 2',
|
|
1204
|
+
summary: 'Still shell-only again.',
|
|
1205
|
+
now: '2026-06-06T00:03:00.000Z'
|
|
1206
|
+
});
|
|
1207
|
+
|
|
1208
|
+
const repeatedDecision = decideResolveIOSupportV5Continuation(repeated);
|
|
1209
|
+
assert.equal(repeatedDecision.action, 'park');
|
|
1210
|
+
assert.equal(repeatedDecision.reason, 'support_v5_same_failure_with_weak_evidence');
|
|
1211
|
+
assert.equal(repeatedDecision.recoveryPlan.recoveryClass, 'blocked_until_new_evidence');
|
|
1212
|
+
assert.equal(repeatedDecision.recoveryPlan.allowedAction, 'collect_new_evidence_only');
|
|
1213
|
+
assert.equal(repeatedDecision.recoveryCheckpoint.status, 'parked');
|
|
1214
|
+
assert.equal(repeatedDecision.recoveryCheckpoint.allowedAction, 'collect_new_evidence_only');
|
|
1215
|
+
assert.equal(repeatedDecision.recoveryEvidenceProbe.evidenceOnly, true);
|
|
1216
|
+
assert.equal(repeatedDecision.recoveryEvidenceProbe.productRepairAllowed, false);
|
|
1217
|
+
assert.ok(repeatedDecision.recoveryEvidenceProbe.acceptanceEvidence.some((evidence) => /changed evidence hash|new artifact path/i.test(evidence)));
|
|
1218
|
+
assert.equal(repeatedDecision.recoveryAction.mode, 'collect_evidence');
|
|
1219
|
+
assert.equal(repeatedDecision.recoveryAction.retryPolicy.requireNewEvidence, true);
|
|
1220
|
+
assert.ok(repeatedDecision.recoveryAction.requiredArtifacts.length > 0);
|
|
1221
|
+
|
|
1222
|
+
let materialEvidenceRetryBundle = withFailure;
|
|
1223
|
+
materialEvidenceRetryBundle = recordResolveIOSupportV5Step(materialEvidenceRetryBundle, {
|
|
1224
|
+
stepType: 'qa_row',
|
|
1225
|
+
outcome: 'needs_repair',
|
|
1226
|
+
lane: 'qa',
|
|
1227
|
+
failureClass: 'product_code',
|
|
1228
|
+
blocker: 'Save action still throws TypeError.',
|
|
1229
|
+
summary: 'Save action still throws TypeError.',
|
|
1230
|
+
evidenceHash: 'save-typeerror-before',
|
|
1231
|
+
artifactPaths: ['qa-artifacts/save-before.log'],
|
|
1232
|
+
now: '2026-06-06T00:03:10.000Z'
|
|
1233
|
+
});
|
|
1234
|
+
materialEvidenceRetryBundle = recordResolveIOSupportV5Step(materialEvidenceRetryBundle, {
|
|
1235
|
+
stepType: 'qa_row',
|
|
1236
|
+
outcome: 'needs_repair',
|
|
1237
|
+
lane: 'qa',
|
|
1238
|
+
failureClass: 'product_code',
|
|
1239
|
+
blocker: 'Save action still throws TypeError.',
|
|
1240
|
+
summary: 'New business DOM trace proves the save click reaches the method with an undefined id.',
|
|
1241
|
+
evidenceHash: 'save-typeerror-after-dom-trace',
|
|
1242
|
+
artifactPaths: ['qa-artifacts/save-before.log', 'qa-artifacts/save-after-dom-trace.json'],
|
|
1243
|
+
now: '2026-06-06T00:03:20.000Z'
|
|
1244
|
+
});
|
|
1245
|
+
const materialEvidenceRetryDecision = decideResolveIOSupportV5Continuation(materialEvidenceRetryBundle);
|
|
1246
|
+
assert.equal(materialEvidenceRetryDecision.action, 'continue');
|
|
1247
|
+
assert.equal(materialEvidenceRetryDecision.reason, 'support_v5_continue');
|
|
1248
|
+
|
|
1249
|
+
const repeatedProductFailure = decideResolveIOSupportV5RepeatedFailureStop({
|
|
1250
|
+
history: [
|
|
1251
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '1' },
|
|
1252
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '2' }
|
|
1253
|
+
],
|
|
1254
|
+
failureClass: 'product_code',
|
|
1255
|
+
blocker: 'same blocker',
|
|
1256
|
+
evidenceHash: 'same',
|
|
1257
|
+
limit: 2
|
|
1258
|
+
});
|
|
1259
|
+
assert.equal(repeatedProductFailure.shouldStop, true);
|
|
1260
|
+
const repeatedInfraFailure = decideResolveIOSupportV5RepeatedFailureStop({
|
|
1261
|
+
history: [
|
|
1262
|
+
{ stepType: 'compile_check', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'infra', blocker: 'puppeteer missing', evidenceHash: 'same', recordedAt: '1' }
|
|
1263
|
+
],
|
|
1264
|
+
failureClass: 'infra',
|
|
1265
|
+
blocker: 'puppeteer missing',
|
|
1266
|
+
evidenceHash: 'same',
|
|
1267
|
+
limit: 1
|
|
1268
|
+
});
|
|
1269
|
+
assert.equal(repeatedInfraFailure.shouldStop, false);
|
|
1270
|
+
|
|
1271
|
+
let repeatedInfraBundle = diagnosedBundle;
|
|
1272
|
+
repeatedInfraBundle = recordResolveIOSupportV5Step(repeatedInfraBundle, {
|
|
1273
|
+
stepType: 'compile_check',
|
|
1274
|
+
outcome: 'needs_repair',
|
|
1275
|
+
lane: 'build',
|
|
1276
|
+
failureClass: 'infra',
|
|
1277
|
+
blocker: 'Puppeteer executable missing.',
|
|
1278
|
+
evidenceHash: 'same-infra',
|
|
1279
|
+
now: '2026-06-06T00:03:10.000Z'
|
|
1280
|
+
});
|
|
1281
|
+
repeatedInfraBundle = recordResolveIOSupportV5Step(repeatedInfraBundle, {
|
|
1282
|
+
stepType: 'compile_check',
|
|
1283
|
+
outcome: 'needs_repair',
|
|
1284
|
+
lane: 'build',
|
|
1285
|
+
failureClass: 'infra',
|
|
1286
|
+
blocker: 'Puppeteer executable missing.',
|
|
1287
|
+
evidenceHash: 'same-infra',
|
|
1288
|
+
now: '2026-06-06T00:03:20.000Z'
|
|
1289
|
+
});
|
|
1290
|
+
repeatedInfraBundle = recordResolveIOSupportV5Step(repeatedInfraBundle, {
|
|
1291
|
+
stepType: 'compile_check',
|
|
1292
|
+
outcome: 'needs_repair',
|
|
1293
|
+
lane: 'build',
|
|
1294
|
+
failureClass: 'infra',
|
|
1295
|
+
blocker: 'Puppeteer executable missing.',
|
|
1296
|
+
evidenceHash: 'same-infra',
|
|
1297
|
+
now: '2026-06-06T00:03:30.000Z'
|
|
1298
|
+
});
|
|
1299
|
+
const repeatedInfraContinuation = decideResolveIOSupportV5Continuation(repeatedInfraBundle);
|
|
1300
|
+
assert.equal(repeatedInfraContinuation.action, 'continue');
|
|
1301
|
+
assert.equal(repeatedInfraContinuation.reason, 'support_v5_infra_or_compile_repair_required');
|
|
1302
|
+
assert.equal(repeatedInfraContinuation.recoveryPlan.recoveryClass, 'infra_repair');
|
|
1303
|
+
assert.equal(repeatedInfraContinuation.recoveryPlan.productRepairAllowed, false);
|
|
1304
|
+
|
|
1305
|
+
const sameBlockerWeakHashOnlyEvidence = decideResolveIOSupportV5RepeatedFailureStop({
|
|
1306
|
+
history: [
|
|
1307
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same root issue', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'before-fix-log', recordedAt: '1' },
|
|
1308
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same root issue', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'renamed-hash-only', recordedAt: '2' }
|
|
1309
|
+
],
|
|
1310
|
+
failureClass: 'product_code',
|
|
1311
|
+
blocker: 'same blocker',
|
|
1312
|
+
evidenceHash: 'renamed-hash-only',
|
|
1313
|
+
limit: 2
|
|
1314
|
+
});
|
|
1315
|
+
assert.equal(sameBlockerWeakHashOnlyEvidence.shouldStop, true);
|
|
1316
|
+
assert.equal(sameBlockerWeakHashOnlyEvidence.reason, 'support_v5_same_failure_with_weak_evidence');
|
|
1317
|
+
assert.equal(sameBlockerWeakHashOnlyEvidence.newEvidence, true);
|
|
1318
|
+
assert.equal(sameBlockerWeakHashOnlyEvidence.materialEvidence, false);
|
|
1319
|
+
assert.equal(sameBlockerWeakHashOnlyEvidence.evidenceStrength, 'weak');
|
|
1320
|
+
|
|
1321
|
+
const sameBlockerMaterialEvidence = decideResolveIOSupportV5RepeatedFailureStop({
|
|
1322
|
+
history: [
|
|
1323
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same root issue', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'before-fix-log', artifactPaths: ['qa-artifacts/before.log'], recordedAt: '1' },
|
|
1324
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'New business DOM trace proves the disabled driver option still persists after save.', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'after-business-proof', artifactPaths: ['qa-artifacts/before.log', 'qa-artifacts/business-proof-after.json'], recordedAt: '2' }
|
|
1325
|
+
],
|
|
1326
|
+
failureClass: 'product_code',
|
|
1327
|
+
blocker: 'same blocker',
|
|
1328
|
+
evidenceHash: 'after-business-proof',
|
|
1329
|
+
artifactPaths: ['qa-artifacts/before.log', 'qa-artifacts/business-proof-after.json'],
|
|
1330
|
+
limit: 2
|
|
1331
|
+
});
|
|
1332
|
+
assert.equal(sameBlockerMaterialEvidence.shouldStop, false);
|
|
1333
|
+
assert.equal(sameBlockerMaterialEvidence.reason, 'support_v5_retry_allowed_material_evidence');
|
|
1334
|
+
assert.equal(sameBlockerMaterialEvidence.materialEvidence, true);
|
|
1335
|
+
assert.equal(sameBlockerMaterialEvidence.evidenceStrength, 'material');
|
|
1336
|
+
assert.ok(sameBlockerMaterialEvidence.evidenceSignals?.includes('artifact_paths_added'));
|
|
1337
|
+
|
|
1338
|
+
const pingPongFailure = decideResolveIOSupportV5RepeatedFailureStop({
|
|
1339
|
+
history: [
|
|
1340
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter excludes active customers', failureClass: 'business', blocker: 'Filter excludes active customers', evidenceHash: 'a', recordedAt: '1' },
|
|
1341
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter includes inactive customers', failureClass: 'business', blocker: 'Filter includes inactive customers', evidenceHash: 'b', recordedAt: '2' },
|
|
1342
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter excludes active customers', failureClass: 'business', blocker: 'Filter excludes active customers', evidenceHash: 'a', recordedAt: '3' },
|
|
1343
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter includes inactive customers', failureClass: 'business', blocker: 'Filter includes inactive customers', evidenceHash: 'b', recordedAt: '4' }
|
|
1344
|
+
],
|
|
1345
|
+
failureClass: 'business',
|
|
1346
|
+
blocker: 'Filter includes inactive customers',
|
|
1347
|
+
evidenceHash: 'b',
|
|
1348
|
+
limit: 3
|
|
1349
|
+
});
|
|
1350
|
+
assert.equal(pingPongFailure.shouldStop, true);
|
|
1351
|
+
assert.equal(pingPongFailure.reason, 'support_v5_ping_pong_failure_loop');
|
|
1352
|
+
|
|
1353
|
+
const budgeted = recordResolveIOSupportV5Step(initialized, {
|
|
1354
|
+
stepType: 'build_repair',
|
|
1355
|
+
outcome: 'needs_repair',
|
|
1356
|
+
lane: 'build',
|
|
1357
|
+
promptTokenEstimate: 1900,
|
|
1358
|
+
blocker: 'Prompt was too broad for a repair step.',
|
|
1359
|
+
now: '2026-06-06T00:04:00.000Z'
|
|
1360
|
+
});
|
|
1361
|
+
assert.equal(decideResolveIOSupportV5Continuation(budgeted).reason, 'support_v5_budget_guard');
|
|
1362
|
+
assert.equal(decideResolveIOSupportV5Continuation(budgeted).recoveryPlan.recoveryClass, 'manual_handoff');
|
|
1363
|
+
|
|
1364
|
+
const prompt = buildResolveIOSupportV5DiagnoseFirstPrompt({
|
|
1365
|
+
goal: initialized.supportV5SupervisorState.currentGoal,
|
|
1366
|
+
activeStep: 'qa_row',
|
|
1367
|
+
activeBlocker: 'Route failed to hydrate.',
|
|
1368
|
+
lane: 'qa',
|
|
1369
|
+
currentQaRow: withFailure.supportV5SupervisorState.currentQaRow,
|
|
1370
|
+
artifactPaths: ['qa-artifacts/client.log'],
|
|
1371
|
+
changedFiles: ['geochem/angular/app/bol/new/bol-new.component.ts']
|
|
1372
|
+
}).join('\n');
|
|
1373
|
+
|
|
1374
|
+
assert.match(prompt, /Diagnose First/);
|
|
1375
|
+
assert.match(prompt, /Do not send customer email/);
|
|
1376
|
+
assert.match(prompt, /Current QA row/);
|
|
1377
|
+
assert.match(prompt, /geochem\/angular\/app\/bol\/new\/bol-new\.component\.ts/);
|
|
1378
|
+
|
|
1379
|
+
const diagnosisPromptWithHints = buildResolveIOSupportV5MicrotaskPrompt({
|
|
1380
|
+
bundle: initialized,
|
|
1381
|
+
lane: 'build',
|
|
1382
|
+
stage: 'support-diagnosis-gate',
|
|
1383
|
+
similarCaseHints,
|
|
1384
|
+
contextSnippets: ['Ticket number: 004999']
|
|
1385
|
+
});
|
|
1386
|
+
assert.equal(diagnosisPromptWithHints.activeMicrotask?.type, 'diagnosis_gate');
|
|
1387
|
+
assert.equal(diagnosisPromptWithHints.diagnosisEvidencePack.status, 'needs_diagnosis');
|
|
1388
|
+
assert.equal(diagnosisPromptWithHints.diagnosisEvidencePack.sourceEditsAllowed, false);
|
|
1389
|
+
assert.equal(diagnosisPromptWithHints.diagnosisEvidencePack.similarCaseSelection.ranked[0].ticketNumber, '004333');
|
|
1390
|
+
assert.match(diagnosisPromptWithHints.prompt, /Similar accepted fix hints/);
|
|
1391
|
+
assert.match(diagnosisPromptWithHints.prompt, /diagnosis_evidence_pack|support-diagnosis-pack/);
|
|
1392
|
+
assert.match(diagnosisPromptWithHints.prompt, /advisory only/i);
|
|
1393
|
+
assert.match(diagnosisPromptWithHints.prompt, /004333/);
|
|
1394
|
+
assert.match(diagnosisPromptWithHints.prompt, /owner_file_overlap/);
|
|
1395
|
+
|
|
1396
|
+
assert.equal(
|
|
1397
|
+
fingerprintResolveIOSupportV5Blocker('Line 123 failed for 6a239cd7d67a2b24b36f3dfe'),
|
|
1398
|
+
fingerprintResolveIOSupportV5Blocker('Line 456 failed for abcdefabcdefabcdef')
|
|
1399
|
+
);
|
|
1400
|
+
|
|
1401
|
+
const incident = buildResolveIOSupportV5Incident({
|
|
1402
|
+
incidentClass: 'false_screenshot_rejection',
|
|
1403
|
+
summary: 'Sparse but valid BOL detail screen was rejected by file-size gate.',
|
|
1404
|
+
stepType: 'artifact_package',
|
|
1405
|
+
blocker: 'screenshot shell-only',
|
|
1406
|
+
artifactPaths: ['qa-artifacts/row-2.jpg'],
|
|
1407
|
+
now: '2026-06-06T00:05:00.000Z'
|
|
1408
|
+
});
|
|
1409
|
+
assert.equal(incident.incidentClass, 'false_screenshot_rejection');
|
|
1410
|
+
assert.ok(incident.blockerFingerprint);
|
|
1411
|
+
|
|
1412
|
+
const microtaskPrompt = buildResolveIOSupportV5MicrotaskPrompt({
|
|
1413
|
+
bundle: diagnosedBundle,
|
|
1414
|
+
lane: 'build',
|
|
1415
|
+
stage: 'support-autonomous-owner',
|
|
1416
|
+
failureText: 'QA row failed because the driver dropdown still includes disabled drivers.',
|
|
1417
|
+
changedFiles: ['geochem/angular/app/bol/new/bol-new.component.ts'],
|
|
1418
|
+
contextSnippets: ['Workspace root: /var/ai-workspace/job-1', 'Project root: geochem']
|
|
1419
|
+
});
|
|
1420
|
+
assert.equal(microtaskPrompt.activeMicrotask?.lane, 'build');
|
|
1421
|
+
assert.equal(microtaskPrompt.withinHardCap, true);
|
|
1422
|
+
assert.ok(microtaskPrompt.promptTokenEstimate <= buildResolveIOSupportV5PromptBudget().buildMicrotaskHardCap);
|
|
1423
|
+
assert.match(microtaskPrompt.prompt, /Microtask id:/);
|
|
1424
|
+
assert.match(microtaskPrompt.prompt, /persistent lane thread/);
|
|
1425
|
+
assert.match(microtaskPrompt.prompt, /Diagnosis issue class: filter_query_mismatch/);
|
|
1426
|
+
assert.doesNotMatch(microtaskPrompt.prompt, /Initial ticket context:/);
|
|
1427
|
+
assert.doesNotMatch(microtaskPrompt.prompt, /Staged support context:/);
|
|
1428
|
+
assert.doesNotMatch(microtaskPrompt.prompt, /BUILD_PLAN/);
|
|
1429
|
+
|
|
1430
|
+
const qaPrompt = buildResolveIOSupportV5MicrotaskPrompt({
|
|
1431
|
+
bundle: {
|
|
1432
|
+
...diagnosedBundle,
|
|
1433
|
+
supportV5ActiveMicrotaskId: diagnosedBundle.supportV5MicrotaskLedger.find((task) => task.lane === 'qa')?.microtaskId
|
|
1434
|
+
},
|
|
1435
|
+
lane: 'qa',
|
|
1436
|
+
stage: 'support-qa-validation',
|
|
1437
|
+
activeQaRow: {
|
|
1438
|
+
index: 0,
|
|
1439
|
+
workflow: 'BOL driver display',
|
|
1440
|
+
route: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
1441
|
+
assertion: 'Disabled driver is rejected',
|
|
1442
|
+
status: 'pending'
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
assert.equal(qaPrompt.activeMicrotask?.lane, 'qa');
|
|
1446
|
+
assert.ok(qaPrompt.promptTokenEstimate <= buildResolveIOSupportV5PromptBudget().qaMicrotaskHardCap);
|
|
1447
|
+
assert.match(qaPrompt.prompt, /Return strict JSON only/);
|
|
1448
|
+
assert.match(qaPrompt.prompt, /IssueClassProbePlan|support-probe-plan|filter_query_mismatch/);
|
|
1449
|
+
|
|
1450
|
+
const usageBundle = recordResolveIOSupportV5MicrotaskUsage(initialized, {
|
|
1451
|
+
microtaskId: initialized.supportV5MicrotaskLedger[0].microtaskId,
|
|
1452
|
+
lane: 'build',
|
|
1453
|
+
model: 'gpt-5.3-codex',
|
|
1454
|
+
threadKey: initialized.supportV5LaneMemory.build.threadKey,
|
|
1455
|
+
reuseThread: true,
|
|
1456
|
+
promptTokenEstimate: microtaskPrompt.promptTokenEstimate,
|
|
1457
|
+
promptSections: microtaskPrompt.promptSections,
|
|
1458
|
+
outcome: 'pass'
|
|
1459
|
+
});
|
|
1460
|
+
const usageSummary = summarizeResolveIOSupportV5MicrotaskUsage(usageBundle);
|
|
1461
|
+
assert.equal(usageSummary.byMicrotask.length, 1);
|
|
1462
|
+
assert.ok(usageSummary.bySection.some((section) => section.name === 'active_microtask'));
|
|
1463
|
+
assert.equal(usageSummary.broadPromptViolations.length, 0);
|
|
1464
|
+
|
|
1465
|
+
const digest = buildResolveIOSupportV5ScopeDigest({
|
|
1466
|
+
goal: 'Resolve support ticket 004999',
|
|
1467
|
+
approvedScope: ['A'.repeat(2000), 'B'.repeat(2000)],
|
|
1468
|
+
prBranch: 'support-004999',
|
|
1469
|
+
maxTokens: 200
|
|
1470
|
+
});
|
|
1471
|
+
assert.ok(digest.length <= 800);
|
|
1472
|
+
|
|
1473
|
+
console.log('support runner v5 tests passed');
|