@resolveio/server-lib 22.3.148 → 22.3.150
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 +23524 -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 +684 -0
- package/src/util/ai-run-evidence-dashboard.ts +313 -0
- package/src/util/ai-run-evidence-eval.ts +885 -0
- package/src/util/ai-run-evidence.ts +1058 -0
- package/src/util/ai-runner-artifacts.ts +586 -0
- package/src/util/ai-runner-manager-autopilot.ts +434 -0
- package/src/util/ai-runner-manager-policy.ts +2733 -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 +875 -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 +2167 -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 +2968 -0
- package/tests/ai-manager-autopilot-snapshot.test.ts +177 -0
- package/tests/ai-manager-recovery-checkpoint.test.ts +595 -0
- package/tests/ai-run-eval.test.ts +88 -0
- package/tests/ai-run-evidence.test.ts +348 -0
- package/tests/ai-runner-contract.test.ts +488 -0
- package/tests/aicoder-runner-v6.test.ts +298 -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 +488 -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 -337
- package/methods/ai-terminal.js +0 -23193
- 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 -33
- package/util/ai-run-evidence-adapters.js +0 -838
- 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 -854
- 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 -731
- 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 -112
- package/util/ai-runner-manager-autopilot.js +0 -313
- package/util/ai-runner-manager-autopilot.js.map +0 -1
- package/util/ai-runner-manager-policy.d.ts +0 -403
- package/util/ai-runner-manager-policy.js +0 -1763
- 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 -214
- package/util/aicoder-runner-v6.js +0 -507
- 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 -415
- package/util/support-runner-v5.js +0 -1445
- 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,488 @@
|
|
|
1
|
+
import * as assert from 'node:assert/strict';
|
|
2
|
+
import {
|
|
3
|
+
buildResolveIOSupportIssueClassProbes,
|
|
4
|
+
buildResolveIOSupportV5MicrotaskPrompt,
|
|
5
|
+
buildResolveIOSupportV5DiagnoseFirstPrompt,
|
|
6
|
+
buildResolveIOSupportV5Incident,
|
|
7
|
+
buildResolveIOSupportV5PromptBudget,
|
|
8
|
+
buildResolveIOSupportV5ScopeDigest,
|
|
9
|
+
changedFilesOutsideResolveIOSupportDiagnosisOwnerFiles,
|
|
10
|
+
decideResolveIOSupportV5RepairGate,
|
|
11
|
+
decideResolveIOSupportV5RepeatedFailureStop,
|
|
12
|
+
decideResolveIOSupportV5Continuation,
|
|
13
|
+
extractResolveIOSupportDiagnosisGateFromText,
|
|
14
|
+
fingerprintResolveIOSupportV5Blocker,
|
|
15
|
+
initializeResolveIOSupportV5State,
|
|
16
|
+
recordResolveIOSupportV5MicrotaskUsage,
|
|
17
|
+
recordResolveIOSupportV5Step,
|
|
18
|
+
selectResolveIOSupportV5ActiveMicrotask,
|
|
19
|
+
summarizeResolveIOSupportV5MicrotaskUsage,
|
|
20
|
+
validateResolveIOSupportDiagnosisGate
|
|
21
|
+
} from '../src/util/support-runner-v5';
|
|
22
|
+
|
|
23
|
+
const initialized = initializeResolveIOSupportV5State({
|
|
24
|
+
jobId: 'job-1',
|
|
25
|
+
ticketId: 'ticket-1',
|
|
26
|
+
ticketNumber: '004999',
|
|
27
|
+
title: 'Support ticket #004999',
|
|
28
|
+
description: 'Fix BOL driver display and QA it.',
|
|
29
|
+
approvedScopeRequirements: ['BOL driver display', 'disabled driver canonical rejection'],
|
|
30
|
+
prBranch: 'feature/support-004999',
|
|
31
|
+
buildThreadKey: 'support:ticket-1:job:job-1:build',
|
|
32
|
+
qaThreadKey: 'support:ticket-1:job:job-1:qa',
|
|
33
|
+
now: '2026-06-06T00:00:00.000Z'
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
assert.equal(initialized.supportWorkflowVersion, 'v5');
|
|
37
|
+
assert.equal(initialized.supportV5SupervisorState.noEmailUnlessApproved, true);
|
|
38
|
+
assert.equal(initialized.supportV5LaneMemory.build.model, 'gpt-5.3-codex');
|
|
39
|
+
assert.equal(initialized.supportV5LaneMemory.qa.model, 'gpt-5.4-mini');
|
|
40
|
+
assert.equal(initialized.supportV5LaneMemory.build.threadKey, 'support:ticket-1:job:job-1:build');
|
|
41
|
+
assert.match(initialized.supportV5SupervisorState.approvedScope, /BOL driver display/);
|
|
42
|
+
assert.ok(initialized.supportV5MicrotaskLedger.length >= 4);
|
|
43
|
+
assert.equal(initialized.supportV5MicrotaskLedger[0].type, 'diagnosis_gate');
|
|
44
|
+
assert.equal(initialized.supportV5MicrotaskLedger[0].lane, 'build');
|
|
45
|
+
assert.equal(initialized.supportV5MicrotaskLedger[1].lane, 'build');
|
|
46
|
+
assert.equal(initialized.supportV5MicrotaskLedger[2].lane, 'qa');
|
|
47
|
+
assert.equal(initialized.supportV5MicrotaskLedger[0].threadKey, 'support:ticket-1:job:job-1:build');
|
|
48
|
+
assert.equal(initialized.supportV5MicrotaskLedger[2].threadKey, 'support:ticket-1:job:job-1:qa');
|
|
49
|
+
assert.equal(initialized.supportV5ActiveMicrotaskId, initialized.supportV5MicrotaskLedger[0].microtaskId);
|
|
50
|
+
assert.equal(selectResolveIOSupportV5ActiveMicrotask(initialized.supportV5MicrotaskLedger)?.type, 'diagnosis_gate');
|
|
51
|
+
assert.match(initialized.supportV5ScopeDigest || '', /Approved scope/);
|
|
52
|
+
assert.equal(validateResolveIOSupportDiagnosisGate(initialized.supportV5DiagnosisGate).valid, false);
|
|
53
|
+
assert.deepEqual(initialized.supportV5RecoveryDispatchHistory, []);
|
|
54
|
+
assert.equal(initialized.supportV5RecoveryDirective, undefined);
|
|
55
|
+
|
|
56
|
+
const validDiagnosis = {
|
|
57
|
+
issue_case: {
|
|
58
|
+
customer_complaint: 'Disabled drivers appear in the BOL driver dropdown.',
|
|
59
|
+
expected_result: 'Disabled drivers are excluded or rejected.',
|
|
60
|
+
observed_result: 'Disabled driver can be selected.',
|
|
61
|
+
route_module: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
62
|
+
account_customer_context: '004999 reporter, truck treating route fixture',
|
|
63
|
+
reproduction_status: 'reproduced' as const
|
|
64
|
+
},
|
|
65
|
+
issue_class: 'filter_query_mismatch' as const,
|
|
66
|
+
accepted_hypothesis: {
|
|
67
|
+
statement: 'The driver dropdown publication does not filter disabled users.',
|
|
68
|
+
falsifiable_test: 'Inspect the publication/method query and run the dropdown with a disabled driver fixture.',
|
|
69
|
+
evidence: ['Ticket names disabled driver selection.', 'Publication path returns drivers without active filter.']
|
|
70
|
+
},
|
|
71
|
+
rejected_alternatives: ['Route auth failure rejected because the BOL page hydrates.', 'Pure CSS issue rejected because persisted selected id changes.'],
|
|
72
|
+
failing_path: {
|
|
73
|
+
frontend: 'geochem/angular/app/bol/new/bol-new.component.ts driver select',
|
|
74
|
+
backend: 'geochem/server/src/publications/drivers.ts',
|
|
75
|
+
description: 'Frontend driver select consumes an unfiltered backend driver list.'
|
|
76
|
+
},
|
|
77
|
+
owner_files: [
|
|
78
|
+
'geochem/angular/app/bol/new/bol-new.component.ts',
|
|
79
|
+
'geochem/server/src/publications/drivers.ts'
|
|
80
|
+
],
|
|
81
|
+
proof_plan: {
|
|
82
|
+
before: 'Seed/identify a disabled driver available to the BOL route.',
|
|
83
|
+
action: 'Open the BOL route, open the driver dropdown, and attempt selecting the disabled driver.',
|
|
84
|
+
after: 'Disabled driver is absent or rejected and the active driver remains selected.',
|
|
85
|
+
business_assertion: 'Disabled driver cannot replace the selected active driver.',
|
|
86
|
+
route: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
87
|
+
data_assertion: 'Persisted BOL driver id remains active after save attempt.',
|
|
88
|
+
business_proof_contract: {
|
|
89
|
+
issue_class: 'filter_query_mismatch' as const,
|
|
90
|
+
setup_state: 'A BOL route has one active driver and one disabled driver in the candidate dataset.',
|
|
91
|
+
action_under_test: 'Open the driver dropdown and attempt to choose the disabled driver.',
|
|
92
|
+
expected_business_state_change: 'The disabled driver is excluded or rejected while the active driver remains selected.',
|
|
93
|
+
prohibited_false_pass: 'Route load, screenshot visibility, or a populated dropdown alone is not acceptance.',
|
|
94
|
+
proof_artifacts: ['browser trace', 'dropdown DOM snapshot', 'persisted BOL driver id check'],
|
|
95
|
+
data_or_dom_assertion: 'The disabled driver option is absent or blocked and the saved BOL driver id remains active.'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
evidence: [{ type: 'code' as const, summary: 'Publication lacks disabled-user filter.' }],
|
|
99
|
+
status: 'passed' as const
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const validDiagnosisResult = validateResolveIOSupportDiagnosisGate(validDiagnosis);
|
|
103
|
+
assert.equal(validDiagnosisResult.valid, true);
|
|
104
|
+
assert.equal(validDiagnosisResult.normalized?.status, 'passed');
|
|
105
|
+
assert.equal(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].issue_class, 'filter_query_mismatch');
|
|
106
|
+
assert.match(buildResolveIOSupportIssueClassProbes(validDiagnosis)[0].expected_evidence, /dropdown DOM snapshot/);
|
|
107
|
+
|
|
108
|
+
const blockedDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
109
|
+
...validDiagnosis,
|
|
110
|
+
accepted_hypothesis: { statement: '', falsifiable_test: '', evidence: [] },
|
|
111
|
+
owner_files: ['geochem/angular/app']
|
|
112
|
+
});
|
|
113
|
+
assert.equal(blockedDiagnosis.valid, false);
|
|
114
|
+
assert.ok(blockedDiagnosis.blockers.some((blocker) => /accepted_hypothesis\.statement/.test(blocker)));
|
|
115
|
+
assert.ok(blockedDiagnosis.blockers.some((blocker) => /broad or unsafe/.test(blocker)));
|
|
116
|
+
|
|
117
|
+
const routeOnlyDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
118
|
+
...validDiagnosis,
|
|
119
|
+
proof_plan: {
|
|
120
|
+
before: 'The affected route is available.',
|
|
121
|
+
action: 'Open the support ticket route.',
|
|
122
|
+
after: 'The page loads and is visible.',
|
|
123
|
+
business_assertion: 'The route loads and the page is visible.',
|
|
124
|
+
route: '/support'
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
assert.equal(routeOnlyDiagnosis.valid, false);
|
|
128
|
+
assert.ok(routeOnlyDiagnosis.blockers.some((blocker) => /route-load|screenshot-only|business state/i.test(blocker)));
|
|
129
|
+
|
|
130
|
+
const missingProofContractDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
131
|
+
...validDiagnosis,
|
|
132
|
+
proof_plan: {
|
|
133
|
+
...validDiagnosis.proof_plan,
|
|
134
|
+
business_proof_contract: undefined
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
assert.equal(missingProofContractDiagnosis.valid, false);
|
|
138
|
+
assert.ok(missingProofContractDiagnosis.blockers.some((blocker) => /business_proof_contract is required/.test(blocker)));
|
|
139
|
+
|
|
140
|
+
const mismatchedProofContractDiagnosis = validateResolveIOSupportDiagnosisGate({
|
|
141
|
+
...validDiagnosis,
|
|
142
|
+
proof_plan: {
|
|
143
|
+
...validDiagnosis.proof_plan,
|
|
144
|
+
business_proof_contract: {
|
|
145
|
+
...validDiagnosis.proof_plan.business_proof_contract,
|
|
146
|
+
issue_class: 'upload_import' as const
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
assert.equal(mismatchedProofContractDiagnosis.valid, false);
|
|
151
|
+
assert.ok(mismatchedProofContractDiagnosis.blockers.some((blocker) => /must match diagnosis issue_class/.test(blocker)));
|
|
152
|
+
|
|
153
|
+
const diagnosisJson = JSON.stringify({ support_diagnosis_gate: validDiagnosis });
|
|
154
|
+
assert.equal(extractResolveIOSupportDiagnosisGateFromText(`\`\`\`json\n${diagnosisJson}\n\`\`\``)?.issue_class, 'filter_query_mismatch');
|
|
155
|
+
|
|
156
|
+
const diagnosedBundle = recordResolveIOSupportV5Step(initialized, {
|
|
157
|
+
stepType: 'diagnosis_gate',
|
|
158
|
+
outcome: 'pass',
|
|
159
|
+
lane: 'build',
|
|
160
|
+
summary: diagnosisJson,
|
|
161
|
+
diagnosisGate: validDiagnosis,
|
|
162
|
+
now: '2026-06-06T00:00:30.000Z'
|
|
163
|
+
});
|
|
164
|
+
assert.equal(diagnosedBundle.supportV5DiagnosisGate?.status, 'passed');
|
|
165
|
+
assert.deepEqual(diagnosedBundle.supportV5MicrotaskLedger[1].targetFiles, validDiagnosis.owner_files);
|
|
166
|
+
assert.equal(diagnosedBundle.supportV5LaneMemory.qa.activeQaRow?.workflow, validDiagnosis.proof_plan.business_proof_contract.action_under_test);
|
|
167
|
+
assert.equal(diagnosedBundle.supportV5LaneMemory.qa.activeQaRow?.assertion, validDiagnosis.proof_plan.business_proof_contract.data_or_dom_assertion);
|
|
168
|
+
assert.equal(diagnosedBundle.supportV5RecoveryPlan?.recoveryClass, 'advance_after_proof');
|
|
169
|
+
assert.equal(diagnosedBundle.supportV5RecoveryCheckpoint?.recoveryClass, 'advance_after_proof');
|
|
170
|
+
assert.equal(diagnosedBundle.supportV5RecoveryAction?.checkpointId, diagnosedBundle.supportV5RecoveryCheckpoint?.checkpointId);
|
|
171
|
+
const diagnosisMicrotaskId = diagnosedBundle.supportV5MicrotaskLedger.find((task) => task.type === 'diagnosis_gate')?.microtaskId;
|
|
172
|
+
const buildMicrotasksAfterDiagnosis = diagnosedBundle.supportV5MicrotaskLedger.filter((task) => task.lane === 'build' && task.type !== 'diagnosis_gate');
|
|
173
|
+
assert.ok(diagnosisMicrotaskId);
|
|
174
|
+
assert.ok(buildMicrotasksAfterDiagnosis.length > 0);
|
|
175
|
+
assert.ok(buildMicrotasksAfterDiagnosis.every((task) => task.dependsOn.includes(diagnosisMicrotaskId || '')));
|
|
176
|
+
assert.ok(buildMicrotasksAfterDiagnosis.every((task) => task.dependsOn.length === new Set(task.dependsOn).size));
|
|
177
|
+
assert.equal(changedFilesOutsideResolveIOSupportDiagnosisOwnerFiles(validDiagnosis, [
|
|
178
|
+
'geochem/angular/app/bol/new/bol-new.component.ts',
|
|
179
|
+
'geochem/server/src/methods/unrelated.ts'
|
|
180
|
+
]).length, 1);
|
|
181
|
+
const missingDiagnosisRepairGate = decideResolveIOSupportV5RepairGate({
|
|
182
|
+
diagnosisGate: undefined,
|
|
183
|
+
activeStepType: 'build_repair'
|
|
184
|
+
});
|
|
185
|
+
assert.equal(missingDiagnosisRepairGate.action, 'diagnose_only');
|
|
186
|
+
assert.equal(missingDiagnosisRepairGate.recoveryPlan.recoveryClass, 'diagnosis_only');
|
|
187
|
+
assert.equal(missingDiagnosisRepairGate.recoveryPlan.productRepairAllowed, false);
|
|
188
|
+
assert.ok(missingDiagnosisRepairGate.recoveryPlan.requiredEvidence.includes('accepted_hypothesis'));
|
|
189
|
+
assert.equal(missingDiagnosisRepairGate.recoveryCheckpoint.recoveryClass, 'diagnosis_only');
|
|
190
|
+
assert.equal(missingDiagnosisRepairGate.recoveryCheckpoint.productRepairAllowed, false);
|
|
191
|
+
const allowedRepairGate = decideResolveIOSupportV5RepairGate({
|
|
192
|
+
diagnosisGate: validDiagnosis,
|
|
193
|
+
activeStepType: 'build_repair',
|
|
194
|
+
changedFiles: ['geochem/angular/app/bol/new/bol-new.component.ts']
|
|
195
|
+
});
|
|
196
|
+
assert.equal(allowedRepairGate.action, 'allow_product_repair');
|
|
197
|
+
assert.equal(allowedRepairGate.recoveryPlan.recoveryClass, 'product_code_repair');
|
|
198
|
+
assert.equal(allowedRepairGate.recoveryPlan.productRepairAllowed, true);
|
|
199
|
+
assert.equal(allowedRepairGate.recoveryCheckpoint.recoveryClass, 'product_code_repair');
|
|
200
|
+
assert.equal(allowedRepairGate.recoveryCheckpoint.productRepairAllowed, true);
|
|
201
|
+
const outOfScopeRepairGate = decideResolveIOSupportV5RepairGate({
|
|
202
|
+
diagnosisGate: validDiagnosis,
|
|
203
|
+
activeStepType: 'build_repair',
|
|
204
|
+
changedFiles: ['geochem/server/src/methods/unrelated.ts']
|
|
205
|
+
});
|
|
206
|
+
assert.equal(outOfScopeRepairGate.action, 'reject_out_of_scope');
|
|
207
|
+
assert.equal(outOfScopeRepairGate.recoveryPlan.recoveryClass, 'diagnosis_revision');
|
|
208
|
+
assert.ok(outOfScopeRepairGate.recoveryPlan.forbiddenActions.some((action) => /outside owner_files/.test(action)));
|
|
209
|
+
const infraRepairGate = decideResolveIOSupportV5RepairGate({
|
|
210
|
+
diagnosisGate: validDiagnosis,
|
|
211
|
+
activeStepType: 'build_repair',
|
|
212
|
+
failureClass: 'infra',
|
|
213
|
+
blocker: 'Puppeteer failed to launch.'
|
|
214
|
+
});
|
|
215
|
+
assert.equal(infraRepairGate.action, 'infra_repair_only');
|
|
216
|
+
assert.equal(infraRepairGate.recoveryPlan.recoveryClass, 'infra_repair');
|
|
217
|
+
assert.equal(infraRepairGate.recoveryPlan.expensiveModelAllowed, false);
|
|
218
|
+
assert.ok(infraRepairGate.recoveryPlan.forbiddenActions.some((action) => /product-code model repair/.test(action)));
|
|
219
|
+
assert.equal(infraRepairGate.recoveryCheckpoint.recoveryClass, 'infra_repair');
|
|
220
|
+
assert.equal(infraRepairGate.recoveryCheckpoint.productRepairAllowed, false);
|
|
221
|
+
const repeatedRepairGate = decideResolveIOSupportV5RepairGate({
|
|
222
|
+
diagnosisGate: validDiagnosis,
|
|
223
|
+
activeStepType: 'build_repair',
|
|
224
|
+
failureClass: 'product_code',
|
|
225
|
+
blocker: 'same blocker',
|
|
226
|
+
evidenceHash: 'same',
|
|
227
|
+
history: [
|
|
228
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '1' },
|
|
229
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '2' }
|
|
230
|
+
],
|
|
231
|
+
maxRepeatedNoProgress: 2
|
|
232
|
+
});
|
|
233
|
+
assert.equal(repeatedRepairGate.action, 'park_repeated_failure');
|
|
234
|
+
assert.equal(repeatedRepairGate.recoveryPlan.recoveryClass, 'blocked_until_new_evidence');
|
|
235
|
+
assert.ok(repeatedRepairGate.recoveryPlan.loopResetEvidence.some((evidence) => /changed evidence hash/.test(evidence)));
|
|
236
|
+
assert.equal(repeatedRepairGate.recoveryCheckpoint.status, 'parked');
|
|
237
|
+
assert.equal(repeatedRepairGate.recoveryCheckpoint.allowedAction, 'collect_new_evidence_only');
|
|
238
|
+
assert.equal(repeatedRepairGate.recoveryEvidenceProbe.evidenceOnly, true);
|
|
239
|
+
assert.equal(repeatedRepairGate.recoveryEvidenceProbe.productRepairAllowed, false);
|
|
240
|
+
assert.ok(repeatedRepairGate.recoveryEvidenceProbe.steps.some((step) => step.kind === 'rerun_same_gate'));
|
|
241
|
+
assert.equal(repeatedRepairGate.recoveryAction.mode, 'collect_evidence');
|
|
242
|
+
assert.equal(repeatedRepairGate.recoveryAction.productRepairAllowed, false);
|
|
243
|
+
assert.equal(repeatedRepairGate.recoveryAction.retryPolicy.requireNewEvidence, true);
|
|
244
|
+
|
|
245
|
+
const withFailure = recordResolveIOSupportV5Step(initialized, {
|
|
246
|
+
stepType: 'qa_row',
|
|
247
|
+
outcome: 'needs_repair',
|
|
248
|
+
lane: 'qa',
|
|
249
|
+
model: 'gpt-5.4-mini',
|
|
250
|
+
threadKey: 'support:ticket-1:job:job-1:qa',
|
|
251
|
+
promptTokenEstimate: 1200,
|
|
252
|
+
runtimeMs: 45000,
|
|
253
|
+
summary: 'Row 2 failed.',
|
|
254
|
+
blocker: 'Screenshot shell-only for row 2',
|
|
255
|
+
artifactPaths: ['qa-artifacts/row-2.jpg'],
|
|
256
|
+
activeQaRow: {
|
|
257
|
+
index: 2,
|
|
258
|
+
workflow: 'Disabled driver cannot replace selected active driver',
|
|
259
|
+
route: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
260
|
+
status: 'failed'
|
|
261
|
+
},
|
|
262
|
+
now: '2026-06-06T00:01:00.000Z'
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
assert.equal(withFailure.supportV5StepHistory.length, 1);
|
|
266
|
+
assert.equal(withFailure.supportV5Budget.loopCount, 1);
|
|
267
|
+
assert.equal(withFailure.supportV5LaneMemory.qa.activeBlocker, 'Screenshot shell-only for row 2');
|
|
268
|
+
assert.equal(withFailure.supportV5SupervisorState.currentQaRow?.index, 2);
|
|
269
|
+
assert.deepEqual(decideResolveIOSupportV5Continuation(withFailure).action, 'continue');
|
|
270
|
+
|
|
271
|
+
let repeated = withFailure;
|
|
272
|
+
repeated = recordResolveIOSupportV5Step(repeated, {
|
|
273
|
+
stepType: 'qa_row',
|
|
274
|
+
outcome: 'needs_repair',
|
|
275
|
+
lane: 'qa',
|
|
276
|
+
blocker: 'Screenshot shell-only for row 2',
|
|
277
|
+
summary: 'Still shell-only.',
|
|
278
|
+
now: '2026-06-06T00:02:00.000Z'
|
|
279
|
+
});
|
|
280
|
+
repeated = recordResolveIOSupportV5Step(repeated, {
|
|
281
|
+
stepType: 'qa_row',
|
|
282
|
+
outcome: 'needs_repair',
|
|
283
|
+
lane: 'qa',
|
|
284
|
+
blocker: 'Screenshot shell-only for row 2',
|
|
285
|
+
summary: 'Still shell-only again.',
|
|
286
|
+
now: '2026-06-06T00:03:00.000Z'
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
const repeatedDecision = decideResolveIOSupportV5Continuation(repeated);
|
|
290
|
+
assert.equal(repeatedDecision.action, 'park');
|
|
291
|
+
assert.equal(repeatedDecision.reason, 'support_v5_repeated_no_progress');
|
|
292
|
+
assert.equal(repeatedDecision.recoveryPlan.recoveryClass, 'blocked_until_new_evidence');
|
|
293
|
+
assert.equal(repeatedDecision.recoveryPlan.allowedAction, 'collect_new_evidence_only');
|
|
294
|
+
assert.equal(repeatedDecision.recoveryCheckpoint.status, 'parked');
|
|
295
|
+
assert.equal(repeatedDecision.recoveryCheckpoint.allowedAction, 'collect_new_evidence_only');
|
|
296
|
+
assert.equal(repeatedDecision.recoveryEvidenceProbe.evidenceOnly, true);
|
|
297
|
+
assert.equal(repeatedDecision.recoveryEvidenceProbe.productRepairAllowed, false);
|
|
298
|
+
assert.ok(repeatedDecision.recoveryEvidenceProbe.acceptanceEvidence.some((evidence) => /changed evidence hash|new artifact path/i.test(evidence)));
|
|
299
|
+
assert.equal(repeatedDecision.recoveryAction.mode, 'collect_evidence');
|
|
300
|
+
assert.equal(repeatedDecision.recoveryAction.retryPolicy.requireNewEvidence, true);
|
|
301
|
+
assert.ok(repeatedDecision.recoveryAction.requiredArtifacts.length > 0);
|
|
302
|
+
|
|
303
|
+
const repeatedProductFailure = decideResolveIOSupportV5RepeatedFailureStop({
|
|
304
|
+
history: [
|
|
305
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '1' },
|
|
306
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'same', recordedAt: '2' }
|
|
307
|
+
],
|
|
308
|
+
failureClass: 'product_code',
|
|
309
|
+
blocker: 'same blocker',
|
|
310
|
+
evidenceHash: 'same',
|
|
311
|
+
limit: 2
|
|
312
|
+
});
|
|
313
|
+
assert.equal(repeatedProductFailure.shouldStop, true);
|
|
314
|
+
const repeatedInfraFailure = decideResolveIOSupportV5RepeatedFailureStop({
|
|
315
|
+
history: [
|
|
316
|
+
{ stepType: 'compile_check', outcome: 'needs_repair', lane: 'build', summary: 'same', failureClass: 'infra', blocker: 'puppeteer missing', evidenceHash: 'same', recordedAt: '1' }
|
|
317
|
+
],
|
|
318
|
+
failureClass: 'infra',
|
|
319
|
+
blocker: 'puppeteer missing',
|
|
320
|
+
evidenceHash: 'same',
|
|
321
|
+
limit: 1
|
|
322
|
+
});
|
|
323
|
+
assert.equal(repeatedInfraFailure.shouldStop, false);
|
|
324
|
+
|
|
325
|
+
let repeatedInfraBundle = diagnosedBundle;
|
|
326
|
+
repeatedInfraBundle = recordResolveIOSupportV5Step(repeatedInfraBundle, {
|
|
327
|
+
stepType: 'compile_check',
|
|
328
|
+
outcome: 'needs_repair',
|
|
329
|
+
lane: 'build',
|
|
330
|
+
failureClass: 'infra',
|
|
331
|
+
blocker: 'Puppeteer executable missing.',
|
|
332
|
+
evidenceHash: 'same-infra',
|
|
333
|
+
now: '2026-06-06T00:03:10.000Z'
|
|
334
|
+
});
|
|
335
|
+
repeatedInfraBundle = recordResolveIOSupportV5Step(repeatedInfraBundle, {
|
|
336
|
+
stepType: 'compile_check',
|
|
337
|
+
outcome: 'needs_repair',
|
|
338
|
+
lane: 'build',
|
|
339
|
+
failureClass: 'infra',
|
|
340
|
+
blocker: 'Puppeteer executable missing.',
|
|
341
|
+
evidenceHash: 'same-infra',
|
|
342
|
+
now: '2026-06-06T00:03:20.000Z'
|
|
343
|
+
});
|
|
344
|
+
repeatedInfraBundle = recordResolveIOSupportV5Step(repeatedInfraBundle, {
|
|
345
|
+
stepType: 'compile_check',
|
|
346
|
+
outcome: 'needs_repair',
|
|
347
|
+
lane: 'build',
|
|
348
|
+
failureClass: 'infra',
|
|
349
|
+
blocker: 'Puppeteer executable missing.',
|
|
350
|
+
evidenceHash: 'same-infra',
|
|
351
|
+
now: '2026-06-06T00:03:30.000Z'
|
|
352
|
+
});
|
|
353
|
+
const repeatedInfraContinuation = decideResolveIOSupportV5Continuation(repeatedInfraBundle);
|
|
354
|
+
assert.equal(repeatedInfraContinuation.action, 'continue');
|
|
355
|
+
assert.equal(repeatedInfraContinuation.reason, 'support_v5_infra_or_compile_repair_required');
|
|
356
|
+
assert.equal(repeatedInfraContinuation.recoveryPlan.recoveryClass, 'infra_repair');
|
|
357
|
+
assert.equal(repeatedInfraContinuation.recoveryPlan.productRepairAllowed, false);
|
|
358
|
+
|
|
359
|
+
const sameBlockerNewEvidence = decideResolveIOSupportV5RepeatedFailureStop({
|
|
360
|
+
history: [
|
|
361
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same root issue', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'before-fix-log', recordedAt: '1' },
|
|
362
|
+
{ stepType: 'build_repair', outcome: 'needs_repair', lane: 'build', summary: 'same root issue', failureClass: 'product_code', blocker: 'same blocker', evidenceHash: 'after-targeted-fix-log', recordedAt: '2' }
|
|
363
|
+
],
|
|
364
|
+
failureClass: 'product_code',
|
|
365
|
+
blocker: 'same blocker',
|
|
366
|
+
evidenceHash: 'after-targeted-fix-log',
|
|
367
|
+
limit: 2
|
|
368
|
+
});
|
|
369
|
+
assert.equal(sameBlockerNewEvidence.shouldStop, false);
|
|
370
|
+
|
|
371
|
+
const pingPongFailure = decideResolveIOSupportV5RepeatedFailureStop({
|
|
372
|
+
history: [
|
|
373
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter excludes active customers', failureClass: 'business', blocker: 'Filter excludes active customers', evidenceHash: 'a', recordedAt: '1' },
|
|
374
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter includes inactive customers', failureClass: 'business', blocker: 'Filter includes inactive customers', evidenceHash: 'b', recordedAt: '2' },
|
|
375
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter excludes active customers', failureClass: 'business', blocker: 'Filter excludes active customers', evidenceHash: 'a', recordedAt: '3' },
|
|
376
|
+
{ stepType: 'qa_row', outcome: 'needs_repair', lane: 'qa', summary: 'Filter includes inactive customers', failureClass: 'business', blocker: 'Filter includes inactive customers', evidenceHash: 'b', recordedAt: '4' }
|
|
377
|
+
],
|
|
378
|
+
failureClass: 'business',
|
|
379
|
+
blocker: 'Filter includes inactive customers',
|
|
380
|
+
evidenceHash: 'b',
|
|
381
|
+
limit: 3
|
|
382
|
+
});
|
|
383
|
+
assert.equal(pingPongFailure.shouldStop, true);
|
|
384
|
+
assert.equal(pingPongFailure.reason, 'support_v5_ping_pong_failure_loop');
|
|
385
|
+
|
|
386
|
+
const budgeted = recordResolveIOSupportV5Step(initialized, {
|
|
387
|
+
stepType: 'build_repair',
|
|
388
|
+
outcome: 'needs_repair',
|
|
389
|
+
lane: 'build',
|
|
390
|
+
promptTokenEstimate: 1900,
|
|
391
|
+
blocker: 'Prompt was too broad for a repair step.',
|
|
392
|
+
now: '2026-06-06T00:04:00.000Z'
|
|
393
|
+
});
|
|
394
|
+
assert.equal(decideResolveIOSupportV5Continuation(budgeted).reason, 'support_v5_budget_guard');
|
|
395
|
+
assert.equal(decideResolveIOSupportV5Continuation(budgeted).recoveryPlan.recoveryClass, 'manual_handoff');
|
|
396
|
+
|
|
397
|
+
const prompt = buildResolveIOSupportV5DiagnoseFirstPrompt({
|
|
398
|
+
goal: initialized.supportV5SupervisorState.currentGoal,
|
|
399
|
+
activeStep: 'qa_row',
|
|
400
|
+
activeBlocker: 'Route failed to hydrate.',
|
|
401
|
+
lane: 'qa',
|
|
402
|
+
currentQaRow: withFailure.supportV5SupervisorState.currentQaRow,
|
|
403
|
+
artifactPaths: ['qa-artifacts/client.log'],
|
|
404
|
+
changedFiles: ['geochem/angular/app/bol/new/bol-new.component.ts']
|
|
405
|
+
}).join('\n');
|
|
406
|
+
|
|
407
|
+
assert.match(prompt, /Diagnose First/);
|
|
408
|
+
assert.match(prompt, /Do not send customer email/);
|
|
409
|
+
assert.match(prompt, /Current QA row/);
|
|
410
|
+
assert.match(prompt, /geochem\/angular\/app\/bol\/new\/bol-new\.component\.ts/);
|
|
411
|
+
|
|
412
|
+
assert.equal(
|
|
413
|
+
fingerprintResolveIOSupportV5Blocker('Line 123 failed for 6a239cd7d67a2b24b36f3dfe'),
|
|
414
|
+
fingerprintResolveIOSupportV5Blocker('Line 456 failed for abcdefabcdefabcdef')
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
const incident = buildResolveIOSupportV5Incident({
|
|
418
|
+
incidentClass: 'false_screenshot_rejection',
|
|
419
|
+
summary: 'Sparse but valid BOL detail screen was rejected by file-size gate.',
|
|
420
|
+
stepType: 'artifact_package',
|
|
421
|
+
blocker: 'screenshot shell-only',
|
|
422
|
+
artifactPaths: ['qa-artifacts/row-2.jpg'],
|
|
423
|
+
now: '2026-06-06T00:05:00.000Z'
|
|
424
|
+
});
|
|
425
|
+
assert.equal(incident.incidentClass, 'false_screenshot_rejection');
|
|
426
|
+
assert.ok(incident.blockerFingerprint);
|
|
427
|
+
|
|
428
|
+
const microtaskPrompt = buildResolveIOSupportV5MicrotaskPrompt({
|
|
429
|
+
bundle: diagnosedBundle,
|
|
430
|
+
lane: 'build',
|
|
431
|
+
stage: 'support-autonomous-owner',
|
|
432
|
+
failureText: 'QA row failed because the driver dropdown still includes disabled drivers.',
|
|
433
|
+
changedFiles: ['geochem/angular/app/bol/new/bol-new.component.ts'],
|
|
434
|
+
contextSnippets: ['Workspace root: /var/ai-workspace/job-1', 'Project root: geochem']
|
|
435
|
+
});
|
|
436
|
+
assert.equal(microtaskPrompt.activeMicrotask?.lane, 'build');
|
|
437
|
+
assert.equal(microtaskPrompt.withinHardCap, true);
|
|
438
|
+
assert.ok(microtaskPrompt.promptTokenEstimate <= buildResolveIOSupportV5PromptBudget().buildMicrotaskHardCap);
|
|
439
|
+
assert.match(microtaskPrompt.prompt, /Microtask id:/);
|
|
440
|
+
assert.match(microtaskPrompt.prompt, /persistent lane thread/);
|
|
441
|
+
assert.match(microtaskPrompt.prompt, /Diagnosis issue class: filter_query_mismatch/);
|
|
442
|
+
assert.doesNotMatch(microtaskPrompt.prompt, /Initial ticket context:/);
|
|
443
|
+
assert.doesNotMatch(microtaskPrompt.prompt, /Staged support context:/);
|
|
444
|
+
assert.doesNotMatch(microtaskPrompt.prompt, /BUILD_PLAN/);
|
|
445
|
+
|
|
446
|
+
const qaPrompt = buildResolveIOSupportV5MicrotaskPrompt({
|
|
447
|
+
bundle: {
|
|
448
|
+
...diagnosedBundle,
|
|
449
|
+
supportV5ActiveMicrotaskId: diagnosedBundle.supportV5MicrotaskLedger.find((task) => task.lane === 'qa')?.microtaskId
|
|
450
|
+
},
|
|
451
|
+
lane: 'qa',
|
|
452
|
+
stage: 'support-qa-validation',
|
|
453
|
+
activeQaRow: {
|
|
454
|
+
index: 0,
|
|
455
|
+
workflow: 'BOL driver display',
|
|
456
|
+
route: '/dashboard/driver/truck-treating/bol-detail/bol/route',
|
|
457
|
+
assertion: 'Disabled driver is rejected',
|
|
458
|
+
status: 'pending'
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
assert.equal(qaPrompt.activeMicrotask?.lane, 'qa');
|
|
462
|
+
assert.ok(qaPrompt.promptTokenEstimate <= buildResolveIOSupportV5PromptBudget().qaMicrotaskHardCap);
|
|
463
|
+
assert.match(qaPrompt.prompt, /Return strict JSON only/);
|
|
464
|
+
|
|
465
|
+
const usageBundle = recordResolveIOSupportV5MicrotaskUsage(initialized, {
|
|
466
|
+
microtaskId: initialized.supportV5MicrotaskLedger[0].microtaskId,
|
|
467
|
+
lane: 'build',
|
|
468
|
+
model: 'gpt-5.3-codex',
|
|
469
|
+
threadKey: initialized.supportV5LaneMemory.build.threadKey,
|
|
470
|
+
reuseThread: true,
|
|
471
|
+
promptTokenEstimate: microtaskPrompt.promptTokenEstimate,
|
|
472
|
+
promptSections: microtaskPrompt.promptSections,
|
|
473
|
+
outcome: 'pass'
|
|
474
|
+
});
|
|
475
|
+
const usageSummary = summarizeResolveIOSupportV5MicrotaskUsage(usageBundle);
|
|
476
|
+
assert.equal(usageSummary.byMicrotask.length, 1);
|
|
477
|
+
assert.ok(usageSummary.bySection.some((section) => section.name === 'active_microtask'));
|
|
478
|
+
assert.equal(usageSummary.broadPromptViolations.length, 0);
|
|
479
|
+
|
|
480
|
+
const digest = buildResolveIOSupportV5ScopeDigest({
|
|
481
|
+
goal: 'Resolve support ticket 004999',
|
|
482
|
+
approvedScope: ['A'.repeat(2000), 'B'.repeat(2000)],
|
|
483
|
+
prBranch: 'support-004999',
|
|
484
|
+
maxTokens: 200
|
|
485
|
+
});
|
|
486
|
+
assert.ok(digest.length <= 800);
|
|
487
|
+
|
|
488
|
+
console.log('support runner v5 tests passed');
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./dist/out-tsc",
|
|
5
|
+
"sourceMap": true,
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"inlineSources": true,
|
|
9
|
+
"baseUrl": ".",
|
|
10
|
+
"module": "commonjs",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"emitDecoratorMetadata": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"target": "es5",
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"stripInternal": true,
|
|
17
|
+
"noImplicitAny": false,
|
|
18
|
+
"downlevelIteration": true,
|
|
19
|
+
"typeRoots": [
|
|
20
|
+
"node_modules/@types"
|
|
21
|
+
],
|
|
22
|
+
"lib": [
|
|
23
|
+
"es2017",
|
|
24
|
+
"dom"
|
|
25
|
+
],
|
|
26
|
+
"noImplicitReturns": true
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"./**/*.ts"
|
|
30
|
+
],
|
|
31
|
+
"exclude": [
|
|
32
|
+
"node_modules"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type AiAssistantCoreTermHint = {
|
|
2
|
-
terms: string[];
|
|
3
|
-
collections: string[];
|
|
4
|
-
};
|
|
5
|
-
export declare const AI_ASSISTANT_CORE_HEURISTICS: Readonly<{
|
|
6
|
-
version: 3;
|
|
7
|
-
collection_aliases: Record<string, string>;
|
|
8
|
-
collection_alias_options: Record<string, string[]>;
|
|
9
|
-
collection_term_hints: AiAssistantCoreTermHint[];
|
|
10
|
-
}>;
|
|
11
|
-
export {};
|