@skyramp/mcp 0.4.1 → 0.4.2-rc.2
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/build/commands/localDevTestChangesCommand.js +2 -1
- package/build/commands/recommendTestsAndExecuteCommand.js +15 -7
- package/build/commands/testThisEndpointCommand.js +35 -6
- package/build/execution/wrapperConfig.d.ts +56 -0
- package/build/execution/wrapperConfig.js +155 -0
- package/build/index.js +40 -10
- package/build/playwright/blueprintDigest.js +28 -7
- package/build/playwright/registerPlaywrightTools.js +47 -28
- package/build/playwright/traceExportStore.d.ts +22 -0
- package/build/playwright/traceExportStore.js +81 -0
- package/build/playwright/traceRecordingPrompt.js +11 -3
- package/build/prompts/code-reuse.js +118 -49
- package/build/prompts/fix-error-prompt.d.ts +9 -1
- package/build/prompts/fix-error-prompt.js +31 -28
- package/build/prompts/local-dev/local-dev-plan.d.ts +3 -0
- package/build/prompts/local-dev/local-dev-plan.js +8 -23
- package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
- package/build/prompts/local-dev/local-dev-prompts.js +31 -4
- package/build/prompts/modularization/integration-test-modularization.js +13 -6
- package/build/prompts/modularization/ui-test-modularization.js +1 -1
- package/build/prompts/personas.js +1 -1
- package/build/prompts/pom-aware-code-reuse.js +7 -9
- package/build/prompts/reuse-hand-off.d.ts +64 -0
- package/build/prompts/reuse-hand-off.js +130 -0
- package/build/prompts/shared-helper-policy.d.ts +124 -2
- package/build/prompts/shared-helper-policy.js +178 -12
- package/build/prompts/startTraceCollectionPrompts.js +1 -1
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +7 -8
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
- package/build/prompts/sut-setup/shared.d.ts +4 -1
- package/build/prompts/sut-setup/shared.js +6 -4
- package/build/prompts/test-maintenance/actionsInstructions.d.ts +19 -11
- package/build/prompts/test-maintenance/actionsInstructions.js +47 -26
- package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +16 -8
- package/build/prompts/test-maintenance/drift-analysis-prompt.js +93 -38
- package/build/prompts/test-maintenance/driftAnalysisSections.js +5 -3
- package/build/prompts/test-maintenance/driftAnalysisShared.js +4 -2
- package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +8 -5
- package/build/prompts/test-recommendation/recommendationSections.js +19 -8
- package/build/prompts/test-recommendation/recommendationShared.d.ts +1 -1
- package/build/prompts/test-recommendation/recommendationShared.js +0 -1
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +5 -2
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +10 -7
- package/build/prompts/testbot/testbot-prompts.js +133 -63
- package/build/recommendation/answers.js +18 -9
- package/build/recommendation/pullRequestText.js +1 -1
- package/build/recommendation/registerPlan.js +31 -17
- package/build/recommendation/subjectStep.d.ts +8 -10
- package/build/recommendation/subjectStep.js +17 -16
- package/build/recommendation/types.d.ts +71 -17
- package/build/recommendation/types.js +9 -15
- package/build/recommendation/verifierContracts.d.ts +7 -3
- package/build/recommendation/verifierContracts.js +8 -4
- package/build/recommendation/verifiers/changedFile.js +11 -13
- package/build/recommendation/verifiers/citedPath.d.ts +8 -0
- package/build/recommendation/verifiers/citedPath.js +16 -2
- package/build/recommendation/verifiers/coverage.d.ts +2 -2
- package/build/recommendation/verifiers/coverage.js +190 -134
- package/build/recommendation/verifiers/defects.js +56 -16
- package/build/recommendation/verifiers/deliveredMatchesPlan.d.ts +7 -1
- package/build/recommendation/verifiers/deliveredMatchesPlan.js +28 -14
- package/build/recommendation/verifiers/endpointGrounded.js +14 -8
- package/build/recommendation/verifiers/existingCoverage.d.ts +6 -0
- package/build/recommendation/verifiers/existingCoverage.js +30 -21
- package/build/recommendation/verifiers/expectedOutcome.js +17 -8
- package/build/recommendation/verifiers/expectedValueSourced.js +54 -43
- package/build/recommendation/verifiers/issueTraceability.d.ts +5 -0
- package/build/recommendation/verifiers/issueTraceability.js +64 -7
- package/build/recommendation/verifiers/removedElementGuarded.js +19 -11
- package/build/recommendation/verifiers/reportedCategory.js +9 -4
- package/build/recommendation/verifiers/requirementSourced.js +34 -21
- package/build/recommendation/verifiers/screenRoute.js +15 -10
- package/build/recommendation/verifiers/statedDifference.js +15 -8
- package/build/recommendation/verifiers/uiElementGrounded.js +50 -16
- package/build/resources/analysisResources.js +7 -3
- package/build/resources/progressResource.js +4 -2
- package/build/resources/sutSetupResource.js +20 -2
- package/build/resources/testbotResource.js +19 -1
- package/build/services/AnalyticsService.js +3 -1
- package/build/services/ScenarioGenerationService.js +5 -5
- package/build/services/TestDiscoveryService.js +53 -9
- package/build/services/TestExecutionService.js +63 -21
- package/build/services/TestGenerationService.d.ts +1 -1
- package/build/services/TestGenerationService.js +43 -24
- package/build/skills/enhanceAssertionsSkill.d.ts +45 -0
- package/build/skills/enhanceAssertionsSkill.js +103 -0
- package/build/skills/fixTestImportErrorsSkill.d.ts +2 -2
- package/build/skills/fixTestImportErrorsSkill.js +2 -2
- package/build/skills/runTestSkill.d.ts +6 -0
- package/build/skills/runTestSkill.js +17 -0
- package/build/skills/skillFiles.d.ts +38 -0
- package/build/skills/skillFiles.js +94 -0
- package/build/skills/validateAssertionAlignmentSkill.d.ts +34 -0
- package/build/skills/validateAssertionAlignmentSkill.js +59 -0
- package/build/tool-phases.js +4 -1
- package/build/tools/auth/loginTool.js +3 -1
- package/build/tools/auth/logoutTool.js +3 -1
- package/build/tools/budgetExcuse.d.ts +15 -0
- package/build/tools/budgetExcuse.js +113 -0
- package/build/tools/code-refactor/alignAssertionsTool.d.ts +2 -0
- package/build/tools/code-refactor/alignAssertionsTool.js +51 -0
- package/build/tools/code-refactor/assertion-state.d.ts +1 -1
- package/build/tools/code-refactor/assertion-state.js +1 -1
- package/build/tools/code-refactor/assertionOperations.d.ts +44 -0
- package/build/tools/code-refactor/assertionOperations.js +82 -0
- package/build/tools/code-refactor/assertionSkillTools.d.ts +3 -0
- package/build/tools/code-refactor/assertionSkillTools.js +86 -0
- package/build/tools/code-refactor/codeReuseTool.js +27 -3
- package/build/tools/code-refactor/enhanceAssertionsTool.js +19 -83
- package/build/tools/code-refactor/gate-markers.d.ts +51 -0
- package/build/tools/code-refactor/gate-markers.js +95 -0
- package/build/tools/code-refactor/retrofit-state.d.ts +3 -1
- package/build/tools/code-refactor/retrofit-state.js +44 -2
- package/build/tools/code-refactor/reuse-outcome.d.ts +23 -1
- package/build/tools/code-refactor/reuse-outcome.js +36 -13
- package/build/tools/code-refactor/reuse-state.d.ts +90 -16
- package/build/tools/code-refactor/reuse-state.js +191 -61
- package/build/tools/code-refactor/utils-verify-gates.d.ts +4 -0
- package/build/tools/code-refactor/utils-verify-gates.js +269 -30
- package/build/tools/code-refactor/verify-gates.d.ts +15 -1
- package/build/tools/code-refactor/verify-gates.js +36 -4
- package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
- package/build/tools/enrichTestWithMocksTool.js +9 -5
- package/build/tools/executeSkyrampTestTool.d.ts +118 -48
- package/build/tools/executeSkyrampTestTool.js +998 -372
- package/build/tools/execution-video-state.js +1 -1
- package/build/tools/fixErrorTool.js +5 -6
- package/build/tools/generate-tests/batchMockGenerationTool.js +1 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +114 -73
- package/build/tools/generate-tests/generateContractRestTool.js +34 -16
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
- package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.js +22 -7
- package/build/tools/generate-tests/generateMockRestTool.js +3 -1
- package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
- package/build/tools/generate-tests/generateUIRestTool.js +11 -2
- package/build/tools/generate-tests/loadTestSchema.js +1 -3
- package/build/tools/generate-tests/planGuard.js +6 -3
- package/build/tools/generate-tests/scenarioFileIdentity.js +4 -1
- package/build/tools/generate-tests/scenarioLint.js +17 -5
- package/build/tools/generate-tests/trace-reuse-guard.js +5 -2
- package/build/tools/generateEnrichedIntegrationTestTool.js +9 -3
- package/build/tools/one-click/oneClickTool.js +3 -1
- package/build/tools/preflightMockCheckTool.js +23 -7
- package/build/tools/submitReportTool.d.ts +51 -12
- package/build/tools/submitReportTool.js +988 -161
- package/build/tools/test-management/actionsTool.js +241 -51
- package/build/tools/test-management/analyzeChangesTool.d.ts +8 -9
- package/build/tools/test-management/analyzeChangesTool.js +127 -68
- package/build/tools/test-management/analyzeTestHealthTool.d.ts +0 -11
- package/build/tools/test-management/analyzeTestHealthTool.js +42 -76
- package/build/tools/test-management/registerTestPlanTool.d.ts +44 -34
- package/build/tools/test-management/registerTestPlanTool.js +255 -111
- package/build/tools/test-management/resolveScreenTool.js +33 -9
- package/build/tools/test-management/testsOwedBeforeRun.d.ts +28 -0
- package/build/tools/test-management/testsOwedBeforeRun.js +53 -0
- package/build/tools/trace/startTraceCollectionTool.js +3 -1
- package/build/tools/trace/stopTraceCollectionTool.js +42 -6
- package/build/tools/verifyTestDependenciesTool.d.ts +3 -0
- package/build/tools/verifyTestDependenciesTool.js +54 -0
- package/build/tools/workspace/initScanWorkspaceTool.js +9 -3
- package/build/tools/workspace/initializeWorkspaceTool.js +3 -1
- package/build/types/AssertionOutcome.d.ts +1 -1
- package/build/types/EnhanceType.d.ts +6 -0
- package/build/types/EnhanceType.js +1 -0
- package/build/types/RepositoryAnalysis.d.ts +32 -72
- package/build/types/ReuseOutcome.d.ts +100 -7
- package/build/types/ReuseOutcome.js +16 -0
- package/build/types/StepMethod.js +20 -6
- package/build/types/TestAnalysis.d.ts +10 -2
- package/build/types/TestExecution.d.ts +45 -0
- package/build/types/TestRecommendation.d.ts +1 -1
- package/build/types/TestRecommendation.js +4 -1
- package/build/types/TestTypes.d.ts +16 -0
- package/build/types/TestTypes.js +40 -3
- package/build/types/TestbotPromptOptions.d.ts +9 -1
- package/build/types/TestbotReport.d.ts +45 -9
- package/build/utils/AnalysisStateManager.d.ts +137 -34
- package/build/utils/AnalysisStateManager.js +228 -44
- package/build/utils/assertion-verify/api-shared-lints.js +34 -16
- package/build/utils/assertion-verify/metrics.js +39 -6
- package/build/utils/assertion-verify/ui-lints.js +4 -2
- package/build/utils/branchDiff.js +47 -12
- package/build/utils/canonicalJson.js +3 -1
- package/build/utils/connectionErrors.d.ts +10 -0
- package/build/utils/connectionErrors.js +10 -0
- package/build/utils/dartRouteExtractor.js +36 -7
- package/build/utils/fixAttempts.d.ts +26 -0
- package/build/utils/fixAttempts.js +109 -0
- package/build/utils/frontendSelectors.js +23 -4
- package/build/utils/generatedTestRecord.d.ts +19 -0
- package/build/utils/generatedTestRecord.js +61 -0
- package/build/utils/gitStaging.js +7 -2
- package/build/utils/initAgent.js +26 -6
- package/build/utils/language-helper.js +60 -45
- package/build/utils/pathMatching.js +2 -1
- package/build/utils/pathSignatures.js +6 -2
- package/build/utils/planMatchKeys.d.ts +2 -2
- package/build/utils/planMatchKeys.js +20 -14
- package/build/utils/pom-catalog-parse.js +7 -2
- package/build/utils/pom-scope/import-expansion.js +6 -1
- package/build/utils/pom-scope/index.js +50 -12
- package/build/utils/pom-scope/scoring.js +13 -3
- package/build/utils/pom-scope/selector-extractor.js +16 -3
- package/build/utils/pom-scope/strip.d.ts +8 -0
- package/build/utils/pom-scope/strip.js +238 -0
- package/build/utils/pom-scope/testIdDiscovery.js +14 -2
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +1 -1
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +4 -2
- package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +3 -1
- package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +3 -1
- package/build/utils/pom-verify/bindings.js +5 -1
- package/build/utils/pom-verify/calls.js +9 -2
- package/build/utils/pom-verify/verify.js +27 -5
- package/build/utils/pr-comment-parser.js +20 -7
- package/build/utils/progress.d.ts +1 -1
- package/build/utils/progress.js +1 -1
- package/build/utils/proxy-terminal.d.ts +19 -1
- package/build/utils/proxy-terminal.js +346 -21
- package/build/utils/rebaselineSnapshots.d.ts +1 -1
- package/build/utils/rebaselineSnapshots.js +6 -16
- package/build/utils/removedUiElements.js +1 -1
- package/build/utils/reportLanguage.js +35 -7
- package/build/utils/reportVerification.d.ts +14 -8
- package/build/utils/reportVerification.js +19 -19
- package/build/utils/repositorySlug.d.ts +32 -0
- package/build/utils/repositorySlug.js +77 -0
- package/build/utils/reuseRouting.d.ts +10 -0
- package/build/utils/reuseRouting.js +21 -2
- package/build/utils/runContextGauge.d.ts +27 -0
- package/build/utils/runContextGauge.js +181 -0
- package/build/utils/runSerialized.d.ts +3 -0
- package/build/utils/runSerialized.js +39 -0
- package/build/utils/screenRoutes.js +74 -18
- package/build/utils/skyrampMdContent.d.ts +1 -1
- package/build/utils/skyrampMdContent.js +1 -1
- package/build/utils/skyrampSdkVersion.d.ts +9 -0
- package/build/utils/skyrampSdkVersion.js +16 -0
- package/build/utils/sourceRouteExtractor.js +13 -6
- package/build/utils/telemetry.d.ts +1 -0
- package/build/utils/telemetry.js +8 -5
- package/build/utils/testDependencyPolicy.d.ts +9 -0
- package/build/utils/testDependencyPolicy.js +809 -0
- package/build/utils/testExecutionRecord.d.ts +94 -0
- package/build/utils/testExecutionRecord.js +269 -0
- package/build/utils/testFileClassification.d.ts +8 -0
- package/build/utils/testFileClassification.js +39 -4
- package/build/utils/trace-parser.js +62 -14
- package/build/utils/urlPath.js +3 -1
- package/build/utils/utils-verify/action-key.d.ts +46 -0
- package/build/utils/utils-verify/action-key.js +120 -38
- package/build/utils/utils-verify/action-sites.d.ts +32 -0
- package/build/utils/utils-verify/action-sites.js +202 -0
- package/build/utils/utils-verify/allow.d.ts +122 -3
- package/build/utils/utils-verify/allow.js +146 -21
- package/build/utils/utils-verify/body-reach.d.ts +120 -0
- package/build/utils/utils-verify/body-reach.js +333 -0
- package/build/utils/utils-verify/call-sites.d.ts +31 -7
- package/build/utils/utils-verify/call-sites.js +80 -13
- package/build/utils/utils-verify/delivered-imports.d.ts +43 -0
- package/build/utils/utils-verify/delivered-imports.js +84 -0
- package/build/utils/utils-verify/fixed-sleep.d.ts +96 -0
- package/build/utils/utils-verify/fixed-sleep.js +461 -0
- package/build/utils/utils-verify/in-house.d.ts +93 -0
- package/build/utils/utils-verify/in-house.js +719 -0
- package/build/utils/utils-verify/incumbent.d.ts +3 -0
- package/build/utils/utils-verify/incumbent.js +75 -0
- package/build/utils/utils-verify/index.d.ts +2 -0
- package/build/utils/utils-verify/index.js +2 -0
- package/build/utils/utils-verify/language-spec.d.ts +51 -10
- package/build/utils/utils-verify/language-spec.js +232 -21
- package/build/utils/utils-verify/locate.d.ts +26 -0
- package/build/utils/utils-verify/locate.js +125 -23
- package/build/utils/utils-verify/module-name.d.ts +40 -0
- package/build/utils/utils-verify/module-name.js +98 -0
- package/build/utils/utils-verify/parse.d.ts +56 -7
- package/build/utils/utils-verify/parse.js +195 -40
- package/build/utils/utils-verify/retrofit-equivalence.d.ts +5 -0
- package/build/utils/utils-verify/retrofit-equivalence.js +4 -2
- package/build/utils/utils-verify/stage.d.ts +5 -0
- package/build/utils/utils-verify/stage.js +47 -2
- package/build/utils/utils-verify/status-once.d.ts +62 -0
- package/build/utils/utils-verify/status-once.js +207 -0
- package/build/utils/utils-verify/typecheck.d.ts +61 -0
- package/build/utils/utils-verify/typecheck.js +338 -0
- package/build/utils/utils-verify/verify.d.ts +79 -3
- package/build/utils/utils-verify/verify.js +531 -61
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.js +107 -37
- package/build/workspace/queryParamResolution.js +11 -4
- package/build/workspace/workspace.d.ts +72 -52
- package/build/workspace/workspace.js +19 -15
- package/node_modules/playwright/ThirdPartyNotices.txt +19 -19
- package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +8 -2
- package/node_modules/playwright/lib/mcp/skyramp/common/cssValue.js +87 -0
- package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -0
- package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +3 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +181 -15
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +24 -0
- package/node_modules/playwright/lib/transform/babelBundleImpl.js +2353 -190
- package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +62 -34
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/README.md +16 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/index.js +4 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/package.json +23 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/index.js +266 -45
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security-normalization.test.js +101 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security.test.js +301 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/index.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/package.json +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/base.js +44 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/request.js +20 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +65 -59
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +71 -128
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/utils.js +27 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/cookie.js +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/url.js +19 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/base.js +41 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/intrinsic-element/components.js +4 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/request.js +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/node.js +61 -58
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/router.js +77 -129
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/utils.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/client/types.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/context.d.ts +6 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/hono-base.d.ts +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/base.d.ts +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/utils.d.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/url.d.ts +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/cookie.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/url.js +17 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/package.json +11 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/CHANGELOG.md +26 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/README.md +19 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/dist/qs.js +25 -25
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/parse.js +16 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/utils.js +57 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/package.json +8 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/parse.js +419 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/utils.js +206 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/README.md +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/index.js +5 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/package.json +10 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/index.js +8 -18
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/package.json +9 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/README.md +23 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/index.js +265 -86
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +18 -9
- package/node_modules/playwright/node_modules/playwright-core/lib/mcpBundleImpl/index.js +47 -47
- package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +3 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +42 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/utilsBundleImpl/index.js +121 -121
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B7KbSQcC.js → index.BAkLd5DX.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +31 -9
- package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +57 -1
- package/node_modules/playwright/package.json +2 -2
- package/package.json +7 -6
- package/plugin/prompts/code-reuse/hand-off.md +30 -0
- package/plugin/prompts/generate-tests/generation.md +1 -1
- package/plugin/prompts/plan-tests.md +14 -14
- package/plugin/prompts/testbot-task1.md +2 -2
- package/plugin/skills/enhance-assertions/SKILL.md +25 -0
- package/plugin/skills/enhance-assertions/reference/contract.md +51 -0
- package/plugin/skills/enhance-assertions/reference/integration.md +58 -0
- package/plugin/skills/enhance-assertions/reference/shared-rules.md +220 -0
- package/plugin/skills/enhance-assertions/reference/ui.md +373 -0
- package/plugin/skills/fix-test-import-errors/SKILL.md +45 -50
- package/plugin/skills/run-test/SKILL.md +16 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/SKILL.md +32 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/checks.md +44 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/evidence.md +47 -0
- package/build/adapters/jestAdapter.d.ts +0 -14
- package/build/adapters/jestAdapter.js +0 -113
- package/build/adapters/mochaAdapter.d.ts +0 -13
- package/build/adapters/mochaAdapter.js +0 -87
- package/build/adapters/playwrightAdapter.d.ts +0 -17
- package/build/adapters/playwrightAdapter.js +0 -182
- package/build/adapters/pytestAdapter.d.ts +0 -15
- package/build/adapters/pytestAdapter.js +0 -108
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.js +0 -29
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.js +0 -36
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -16
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -284
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +0 -388
- package/build/tools/runExistingTestsTool.d.ts +0 -138
- package/build/tools/runExistingTestsTool.js +0 -644
- package/build/types/ExternalTestExecution.d.ts +0 -67
- package/build/types/ExternalTestExecution.js +0 -8
- package/build/workspace/testSuites.d.ts +0 -20
- package/build/workspace/testSuites.js +0 -17
- package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import * as fs from "fs";
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import { logger } from "../logger.js";
|
|
4
|
-
import { locateUtilsFiles } from "./locate.js";
|
|
5
|
-
import {
|
|
4
|
+
import { isInside, locateUtilsFiles, realpath, resolveSpecImports, } from "./locate.js";
|
|
5
|
+
import { generateSkyrampHeader } from "../utils.js";
|
|
6
|
+
import { typecheckDelivered } from "./typecheck.js";
|
|
7
|
+
import { blankComments, blankCommentsAndStrings, countAssertions, hasPageErrorGuard, parseUtilsFile, } from "./parse.js";
|
|
6
8
|
import { escapeRegExp } from "../regex.js";
|
|
9
|
+
import { detectGitRoot } from "../gitStaging.js";
|
|
10
|
+
import { inlineCallSiteFamily, isModularizeFirstTarget, } from "../reuseRouting.js";
|
|
11
|
+
import { describeActionKey } from "./action-key.js";
|
|
12
|
+
import { findDuplicateBodyReach, findUnreachableBodies } from "./body-reach.js";
|
|
13
|
+
import { misnamedNewModules } from "./module-name.js";
|
|
14
|
+
import { additiveChanges, locateInHouseModules, resolveInHouseCalls, } from "./in-house.js";
|
|
15
|
+
import { findSiblingInlineActionSites } from "./action-sites.js";
|
|
7
16
|
import { findSiblingInlineCallSites, findUnextractedDuplicates, generatedSiblings, } from "./call-sites.js";
|
|
8
17
|
import { parseUtilsAllows, } from "./allow.js";
|
|
18
|
+
import { describeFixedSleeps, fixedSleepReplacement } from "./fixed-sleep.js";
|
|
9
19
|
import { singleImporterHelpers, } from "./importers.js";
|
|
20
|
+
import { assertsStatusEquality, defaultedStatusParam, pinnedStatusLiteral, restatedStatusAssertions, } from "./status-once.js";
|
|
21
|
+
import { STATUS_ONCE_RULE } from "../../prompts/shared-helper-policy.js";
|
|
22
|
+
import { committedBaseline } from "./retrofit-equivalence.js";
|
|
23
|
+
import { incumbentSignatureViolations } from "./incumbent.js";
|
|
10
24
|
import { helperFamilyFor, helperFamilyOf, scenarioNameViolation, utilsSpecFor, utilsSpecForFile, } from "./language-spec.js";
|
|
25
|
+
/** What the compiler says about a name defined twice, which `helper-redefined`
|
|
26
|
+
* already reports once with its remediation: TS2393 "Duplicate function
|
|
27
|
+
* implementation" and TS2323 "Cannot redeclare exported variable" for two
|
|
28
|
+
* `function` declarations, TS2451 "Cannot redeclare block-scoped variable" for two
|
|
29
|
+
* `const` arrow helpers. */
|
|
30
|
+
const REDECLARATION_CODES = new Set([2393, 2323, 2451]);
|
|
11
31
|
/**
|
|
12
32
|
* Deterministic post-reuse check of the shared utils file(s) a spec depends on.
|
|
13
33
|
*
|
|
@@ -25,20 +45,51 @@ import { helperFamilyFor, helperFamilyOf, scenarioNameViolation, utilsSpecFor, u
|
|
|
25
45
|
* helper (runs 5 and 11 — `assert total_amount == 16.0` in `update_order`); a
|
|
26
46
|
* body assertion carries one scenario's values into a function every scenario calls.
|
|
27
47
|
* - `scenario-name` (ADVISORY only): a helper named for its scenario rather than its step.
|
|
48
|
+
* - `status-default` (ADVISORY for now) and `status-restated`: the status a test
|
|
49
|
+
* expects is stated ONCE, as the call's argument — not omitted behind a defaulted
|
|
50
|
+
* parameter, and not asserted again in the spec on the response the helper
|
|
51
|
+
* returned. See status-once.ts.
|
|
52
|
+
* - `type-error` (TypeScript): the delivered module or spec fails the compiler with
|
|
53
|
+
* every strictness flag off — an error under every configuration (a path parameter
|
|
54
|
+
* typed `unknown`, request options built as a record and handed to `sendRequest`).
|
|
55
|
+
* An error only the repository's own tsconfig raises is the `tsconfig-type-error`
|
|
56
|
+
* ADVISORY. See typecheckDelivered.
|
|
28
57
|
*
|
|
29
58
|
* Analyses the utils files' INTERNAL invariants — unlike the POM verifier, which
|
|
30
59
|
* checks a spec's cross-file references — so it reads the utils files, not the spec,
|
|
31
60
|
* except to count what the spec imports.
|
|
32
61
|
*/
|
|
33
62
|
export async function verifyUtils(params) {
|
|
34
|
-
|
|
63
|
+
// The spec file's extension decides its language; the declared language covers
|
|
64
|
+
// a path whose extension names none. Each utils file is then judged by ITS OWN
|
|
65
|
+
// extension (`fileSpec` below): a TypeScript spec may import a JavaScript
|
|
66
|
+
// module, and the TypeScript-only rules — the signature advisory, the compiler —
|
|
67
|
+
// must not read it (run 9, sample-microservices: `client: SkyrampClient`
|
|
68
|
+
// prescribed into a `.js` file, and node's `assert` reported unresolved).
|
|
69
|
+
const spec = utilsSpecForFile(params.testFile) ?? utilsSpecFor(params.language);
|
|
35
70
|
const family = helperFamilyFor(params.testType);
|
|
71
|
+
// CANONICAL, once: `locateInHouseModules` realpaths every module it returns, and
|
|
72
|
+
// `git show HEAD:<rel>` needs a path relative to the same root. A caller-supplied
|
|
73
|
+
// cwd routinely is not canonical — a sandboxed run works under macOS's /tmp, a
|
|
74
|
+
// symlink to /private/tmp — and the mismatch made `path.relative` yield a path git
|
|
75
|
+
// could not read, so the additive gate returned `ran: false` and the pass went
|
|
76
|
+
// green over a module it never compared.
|
|
77
|
+
const rawRoot = params.cwd ?? detectGitRoot(params.testFile);
|
|
78
|
+
const root = rawRoot ? await realpath(rawRoot) : undefined;
|
|
79
|
+
// The repository's own modules the spec imports — ownership decided at HEAD (see
|
|
80
|
+
// locateInHouseModules). Found BEFORE the utils files so a customer module that
|
|
81
|
+
// gained our header this run is judged by the additive gate, never by the Skyramp
|
|
82
|
+
// invariants: the header locator would otherwise claim it.
|
|
83
|
+
const inHouse = spec
|
|
84
|
+
? await locateInHouseModules({ testFile: params.testFile, spec, cwd: root })
|
|
85
|
+
: [];
|
|
86
|
+
const inHouseFiles = new Set(inHouse.map((m) => m.file));
|
|
36
87
|
const utilsFiles = spec
|
|
37
|
-
? await locateUtilsFiles({
|
|
88
|
+
? (await locateUtilsFiles({
|
|
38
89
|
testFile: params.testFile,
|
|
39
90
|
language: spec.language,
|
|
40
91
|
cwd: params.cwd,
|
|
41
|
-
})
|
|
92
|
+
})).filter((f) => !inHouseFiles.has(f))
|
|
42
93
|
: [];
|
|
43
94
|
const result = {
|
|
44
95
|
ok: true,
|
|
@@ -49,6 +100,7 @@ export async function verifyUtils(params) {
|
|
|
49
100
|
violations: [],
|
|
50
101
|
allowed: [],
|
|
51
102
|
advisories: [],
|
|
103
|
+
carriedConsumed: [],
|
|
52
104
|
malformedAllows: [],
|
|
53
105
|
spec,
|
|
54
106
|
fallbackFamily: family,
|
|
@@ -67,9 +119,19 @@ export async function verifyUtils(params) {
|
|
|
67
119
|
}
|
|
68
120
|
if (spec.language === "python")
|
|
69
121
|
result.violations.push(...importFormViolations(params.testFile, specContent, utilsFiles));
|
|
122
|
+
// Imports and module qualifiers are read with comments blanked and strings kept:
|
|
123
|
+
// a commented-out `import * as client from "./skyrampUtils"` authorised `client.`
|
|
124
|
+
// as the module's qualifier, and a commented-out named import counted as one.
|
|
125
|
+
const liveSpec = blankComments(specContent, spec);
|
|
126
|
+
/** Per utils file, the helpers defined at HEAD — not this run's. Read once and
|
|
127
|
+
* kept: both the status advisory's scope and the restatement's remediation
|
|
128
|
+
* turn on it. */
|
|
129
|
+
const incumbentsOfFile = new Map();
|
|
70
130
|
const allHelpers = [];
|
|
71
131
|
const helpersByFile = new Map();
|
|
72
132
|
const allAllows = [];
|
|
133
|
+
/** Findings from every located file, classified after the walk — see below. */
|
|
134
|
+
const pending = [];
|
|
73
135
|
const importedNames = new Set();
|
|
74
136
|
const importedByFile = new Map();
|
|
75
137
|
const helpersOfFile = new Map();
|
|
@@ -93,61 +155,328 @@ export async function verifyUtils(params) {
|
|
|
93
155
|
});
|
|
94
156
|
throw err; // the caller records a verify error, which fails OPEN — never a silent PASS
|
|
95
157
|
}
|
|
96
|
-
const
|
|
158
|
+
const fileSpec = utilsSpecForFile(file) ?? spec;
|
|
159
|
+
const helpers = parseUtilsFile(content, fileSpec);
|
|
160
|
+
// The module as committed: its helpers are INCUMBENTS. The status rule governs
|
|
161
|
+
// helpers this run writes, so a defaulted status on an incumbent is not advised
|
|
162
|
+
// — and an incumbent's signature is held to what it was (incumbent.ts). Absent
|
|
163
|
+
// for a module this run created, or outside git: then every helper is this run's.
|
|
164
|
+
const baseline = await committedBaseline(file);
|
|
165
|
+
const headHelpers = baseline === undefined ? [] : parseUtilsFile(baseline, fileSpec);
|
|
166
|
+
const incumbents = new Set(headHelpers.map((h) => h.name));
|
|
167
|
+
incumbentsOfFile.set(file, incumbents);
|
|
168
|
+
pending.push(...incumbentSignatureViolations(headHelpers, helpers, file));
|
|
97
169
|
for (const h of helpers) {
|
|
98
|
-
// An
|
|
99
|
-
//
|
|
100
|
-
|
|
170
|
+
// A static reading of the signature. An unannotated parameter is an error only
|
|
171
|
+
// under `noImplicitAny`, and `any` is never one — whether the host repo's
|
|
172
|
+
// tsconfig reaches the tests directory is its call — so this advises and never
|
|
173
|
+
// blocks; the compiler run below is what blocks, on the error an `unknown`
|
|
174
|
+
// parameter produces at its first use.
|
|
175
|
+
if (h.unusableParamTypes.length > 0)
|
|
101
176
|
result.advisories.push({
|
|
102
|
-
kind: "
|
|
177
|
+
kind: "unusable-parameter-type",
|
|
103
178
|
file,
|
|
104
179
|
helper: h.name,
|
|
105
180
|
line: h.line,
|
|
106
181
|
// Names only — the remediation is stated once, in the advisory footer.
|
|
107
|
-
detail: h.
|
|
182
|
+
detail: h.unusableParamTypes.map((p) => `\`${p}\``).join(", "),
|
|
108
183
|
});
|
|
109
184
|
}
|
|
110
185
|
allHelpers.push(...helpers);
|
|
111
186
|
helpersByFile.set(file, helpers);
|
|
112
187
|
helpersOfFile.set(file, helpers);
|
|
113
|
-
const { allows, malformed } = parseUtilsAllows(content,
|
|
114
|
-
allAllows.push(...allows);
|
|
188
|
+
const { allows, malformed } = parseUtilsAllows(content, fileSpec);
|
|
189
|
+
allAllows.push(...allows.map((a) => ({ ...a, file })));
|
|
115
190
|
result.helpers += helpers.length;
|
|
116
191
|
result.malformedAllows.push(...malformed.map((line) => ({ file, line })));
|
|
117
192
|
const stem = path.basename(file).replace(/\.[^.]+$/, "");
|
|
118
193
|
const defined = new Set(helpers.map((h) => h.name));
|
|
119
194
|
const importedHere = new Set();
|
|
120
|
-
for (const n of spec.importedNames(
|
|
195
|
+
for (const n of spec.importedNames(liveSpec, stem))
|
|
121
196
|
if (defined.has(n)) {
|
|
122
197
|
importedNames.add(n);
|
|
123
198
|
importedHere.add(n);
|
|
124
199
|
}
|
|
125
200
|
importedByFile.set(file, importedHere);
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
201
|
+
// Findings are collected here and classified once every file has been read: a
|
|
202
|
+
// marker may sit beside the CALLER while the finding it documents is raised in
|
|
203
|
+
// the module next to it, and a per-file budget could never reach across.
|
|
204
|
+
pending.push(...violationsIn(helpers, file, family, fileSpec, { byRoute, byName, byAction }, result.advisories, incumbents));
|
|
205
|
+
}
|
|
206
|
+
result.imported = importedNames.size;
|
|
207
|
+
result.importedNames = [...importedNames].sort();
|
|
208
|
+
// The repository's own modules the spec imports. Their helpers join the baseline
|
|
209
|
+
// count for every family — the count asks what the delivered test asserts, and a
|
|
210
|
+
// customer's helper asserts whatever it asserts — while the resolve and additive
|
|
211
|
+
// checks run for browser helpers only: a browser helper and the step it replaces
|
|
212
|
+
// drive one library, so the checks have something to read; an API helper written
|
|
213
|
+
// against another HTTP client does not, and that gate is a separate change.
|
|
214
|
+
// The SAME predicate the prompt routes on, not a copy of its conditions: STEP
|
|
215
|
+
// 2b/3b are emitted for a modularize-first browser target, which is UI with utils
|
|
216
|
+
// reuse on and page-object reuse OFF. A hand-maintained `testType === "ui"` also
|
|
217
|
+
// fired where the prompt gives no workflow — with the page-object flag on and a
|
|
218
|
+
// non-Playwright framework, which takes the plain reuse prompt — and a gate the
|
|
219
|
+
// agent was given no way to satisfy is a run that cannot finish.
|
|
220
|
+
const inHouseResult = isModularizeFirstTarget(params.testType, spec.language) &&
|
|
221
|
+
helperFamilyFor(params.testType).family === "browser" &&
|
|
222
|
+
inHouse.length > 0
|
|
223
|
+
? {
|
|
224
|
+
modules: inHouse.map((m) => m.file),
|
|
225
|
+
resolved: [],
|
|
226
|
+
unverifiable: [],
|
|
227
|
+
additiveGateRan: true,
|
|
228
|
+
added: [],
|
|
229
|
+
widened: [],
|
|
230
|
+
}
|
|
231
|
+
: undefined;
|
|
232
|
+
for (const m of inHouse) {
|
|
233
|
+
let content;
|
|
234
|
+
try {
|
|
235
|
+
content = await fs.promises.readFile(m.file, "utf8");
|
|
236
|
+
}
|
|
237
|
+
catch (err) {
|
|
238
|
+
// A module HEAD holds and the working tree does not was deleted by this run:
|
|
239
|
+
// nothing to resolve against, and the additive gate is what says so.
|
|
240
|
+
if (err?.code === "ENOENT" &&
|
|
241
|
+
inHouseResult &&
|
|
242
|
+
root) {
|
|
243
|
+
const additive = await additiveChanges(m.file, root, spec);
|
|
244
|
+
if (!additive.ran)
|
|
245
|
+
inHouseResult.additiveGateRan = false;
|
|
246
|
+
pending.push(...additive.violations);
|
|
247
|
+
continue;
|
|
143
248
|
}
|
|
144
|
-
|
|
145
|
-
|
|
249
|
+
logger.warning("Could not read an in-house module the spec imports", {
|
|
250
|
+
file: m.file,
|
|
251
|
+
error: String(err),
|
|
252
|
+
});
|
|
253
|
+
if (inHouseResult)
|
|
254
|
+
inHouseResult.additiveGateRan = false;
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
const helpers = parseUtilsFile(content, spec);
|
|
258
|
+
const stem = path.basename(m.file).replace(/\.[^.]+$/, "");
|
|
259
|
+
const defined = new Set(helpers.map((h) => h.name));
|
|
260
|
+
const importedHere = new Set();
|
|
261
|
+
for (const n of spec.importedNames(specContent, stem))
|
|
262
|
+
if (defined.has(n))
|
|
263
|
+
importedHere.add(n);
|
|
264
|
+
helpersOfFile.set(m.file, helpers);
|
|
265
|
+
importedByFile.set(m.file, importedHere);
|
|
266
|
+
if (!inHouseResult || !root)
|
|
267
|
+
continue;
|
|
268
|
+
const resolution = resolveInHouseCalls(specContent, content, stem, spec, m.file);
|
|
269
|
+
inHouseResult.resolved.push(...resolution.resolved);
|
|
270
|
+
inHouseResult.unverifiable.push(...resolution.unverifiable);
|
|
271
|
+
pending.push(...resolution.violations);
|
|
272
|
+
const additive = await additiveChanges(m.file, root, spec);
|
|
273
|
+
if (!additive.ran)
|
|
274
|
+
inHouseResult.additiveGateRan = false;
|
|
275
|
+
pending.push(...additive.violations);
|
|
276
|
+
inHouseResult.added.push(...additive.added.map((helper) => ({ file: m.file, helper })));
|
|
277
|
+
inHouseResult.widened.push(...additive.widened.map((helper) => ({ file: m.file, helper })));
|
|
278
|
+
for (const d of additive.duplicates)
|
|
279
|
+
result.advisories.push({
|
|
280
|
+
kind: "in-house-duplicate",
|
|
281
|
+
file: m.file,
|
|
282
|
+
helper: d.added,
|
|
283
|
+
line: helpers.find((h) => h.name === d.added)?.line ?? 1,
|
|
284
|
+
detail: `\`${d.added}\`, added this run, performs the action sequence \`${d.existing}\` already performs in this module — call \`${d.existing}\` instead (lift a differing value into a defaulted parameter of it if needed) and delete \`${d.added}\``,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
if (inHouseResult) {
|
|
288
|
+
inHouseResult.resolved.sort();
|
|
289
|
+
inHouseResult.unverifiable.sort();
|
|
290
|
+
result.inHouse = inHouseResult;
|
|
291
|
+
}
|
|
292
|
+
// The spec's own relative imports are evidence the locator can check without
|
|
293
|
+
// the header. Every one must be a utils file, an in-house module, or a test; a
|
|
294
|
+
// module none of those readers claims is one this pass cannot verify or stage,
|
|
295
|
+
// and a PASSED over it is a gate failing open — fixture 12, run 9: a module
|
|
296
|
+
// rewritten with a bare `// Generated by Skyramp` line passed four verify calls
|
|
297
|
+
// as "nothing to verify". Relative imports only (a package the sandbox lacks is
|
|
298
|
+
// a trap this must fail OPEN on) and not Python (spelled the same as a package).
|
|
299
|
+
const unchecked = [];
|
|
300
|
+
const unresolved = [];
|
|
301
|
+
const realTestFile = await realpath(params.testFile);
|
|
302
|
+
const utilsSet = new Set(utilsFiles);
|
|
303
|
+
const headerLine = generateSkyrampHeader(spec.language).trim();
|
|
304
|
+
const testShaped = (file) => /\.(?:spec|test)\.[cm]?[jt]sx?$/.test(path.basename(file));
|
|
305
|
+
for (const imp of await resolveSpecImports(params.testFile, spec)) {
|
|
306
|
+
const stem = (imp.specifier.split("/").pop() ?? imp.specifier).replace(/\.[cm]?[jt]sx?$/, "");
|
|
307
|
+
if (!imp.resolved) {
|
|
308
|
+
// A module HEAD holds and the working tree does not is located from HEAD
|
|
309
|
+
// and refused by the additive gate; this would say the same twice.
|
|
310
|
+
if (imp.candidates.some((c) => inHouseFiles.has(c)))
|
|
311
|
+
continue;
|
|
312
|
+
if (testShaped(imp.candidates[0] ?? ""))
|
|
313
|
+
continue;
|
|
314
|
+
// Reported, not blocked. This resolver tries a fixed set of extensions and an
|
|
315
|
+
// index file; the customer's toolchain resolves more — a component test
|
|
316
|
+
// imports a `.vue`, a fixture imports a `.sql`, a path alias points elsewhere
|
|
317
|
+
// — and every one of those exists on disk. "Could not resolve" is evidence
|
|
318
|
+
// about this pass, not about the file.
|
|
319
|
+
unresolved.push(imp.specifier);
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
if (utilsSet.has(imp.resolved) || imp.resolved === realTestFile)
|
|
323
|
+
continue;
|
|
324
|
+
if (inHouseFiles.has(imp.resolved)) {
|
|
325
|
+
if (!inHouseResult)
|
|
326
|
+
unchecked.push(imp.resolved);
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
if (testShaped(imp.resolved))
|
|
330
|
+
continue;
|
|
331
|
+
if (root && !isInside(imp.resolved, root)) {
|
|
332
|
+
unchecked.push(imp.resolved);
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
// A module is one the reuse step should have written only if the spec calls
|
|
336
|
+
// HELPERS from it. A data module — constants, bodies, fixtures — is a
|
|
337
|
+
// legitimate thing for a run to create beside a test, and demanding a Skyramp
|
|
338
|
+
// header on it is a block the agent cannot act on. The evidence is checkable:
|
|
339
|
+
// the names the spec imports, against the functions the module defines.
|
|
340
|
+
let defines = [];
|
|
341
|
+
try {
|
|
342
|
+
const imported = new Set(spec.importedNames(specContent, path.basename(imp.resolved).replace(/\.[^.]+$/, "")));
|
|
343
|
+
defines = parseUtilsFile(await fs.promises.readFile(imp.resolved, "utf8"), spec)
|
|
344
|
+
.map((h) => h.name)
|
|
345
|
+
.filter((n) => imported.has(n));
|
|
346
|
+
}
|
|
347
|
+
catch {
|
|
348
|
+
/* unreadable: judged below on the import alone */
|
|
349
|
+
}
|
|
350
|
+
if (defines.length === 0) {
|
|
351
|
+
unchecked.push(imp.resolved);
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
pending.push({
|
|
355
|
+
kind: "unresolved-module",
|
|
356
|
+
file: imp.resolved,
|
|
357
|
+
helper: stem,
|
|
358
|
+
line: 1,
|
|
359
|
+
// A module reaching this point is NOT tracked at HEAD: one at HEAD with the
|
|
360
|
+
// header is a utils file, and one at HEAD without it is the repository's
|
|
361
|
+
// own. So it is either a module this run wrote, or the customer's own file
|
|
362
|
+
// that is not committed yet — and nothing here can tell those apart. The
|
|
363
|
+
// message states both, because telling the agent to stamp our header on
|
|
364
|
+
// their file is the fault this PR's second blocking fix removed.
|
|
365
|
+
detail: `the test imports ${defines.map((n) => `\`${n}\``).join(", ")} from \`${imp.specifier}\` → ${root ? path.relative(root, imp.resolved) : imp.resolved}, a module of helpers that is not tracked at HEAD and carries no Skyramp header, so this pass cannot verify it or stage it and the pull request would not carry it. If this run wrote it: make its FIRST line exactly \`${headerLine}\` — the \`on <timestamp>\` part is what the shared-module tools recognise — and change nothing else in the file. If it is the repository's OWN module and simply not committed yet: do NOT add the header, leave the step inline, and name the module in the report. Then re-verify`,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
if (unresolved.length > 0)
|
|
369
|
+
result.unresolvedImports = unresolved;
|
|
370
|
+
if (unchecked.length > 0) {
|
|
371
|
+
result.uncheckedModules = unchecked.sort();
|
|
372
|
+
if (!inHouseResult && inHouse.length > 0)
|
|
373
|
+
result.inHouseChecksSkipped = `this pass ran ${params.testType
|
|
374
|
+
? `as a ${params.testType.toLowerCase()} test`
|
|
375
|
+
: "with no test type supplied"}, and they run for a UI test with page-object reuse off`;
|
|
376
|
+
}
|
|
377
|
+
// The spec asserts a status a helper it calls already asserted on the response it
|
|
378
|
+
// returned. Spec-level, like assertion-loss: the finding names the spec and the
|
|
379
|
+
// marker token is the helper. Only helpers that pin the status to ONE value count
|
|
380
|
+
// — after `toBeLessThan(500)` a `toBe(200)` in the spec is a tighter claim, not a
|
|
381
|
+
// repetition.
|
|
382
|
+
if (specContent) {
|
|
383
|
+
// Per utils FILE: a helper's contract travels with the module that defines it
|
|
384
|
+
// and the names the spec binds THAT module to. One flattened set of helpers
|
|
385
|
+
// and one of qualifiers cross-multiplied — `users.get` was scanned under
|
|
386
|
+
// `orders.get`'s pinning contract, and a same-name, equal-arity helper in two
|
|
387
|
+
// modules is a shape the verifier permits.
|
|
388
|
+
for (const [file, imported] of importedByFile) {
|
|
389
|
+
const pinning = [];
|
|
390
|
+
/** Helpers that pin a LITERAL status: the remediation differs, see below. */
|
|
391
|
+
const literalOf = new Map();
|
|
392
|
+
const incumbents = incumbentsOfFile.get(file) ?? new Set();
|
|
393
|
+
for (const h of helpersOfFile.get(file) ?? []) {
|
|
394
|
+
if (!imported.has(h.name) || !assertsStatusEquality(h, spec))
|
|
395
|
+
continue;
|
|
396
|
+
pinning.push(h.name);
|
|
397
|
+
const literal = pinnedStatusLiteral(h, spec);
|
|
398
|
+
if (literal !== undefined)
|
|
399
|
+
literalOf.set(h.name, literal);
|
|
146
400
|
}
|
|
401
|
+
const qualifiers = spec.moduleQualifiers(liveSpec, path.basename(file).replace(/\.[^.]+$/, ""));
|
|
402
|
+
for (const r of restatedStatusAssertions(specContent, spec, pinning, qualifiers))
|
|
403
|
+
pending.push({
|
|
404
|
+
kind: "status-restated",
|
|
405
|
+
file: params.testFile,
|
|
406
|
+
helper: r.helper,
|
|
407
|
+
line: r.line,
|
|
408
|
+
// Three shapes, three remediations. A helper that reads the status from a
|
|
409
|
+
// parameter: the call already states it, so the spec's copy goes. A helper
|
|
410
|
+
// THIS RUN WROTE that pins a literal has no call argument to keep, so the
|
|
411
|
+
// literal is lifted first. An INCUMBENT that pins a literal keeps its
|
|
412
|
+
// signature — adding a required parameter is what `incumbent-signature`
|
|
413
|
+
// refuses, and prescribing it here would cost the run a round and end in a
|
|
414
|
+
// marker; the pin is acceptable because no caller can vary it.
|
|
415
|
+
detail: `\`${r.text}\` restates the status \`${r.helper}\` already asserts on the response it returned${r.sites > 1 ? ` (${r.sites} call sites do)` : ""} — ${STATUS_ONCE_RULE.notRestated}. ${remediation(r.helper, literalOf.get(r.helper), incumbents.has(r.helper))}`,
|
|
416
|
+
});
|
|
147
417
|
}
|
|
148
418
|
}
|
|
149
|
-
|
|
150
|
-
|
|
419
|
+
// The compiler over the delivered files: the shared module(s) and the spec that
|
|
420
|
+
// imports them. The executor transpiles TypeScript without typechecking it, so
|
|
421
|
+
// this is the first typecheck the files meet before the customer's own. An error
|
|
422
|
+
// under the permissive settings fails under every configuration and blocks; one
|
|
423
|
+
// only the repository's tsconfig raises advises (see typecheckDelivered).
|
|
424
|
+
// Over the TypeScript files only, by extension: a JavaScript module is not
|
|
425
|
+
// typechecked (its spec would be `checkJs`, which no delivered file relies on),
|
|
426
|
+
// and a JavaScript spec is not compiled beside a TypeScript module.
|
|
427
|
+
const isTs = (f) => utilsSpecForFile(f)?.language === "typescript";
|
|
428
|
+
const tsUtils = utilsFiles.filter(isTs);
|
|
429
|
+
if (tsUtils.length > 0) {
|
|
430
|
+
// No existence guard: `realpath` falls back to `path.resolve`, and a root the
|
|
431
|
+
// compiler cannot find yields no source file, which the diagnostic walk skips.
|
|
432
|
+
const realSpec = await realpath(params.testFile);
|
|
433
|
+
const specFile = realSpec && isTs(realSpec) ? realSpec : undefined;
|
|
434
|
+
const files = specFile ? [...tsUtils, specFile] : tsUtils;
|
|
435
|
+
const tc = await typecheckDelivered(files);
|
|
436
|
+
result.typecheck = tc;
|
|
437
|
+
const subjectOf = (file, line) => file === specFile
|
|
438
|
+
? path.basename(specFile).replace(/\W/g, "_")
|
|
439
|
+
: (helpersOfFile
|
|
440
|
+
.get(file)
|
|
441
|
+
?.find((h) => h.line <= line && line <= h.endLine)?.name ??
|
|
442
|
+
path.basename(file).replace(/\.[^.]+$/, ""));
|
|
443
|
+
// One detector per fault: a name defined twice is `helper-redefined`, with its
|
|
444
|
+
// own remediation; the compiler says the same on each of the two definitions,
|
|
445
|
+
// twice each ("Duplicate function implementation", "Cannot redeclare exported
|
|
446
|
+
// variable"), and those four lines would add nothing but noise.
|
|
447
|
+
const redefined = new Set(pending
|
|
448
|
+
.filter((v) => v.kind === "helper-redefined")
|
|
449
|
+
.map((v) => `${v.file}\0${v.helper}`));
|
|
450
|
+
for (const e of tc.errors) {
|
|
451
|
+
const helper = subjectOf(e.file, e.line);
|
|
452
|
+
if (REDECLARATION_CODES.has(e.code) &&
|
|
453
|
+
redefined.has(`${e.file}\0${helper}`))
|
|
454
|
+
continue;
|
|
455
|
+
pending.push({
|
|
456
|
+
kind: "type-error",
|
|
457
|
+
file: e.file,
|
|
458
|
+
helper,
|
|
459
|
+
line: e.line,
|
|
460
|
+
detail: `\`TS${e.code}: ${e.message}\``,
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
for (const e of tc.ambientErrors)
|
|
464
|
+
result.advisories.push({
|
|
465
|
+
kind: "ambient-type-error",
|
|
466
|
+
file: e.file,
|
|
467
|
+
helper: subjectOf(e.file, e.line),
|
|
468
|
+
line: e.line,
|
|
469
|
+
detail: `\`TS${e.code}: ${e.message}\``,
|
|
470
|
+
});
|
|
471
|
+
for (const e of tc.settingErrors)
|
|
472
|
+
result.advisories.push({
|
|
473
|
+
kind: "tsconfig-type-error",
|
|
474
|
+
file: e.file,
|
|
475
|
+
helper: subjectOf(e.file, e.line),
|
|
476
|
+
line: e.line,
|
|
477
|
+
detail: `\`TS${e.code}: ${e.message}\``,
|
|
478
|
+
});
|
|
479
|
+
}
|
|
151
480
|
// One directory walk feeds every sibling advisory: each sibling is read exactly once.
|
|
152
481
|
let siblings = [];
|
|
153
482
|
try {
|
|
@@ -190,29 +519,140 @@ export async function verifyUtils(params) {
|
|
|
190
519
|
inHelpers,
|
|
191
520
|
};
|
|
192
521
|
for (const v of baselineViolations(params.baseline, params.testFile, spec, specContent, inSpec, inHelpers, guardInHelpers)) {
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
522
|
+
// Classified with every other finding below: an assertion-loss marker lives in
|
|
523
|
+
// a utils file and the finding is about the spec, so it is cross-file by
|
|
524
|
+
// construction.
|
|
525
|
+
pending.push(v);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
// Two rules about the module this run WROTE, both ungated by test type: a helper
|
|
529
|
+
// that issues a request follows the API rules whatever the test type drives (see
|
|
530
|
+
// helperFamilyOf), and a module's name is not a question about its helpers at all.
|
|
531
|
+
// Both fail open, and both ADVISE for their first cohort — the prompt states each
|
|
532
|
+
// rule, which is the lever that converges a cohort; this counts what it did.
|
|
533
|
+
result.advisories.push(...(await misnamedNewModules(utilsFiles, spec, params.cwd ?? detectGitRoot(params.testFile))));
|
|
534
|
+
try {
|
|
535
|
+
for (const d of await findDuplicateBodyReach(utilsFiles, spec))
|
|
536
|
+
result.advisories.push({
|
|
537
|
+
kind: "duplicate-body-reach",
|
|
538
|
+
file: d.utilsFile,
|
|
539
|
+
helper: d.helper,
|
|
540
|
+
line: d.line,
|
|
541
|
+
detail: `\`${d.helper}\` sends its request body from a body parameter AND from \`${d.override}\`, passed straight through. The body parameter already reaches every property a caller could override, so \`${d.override}\` changes nothing it cannot — and a second run writing this helper has no rule telling it whether to add one. Take one form: keep the body parameter and delete \`${d.override}\` from the signature and the request call, or keep the override and drop the body parameter. Update the call sites either way`,
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
catch {
|
|
545
|
+
/* never fails a verify on its own error */
|
|
546
|
+
}
|
|
547
|
+
// ONE classification pass, over every finding and every marker this verify saw.
|
|
548
|
+
//
|
|
549
|
+
// A marker documents ONE finding of its kind and helper, and it is consumed in
|
|
550
|
+
// order. The budget spans all the located utils files rather than one of them: a
|
|
551
|
+
// decline is written where the agent is working, which is often beside the CALLER
|
|
552
|
+
// and not beside the helper the finding names. A per-file budget left that finding
|
|
553
|
+
// blocking, the agent wrote a second marker in the other file, and the first then
|
|
554
|
+
// reported `stale-allow` — two refusals for one decline.
|
|
555
|
+
//
|
|
556
|
+
// A decline this run removed from a delivered file before delivery counts first.
|
|
557
|
+
// The marker is gone from the customer's copy, not from the run's record of what
|
|
558
|
+
// was declined, so a further submission must not refuse a fault already declined.
|
|
559
|
+
// It is never reported as stale: it is no line in any file, so there is nothing
|
|
560
|
+
// for the agent to delete.
|
|
561
|
+
// Queued, not counted: the ENTRY the caller passed is echoed back when a finding
|
|
562
|
+
// consumes it, so a tag the caller put on it (which file it came from) survives.
|
|
563
|
+
const carried = new Map();
|
|
564
|
+
for (const c of params.carriedAllows ?? []) {
|
|
565
|
+
const k = `${c.kind}\0${c.helper}`;
|
|
566
|
+
carried.set(k, [...(carried.get(k) ?? []), c]);
|
|
567
|
+
}
|
|
568
|
+
// Markers in file order, so "consumed in order" still holds and the SURPLUS marker
|
|
569
|
+
// is the later one — which is the line a reader would otherwise trust.
|
|
570
|
+
// A shared helper whose body no parameter reaches, beside a spec that wrote its own
|
|
571
|
+
// helper for the same route. Integration only, as the body rule is: the prompt
|
|
572
|
+
// states the shape, and this is the same statement in code, where it cannot be read
|
|
573
|
+
// two ways. Blocking, unlike the sibling advisories — those name a change to a
|
|
574
|
+
// PRE-EXISTING test the customer owns, and this names the module the run authored.
|
|
575
|
+
// Fails open on any read error, and bodyReachable answers `true` for everything it
|
|
576
|
+
// cannot establish, so a run is never blocked on a guess.
|
|
577
|
+
if ((params.testType ?? "").toLowerCase() === "integration") {
|
|
578
|
+
try {
|
|
579
|
+
for (const f of await findUnreachableBodies(params.testFile, utilsFiles, spec, siblings))
|
|
580
|
+
pending.push({
|
|
581
|
+
kind: "frozen-body",
|
|
582
|
+
file: f.utilsFile,
|
|
583
|
+
helper: f.helper,
|
|
584
|
+
line: 1,
|
|
585
|
+
detail: `\`${f.helper}\` holds the body it sends to ${f.method} ${f.path}, and no parameter of its signature reaches it — so \`${f.rivalHelper}\` in ${path.basename(f.rivalFile)} could not call it and wrote the request again. Lift the body: a parameter defaulted to what the helper sends today, or the differing values through the override map, then delete \`${f.rivalHelper}\` and call the shared helper`,
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
catch {
|
|
589
|
+
/* never fails a verify on its own error */
|
|
201
590
|
}
|
|
202
591
|
}
|
|
592
|
+
const markers = new Map();
|
|
593
|
+
for (const a of allAllows) {
|
|
594
|
+
const k = `${a.kind}\0${a.helper}`;
|
|
595
|
+
markers.set(k, [...(markers.get(k) ?? []), a]);
|
|
596
|
+
}
|
|
597
|
+
for (const v of pending) {
|
|
598
|
+
const k = `${v.kind}\0${v.helper}`;
|
|
599
|
+
const held = carried.get(k);
|
|
600
|
+
if (held && held.length > 0) {
|
|
601
|
+
result.carriedConsumed.push(held.shift());
|
|
602
|
+
result.allowed.push(v);
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
const queue = markers.get(k);
|
|
606
|
+
if (queue && queue.length > 0) {
|
|
607
|
+
queue.shift();
|
|
608
|
+
result.allowed.push(v);
|
|
609
|
+
}
|
|
610
|
+
else if (v.kind === "scenario-name" || v.kind === "status-default") {
|
|
611
|
+
// `status-default` advises for now. The defaulted status was measured on 11 of
|
|
612
|
+
// 16 rows of one release and 12 of 16 on the one before, then ten more helpers
|
|
613
|
+
// across five repositories in the next cohort; blocking from day one would fail
|
|
614
|
+
// most of a cohort at once while the prompt side catches up. One cohort as an
|
|
615
|
+
// advisory measures whether the prompt rule landed; blocking is then this
|
|
616
|
+
// clause dropping the kind.
|
|
617
|
+
result.advisories.push(v);
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
result.violations.push(v);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
// Whatever no finding consumed is a marker that documents nothing: either it never
|
|
624
|
+
// applied, or the agent went on to fix the fault and left the line behind, so the
|
|
625
|
+
// file states a reason its own code contradicts. Nothing re-reads a marker once
|
|
626
|
+
// written, which is how such a line reached a customer's repository.
|
|
627
|
+
for (const queue of markers.values())
|
|
628
|
+
for (const a of queue)
|
|
629
|
+
result.violations.push({
|
|
630
|
+
kind: "stale-allow",
|
|
631
|
+
file: a.file,
|
|
632
|
+
helper: a.helper,
|
|
633
|
+
line: a.line,
|
|
634
|
+
detail: `this pass found no further \`${a.kind}\` for \`${a.helper}\`, so the decline describes nothing in the delivered files — delete the marker line`,
|
|
635
|
+
});
|
|
203
636
|
result.ok =
|
|
204
637
|
result.violations.length === 0 && result.malformedAllows.length === 0;
|
|
205
|
-
//
|
|
206
|
-
//
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if ((params.testType ?? "").toLowerCase() === "integration") {
|
|
638
|
+
// The gate the prompt renders the rule on: one predicate, so the advisory can
|
|
639
|
+
// never describe a rewiring the prompt did not ask for.
|
|
640
|
+
const scanFamily = inlineCallSiteFamily(params.testType, spec.language);
|
|
641
|
+
if (scanFamily) {
|
|
210
642
|
try {
|
|
211
|
-
result.inlineCallSites =
|
|
643
|
+
result.inlineCallSites =
|
|
644
|
+
scanFamily === "api"
|
|
645
|
+
? await findSiblingInlineCallSites(params.testFile, utilsFiles, allHelpers, spec, siblings)
|
|
646
|
+
: await findSiblingInlineActionSites(params.testFile, helpersByFile, spec, siblings);
|
|
212
647
|
}
|
|
213
648
|
catch {
|
|
214
649
|
/* advisory only — never fails a verify */
|
|
215
650
|
}
|
|
651
|
+
}
|
|
652
|
+
// Integration only — `contract`, `load` and an absent type also resolve to the API
|
|
653
|
+
// family, but the reuse flow never targets them.
|
|
654
|
+
const integration = (params.testType ?? "").toLowerCase() === "integration";
|
|
655
|
+
if (integration) {
|
|
216
656
|
try {
|
|
217
657
|
result.unextractedDuplicates = await findUnextractedDuplicates(params.testFile, utilsFiles, spec, siblings);
|
|
218
658
|
}
|
|
@@ -222,6 +662,15 @@ export async function verifyUtils(params) {
|
|
|
222
662
|
}
|
|
223
663
|
return result;
|
|
224
664
|
}
|
|
665
|
+
/** What to do about a restated status, by the shape of the helper that asserted it.
|
|
666
|
+
* Stated here rather than inline so the gate note and this text stay one rule. */
|
|
667
|
+
function remediation(helper, literal, incumbent) {
|
|
668
|
+
if (literal === undefined)
|
|
669
|
+
return "Delete the assertion; keep the status as the call's argument";
|
|
670
|
+
if (incumbent)
|
|
671
|
+
return `\`${helper}\` is defined at HEAD and keeps its signature, so the literal \`${literal}\` stays where it is — a status no caller can vary hides nothing. Just delete the assertion from the spec`;
|
|
672
|
+
return `\`${helper}\` pins the status inside the helper: lift the literal \`${literal}\` into a required expected-status parameter, pass it at every call site of \`${helper}\`, then delete the assertion`;
|
|
673
|
+
}
|
|
225
674
|
/** The compared counts as one phrase, shared by the assertion-loss detail and the
|
|
226
675
|
* PASSED line's note so the two cannot drift. */
|
|
227
676
|
export function describeAssertionCount(c) {
|
|
@@ -363,7 +812,9 @@ export function importFormViolations(testFile, specContent, utilsFiles) {
|
|
|
363
812
|
function blankTripleQuoted(src) {
|
|
364
813
|
return src.replace(/("""|''')[\s\S]*?\1/g, (m) => m.replace(/[^\n]/g, " "));
|
|
365
814
|
}
|
|
366
|
-
function violationsIn(helpers, file, fallback, spec, seen, advisories
|
|
815
|
+
function violationsIn(helpers, file, fallback, spec, seen, advisories,
|
|
816
|
+
/** Helpers defined at HEAD — not this run's, and outside the status rule's scope. */
|
|
817
|
+
incumbents = new Set()) {
|
|
367
818
|
const { byRoute, byName, byAction } = seen;
|
|
368
819
|
// Names seen in THIS file: a second definition here is a redefinition, not drift.
|
|
369
820
|
const inThisFile = new Map();
|
|
@@ -468,6 +919,36 @@ function violationsIn(helpers, file, fallback, spec, seen, advisories) {
|
|
|
468
919
|
});
|
|
469
920
|
}
|
|
470
921
|
}
|
|
922
|
+
// A wait for a duration rather than for a condition — one finding per helper, so
|
|
923
|
+
// a helper's timing reads as one note rather than one per call. The family decides
|
|
924
|
+
// only the REPLACEMENT named in the text: the fault is the same in both, and
|
|
925
|
+
// fixture 2's fifty-second polling helper was the API form of it. Advisory for its
|
|
926
|
+
// first cohort — see UTILS_ADVISORY_KINDS.
|
|
927
|
+
if (h.fixedSleeps.length > 0) {
|
|
928
|
+
advisories.push({
|
|
929
|
+
kind: "fixed-sleep",
|
|
930
|
+
file,
|
|
931
|
+
helper: h.name,
|
|
932
|
+
line: h.fixedSleeps[0].line,
|
|
933
|
+
detail: `${describeFixedSleeps(h.fixedSleeps)}. A shared helper's wait is inherited by every test that calls it and is invisible at the call site. ${fixedSleepReplacement(family.family, spec.language)}`,
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
// The parameter the status assertion reads carries a default: a call site may
|
|
937
|
+
// omit the status it expects, and the spec then states it nowhere. Helpers this
|
|
938
|
+
// run writes only — an incumbent keeps its signature, default included.
|
|
939
|
+
const defaulted = incumbents.has(h.name)
|
|
940
|
+
? undefined
|
|
941
|
+
: defaultedStatusParam(h, spec);
|
|
942
|
+
if (defaulted) {
|
|
943
|
+
out.push({
|
|
944
|
+
kind: "status-default",
|
|
945
|
+
file,
|
|
946
|
+
helper: h.name,
|
|
947
|
+
line: h.line,
|
|
948
|
+
// The rule itself is stated once, in the advisory's footer.
|
|
949
|
+
detail: `\`${defaulted.param}\` lets a caller omit the status it expects — remove the default and pass the status at every call site of \`${h.name}\``,
|
|
950
|
+
});
|
|
951
|
+
}
|
|
471
952
|
const naming = scenarioNameViolation(h.name);
|
|
472
953
|
if (naming) {
|
|
473
954
|
out.push({
|
|
@@ -481,14 +962,3 @@ function violationsIn(helpers, file, fallback, spec, seen, advisories) {
|
|
|
481
962
|
}
|
|
482
963
|
return out;
|
|
483
964
|
}
|
|
484
|
-
/** `click empty-cart-btn; fill qty` → `click \`empty-cart-btn\`; fill \`qty\`` — the
|
|
485
|
-
* key as the agent reads it, selectors quoted so a `#id` never reads as prose. */
|
|
486
|
-
function describeActionKey(key) {
|
|
487
|
-
return key
|
|
488
|
-
.split("; ")
|
|
489
|
-
.map((step) => {
|
|
490
|
-
const at = step.indexOf(" ");
|
|
491
|
-
return `${step.slice(0, at)} \`${step.slice(at + 1)}\``;
|
|
492
|
-
})
|
|
493
|
-
.join("; ");
|
|
494
|
-
}
|