@tea-agent/loop-agent 0.1.0-fe-test.3 → 0.1.0-fe-test.5
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/AGENTS.md +6 -3
- package/CHANGELOG.md +607 -93
- package/README.md +11 -5
- package/bin/loop-agent.js +7 -3
- package/dist/adapters/context-transfer/optional-pi-handoff.js +31 -0
- package/dist/adapters/context-transfer/pi-session.js +61 -0
- package/dist/application/dag/generate-task-dag.js +90 -21
- package/dist/application/dag/run-dag.js +41 -0
- package/dist/application/task-lifecycle/advance.js +40 -5
- package/dist/application/task-lifecycle/observe.js +171 -17
- package/dist/application/task-lifecycle/plan-transitions.js +42 -7
- package/dist/application/task-lifecycle/recommendations.js +13 -2
- package/dist/build-stamp.json +3 -3
- package/dist/cli/command-definitions.js +44 -10
- package/dist/cli/program.js +82 -6
- package/dist/cli/update/notifier.js +2 -2
- package/dist/cli/update/runtime-activity.js +1 -29
- package/dist/cli.js +2 -1
- package/dist/commands/client-recovery.js +11 -36
- package/dist/commands/dag-artifact.js +284 -0
- package/dist/commands/dag-context.js +184 -0
- package/dist/commands/dag-follow-up.js +138 -0
- package/dist/commands/dag-rerun-task.js +2 -0
- package/dist/commands/dag-rerun.js +261 -2
- package/dist/commands/init-model-catalog.js +486 -0
- package/dist/commands/init-upgrade.js +265 -97
- package/dist/commands/init.js +455 -28
- package/dist/commands/inspect-next.js +8 -0
- package/dist/commands/task-advance.js +73 -1
- package/dist/commands/task-source-prepare.js +5 -0
- package/dist/commands/task-status.js +1 -0
- package/dist/executors/dag-pi-executor.js +4323 -231
- package/dist/executors/pi-event-serializer.js +42 -1
- package/dist/executors/pi-executor.js +70 -6
- package/dist/executors/pi-extension-resolver.js +245 -0
- package/dist/executors/pi-playwright-cli-tool.js +74 -28
- package/dist/executors/pi-read-budget-policy.js +239 -0
- package/dist/executors/pi-sdk-executor.js +263 -59
- package/dist/executors/pi-writer-tool-policy.js +57 -1
- package/dist/executors/shell-executor.js +1456 -240
- package/dist/executors/shell-write-guard.js +14 -0
- package/dist/executors/workspace-write-snapshot.js +68 -0
- package/dist/governance/checks.js +1 -0
- package/dist/{worker → infrastructure}/console/app-data.js +4 -0
- package/dist/infrastructure/console/artifact-revision-store.js +430 -0
- package/dist/infrastructure/console/context-export-store.js +160 -0
- package/dist/infrastructure/console/dir-lock.js +132 -0
- package/dist/infrastructure/console/operation-store.js +417 -0
- package/dist/infrastructure/harness/artifact-store.js +10 -1
- package/dist/infrastructure/harness/atomic-write.js +35 -2
- package/dist/shared/context-transfer/artifact-revision.js +172 -0
- package/dist/shared/context-transfer.js +418 -0
- package/dist/shared/dag-failure-category.js +150 -0
- package/dist/shared/dag-prompt-override.js +27 -0
- package/dist/shared/openspec-spec.js +70 -4
- package/dist/shared/operator/capabilities.js +65 -4
- package/dist/shared/operator/safe-run-summary.js +1 -0
- package/dist/shared/path-safety.js +93 -0
- package/dist/shared/pi-context-pressure/checkpoint.js +116 -0
- package/dist/shared/pi-context-pressure/compaction-policy.js +151 -0
- package/dist/shared/pi-context-pressure/env.js +58 -0
- package/dist/shared/pi-context-pressure/extension.js +100 -0
- package/dist/shared/pi-context-pressure/index.js +7 -0
- package/dist/shared/pi-context-pressure/overflow.js +252 -0
- package/dist/shared/pi-context-pressure/sift-bridge.js +386 -0
- package/dist/shared/pi-context-pressure/telemetry.js +51 -0
- package/dist/shared/playwright-cli-command-policy.js +15 -0
- package/dist/shared/preview.js +28 -4
- package/dist/shared/update/console-notifier.js +100 -0
- package/dist/{cli → shared}/update/npm-client.js +70 -15
- package/dist/{cli → shared}/update/state.js +41 -13
- package/dist/task/config-types.js +125 -6
- package/dist/task/contract/adopt.js +4 -0
- package/dist/task/contract/apply.js +11 -1
- package/dist/task/contract/constants.js +3 -0
- package/dist/task/contract/diff.js +26 -0
- package/dist/task/contract/hash.js +3 -0
- package/dist/task/contract/import-revision.js +4 -0
- package/dist/task/contract/observe.js +25 -4
- package/dist/task/contract/paths.js +2 -1
- package/dist/task/contract/project.js +23 -1
- package/dist/task/contract/schema.js +9 -1
- package/dist/task/contract/transaction.js +12 -0
- package/dist/task/frontend-project-capability.js +203 -20
- package/dist/task/runtime.js +5 -2
- package/dist/task/source-prepare/build-draft.js +18 -3
- package/dist/task/source-prepare/completeness.js +188 -0
- package/dist/task/source-prepare/fragment-inventory.js +513 -0
- package/dist/task/source-prepare/index.js +3 -0
- package/dist/task/source-prepare/ledger-reconciliation.js +127 -0
- package/dist/task/source-prepare/ledger-review.js +214 -0
- package/dist/task/source-prepare/ledger.js +545 -0
- package/dist/task/source-prepare/parse-intent.js +24 -4
- package/dist/task/source-prepare/prepare.js +368 -2
- package/dist/task/source-prepare/semantic-intake.js +25 -5
- package/dist/task/source-prepare/source-fidelity-pi.js +384 -0
- package/dist/task/source-prepare/types.js +22 -0
- package/dist/task/source-references.js +22 -1
- package/dist/task/task-demand-routing.js +3 -0
- package/dist/worker/cli.js +18 -2
- package/dist/worker/console/chat/assistant-content.js +7 -0
- package/dist/worker/console/chat/chat-event-store.js +159 -18
- package/dist/worker/console/chat/chat-ui-policy.js +4 -2
- package/dist/worker/console/chat/context-panel.js +7 -0
- package/dist/worker/console/chat/deferred-turn.js +103 -0
- package/dist/worker/console/chat/goal-round-driver.js +72 -0
- package/dist/worker/console/chat/goals.js +300 -0
- package/dist/worker/console/chat/model-resolver.js +7 -4
- package/dist/worker/console/chat/operation-card.js +8 -1
- package/dist/worker/console/chat/pi-console-config.js +81 -10
- package/dist/worker/console/chat/pi-runtime.js +868 -30
- package/dist/worker/console/chat/provider-error.js +99 -0
- package/dist/worker/console/chat/repo-browser.js +101 -12
- package/dist/worker/console/chat/resource-preferences-store.js +1 -1
- package/dist/worker/console/chat/routes.js +1451 -145
- package/dist/worker/console/chat/sdd-data-alignment.js +222 -0
- package/dist/worker/console/chat/semantic-activity.js +25 -24
- package/dist/worker/console/chat/session-catalog.js +50 -0
- package/dist/worker/console/chat/session-stats.js +275 -0
- package/dist/worker/console/chat/session-store.js +348 -76
- package/dist/worker/console/chat/shortcuts.js +26 -3
- package/dist/worker/console/chat/sift-bridge.js +1 -0
- package/dist/worker/console/chat/todos.js +115 -0
- package/dist/worker/console/chat/tool-preview.js +42 -0
- package/dist/worker/console/chat/turn-process.js +185 -112
- package/dist/worker/console/chat/user-questions.js +266 -0
- package/dist/worker/console/chat/workspace-landing.js +79 -0
- package/dist/worker/console/console-handoff.js +82 -0
- package/dist/worker/console/console-update-and-init.js +115 -0
- package/dist/worker/console/console-update-runtime.js +84 -0
- package/dist/worker/console/context-transfer-diagnostics.js +198 -0
- package/dist/worker/console/dag-confirmation.js +1 -1
- package/dist/worker/console/dag-execution-receipt.js +54 -3
- package/dist/worker/console/doctor.js +1 -1
- package/dist/worker/console/draft-store.js +50 -1
- package/dist/worker/console/frontend-human-decision-adapter.js +19 -0
- package/dist/worker/console/frontend-split-operation-adapter.js +20 -0
- package/dist/worker/console/human-gate-token.js +1 -1
- package/dist/worker/console/index.js +6 -3
- package/dist/worker/console/inspect-split.js +18 -0
- package/dist/worker/console/interview/assessment.js +1 -1
- package/dist/worker/console/interview/session.js +1 -1
- package/dist/worker/console/native-directory-picker.js +13 -0
- package/dist/worker/console/operation-run-facts.js +19 -3
- package/dist/worker/console/operation-runner.js +45 -4
- package/dist/worker/console/operation-sse.js +1 -1
- package/dist/worker/console/operation-wait.js +1 -1
- package/dist/worker/console/operator-actions.js +534 -15
- package/dist/worker/console/operator-selection.js +6 -2
- package/dist/worker/console/operator-surface-health.js +2 -1
- package/dist/worker/console/operator-user-error.js +171 -2
- package/dist/worker/console/pi-plugins.catalog.json +73658 -0
- package/dist/worker/console/pi-plugins.js +238 -0
- package/dist/worker/console/pi-readiness.js +7 -6
- package/dist/worker/console/prd-intake-bridge.js +13 -0
- package/dist/worker/console/recovery-cta.js +4 -4
- package/dist/worker/console/recovery-error-copy.js +4 -4
- package/dist/worker/console/routes.js +1231 -10
- package/dist/worker/console/security.js +102 -13
- package/dist/worker/console/server.js +762 -159
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-BmOEx0gA.js → abnfDiagram-N423BO3Z-BZogYNl1.js} +1 -1
- package/dist/worker/console/static/assets/{arc-BGiVVe8b.js → arc-DcJTLe2v.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-nDdu4rgJ.js → architectureDiagram-T3A2C74G-B39EQQ9n.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-Bb5u0BWf.js → blockDiagram-VBNYF7ZC-CitCGV56.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-BlhC0j94.js → c4Diagram-5PPSVZJV-rvWuOHLG.js} +1 -1
- package/dist/worker/console/static/assets/channel-CXqdP5pW.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-Ai8_qQXI.js → chunk-2GRJ4B5K-DGXplIJs.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-B9gyCjqX.js → chunk-2Q5K7J3B-ur9OqjPn.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-Bzbj3zGH.js → chunk-5RXB4S5H-D1KqU_Vi.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-BT415PvT.js → chunk-5VM5RSS4-BlVZrbtM.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-D_A5_5QL.js → chunk-6Q2QTUOP-BAzz3nQy.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-srJkaP3f.js → chunk-GF5L2VYU-CP_nYuCV.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-UYGvEP4l.js → chunk-JWPE2WC7-CWvKQ80X.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-B8luBrrz.js → chunk-KBJHAD2P-CyUki8wp.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-DN7wXZSq.js → chunk-RYQCIY6F-5NYzNKfY.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-DXKyMuKS.js → chunk-XXDRQBXY-DHdUgjS-.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-D9C3agF7.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-D9C3agF7.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-dqvoynXj.js → cose-bilkent-JH36ORCC-ANQ5g_t6.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2--PcyL34A.js → cynefin-VYW2F7L2-CruT_4-0.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-DvWs_hTY.js → cynefinDiagram-MW4NZA55-rbFo77ID.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-DxeIxbyO.js → dagre-VZM6K2ZE-asstxBQs.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-DPCG61Of.js → diagram-7IWD3JNH-DzTyBZwI.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-CmuU50-U.js → diagram-B4RE2ZJO-gw8ccH3B.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-B61XLD_v.js → diagram-LBJQPF4R-B8RpZzOf.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-BB7HTRRY.js → diagram-Q27KOJAE-B1zJkCS9.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-DvkboAIp.js → diagram-UB23O5K3-B6JLWZmO.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-BdJ_y1fL.js → ebnfDiagram-BXEA7PRR-q2iZP-Ps.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-9bUBZTRi.js → erDiagram-JOGREHBK-B3dbbktQ.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-Dw4L4RBa.js → flowDiagram-UKHOOZJN-C-zc6-kB.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-Jr82N_QP.js → ganttDiagram-PKOTCBZU-BSolnot9.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-DAz9wFLr.js → gitGraphDiagram-DS77QQ5N-Bo8jGxTk.js} +1 -1
- package/dist/worker/console/static/assets/index-CAZ2fC_X.css +1 -0
- package/dist/worker/console/static/assets/index-DhfjOafu.js +449 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-CBB5Np7y.js → infoDiagram-6WML65LV-DQaZqJOH.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-D8IOp94y.js → ishikawaDiagram-WSZJBQD7-DsdX1WnE.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-Dgd3AHGG.js → journeyDiagram-NVQOT4AX-CP5EYDZL.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-BmYOxLE9.js → kanban-definition-27J2QSJJ-DAm14Dr8.js} +1 -1
- package/dist/worker/console/static/assets/{linear-DfYTEF6J.js → linear-gZECoLc5.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-BjuFPRqa.js → mermaid.core-BRJNIM6p.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-CLyUViGd.js → mindmap-definition-FAOFIHXS-Cja3kLkR.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-BvX2Di4-.js → pegDiagram-VL7TDLO6-22ZGFisL.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-BFj0_OLv.js → pieDiagram-7S7Q4E2Y-BXin0Y1o.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-BIUrD_hx.js → quadrantDiagram-CIZ2JOQS-Cw6T69Yt.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-CHBB48fj.js → railroadDiagram-AXF67PYL-C1-gTieN.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-sJrYw2Sf.js → requirementDiagram-LRYGKXZP--H5N2iI1.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-BzHH6fPR.js → sankeyDiagram-W5VNT64P-CgWAPeRz.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-7QCnelCt.js → sequenceDiagram-SI44F4Z6-CrKqzGvt.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-sDYSxn72.js → sizeCapture-X5ZJPWSS-BB3wG06K.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-XpiUdwzm.js → stateDiagram-OKZ733FA-DjsGgdgY.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-Tp7V0U4q.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-DvqgNPzD.js → swimlanes-SLNWSIFB-DYKEbvAR.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-DUZWZWi8.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-2TyOYNx0.js → timeline-definition-Z64GVDOM-eQOb5k9Y.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-B-nM6wM2.js → vennDiagram-T6HMQDX7-B2-l9FIu.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-B86wPdbr.js → wardleyDiagram-T6FBY63Y-BX2Cda3l.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-Dr1C4AQz.js → xychartDiagram-ELKLHX3M-D9S892ph.js} +1 -1
- package/dist/worker/console/static/index.html +7 -2
- package/dist/worker/console/static-src/active-run-badge.js +17 -0
- package/dist/worker/console/static-src/app/console-types.js +68 -4
- package/dist/worker/console/static-src/app/useConsoleShell.js +30 -12
- package/dist/worker/console/static-src/app/useOperatorActions.js +43 -7
- package/dist/worker/console/static-src/app/useRecoveryActions.js +2 -2
- package/dist/worker/console/static-src/app/useRecoveryConsole.js +45 -10
- package/dist/worker/console/static-src/app/useRunProgress.js +54 -0
- package/dist/worker/console/static-src/app/useTaskWizard.js +74 -2
- package/dist/worker/console/static-src/night/useNightBoard.js +8 -5
- package/dist/worker/console/static-src/operator-chat/cards/failure-category-advice.js +25 -0
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +264 -13
- package/dist/worker/console/static-src/operator-chat/compaction-message.js +113 -0
- package/dist/worker/console/static-src/operator-chat/dag-progress-link.js +22 -0
- package/dist/worker/console/static-src/operator-chat/details-dag-actions.js +122 -0
- package/dist/worker/console/static-src/operator-chat/input-history.js +78 -0
- package/dist/worker/console/static-src/operator-chat/mutation-gate.js +1 -1
- package/dist/worker/console/static-src/operator-chat/open-preview-in-browser.js +338 -0
- package/dist/worker/console/static-src/operator-chat/refs.js +3 -0
- package/dist/worker/console/static-src/operator-chat/runtime-selection-labels.js +27 -0
- package/dist/worker/console/static-src/operator-chat/runtime-snapshot-store.js +10 -0
- package/dist/worker/console/static-src/operator-chat/spatial-overlay.js +1 -2
- package/dist/worker/console/static-src/operator-chat/turn-stream-controller.js +33 -1
- package/dist/worker/console/static-src/operator-chat/turn-submission.js +55 -0
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +448 -109
- package/dist/worker/console/static-src/operator-chat/useChatStream.js +344 -27
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +323 -11
- package/dist/worker/console/static-src/operator-chat/useComposer.js +45 -4
- package/dist/worker/console/static-src/operator-chat/useRepoBrowser.js +97 -13
- package/dist/worker/console/static-src/operator-chat/useRuntimeControls.js +57 -9
- package/dist/worker/console/static-src/operator-chat/useRuntimeSnapshot.js +8 -2
- package/dist/worker/console/static-src/operator-chat/useWorkspaceBrowserGate.js +4 -0
- package/dist/worker/console/static-src/operator-chat/workspace-layout-mode.js +3 -3
- package/dist/worker/console/static-src/operator-chat/workspace-reorder.js +18 -0
- package/dist/worker/console/static-src/pages/tasks/run-id-resolution.js +79 -0
- package/dist/worker/console/static-src/pages/tasks/run-ownership-verify.js +23 -0
- package/dist/worker/console/static-src/pages/tasks/run-panel-progress.js +216 -0
- package/dist/worker/console/static-src/shell/console-update-reload.js +52 -0
- package/dist/worker/console/static-src/shell/useWorkspaces.js +415 -0
- package/dist/worker/console/static-src/shell/workspace-route.js +356 -0
- package/dist/worker/console/workspace-context.js +399 -0
- package/dist/worker/console/workspace-registry.js +487 -0
- package/dist/worker/continuation/worker-continuation.js +278 -0
- package/dist/worker/loop-agent/loop-agent-client.js +7 -3
- package/dist/worker/materialize/frontend-split-task-materializer.js +72 -0
- package/dist/worker/materialize/harness-task-lineage.js +5 -2
- package/dist/worker/observability/init-runtime-activity.js +26 -0
- package/dist/worker/observability/read-model.js +26 -0
- package/dist/worker/observe/health.js +1 -1
- package/dist/worker/observe/node-input.js +160 -3
- package/dist/worker/observe/node-process.js +377 -0
- package/dist/worker/observe/node-transparency.js +572 -0
- package/dist/worker/observe/routes.js +278 -3
- package/dist/worker/observe/server.js +4 -0
- package/dist/worker/observe/shell-handler-keys.js +34 -0
- package/dist/worker/observe/static/api.js +154 -4
- package/dist/worker/observe/static/app.js +18 -70
- package/dist/worker/observe/static/constants.js +26 -19
- package/dist/worker/observe/static/dag-context-reason-labels.d.ts +9 -0
- package/dist/worker/observe/static/dag-context-reason-labels.js +139 -0
- package/dist/worker/observe/static/dag-helpers.js +4 -2
- package/dist/worker/observe/static/dag-history-labels.js +5 -0
- package/dist/worker/observe/static/dag-inspector-humanize.d.ts +16 -0
- package/dist/worker/observe/static/dag-inspector-humanize.js +339 -0
- package/dist/worker/observe/static/dag-node-purpose.d.ts +6 -0
- package/dist/worker/observe/static/dag-node-purpose.js +208 -0
- package/dist/worker/observe/static/format.js +60 -0
- package/dist/worker/observe/static/index.html +10 -5
- package/dist/worker/observe/static/inspect-bootstrap.d.ts +8 -0
- package/dist/worker/observe/static/inspect-bootstrap.js +57 -0
- package/dist/worker/observe/static/inspect-workspace.js +374 -0
- package/dist/worker/observe/static/kpi.js +2 -2
- package/dist/worker/observe/static/markdown-render.js +20 -1
- package/dist/worker/observe/static/operator-chrome.css +168 -24
- package/dist/worker/observe/static/operator-chrome.d.ts +30 -5
- package/dist/worker/observe/static/operator-chrome.js +354 -101
- package/dist/worker/observe/static/prompt-restart-candidates.d.ts +18 -0
- package/dist/worker/observe/static/prompt-restart-candidates.js +38 -0
- package/dist/worker/observe/static/relations.js +7 -7
- package/dist/worker/observe/static/router.d.ts +57 -0
- package/dist/worker/observe/static/router.js +67 -1
- package/dist/worker/observe/static/run-processing.js +4 -2
- package/dist/worker/observe/static/shell-chrome.js +2 -2
- package/dist/worker/observe/static/state.d.ts +50 -0
- package/dist/worker/observe/static/state.js +191 -1
- package/dist/worker/observe/static/styles.css +1720 -86
- package/dist/worker/observe/static/views/dag-graph.js +5 -3
- package/dist/worker/observe/static/views/dag-inspector.js +2601 -188
- package/dist/worker/observe/static/views/dag.d.ts +13 -0
- package/dist/worker/observe/static/views/dag.js +39 -18
- package/dist/worker/observe/static/views/dags.js +10 -6
- package/dist/worker/observe/static/views/dashboard.js +18 -8
- package/dist/worker/observe/static/views/failures.js +5 -2
- package/dist/worker/observe/static/views/night.js +2 -2
- package/dist/worker/observe/static/views/pool.js +8 -2
- package/dist/worker/observe/static/views/run.js +15 -4
- package/dist/worker/observe/static/views/session-timeline.js +386 -25
- package/dist/worker/observe/static/views/task.js +63 -3
- package/dist/worker/outcomes/adapters.js +19 -0
- package/dist/worker/outcomes/types.js +1 -0
- package/dist/worker/pool/attempt-lease.js +97 -66
- package/dist/worker/pool/begin-attempt-with-lease.js +1 -0
- package/dist/worker/pool/reconcile.js +46 -1
- package/dist/worker/pool/run-store.js +2 -0
- package/dist/worker/pool/state-projection.js +2 -0
- package/dist/worker/task-spec/workflow-routing.js +8 -3
- package/dist/workflows/dag/artifact-bindings.js +149 -0
- package/dist/workflows/dag/artifact-revision-schema-registry.js +31 -0
- package/dist/workflows/dag/backend-test-case-coverage-analysis.js +470 -31
- package/dist/workflows/dag/backend-test-markdown-workflow.js +189 -2
- package/dist/workflows/dag/backend-test-plan-protocol.js +210 -0
- package/dist/workflows/dag/backend-test-pytest-collection.js +168 -16
- package/dist/workflows/dag/backend-test-result-contract.js +5 -1
- package/dist/workflows/dag/backend-test-scenario-param.js +506 -73
- package/dist/workflows/dag/backend-test-scenario-partitions.js +135 -2
- package/dist/workflows/dag/backend-test-writer-completeness.js +131 -28
- package/dist/workflows/dag/budget-enforcement.js +10 -0
- package/dist/workflows/dag/context-receipt.js +305 -0
- package/dist/workflows/dag/context-transfer/context-bundle.js +423 -0
- package/dist/workflows/dag/context-transfer/operator-actions.js +61 -0
- package/dist/workflows/dag/context-transfer/renderers.js +93 -0
- package/dist/workflows/dag/contract-output-registry.js +15 -0
- package/dist/workflows/dag/contract-validator-registrations.js +1 -2
- package/dist/workflows/dag/convergence/controller.js +141 -0
- package/dist/workflows/dag/dag-retry-schema.js +138 -0
- package/dist/workflows/dag/dynamic-runtime/loop-until.js +1 -1
- package/dist/workflows/dag/dynamic-runtime/map.js +17 -3
- package/dist/workflows/dag/failure-category.js +7 -116
- package/dist/workflows/dag/frontend-closeout.js +221 -0
- package/dist/workflows/dag/frontend-design-policy.js +400 -0
- package/dist/workflows/dag/frontend-human-decision.js +182 -0
- package/dist/workflows/dag/frontend-implementation-contract.js +1377 -141
- package/dist/workflows/dag/frontend-plan-render.js +26 -1
- package/dist/workflows/dag/frontend-prewrite-gate.js +376 -318
- package/dist/workflows/dag/frontend-provider-capability-matrix.js +159 -0
- package/dist/workflows/dag/frontend-recovery-capsule.js +455 -0
- package/dist/workflows/dag/frontend-recovery-controller.js +226 -0
- package/dist/workflows/dag/frontend-recovery-lineage.js +178 -0
- package/dist/workflows/dag/frontend-recovery-plan.js +21 -10
- package/dist/workflows/dag/frontend-recovery-run.js +166 -34
- package/dist/workflows/dag/frontend-repair.js +7 -424
- package/dist/workflows/dag/frontend-review-context.js +348 -20
- package/dist/workflows/dag/frontend-review-findings.js +270 -0
- package/dist/workflows/dag/frontend-risk.js +15 -2
- package/dist/workflows/dag/frontend-shadow-dual-write.js +941 -0
- package/dist/workflows/dag/frontend-shape-capsule-store.js +191 -0
- package/dist/workflows/dag/frontend-shape-facts.js +419 -0
- package/dist/workflows/dag/frontend-shape.js +435 -0
- package/dist/workflows/dag/frontend-source-fidelity-ledger.js +108 -0
- package/dist/workflows/dag/frontend-split-application-service.js +203 -0
- package/dist/workflows/dag/frontend-split-orchestrator.js +899 -0
- package/dist/workflows/dag/frontend-test-case-checklist.js +32 -4
- package/dist/workflows/dag/frontend-test-case-generation-assessment.js +69 -0
- package/dist/workflows/dag/frontend-test-case-manifest.js +17 -5
- package/dist/workflows/dag/frontend-test-case-quality.js +11 -16
- package/dist/workflows/dag/frontend-test-environment-probe.js +230 -0
- package/dist/workflows/dag/frontend-test-html-report.js +3 -1
- package/dist/workflows/dag/frontend-test-l5-report.js +3 -1
- package/dist/workflows/dag/frontend-test-layout.js +159 -0
- package/dist/workflows/dag/frontend-test-markdown.js +61 -0
- package/dist/workflows/dag/frontend-test-result-contract.js +202 -42
- package/dist/workflows/dag/frontend-test-standard-scenarios.js +70 -0
- package/dist/workflows/dag/frontend-typed-event-store.js +452 -0
- package/dist/workflows/dag/frontend-typed-event-transaction.js +180 -0
- package/dist/workflows/dag/frontend-verification-trace.js +281 -29
- package/dist/workflows/dag/frontend-worktree-diff.js +250 -17
- package/dist/workflows/dag/frontend-writer-admission.js +319 -0
- package/dist/workflows/dag/frontend-writer-rollback.js +32 -0
- package/dist/workflows/dag/frontend-writer-status.js +256 -0
- package/dist/workflows/dag/init-hybrid.js +1771 -717
- package/dist/workflows/dag/interrupt-request.js +10 -3
- package/dist/workflows/dag/lifecycle.js +3 -3
- package/dist/workflows/dag/node-execution.js +1141 -32
- package/dist/workflows/dag/path-safety.js +1 -0
- package/dist/workflows/dag/prompt.js +158 -7
- package/dist/workflows/dag/recovery-lease.js +170 -0
- package/dist/workflows/dag/report.js +37 -1
- package/dist/workflows/dag/rerun-feedback.js +526 -0
- package/dist/workflows/dag/rerun-plan.js +790 -28
- package/dist/workflows/dag/rerun-run.js +700 -21
- package/dist/workflows/dag/rerun-task.js +311 -14
- package/dist/workflows/dag/retry-policy.js +336 -101
- package/dist/workflows/dag/runner.js +596 -121
- package/dist/workflows/dag/scheduler.js +133 -20
- package/dist/workflows/dag/skill-snapshot.js +17 -0
- package/dist/workflows/dag/structured-output-repair.js +712 -0
- package/dist/workflows/dag/types.js +600 -31
- package/dist/workflows/dag/validate.js +92 -32
- package/docs/README.md +2 -0
- package/docs/architecture/evolution.md +45 -0
- package/docs/architecture/runtime-boundaries.md +8 -7
- package/docs/architecture/worker-and-feature.md +1 -1
- package/docs/examples/README.md +5 -0
- package/docs/init-surface.manifest.json +36 -12
- package/docs/operations/README.md +1 -1
- package/docs/operations/local-development-environment.md +22 -5
- package/docs/skills/vetted-skill-registry.md +16 -0
- package/docs/templates/README.md +4 -2
- package/docs/templates/agent-dag-report.schema.json +8 -2
- package/docs/templates/agent-dag.schema.json +95 -1
- package/docs/templates/backend-test-dag.json +278 -244
- package/docs/templates/frontend-implementation-contract.schema.json +684 -24
- package/docs/templates/frontend-implementation-dag.json +89 -0
- package/docs/templates/frontend-test-case-checklist.md +2 -2
- package/docs/templates/frontend-test-dag.json +10 -12
- package/docs/templates/frontend-test-dag.retrieve-context.prompt.md +1 -1
- package/docs/templates/init-managed-agents.md +13 -3
- package/docs/templates/product-line/task.yaml +1 -1
- package/docs/templates/spec-registry.schema.json +45 -0
- package/harness.json +2 -2
- package/package.json +19 -5
- package/scripts/next-info.mjs +356 -0
- package/scripts/next-publish-gate.mjs +238 -0
- package/scripts/release-source-binding.mjs +251 -0
- package/skills/analyze-product-requirements/SKILL.md +8 -5
- package/skills/analyze-product-requirements/references/acceptance-criteria.md +1 -1
- package/skills/analyze-product-requirements/references/clarification-and-knowledge.md +10 -6
- package/skills/analyze-product-requirements/references/example.md +50 -0
- package/skills/analyze-product-requirements/references/forward-test-cases.md +11 -7
- package/skills/analyze-product-requirements/references/kb-integration.md +5 -5
- package/skills/analyze-product-requirements/references/product-analysis-schema.md +8 -4
- package/skills/analyze-product-requirements/references/product-requirement-schema.md +2 -2
- package/skills/analyze-product-requirements/references/requirement-clarification-schema.md +1 -1
- package/skills/analyze-product-requirements/scripts/test-validators.mjs +11 -1
- package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +20 -1
- package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +9 -0
- package/skills/codebase-scout/SKILL.md +1 -1
- package/skills/fe-test-ui-scout/SKILL.md +65 -0
- package/skills/fe-test-ui-scout/references/ledger-schema.md +62 -0
- package/skills/fe-test-ui-scout/references/recon-protocol.md +54 -0
- package/skills/frontend-bounded-implement/SKILL.md +15 -14
- package/skills/frontend-bounded-implement/references/code-standards.md +19 -0
- package/skills/frontend-contract/SKILL.md +23 -0
- package/skills/frontend-contract/references/contract-protocol.md +34 -0
- package/skills/frontend-design-review/SKILL.md +22 -41
- package/skills/frontend-plan/SKILL.md +26 -0
- package/skills/frontend-plan/references/decision-contract.md +37 -0
- package/skills/frontend-plan/references/design-decisions.md +17 -0
- package/skills/frontend-review/SKILL.md +20 -15
- package/skills/frontend-review/references/review-findings.md +6 -7
- package/skills/frontend-scout/SKILL.md +25 -0
- package/skills/frontend-scout/references/design-evidence.md +16 -0
- package/skills/frontend-scout/references/scout-evidence.md +23 -0
- package/skills/frontend-verification/SKILL.md +1 -1
- package/skills/improve-codebase-architecture/SKILL.md +81 -0
- package/skills/improve-codebase-architecture/deepening.md +37 -0
- package/skills/improve-codebase-architecture/html-report.md +123 -0
- package/skills/improve-codebase-architecture/interface-design.md +44 -0
- package/skills/improve-codebase-architecture/language.md +53 -0
- package/skills/loop-agent/references/command-reference.md +32 -4
- package/skills/loop-agent/references/hybrid-dag.md +9 -2
- package/skills/playwright-cli/SKILL.md +23 -1
- package/skills/playwright-cli-case-generator/SKILL.md +50 -13
- package/dist/worker/console/operation-store.js +0 -169
- package/dist/worker/console/static/assets/channel-Tl-FkUqr.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BaehtRk4.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BaehtRk4.js +0 -1
- package/dist/worker/console/static/assets/index-B7Y-0g3J.css +0 -1
- package/dist/worker/console/static/assets/index-DkCrqaYg.js +0 -325
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-eEhq2A8Y.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-la8AC7fo.js +0 -8
- package/dist/worker/console/static-src/operator-chat/activity-rail-presentation.js +0 -73
- package/dist/worker/console/static-src/operator-chat/useActivityRailTransition.js +0 -59
- package/skills/frontend-implementation/SKILL.md +0 -52
- package/skills/frontend-implementation/references/code-standards.md +0 -33
- package/skills/frontend-implementation/references/design-spec.md +0 -56
- package/skills/frontend-implementation/references/node-contracts.md +0 -31
- /package/dist/{worker → infrastructure}/console/repo-fingerprint.js +0 -0
|
@@ -5,8 +5,10 @@ import path from "node:path";
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import YAML from "yaml";
|
|
7
7
|
import { resolveBackendTestLayout, } from "./backend-test-layout.js";
|
|
8
|
-
import {
|
|
8
|
+
import { resolveBackendTestManifestModules, backendManifestStatusFinding } from "./backend-test-markdown-workflow.js";
|
|
9
|
+
import { applyOpenApiPartitionDomainPolicy, assessScenarioPartitionCoverage, parseScenarioPartitions, } from "./backend-test-scenario-partitions.js";
|
|
9
10
|
import { backendTestCaseManifestSchema, computeCaseManifestCoverageSummary, } from "./backend-test-case-manifest.js";
|
|
11
|
+
import { inferScenarioParamIntent } from "./backend-test-scenario-param.js";
|
|
10
12
|
const CASE_HEADING = /^##\s+(BE-[A-Z0-9_-]+-\d{3})\b.*$/gm;
|
|
11
13
|
const CASE_ID_IN_TEXT = /\bBE-[A-Z0-9_-]+-\d{3}\b/g;
|
|
12
14
|
const NON_CANONICAL_CASE_HEADING = /^##\s+(BE-[A-Z0-9_-]+-(?:\d{2}|\d{2,3}[A-Z]+))\b.*$/gm;
|
|
@@ -280,6 +282,87 @@ export const backendTestMarkdownPytestCorrespondenceFactsSchema = z.object({
|
|
|
280
282
|
entries: z.array(correspondenceEntrySchema),
|
|
281
283
|
findings: z.array(z.string()),
|
|
282
284
|
}).strict();
|
|
285
|
+
function bindingCounts(entry) {
|
|
286
|
+
const counts = new Map();
|
|
287
|
+
for (const point of [...entry.variantTestPoints, ...entry.assertionTestPoints, ...entry.crossCuttingTestPoints]) {
|
|
288
|
+
counts.set(point, (counts.get(point) ?? 0) + 1);
|
|
289
|
+
}
|
|
290
|
+
return counts;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Classify correspondence defects by the only writer that can safely repair
|
|
294
|
+
* them. Markdown-owned contract defects must be fixed before pytest generation;
|
|
295
|
+
* pytest-owned generated-asset defects may enter the single bounded N11 repair.
|
|
296
|
+
*/
|
|
297
|
+
export function classifyBackendTestCorrespondenceRepair(facts, layout) {
|
|
298
|
+
const resolved = layout ?? resolveBackendTestLayout(undefined);
|
|
299
|
+
const scriptRoot = resolved.scriptDir.replace(/\/$/, "");
|
|
300
|
+
const safePytestPath = (candidate) => {
|
|
301
|
+
const normalized = candidate.replaceAll("\\", "/").replace(/^\.\//, "");
|
|
302
|
+
return normalized.endsWith(".py") && (normalized === scriptRoot || normalized.startsWith(`${scriptRoot}/`));
|
|
303
|
+
};
|
|
304
|
+
const markdownBlockingEntries = [];
|
|
305
|
+
const pytestRepairEntries = [];
|
|
306
|
+
for (const entry of facts.entries) {
|
|
307
|
+
const markdownReasons = [];
|
|
308
|
+
const pytestReasons = [];
|
|
309
|
+
const counts = bindingCounts(entry);
|
|
310
|
+
if (entry.cardinality !== "0:1" &&
|
|
311
|
+
entry.testPoints.some((point) => (counts.get(point) ?? 0) !== 1)) {
|
|
312
|
+
// Only ### 测试点 inventory must be bound exactly once. Extra
|
|
313
|
+
// automation-mapping TPs (typical: 横切 listed only under 跨切证据)
|
|
314
|
+
// are pytest-owned docstring/repair defects, not Markdown BLOCKED.
|
|
315
|
+
markdownReasons.push("markdown-test-point-binding-invalid");
|
|
316
|
+
}
|
|
317
|
+
if (entry.declaredScript && entry.declaredScript !== entry.expectedScript) {
|
|
318
|
+
markdownReasons.push("markdown-script-declaration-invalid");
|
|
319
|
+
}
|
|
320
|
+
const evidenceOnly = isEvidenceOnlyCorrespondenceEntry(entry);
|
|
321
|
+
if (!evidenceOnly && entry.cardinality === "1:0")
|
|
322
|
+
pytestReasons.push("missing-pytest-symbol");
|
|
323
|
+
if (entry.cardinality === "1:N")
|
|
324
|
+
pytestReasons.push("multiple-pytest-symbols");
|
|
325
|
+
if (entry.cardinality === "0:1")
|
|
326
|
+
pytestReasons.push("extra-pytest-symbol");
|
|
327
|
+
if (entry.actualScripts.some((script) => script !== entry.expectedScript))
|
|
328
|
+
pytestReasons.push("pytest-script-mismatch");
|
|
329
|
+
if (entry.declaredPrimarySymbol && entry.pytestSymbols.some((symbol) => symbol !== entry.declaredPrimarySymbol)) {
|
|
330
|
+
pytestReasons.push("pytest-primary-symbol-mismatch");
|
|
331
|
+
}
|
|
332
|
+
if (!evidenceOnly && entry.variantTestPoints.some((point) => !entry.parameterIds.includes(point))) {
|
|
333
|
+
pytestReasons.push("variant-parameter-missing");
|
|
334
|
+
}
|
|
335
|
+
if (!evidenceOnly && entry.assertionTestPoints.some((point) => !entry.mappedTestPoints.includes(point))) {
|
|
336
|
+
pytestReasons.push("assertion-binding-missing");
|
|
337
|
+
}
|
|
338
|
+
if (!evidenceOnly && entry.crossCuttingTestPoints.some((point) => !entry.mappedTestPoints.includes(point))) {
|
|
339
|
+
pytestReasons.push("cross-cutting-binding-missing");
|
|
340
|
+
}
|
|
341
|
+
if (entry.parameterIds.some((point) => !entry.testPoints.includes(point)))
|
|
342
|
+
pytestReasons.push("pytest-test-point-binding-extra");
|
|
343
|
+
if (entry.payloadAssessment.status === "UNSAFE")
|
|
344
|
+
pytestReasons.push("pytest-payload-shape-mismatch");
|
|
345
|
+
if (entry.status !== "EXACT_1_TO_1" &&
|
|
346
|
+
!["TEST_POINT_BINDING_DUPLICATE", "PAYLOAD_CONTRACT_UNAVAILABLE"].includes(entry.status)) {
|
|
347
|
+
pytestReasons.push(`correspondence-${entry.status.toLowerCase().replaceAll("_", "-")}`);
|
|
348
|
+
}
|
|
349
|
+
if (entry.status === "PAYLOAD_CONTRACT_UNAVAILABLE" && entry.cardinality !== "0:1") {
|
|
350
|
+
markdownReasons.push("markdown-payload-contract-unavailable");
|
|
351
|
+
}
|
|
352
|
+
const paths = orderedUnique([entry.expectedScript, ...entry.actualScripts].filter(safePytestPath));
|
|
353
|
+
if (markdownReasons.length > 0) {
|
|
354
|
+
markdownBlockingEntries.push({ ...(entry.caseId ? { caseId: entry.caseId } : {}), reasonCodes: orderedUnique(markdownReasons), paths });
|
|
355
|
+
}
|
|
356
|
+
if (pytestReasons.length > 0 && paths.length > 0) {
|
|
357
|
+
pytestRepairEntries.push({ ...(entry.caseId ? { caseId: entry.caseId } : {}), reasonCodes: orderedUnique(pytestReasons), paths });
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return {
|
|
361
|
+
markdownBlockingEntries,
|
|
362
|
+
pytestRepairEntries,
|
|
363
|
+
pytestRepairPaths: orderedUnique(pytestRepairEntries.flatMap((entry) => entry.paths)).sort(),
|
|
364
|
+
};
|
|
365
|
+
}
|
|
283
366
|
function isRecord(value) {
|
|
284
367
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
285
368
|
}
|
|
@@ -486,6 +569,55 @@ export async function extractBackendTestOpenApiRules(input) {
|
|
|
486
569
|
}
|
|
487
570
|
return rules.sort((left, right) => left.ruleKey.localeCompare(right.ruleKey));
|
|
488
571
|
}
|
|
572
|
+
export async function extractBackendTestOpenApiPartitionAxes(input) {
|
|
573
|
+
const axes = [];
|
|
574
|
+
const seen = new Set();
|
|
575
|
+
for (const referencePath of input.sourceBinding.referencePaths) {
|
|
576
|
+
const physicalPath = resolveBoundSourcePath(input.workspaceRoot, input.sourceBinding.taskId, referencePath);
|
|
577
|
+
let document;
|
|
578
|
+
try {
|
|
579
|
+
const parsed = YAML.parse(await readFile(physicalPath, "utf8"));
|
|
580
|
+
if (!isRecord(parsed) || !isRecord(parsed.paths))
|
|
581
|
+
continue;
|
|
582
|
+
document = parsed;
|
|
583
|
+
}
|
|
584
|
+
catch {
|
|
585
|
+
continue;
|
|
586
|
+
}
|
|
587
|
+
for (const [apiPath, pathItem] of Object.entries(document.paths)) {
|
|
588
|
+
if (!isRecord(pathItem))
|
|
589
|
+
continue;
|
|
590
|
+
const operation = pathItem.get;
|
|
591
|
+
if (!isRecord(operation))
|
|
592
|
+
continue;
|
|
593
|
+
const parameterValues = [
|
|
594
|
+
...(Array.isArray(pathItem.parameters) ? pathItem.parameters : []),
|
|
595
|
+
...(Array.isArray(operation.parameters) ? operation.parameters : []),
|
|
596
|
+
];
|
|
597
|
+
for (const rawParameter of parameterValues) {
|
|
598
|
+
const parameter = resolveOpenApiSchema(document, rawParameter);
|
|
599
|
+
if (!parameter || typeof parameter.name !== "string")
|
|
600
|
+
continue;
|
|
601
|
+
const location = parameter.in === "path" ? "path" : parameter.in === "query" ? "query" : undefined;
|
|
602
|
+
if (!location)
|
|
603
|
+
continue;
|
|
604
|
+
const property = resolveOpenApiSchema(document, parameter.schema);
|
|
605
|
+
const enumValues = property && Array.isArray(property.enum) ? property.enum.map(String) : null;
|
|
606
|
+
const identity = `GET ${apiPath}|${location}|${parameter.name}`;
|
|
607
|
+
if (seen.has(identity))
|
|
608
|
+
continue;
|
|
609
|
+
seen.add(identity);
|
|
610
|
+
axes.push({
|
|
611
|
+
operation: `GET ${apiPath}`,
|
|
612
|
+
name: parameter.name,
|
|
613
|
+
in: location,
|
|
614
|
+
enumValues,
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
return axes;
|
|
620
|
+
}
|
|
489
621
|
function orderedUnique(values) {
|
|
490
622
|
const result = [];
|
|
491
623
|
const seen = new Set();
|
|
@@ -543,6 +675,105 @@ function automationLabelBody(body, labels) {
|
|
|
543
675
|
const match = new RegExp(`^\\s*[-*+]\\s*(?:${escaped})\\s*[::]\\s*(.*)$`, "mi").exec(automation);
|
|
544
676
|
return match?.[1]?.replaceAll("`", "").trim() ?? "";
|
|
545
677
|
}
|
|
678
|
+
const BINDING_NEGATION_OR_AMBIGUITY = /(?:不是|并非|非变体|非断言|非横切|可能|待定|或者|\b(?:TBD|unknown)\b)/i;
|
|
679
|
+
function explicitBindingModeFromLine(line) {
|
|
680
|
+
if (BINDING_NEGATION_OR_AMBIGUITY.test(line))
|
|
681
|
+
return undefined;
|
|
682
|
+
const modes = TEST_POINT_BINDING_MODES.filter((mode) => AUTOMATION_BINDING_LABELS[mode].some((label) => line.includes(label)));
|
|
683
|
+
return modes.length === 1 ? modes[0] : undefined;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Canonicalize only explicit, unambiguous Test Point classification marks.
|
|
687
|
+
* The model occasionally writes `TP-X(变体测试点)`, `[场景断言测试点] TP-X`
|
|
688
|
+
* or a pipe-delimited equivalent. Those forms carry deterministic semantics,
|
|
689
|
+
* but are not the machine contract consumed by automationLabelBody(). Keep the
|
|
690
|
+
* original prose and materialize the same binding under `### 自动化映射` as the
|
|
691
|
+
* canonical single-line labels. Never infer a mode from ordinary prose.
|
|
692
|
+
*/
|
|
693
|
+
export function canonicalizeBackendTestMarkdownTestPointBindings(markdown) {
|
|
694
|
+
const headings = [...markdown.matchAll(CASE_HEADING)];
|
|
695
|
+
let output = "";
|
|
696
|
+
let cursor = 0;
|
|
697
|
+
const unsafeTestPoints = [];
|
|
698
|
+
const canonicalizedTestPoints = [];
|
|
699
|
+
for (let index = 0; index < headings.length; index += 1) {
|
|
700
|
+
const heading = headings[index];
|
|
701
|
+
const start = heading.index;
|
|
702
|
+
const end = headings[index + 1]?.index ?? markdown.length;
|
|
703
|
+
const body = markdown.slice(start, end);
|
|
704
|
+
output += markdown.slice(cursor, start);
|
|
705
|
+
cursor = end;
|
|
706
|
+
const declared = listTokens(body, CASE_SECTION_ALIASES.testPoints, TEST_POINT);
|
|
707
|
+
const current = testPointBindingFacts(body, declared);
|
|
708
|
+
const currentByMode = new Map(TEST_POINT_BINDING_MODES.map((mode) => [
|
|
709
|
+
mode,
|
|
710
|
+
current.testPointBindings.filter((item) => item.mode === mode).map((item) => item.testPoint),
|
|
711
|
+
]));
|
|
712
|
+
const unresolved = new Set(current.unclassifiedTestPoints);
|
|
713
|
+
for (const line of body.split(/\r?\n/)) {
|
|
714
|
+
const mode = explicitBindingModeFromLine(line);
|
|
715
|
+
if (!mode)
|
|
716
|
+
continue;
|
|
717
|
+
const tokens = orderedUnique(line.match(/\bTP-[A-Z0-9]+(?:-[A-Z0-9]+)*\b/g) ?? []);
|
|
718
|
+
for (const token of tokens) {
|
|
719
|
+
if (!unresolved.has(token))
|
|
720
|
+
continue;
|
|
721
|
+
const existingModes = TEST_POINT_BINDING_MODES.filter((candidate) => (currentByMode.get(candidate) ?? []).includes(token));
|
|
722
|
+
if (existingModes.length > 0)
|
|
723
|
+
continue;
|
|
724
|
+
currentByMode.set(mode, orderedUnique([...(currentByMode.get(mode) ?? []), token]));
|
|
725
|
+
unresolved.delete(token);
|
|
726
|
+
canonicalizedTestPoints.push(token);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
unsafeTestPoints.push(...unresolved);
|
|
730
|
+
if (unresolved.size === current.unclassifiedTestPoints.length) {
|
|
731
|
+
output += body;
|
|
732
|
+
continue;
|
|
733
|
+
}
|
|
734
|
+
const automationMarker = /^###\s+(?:自动化映射|Automation Mapping)\s*$/mi.exec(body);
|
|
735
|
+
if (!automationMarker) {
|
|
736
|
+
output += body;
|
|
737
|
+
continue;
|
|
738
|
+
}
|
|
739
|
+
const automationStart = automationMarker.index + automationMarker[0].length;
|
|
740
|
+
const rest = body.slice(automationStart);
|
|
741
|
+
const nextSection = /^###\s+/m.exec(rest);
|
|
742
|
+
const automationEnd = automationStart + (nextSection?.index ?? rest.length);
|
|
743
|
+
let automation = body.slice(automationStart, automationEnd);
|
|
744
|
+
for (const mode of TEST_POINT_BINDING_MODES) {
|
|
745
|
+
const labels = AUTOMATION_BINDING_LABELS[mode];
|
|
746
|
+
const escaped = labels.map((label) => label.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
747
|
+
const canonicalLine = `- ${AUTOMATION_BINDING_LABELS[mode][0]}:${(currentByMode.get(mode) ?? []).join("; ") || "无"}`;
|
|
748
|
+
const linePattern = new RegExp(`^\\s*[-*+]\\s*(?:${escaped})\\s*[::].*$`, "mi");
|
|
749
|
+
if (linePattern.test(automation))
|
|
750
|
+
automation = automation.replace(linePattern, canonicalLine);
|
|
751
|
+
else
|
|
752
|
+
automation = `${automation.replace(/\s*$/, "")}\n${canonicalLine}\n`;
|
|
753
|
+
}
|
|
754
|
+
output += body.slice(0, automationStart) + automation + body.slice(automationEnd);
|
|
755
|
+
}
|
|
756
|
+
output += markdown.slice(cursor);
|
|
757
|
+
return {
|
|
758
|
+
markdown: output,
|
|
759
|
+
changed: output !== markdown,
|
|
760
|
+
unsafeTestPoints: orderedUnique(unsafeTestPoints),
|
|
761
|
+
canonicalizedTestPoints: orderedUnique(canonicalizedTestPoints),
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
export function inspectBackendTestMarkdownTestPointBindings(markdown) {
|
|
765
|
+
const headings = [...markdown.matchAll(CASE_HEADING)];
|
|
766
|
+
return headings.map((heading, index) => {
|
|
767
|
+
const body = markdown.slice(heading.index, headings[index + 1]?.index ?? markdown.length);
|
|
768
|
+
const testPoints = listTokens(body, CASE_SECTION_ALIASES.testPoints, TEST_POINT);
|
|
769
|
+
const bindings = testPointBindingFacts(body, testPoints);
|
|
770
|
+
return {
|
|
771
|
+
caseId: canonicalCaseId(heading[1]),
|
|
772
|
+
unclassifiedTestPoints: bindings.unclassifiedTestPoints,
|
|
773
|
+
duplicateBindingTestPoints: bindings.duplicateBindingTestPoints,
|
|
774
|
+
};
|
|
775
|
+
});
|
|
776
|
+
}
|
|
546
777
|
function testPointBindingFacts(body, testPoints) {
|
|
547
778
|
const bindings = TEST_POINT_BINDING_MODES.flatMap((mode) => {
|
|
548
779
|
const value = automationLabelBody(body, AUTOMATION_BINDING_LABELS[mode]);
|
|
@@ -572,12 +803,26 @@ function isEvidenceOnlyMarkdownCase(testCase) {
|
|
|
572
803
|
!hasVariant &&
|
|
573
804
|
hasNonVariant);
|
|
574
805
|
}
|
|
806
|
+
function isEvidenceOnlyCorrespondenceEntry(entry) {
|
|
807
|
+
return (entry.status === "EXACT_1_TO_1" &&
|
|
808
|
+
entry.cardinality === "1:0" &&
|
|
809
|
+
!entry.declaredScript &&
|
|
810
|
+
!entry.declaredPrimarySymbol &&
|
|
811
|
+
entry.variantTestPoints.length === 0 &&
|
|
812
|
+
(entry.assertionTestPoints.length > 0 || entry.crossCuttingTestPoints.length > 0) &&
|
|
813
|
+
entry.pytestSymbols.length === 0 &&
|
|
814
|
+
entry.actualScripts.length === 0);
|
|
815
|
+
}
|
|
575
816
|
function payloadContract(body) {
|
|
576
817
|
const contractValue = automationLabelBody(body, ["Payload Contract", "载荷合同"]);
|
|
577
818
|
const requiredValue = automationLabelBody(body, ["Payload Required Paths", "载荷必需路径"]);
|
|
578
819
|
const allowedValue = automationLabelBody(body, ["Payload Allowed Paths", "载荷允许路径"]);
|
|
579
820
|
const enumValue = automationLabelBody(body, ["Payload Enum", "载荷枚举"]);
|
|
580
|
-
const tokens = (value) => orderedUnique(value
|
|
821
|
+
const tokens = (value) => orderedUnique(value
|
|
822
|
+
.split(/[,;,;]/)
|
|
823
|
+
.map((item) => item.trim())
|
|
824
|
+
.filter((item) => !/^(?:none|无|not-applicable|n\/a|true|false)$/i.test(item))
|
|
825
|
+
.filter((item) => /^[A-Za-z_][A-Za-z0-9_.]*$/.test(item)));
|
|
581
826
|
const enumValues = {};
|
|
582
827
|
for (const assignment of enumValue.split(/[,;,;]/).map((item) => item.trim()).filter(Boolean)) {
|
|
583
828
|
const match = /^([A-Za-z_][A-Za-z0-9_.]*)\s*(?:=|:)\s*(.+)$/.exec(assignment);
|
|
@@ -610,10 +855,18 @@ async function markdownModuleFiles(workspaceRoot, layout) {
|
|
|
610
855
|
const resolved = layout ?? resolveBackendTestLayout(undefined);
|
|
611
856
|
const dir = path.join(workspaceRoot, ...resolved.markdownDir.split("/"));
|
|
612
857
|
const entries = await readdir(dir, { withFileTypes: true });
|
|
613
|
-
|
|
858
|
+
const all = entries
|
|
614
859
|
.filter((entry) => entry.isFile() && entry.name.toLowerCase().endsWith(".md") && entry.name.toLowerCase() !== "readme.md")
|
|
615
860
|
.map((entry) => path.join(dir, entry.name))
|
|
616
861
|
.sort();
|
|
862
|
+
// Current-round Markdown scope is the README Module Index manifest: unmanifested
|
|
863
|
+
// legacy .md files must not enter Case/coverage/partition statistics. Workspaces
|
|
864
|
+
// without a Module Index fall back to the whole directory (prior behaviour).
|
|
865
|
+
const manifest = await resolveBackendTestManifestModules(workspaceRoot, resolved);
|
|
866
|
+
if (manifest.manifestStatus !== "valid")
|
|
867
|
+
return [];
|
|
868
|
+
const declaredAbs = new Set(manifest.declaredMdFiles.map((rel) => path.join(workspaceRoot, ...rel.split("/")).toLowerCase()));
|
|
869
|
+
return all.filter((file) => declaredAbs.has(file.toLowerCase())).sort();
|
|
617
870
|
}
|
|
618
871
|
async function parseMarkdownCases(workspaceRoot, layout) {
|
|
619
872
|
const result = [];
|
|
@@ -825,6 +1078,16 @@ export async function analyzeBackendTestCaseCoverage(input) {
|
|
|
825
1078
|
findings.push(...coverageScope.findings);
|
|
826
1079
|
const matrix = parseCoverageMatrix(readme);
|
|
827
1080
|
findings.push(...matrix.findings);
|
|
1081
|
+
const manifest = await resolveBackendTestManifestModules(input.workspaceRoot, layout);
|
|
1082
|
+
// Fail closed on README Module Index entries declared but never materialized.
|
|
1083
|
+
if (manifest.declaredMissing.length > 0) {
|
|
1084
|
+
findings.push(`declared Markdown module is missing (Module Index): ${manifest.declaredMissing.join(", ")}`);
|
|
1085
|
+
}
|
|
1086
|
+
// Fail closed on every non-valid Module Index state: without a valid unique
|
|
1087
|
+
// Module Index the current round must not re-scan historical `.md` files.
|
|
1088
|
+
if (manifest.manifestStatus !== "valid") {
|
|
1089
|
+
findings.push(backendManifestStatusFinding(manifest.manifestStatus, manifest.moduleIndexHeadingCount));
|
|
1090
|
+
}
|
|
828
1091
|
const cases = await parseMarkdownCases(input.workspaceRoot, layout);
|
|
829
1092
|
for (const file of await markdownModuleFiles(input.workspaceRoot, layout)) {
|
|
830
1093
|
const markdown = await readFile(file, "utf8");
|
|
@@ -985,8 +1248,11 @@ export async function analyzeBackendTestCaseCoverage(input) {
|
|
|
985
1248
|
// Plan C: deterministic query/filter axis partitions (fail-closed on missing slots).
|
|
986
1249
|
const parsedPartitions = parseScenarioPartitions(readme);
|
|
987
1250
|
findings.push(...parsedPartitions.issues);
|
|
1251
|
+
const openApiPartitionAxes = await extractBackendTestOpenApiPartitionAxes(input);
|
|
1252
|
+
const partitionedBySource = applyOpenApiPartitionDomainPolicy(parsedPartitions.partitions, openApiPartitionAxes);
|
|
1253
|
+
findings.push(...partitionedBySource.issues);
|
|
988
1254
|
const declaredPointUniverse = new Set(cases.flatMap((item) => item.testPoints));
|
|
989
|
-
const partitionAssessment = assessScenarioPartitionCoverage(
|
|
1255
|
+
const partitionAssessment = assessScenarioPartitionCoverage(partitionedBySource.partitions, declaredPointUniverse);
|
|
990
1256
|
findings.push(...partitionAssessment.findings);
|
|
991
1257
|
const [enumValueCount, coveredEnumValueCount] = dimensionCounts(rules, /enum/);
|
|
992
1258
|
const [boundaryPointCount, coveredBoundaryPointCount] = dimensionCounts(rules, /boundary|length|numeric/);
|
|
@@ -1003,7 +1269,7 @@ export async function analyzeBackendTestCaseCoverage(input) {
|
|
|
1003
1269
|
sourceBinding: input.sourceBinding,
|
|
1004
1270
|
inputFiles: await inputFileFacts(input.workspaceRoot, [
|
|
1005
1271
|
...((await exists(readmePath)) ? [readmePath] : []),
|
|
1006
|
-
...(await markdownModuleFiles(input.workspaceRoot)),
|
|
1272
|
+
...(await markdownModuleFiles(input.workspaceRoot, layout)),
|
|
1007
1273
|
...(await Promise.all(input.sourceBinding.referencePaths.map(async (referencePath) => {
|
|
1008
1274
|
const physicalPath = resolveBoundSourcePath(input.workspaceRoot, input.sourceBinding.taskId, referencePath);
|
|
1009
1275
|
return (await exists(physicalPath)) ? physicalPath : "";
|
|
@@ -1057,6 +1323,15 @@ export async function analyzeBackendTestCaseCoverage(input) {
|
|
|
1057
1323
|
"",
|
|
1058
1324
|
facts.status,
|
|
1059
1325
|
"",
|
|
1326
|
+
`- Manifest scope: ${manifest.manifestStatus === "valid" ? "declared-modules" : `fails-closed:${manifest.manifestStatus}`} (declared-missing=${manifest.declaredMissing.length}, unmanifested-advisory=${manifest.unmanifested.length}, module-index-heading-count=${manifest.moduleIndexHeadingCount})`,
|
|
1327
|
+
"",
|
|
1328
|
+
"## Unmanifested Markdown Modules",
|
|
1329
|
+
"",
|
|
1330
|
+
"- Advisory: existing .md files not declared by the README Module Index are excluded from Case/coverage/partition statistics for this round.",
|
|
1331
|
+
...(manifest.unmanifested.length > 0
|
|
1332
|
+
? manifest.unmanifested.map((item) => `- ${item}`)
|
|
1333
|
+
: ["- None"]),
|
|
1334
|
+
"",
|
|
1060
1335
|
"## Coverage Scope",
|
|
1061
1336
|
"",
|
|
1062
1337
|
`- Change Classification: ${facts.coverageScope.changeClassification}`,
|
|
@@ -1140,8 +1415,16 @@ export async function analyzeBackendTestCaseCoverage(input) {
|
|
|
1140
1415
|
function normalizeModuleStem(markdownPath) {
|
|
1141
1416
|
return path.posix.basename(markdownPath).replace(/\.md$/i, "").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").replace(/_+/g, "_");
|
|
1142
1417
|
}
|
|
1143
|
-
function expectedScript(markdownPath, layout) {
|
|
1418
|
+
function expectedScript(markdownPath, layout, declaredScripts = []) {
|
|
1144
1419
|
const resolved = layout ?? resolveBackendTestLayout(undefined);
|
|
1420
|
+
if (declaredScripts.length === 1) {
|
|
1421
|
+
const candidate = declaredScripts[0].replaceAll("\\", "/").replace(/^\.\//, "");
|
|
1422
|
+
const prefix = resolved.scriptDir === "." ? "" : `${resolved.scriptDir}/`;
|
|
1423
|
+
const relative = prefix && candidate.startsWith(prefix) ? candidate.slice(prefix.length) : candidate;
|
|
1424
|
+
if ((!prefix || candidate.startsWith(prefix)) && !relative.includes("..") && /^test_[A-Za-z0-9_.-]+\.py$/.test(path.posix.basename(candidate))) {
|
|
1425
|
+
return candidate;
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1145
1428
|
return `${resolved.scriptDir}/test_${normalizeModuleStem(markdownPath)}.py`;
|
|
1146
1429
|
}
|
|
1147
1430
|
function symbolCaseId(symbol) {
|
|
@@ -1197,8 +1480,15 @@ for top in ast.walk(tree):
|
|
|
1197
1480
|
returned_names.add(node.value.id)
|
|
1198
1481
|
if isinstance(node,ast.Call):
|
|
1199
1482
|
for keyword in node.keywords:
|
|
1200
|
-
if keyword.arg in {'payload','body','request_body','request_json','dto','json','data','json_body'} and isinstance(keyword.value,ast.Name) and keyword.value.id in positional:
|
|
1483
|
+
if keyword.arg in {'payload','body','request_body','request_json','dto','json','data','json_body','params','query','query_params'} and isinstance(keyword.value,ast.Name) and keyword.value.id in positional:
|
|
1201
1484
|
transport.append((keyword.value.id,positional.index(keyword.value.id)-call_offset))
|
|
1485
|
+
if keyword.arg is None and isinstance(keyword.value,ast.Name):
|
|
1486
|
+
alias=keyword.value.id
|
|
1487
|
+
assigned_value=assigned.get(alias)
|
|
1488
|
+
if isinstance(assigned_value,ast.Name) and assigned_value.id in positional:
|
|
1489
|
+
transport.append((assigned_value.id,positional.index(assigned_value.id)-call_offset))
|
|
1490
|
+
elif isinstance(assigned_value,ast.Call) and isinstance(assigned_value.func,ast.Name) and assigned_value.func.id == 'dict' and assigned_value.args and isinstance(assigned_value.args[0],ast.Name) and assigned_value.args[0].id in positional:
|
|
1491
|
+
transport.append((assigned_value.args[0].id,positional.index(assigned_value.args[0].id)-call_offset))
|
|
1202
1492
|
if isinstance(node.func,ast.Attribute) and node.func.attr.lower() in {'post','put','patch'} and len(node.args) >= 2:
|
|
1203
1493
|
candidate=node.args[1]
|
|
1204
1494
|
if isinstance(candidate,ast.Name) and candidate.id in positional:
|
|
@@ -1210,6 +1500,17 @@ for top in ast.walk(tree):
|
|
|
1210
1500
|
matched=node.args[nested_position] if nested_position >= 0 and nested_position < len(node.args) else None
|
|
1211
1501
|
if isinstance(matched,ast.Name) and matched.id in positional:
|
|
1212
1502
|
transport.append((matched.id,positional.index(matched.id)-call_offset))
|
|
1503
|
+
# Assignment order in ast.walk is not source order. Re-scan **kwargs
|
|
1504
|
+
# aliases once the complete local assignment table is available.
|
|
1505
|
+
for node in ast.walk(top):
|
|
1506
|
+
if not isinstance(node,ast.Call): continue
|
|
1507
|
+
for keyword in node.keywords:
|
|
1508
|
+
if keyword.arg is not None or not isinstance(keyword.value,ast.Name): continue
|
|
1509
|
+
assigned_value=assigned.get(keyword.value.id)
|
|
1510
|
+
if isinstance(assigned_value,ast.Name) and assigned_value.id in positional:
|
|
1511
|
+
transport.append((assigned_value.id,positional.index(assigned_value.id)-call_offset))
|
|
1512
|
+
elif isinstance(assigned_value,ast.Call) and isinstance(assigned_value.func,ast.Name) and assigned_value.func.id == 'dict' and assigned_value.args and isinstance(assigned_value.args[0],ast.Name) and assigned_value.args[0].id in positional:
|
|
1513
|
+
transport.append((assigned_value.args[0].id,positional.index(assigned_value.args[0].id)-call_offset))
|
|
1213
1514
|
for returned_name in returned_names:
|
|
1214
1515
|
entries=mutated.get(returned_name,[])
|
|
1215
1516
|
if entries:
|
|
@@ -1218,7 +1519,7 @@ for top in ast.walk(tree):
|
|
|
1218
1519
|
for node in ast.walk(top):
|
|
1219
1520
|
if not isinstance(node,ast.Call): continue
|
|
1220
1521
|
for keyword in node.keywords:
|
|
1221
|
-
if keyword.arg in {'payload','body','request_body','request_json','dto','json','data','json_body'} and isinstance(keyword.value,ast.Name) and keyword.value.id in assigned:
|
|
1522
|
+
if keyword.arg in {'payload','body','request_body','request_json','dto','json','data','json_body','params','query','query_params'} and isinstance(keyword.value,ast.Name) and keyword.value.id in assigned:
|
|
1222
1523
|
transport_shapes.append(assigned[keyword.value.id])
|
|
1223
1524
|
if candidates: FUNCTION_PAYLOADS[top.name]=candidates
|
|
1224
1525
|
if transport_shapes: FUNCTION_TRANSPORT_SHAPES[top.name]=transport_shapes
|
|
@@ -1274,8 +1575,9 @@ def literal(node):
|
|
|
1274
1575
|
return repr(node.value)
|
|
1275
1576
|
return None
|
|
1276
1577
|
|
|
1277
|
-
def collect_dict(node, prefix, paths, values):
|
|
1578
|
+
def collect_dict(node, prefix, paths, values, parameters=None):
|
|
1278
1579
|
if not isinstance(node, ast.Dict): return
|
|
1580
|
+
parameters = parameters or {}
|
|
1279
1581
|
for key,value in zip(node.keys,node.values):
|
|
1280
1582
|
if not isinstance(key, ast.Constant) or not isinstance(key.value,str): continue
|
|
1281
1583
|
# Ignore writer helper/meta keys that are not DTO request fields.
|
|
@@ -1285,12 +1587,16 @@ def collect_dict(node, prefix, paths, values):
|
|
|
1285
1587
|
paths.add(current)
|
|
1286
1588
|
lv=literal(value)
|
|
1287
1589
|
if lv is not None: values.setdefault(current,set()).add(lv)
|
|
1288
|
-
|
|
1590
|
+
elif isinstance(value, ast.Name) and value.id in parameters:
|
|
1591
|
+
for bound in parameters[value.id]:
|
|
1592
|
+
bound_lv=literal(bound)
|
|
1593
|
+
if bound_lv is not None: values.setdefault(current,set()).add(bound_lv)
|
|
1594
|
+
if isinstance(value, ast.Dict): collect_dict(value,current,paths,values,parameters)
|
|
1289
1595
|
elif isinstance(value,(ast.List,ast.Tuple)):
|
|
1290
1596
|
for item in value.elts:
|
|
1291
|
-
if isinstance(item,ast.Dict): collect_dict(item,current,paths,values)
|
|
1597
|
+
if isinstance(item,ast.Dict): collect_dict(item,current,paths,values,parameters)
|
|
1292
1598
|
|
|
1293
|
-
PAYLOAD_NAMES={'payload','body','request_body','request_json','dto','json','data','json_body'}
|
|
1599
|
+
PAYLOAD_NAMES={'payload','body','request_body','request_json','dto','json','data','json_body','params','query','query_params'}
|
|
1294
1600
|
|
|
1295
1601
|
def shape_only(node):
|
|
1296
1602
|
if isinstance(node,ast.Dict):
|
|
@@ -1324,6 +1630,11 @@ def payload_expr_nodes(expr, assigned, parameters, seen=None):
|
|
|
1324
1630
|
if isinstance(key,ast.Constant) and key.value == expr.slice.value:
|
|
1325
1631
|
result.extend(shape_only(item) for item in payload_expr_nodes(value,assigned,parameters,set(seen)))
|
|
1326
1632
|
return result
|
|
1633
|
+
if isinstance(expr,ast.IfExp):
|
|
1634
|
+
result=[]
|
|
1635
|
+
result.extend(payload_expr_nodes(expr.body,assigned,parameters,set(seen)))
|
|
1636
|
+
result.extend(payload_expr_nodes(expr.orelse,assigned,parameters,set(seen)))
|
|
1637
|
+
return result
|
|
1327
1638
|
if isinstance(expr,ast.Call):
|
|
1328
1639
|
result=[]
|
|
1329
1640
|
if isinstance(expr.func,ast.Name) and expr.func.id in FUNCTION_PAYLOADS:
|
|
@@ -1364,6 +1675,33 @@ def decorator_payload_nodes(parameters,assigned):
|
|
|
1364
1675
|
for value in values: result.extend(payload_expr_nodes(value,assigned,parameters))
|
|
1365
1676
|
return result
|
|
1366
1677
|
|
|
1678
|
+
def decorator_payload_nodes_by_tp(fn,assigned):
|
|
1679
|
+
result={}
|
|
1680
|
+
function_payload_nodes=payload_nodes(fn)
|
|
1681
|
+
for dec in fn.decorator_list:
|
|
1682
|
+
if not isinstance(dec,ast.Call) or not isinstance(dec.func,ast.Attribute) or dec.func.attr != 'parametrize' or len(dec.args) < 2: continue
|
|
1683
|
+
if not isinstance(dec.args[0],ast.Constant) or not isinstance(dec.args[0].value,str): continue
|
|
1684
|
+
names=[item.strip() for item in dec.args[0].value.split(',')]
|
|
1685
|
+
rows=dec.args[1]
|
|
1686
|
+
if isinstance(rows,ast.Name) and rows.id in GLOBAL_VALUES: rows=GLOBAL_VALUES[rows.id]
|
|
1687
|
+
for node in ast.walk(rows):
|
|
1688
|
+
if not isinstance(node,ast.Call) or not isinstance(node.func,ast.Attribute) or node.func.attr != 'param': continue
|
|
1689
|
+
tp=None
|
|
1690
|
+
for keyword in node.keywords:
|
|
1691
|
+
if keyword.arg == 'id' and isinstance(keyword.value,ast.Constant) and isinstance(keyword.value.value,str) and keyword.value.value.startswith('TP-'):
|
|
1692
|
+
tp=keyword.value.value
|
|
1693
|
+
if not tp: continue
|
|
1694
|
+
parameters={}
|
|
1695
|
+
for index,name in enumerate(names):
|
|
1696
|
+
if index < len(node.args): parameters.setdefault(name,[]).append(node.args[index])
|
|
1697
|
+
payload_nodes_for_tp=decorator_payload_nodes(parameters,assigned)
|
|
1698
|
+
if not payload_nodes_for_tp:
|
|
1699
|
+
payload_nodes_for_tp=function_payload_nodes
|
|
1700
|
+
paths=set(); values={}
|
|
1701
|
+
for payload_node in payload_nodes_for_tp: collect_dict(payload_node,'',paths,values,parameters)
|
|
1702
|
+
result[tp]={key:sorted(items) for key,items in sorted(values.items())}
|
|
1703
|
+
return result
|
|
1704
|
+
|
|
1367
1705
|
def fallback_payload_nodes(fn):
|
|
1368
1706
|
result=[]
|
|
1369
1707
|
assigned={}
|
|
@@ -1393,7 +1731,7 @@ def fallback_payload_nodes(fn):
|
|
|
1393
1731
|
|
|
1394
1732
|
def is_direct_transport_call(node):
|
|
1395
1733
|
if not isinstance(node,ast.Call) or not isinstance(node.func,ast.Attribute): return False
|
|
1396
|
-
if node.func.attr.lower() not in {'get','post','put','patch','delete','request'}: return False
|
|
1734
|
+
if node.func.attr.lower() not in {'get','post','put','patch','delete','request','call'}: return False
|
|
1397
1735
|
receiver_tokens=[]
|
|
1398
1736
|
current=node.func.value
|
|
1399
1737
|
while isinstance(current,ast.Attribute):
|
|
@@ -1402,6 +1740,20 @@ def is_direct_transport_call(node):
|
|
|
1402
1740
|
if isinstance(current,ast.Name): receiver_tokens.append(current.id.lower())
|
|
1403
1741
|
return any(token in {'requests','httpx','client','session','api_client','http_client'} or token.endswith('_client') for token in receiver_tokens)
|
|
1404
1742
|
|
|
1743
|
+
HTTP_METHODS={'GET','POST','PUT','PATCH','DELETE','HEAD','OPTIONS'}
|
|
1744
|
+
HTTP_FIXTURE_NAMES={'http','http_client','client','api_client','session'}
|
|
1745
|
+
|
|
1746
|
+
def is_fixture_http_call(node):
|
|
1747
|
+
# R12: http("POST", path, json_body={"title": title}) is a Name-call fixture, not client.post.
|
|
1748
|
+
# R15: http_client(operation, path, json_body={...}) still transports when operation is a parametrized method.
|
|
1749
|
+
if not isinstance(node,ast.Call) or not isinstance(node.func,ast.Name) or not node.args: return False
|
|
1750
|
+
first=node.args[0]
|
|
1751
|
+
if isinstance(first,ast.Constant) and isinstance(first.value,str) and first.value.upper() in HTTP_METHODS:
|
|
1752
|
+
return True
|
|
1753
|
+
func=node.func.id.lower()
|
|
1754
|
+
httpish=func in HTTP_FIXTURE_NAMES or func.endswith('_client')
|
|
1755
|
+
return httpish and isinstance(first,ast.Name)
|
|
1756
|
+
|
|
1405
1757
|
def payload_nodes(fn):
|
|
1406
1758
|
result=[]
|
|
1407
1759
|
assigned={}
|
|
@@ -1424,7 +1776,7 @@ def payload_nodes(fn):
|
|
|
1424
1776
|
# Observe local payload/body variables only when they flow into a direct
|
|
1425
1777
|
# HTTP transport call. Arbitrary setup variables are not target requests.
|
|
1426
1778
|
for node in ast.walk(fn):
|
|
1427
|
-
if not is_direct_transport_call(node): continue
|
|
1779
|
+
if not (is_direct_transport_call(node) or is_fixture_http_call(node)): continue
|
|
1428
1780
|
for keyword in node.keywords:
|
|
1429
1781
|
if keyword.arg in PAYLOAD_NAMES: result.extend(payload_expr_nodes(keyword.value,assigned,parameters))
|
|
1430
1782
|
return result
|
|
@@ -1434,13 +1786,14 @@ for fn in ast.walk(tree):
|
|
|
1434
1786
|
if isinstance(fn,(ast.FunctionDef,ast.AsyncFunctionDef)) and fn.name.startswith('test_'):
|
|
1435
1787
|
paths=set(); values={}
|
|
1436
1788
|
fallback_paths=set(); fallback_values={}
|
|
1437
|
-
for node in payload_nodes(fn): collect_dict(node,'',paths,values)
|
|
1438
|
-
for node in fallback_payload_nodes(fn): collect_dict(node,'',fallback_paths,fallback_values)
|
|
1789
|
+
for node in payload_nodes(fn): collect_dict(node,'',paths,values,{})
|
|
1790
|
+
for node in fallback_payload_nodes(fn): collect_dict(node,'',fallback_paths,fallback_values,{})
|
|
1439
1791
|
out[fn.name]={
|
|
1440
1792
|
'paths':sorted(paths),
|
|
1441
1793
|
'values':{key:sorted(items) for key,items in sorted(values.items())},
|
|
1442
1794
|
'fallbackPaths':sorted(fallback_paths),
|
|
1443
1795
|
'fallbackValues':{key:sorted(items) for key,items in sorted(fallback_values.items())},
|
|
1796
|
+
'valuesByTestPoint':decorator_payload_nodes_by_tp(fn,{}),
|
|
1444
1797
|
}
|
|
1445
1798
|
print(json.dumps(out,ensure_ascii=True))
|
|
1446
1799
|
`;
|
|
@@ -1448,8 +1801,26 @@ print(json.dumps(out,ensure_ascii=True))
|
|
|
1448
1801
|
// Windows Python may expose stdin as GBK; decoding generated Chinese/emoji
|
|
1449
1802
|
// source through that locale can create surrogateescape code points and make
|
|
1450
1803
|
// ast.parse fail with "surrogates not allowed".
|
|
1451
|
-
|
|
1452
|
-
|
|
1804
|
+
// POSIX images usually expose only `python3` (modern macOS has no `python`);
|
|
1805
|
+
// Windows often has a real `python` plus a Microsoft Store `python3` stub.
|
|
1806
|
+
// A missing interpreter must not silently degrade to empty payload shapes.
|
|
1807
|
+
const interpreterCandidates = process.platform === "win32" ? ["python", "python3"] : ["python3", "python"];
|
|
1808
|
+
let result;
|
|
1809
|
+
for (const interpreter of interpreterCandidates) {
|
|
1810
|
+
const attempt = spawnSync(interpreter, ["-c", program], {
|
|
1811
|
+
input: Buffer.from(source, "utf8"),
|
|
1812
|
+
encoding: "utf8",
|
|
1813
|
+
maxBuffer: 4 * 1024 * 1024,
|
|
1814
|
+
windowsHide: true,
|
|
1815
|
+
});
|
|
1816
|
+
// Interpreter missing/unspawnable → try the next candidate. A spawned
|
|
1817
|
+
// interpreter that exits nonzero analyzed real input; do not retry then.
|
|
1818
|
+
if (attempt.error)
|
|
1819
|
+
continue;
|
|
1820
|
+
result = attempt;
|
|
1821
|
+
break;
|
|
1822
|
+
}
|
|
1823
|
+
if (!result || result.status !== 0 || !result.stdout.trim())
|
|
1453
1824
|
return new Map();
|
|
1454
1825
|
try {
|
|
1455
1826
|
const parsed = JSON.parse(result.stdout);
|
|
@@ -1468,14 +1839,39 @@ function metadataTestPoints(region, label) {
|
|
|
1468
1839
|
const match = new RegExp(`^\\s*${escaped}\\s*:\\s*(.*)$`, "mi").exec(region);
|
|
1469
1840
|
return orderedUnique(match?.[1]?.match(/\bTP-[A-Z0-9]+(?:-[A-Z0-9]+)*\b/g) ?? []);
|
|
1470
1841
|
}
|
|
1842
|
+
function isPytestDecoratorOrContinuationLine(line) {
|
|
1843
|
+
const trimmed = line.trim();
|
|
1844
|
+
if (!trimmed)
|
|
1845
|
+
return false;
|
|
1846
|
+
if (trimmed.startsWith("#"))
|
|
1847
|
+
return true;
|
|
1848
|
+
if (trimmed.startsWith("@"))
|
|
1849
|
+
return true;
|
|
1850
|
+
// Multi-line decorator argument lists: @pytest.mark.parametrize(\n "x", [\n pytest.param(..., id="TP-...")\n ]\n)
|
|
1851
|
+
return /^[\]\),]/.test(trimmed) || /[\(\[{,]$/.test(trimmed) || /\bpytest\.param\s*\(/.test(trimmed);
|
|
1852
|
+
}
|
|
1471
1853
|
function pytestFunctionRegionStart(source, functionIndex) {
|
|
1472
1854
|
let regionStart = source.lastIndexOf("\n", functionIndex - 1) + 1;
|
|
1473
1855
|
let cursor = regionStart;
|
|
1856
|
+
let blankRun = 0;
|
|
1474
1857
|
while (cursor > 0) {
|
|
1475
1858
|
const previousEnd = cursor - 1;
|
|
1476
1859
|
const previousStart = source.lastIndexOf("\n", previousEnd - 1) + 1;
|
|
1477
1860
|
const previous = source.slice(previousStart, previousEnd).replace(/\r$/, "");
|
|
1478
|
-
|
|
1861
|
+
const trimmed = previous.trim();
|
|
1862
|
+
if (!trimmed) {
|
|
1863
|
+
blankRun += 1;
|
|
1864
|
+
// Keep walking across a small blank gap so a decorator is still bound to
|
|
1865
|
+
// the following test when writers insert one empty line before `def`.
|
|
1866
|
+
if (blankRun > 2)
|
|
1867
|
+
break;
|
|
1868
|
+
cursor = previousStart;
|
|
1869
|
+
continue;
|
|
1870
|
+
}
|
|
1871
|
+
blankRun = 0;
|
|
1872
|
+
if (/^(?:async\s+)?def\s+/.test(trimmed) || /^(?:async\s+)?class\s+/.test(trimmed))
|
|
1873
|
+
break;
|
|
1874
|
+
if (!isPytestDecoratorOrContinuationLine(previous))
|
|
1479
1875
|
break;
|
|
1480
1876
|
regionStart = previousStart;
|
|
1481
1877
|
cursor = previousStart;
|
|
@@ -1505,12 +1901,14 @@ function pytestFunctionBodyEnd(source, signatureEnd, functionIndent) {
|
|
|
1505
1901
|
}
|
|
1506
1902
|
function pytestParameterCollections(source) {
|
|
1507
1903
|
const collections = new Map();
|
|
1508
|
-
for (const match of source.matchAll(/^(
|
|
1904
|
+
for (const match of source.matchAll(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*\[(?![^\r\n]*\])([\s\S]*?)^\]/gm)) {
|
|
1509
1905
|
const explicitIds = [...match[2].matchAll(/\bid\s*=\s*["'](TP-[A-Z0-9-]+)["']/g)].map((item) => item[1]);
|
|
1510
1906
|
const factoryIds = explicitIds.length === 0
|
|
1511
1907
|
? [...match[2].matchAll(/["'](TP-[A-Z0-9-]+)["']/g)].map((item) => item[1])
|
|
1512
1908
|
: [];
|
|
1513
|
-
|
|
1909
|
+
const ids = orderedUnique([...explicitIds, ...factoryIds]);
|
|
1910
|
+
if (ids.length > 0)
|
|
1911
|
+
collections.set(match[1], ids);
|
|
1514
1912
|
}
|
|
1515
1913
|
return collections;
|
|
1516
1914
|
}
|
|
@@ -1553,6 +1951,7 @@ function pytestSymbols(script, source) {
|
|
|
1553
1951
|
payloadValues: payloadShape.values,
|
|
1554
1952
|
fallbackPayloadPaths: payloadShape.fallbackPaths ?? [],
|
|
1555
1953
|
fallbackPayloadValues: payloadShape.fallbackValues ?? {},
|
|
1954
|
+
payloadValuesByTestPoint: payloadShape.valuesByTestPoint ?? {},
|
|
1556
1955
|
};
|
|
1557
1956
|
});
|
|
1558
1957
|
}
|
|
@@ -1566,6 +1965,39 @@ function executionSignature(testCase) {
|
|
|
1566
1965
|
.join("\n");
|
|
1567
1966
|
return createHash("sha256").update(normalized).digest("hex");
|
|
1568
1967
|
}
|
|
1968
|
+
function normalizePythonLiteralValue(value) {
|
|
1969
|
+
const trimmed = value.trim();
|
|
1970
|
+
if ((trimmed.startsWith("'") && trimmed.endsWith("'")) || (trimmed.startsWith('"') && trimmed.endsWith('"'))) {
|
|
1971
|
+
return trimmed.slice(1, -1);
|
|
1972
|
+
}
|
|
1973
|
+
if (trimmed === "True")
|
|
1974
|
+
return "true";
|
|
1975
|
+
if (trimmed === "False")
|
|
1976
|
+
return "false";
|
|
1977
|
+
if (trimmed === "None")
|
|
1978
|
+
return "null";
|
|
1979
|
+
return trimmed;
|
|
1980
|
+
}
|
|
1981
|
+
function intentionalInvalidEnumVariant(input) {
|
|
1982
|
+
if (!input.testCase.testPointBindings.some((binding) => binding.mode === "variant" && binding.testPoint === input.testPoint))
|
|
1983
|
+
return false;
|
|
1984
|
+
const inferred = inferScenarioParamIntent({ tpId: input.testPoint, caseBody: input.testCase.body });
|
|
1985
|
+
if (inferred.intentSource !== "machine-line" || inferred.field?.toLowerCase() !== input.field.toLowerCase())
|
|
1986
|
+
return false;
|
|
1987
|
+
const observed = normalizePythonLiteralValue(input.observedValue);
|
|
1988
|
+
if (input.allowed.includes(observed))
|
|
1989
|
+
return false;
|
|
1990
|
+
if (inferred.intent === "enum-invalid" || inferred.intent === "wrong-type")
|
|
1991
|
+
return true;
|
|
1992
|
+
if (inferred.intent === "null")
|
|
1993
|
+
return observed === "None" || observed === "null";
|
|
1994
|
+
if (inferred.intent === "empty")
|
|
1995
|
+
return observed === "";
|
|
1996
|
+
if (!inferred.intent.startsWith("custom-literal:"))
|
|
1997
|
+
return false;
|
|
1998
|
+
const expected = normalizePythonLiteralValue(inferred.example ?? inferred.intent.slice("custom-literal:".length));
|
|
1999
|
+
return observed === expected;
|
|
2000
|
+
}
|
|
1569
2001
|
function assessPayloadContract(testCase, refs) {
|
|
1570
2002
|
const requiredPaths = testCase.payloadContract.requiredPaths;
|
|
1571
2003
|
const directObservedPaths = orderedUnique(refs.flatMap((item) => item.payloadPaths));
|
|
@@ -1587,13 +2019,19 @@ function assessPayloadContract(testCase, refs) {
|
|
|
1587
2019
|
? observedPaths.filter((item) => !allowedPaths.includes(item) && !allowedPaths.some((allowed) => item.startsWith(`${allowed}.`)))
|
|
1588
2020
|
: [];
|
|
1589
2021
|
const enumMismatches = [];
|
|
1590
|
-
const delegatesInvalidEnumToScenarioGate = testCase.testPointBindings
|
|
1591
|
-
.filter((binding) => binding.mode === "variant")
|
|
1592
|
-
.some((binding) => /(?:ENUM|CATEGORY).*(?:INVALID|UNKNOWN|CASE|WHITESPACE|EMPTY|WRONG-TYPE)|(?:INVALID|UNKNOWN|CASE|WHITESPACE|EMPTY|WRONG-TYPE).*(?:ENUM|CATEGORY)/.test(binding.testPoint));
|
|
1593
2022
|
for (const [field, allowed] of Object.entries(testCase.payloadContract.enumValues)) {
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
|
|
2023
|
+
const aggregated = orderedUnique(refs.flatMap((item) => (useFallback ? item.fallbackPayloadValues[field] : item.payloadValues[field]) ?? []));
|
|
2024
|
+
const byTestPoint = orderedUnique(refs.flatMap((item) => Object.values(item.payloadValuesByTestPoint).flatMap((values) => values[field] ?? [])));
|
|
2025
|
+
const observed = orderedUnique([...aggregated, ...byTestPoint]);
|
|
2026
|
+
for (const rawValue of observed) {
|
|
2027
|
+
const value = normalizePythonLiteralValue(rawValue);
|
|
2028
|
+
if (allowed.includes(value))
|
|
2029
|
+
continue;
|
|
2030
|
+
const associatedTestPoints = orderedUnique(refs.flatMap((item) => Object.entries(item.payloadValuesByTestPoint)
|
|
2031
|
+
.filter(([, values]) => (values[field] ?? []).some((itemValue) => itemValue === rawValue || normalizePythonLiteralValue(itemValue) === value))
|
|
2032
|
+
.map(([testPoint]) => testPoint)));
|
|
2033
|
+
const intentionallyInvalid = associatedTestPoints.length > 0 && associatedTestPoints.every((testPoint) => intentionalInvalidEnumVariant({ testCase, testPoint, field, observedValue: rawValue, allowed }));
|
|
2034
|
+
if (!intentionallyInvalid)
|
|
1597
2035
|
enumMismatches.push(`${field}=${value}; allowed=${allowed.join("|")}`);
|
|
1598
2036
|
}
|
|
1599
2037
|
}
|
|
@@ -1611,7 +2049,7 @@ export async function analyzeBackendTestMarkdownPytestCorrespondence(input) {
|
|
|
1611
2049
|
const layout = input.layout ?? resolveBackendTestLayout(undefined);
|
|
1612
2050
|
const cases = await parseMarkdownCases(input.workspaceRoot, layout);
|
|
1613
2051
|
const modulePaths = orderedUnique(cases.map((item) => item.markdownPath));
|
|
1614
|
-
const scripts = orderedUnique(cases.flatMap((item) => [
|
|
2052
|
+
const scripts = orderedUnique(cases.flatMap((item) => [expectedScript(item.markdownPath, layout, item.declaredScripts)]));
|
|
1615
2053
|
const allSymbols = [];
|
|
1616
2054
|
const scriptFiles = [];
|
|
1617
2055
|
for (const script of scripts) {
|
|
@@ -1624,7 +2062,7 @@ export async function analyzeBackendTestMarkdownPytestCorrespondence(input) {
|
|
|
1624
2062
|
const findings = [];
|
|
1625
2063
|
const entries = [];
|
|
1626
2064
|
for (const testCase of cases) {
|
|
1627
|
-
const expected = expectedScript(testCase.markdownPath, layout);
|
|
2065
|
+
const expected = expectedScript(testCase.markdownPath, layout, testCase.declaredScripts);
|
|
1628
2066
|
const declared = testCase.declaredScripts[0];
|
|
1629
2067
|
const refs = allSymbols.filter((item) => item.caseIds.includes(testCase.caseId));
|
|
1630
2068
|
const actualScripts = orderedUnique(refs.map((item) => item.script));
|
|
@@ -1782,8 +2220,9 @@ export async function analyzeBackendTestMarkdownPytestCorrespondence(input) {
|
|
|
1782
2220
|
for (const [signature, owners] of duplicateSignatureGroups)
|
|
1783
2221
|
findings.push(`duplicate execution signature ${signature}: ${orderedUnique(owners).join(", ")}`);
|
|
1784
2222
|
const exactModuleCount = modulePaths.filter((modulePath) => {
|
|
1785
|
-
const expected = expectedScript(modulePath, layout);
|
|
1786
2223
|
const moduleCases = cases.filter((item) => item.markdownPath === modulePath);
|
|
2224
|
+
const moduleDeclaredScripts = orderedUnique(moduleCases.flatMap((item) => item.declaredScripts));
|
|
2225
|
+
const expected = expectedScript(modulePath, layout, moduleDeclaredScripts);
|
|
1787
2226
|
return moduleCases.every((item) => item.declaredScripts.length === 1 && item.declaredScripts[0] === expected) && scriptFiles.some((file) => path.relative(input.workspaceRoot, file).replaceAll(path.sep, "/") === expected);
|
|
1788
2227
|
}).length;
|
|
1789
2228
|
const caseEntries = entries.filter((entry) => entry.cardinality !== "0:1");
|
|
@@ -1794,7 +2233,7 @@ export async function analyzeBackendTestMarkdownPytestCorrespondence(input) {
|
|
|
1794
2233
|
status: findings.length === 0 ? "PASS" : "FAIL",
|
|
1795
2234
|
inputFiles: await inputFileFacts(input.workspaceRoot, [
|
|
1796
2235
|
path.join(input.workspaceRoot, ...layout.readmePath.split("/")),
|
|
1797
|
-
...(await markdownModuleFiles(input.workspaceRoot)),
|
|
2236
|
+
...(await markdownModuleFiles(input.workspaceRoot, layout)),
|
|
1798
2237
|
...scriptFiles,
|
|
1799
2238
|
].filter((file) => file && path.isAbsolute(file))),
|
|
1800
2239
|
summary: {
|