@alwaysmeticulous/cli 2.326.1 → 2.328.0
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/dist/__tests__/commonjs-dependencies.spec.d.ts +2 -0
- package/dist/__tests__/commonjs-dependencies.spec.d.ts.map +1 -0
- package/dist/__tests__/commonjs-dependencies.spec.js +82 -0
- package/dist/__tests__/commonjs-dependencies.spec.js.map +1 -0
- package/dist/command-utils/__tests__/parse-rewrites.spec.js +2 -2
- package/dist/command-utils/__tests__/parse-rewrites.spec.js.map +1 -1
- package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js +2 -2
- package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js.map +1 -1
- package/dist/command-utils/common-options.js +2 -2
- package/dist/command-utils/common-options.js.map +1 -1
- package/dist/command-utils/detect-upload-mode.js +2 -2
- package/dist/command-utils/detect-upload-mode.js.map +1 -1
- package/dist/command-utils/detect-upload-mode.spec.js +2 -2
- package/dist/command-utils/detect-upload-mode.spec.js.map +1 -1
- package/dist/command-utils/download-session.utils.js +2 -2
- package/dist/command-utils/download-session.utils.js.map +1 -1
- package/dist/command-utils/json-args.js +2 -2
- package/dist/command-utils/json-args.js.map +1 -1
- package/dist/command-utils/json-args.spec.js +2 -2
- package/dist/command-utils/json-args.spec.js.map +1 -1
- package/dist/command-utils/parse-container-env.js +2 -2
- package/dist/command-utils/parse-container-env.js.map +1 -1
- package/dist/command-utils/parse-rewrites.js +2 -2
- package/dist/command-utils/parse-rewrites.js.map +1 -1
- package/dist/command-utils/print-json.js +2 -2
- package/dist/command-utils/print-json.js.map +1 -1
- package/dist/command-utils/sentry.utils.js +2 -2
- package/dist/command-utils/sentry.utils.js.map +1 -1
- package/dist/command-utils/warn-regex-rewrites.js +2 -2
- package/dist/command-utils/warn-regex-rewrites.js.map +1 -1
- package/dist/commands/agent/agent-review-writes.command.spec.js +2 -2
- package/dist/commands/agent/agent-review-writes.command.spec.js.map +1 -1
- package/dist/commands/agent/build-git-options.js +2 -2
- package/dist/commands/agent/build-git-options.js.map +1 -1
- package/dist/commands/agent/build-git-options.spec.js +2 -2
- package/dist/commands/agent/build-git-options.spec.js.map +1 -1
- package/dist/commands/agent/coverage-columns.util.js +2 -2
- package/dist/commands/agent/coverage-columns.util.js.map +1 -1
- package/dist/commands/agent/create-diff-comment.command.js +2 -2
- package/dist/commands/agent/create-diff-comment.command.js.map +1 -1
- package/dist/commands/agent/diff-comment-write.utils.js +2 -2
- package/dist/commands/agent/diff-comment-write.utils.js.map +1 -1
- package/dist/commands/agent/diff-comments.command.js +2 -2
- package/dist/commands/agent/diff-comments.command.js.map +1 -1
- package/dist/commands/agent/diff-comments.command.spec.js +2 -2
- package/dist/commands/agent/diff-comments.command.spec.js.map +1 -1
- package/dist/commands/agent/ignore-diff.command.js +2 -2
- package/dist/commands/agent/ignore-diff.command.js.map +1 -1
- package/dist/commands/agent/index.js +2 -2
- package/dist/commands/agent/index.js.map +1 -1
- package/dist/commands/agent/js-coverage-diff.command.js +2 -2
- package/dist/commands/agent/js-coverage-diff.command.js.map +1 -1
- package/dist/commands/agent/js-coverage.command.handler.spec.js +2 -2
- package/dist/commands/agent/js-coverage.command.handler.spec.js.map +1 -1
- package/dist/commands/agent/js-coverage.command.js +2 -2
- package/dist/commands/agent/js-coverage.command.js.map +1 -1
- package/dist/commands/agent/js-coverage.command.spec.js +2 -2
- package/dist/commands/agent/js-coverage.command.spec.js.map +1 -1
- package/dist/commands/agent/reject-diff.command.js +2 -2
- package/dist/commands/agent/reject-diff.command.js.map +1 -1
- package/dist/commands/agent/reject-diff.command.spec.js +2 -2
- package/dist/commands/agent/reject-diff.command.spec.js.map +1 -1
- package/dist/commands/agent/reply-to-diff-comment.command.js +2 -2
- package/dist/commands/agent/reply-to-diff-comment.command.js.map +1 -1
- package/dist/commands/agent/screenshot-dom-diff.command.js +2 -2
- package/dist/commands/agent/screenshot-dom-diff.command.js.map +1 -1
- package/dist/commands/agent/screenshot-image-files.command.js +2 -2
- package/dist/commands/agent/screenshot-image-files.command.js.map +1 -1
- package/dist/commands/agent/screenshot-image.command.js +2 -2
- package/dist/commands/agent/screenshot-image.command.js.map +1 -1
- package/dist/commands/agent/sessions.command.js +2 -2
- package/dist/commands/agent/sessions.command.js.map +1 -1
- package/dist/commands/agent/sessions.command.spec.js +2 -2
- package/dist/commands/agent/sessions.command.spec.js.map +1 -1
- package/dist/commands/agent/submit-feedback.command.js +2 -2
- package/dist/commands/agent/submit-feedback.command.js.map +1 -1
- package/dist/commands/agent/test-run-check.command.js +2 -2
- package/dist/commands/agent/test-run-check.command.js.map +1 -1
- package/dist/commands/agent/test-run-check.command.spec.js +2 -2
- package/dist/commands/agent/test-run-check.command.spec.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.command.js +2 -2
- package/dist/commands/agent/test-run-diffs.command.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.command.spec.js +2 -2
- package/dist/commands/agent/test-run-diffs.command.spec.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.utils.js +2 -2
- package/dist/commands/agent/test-run-diffs.utils.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.utils.spec.js +2 -2
- package/dist/commands/agent/test-run-diffs.utils.spec.js.map +1 -1
- package/dist/commands/agent/test-run-for-commit.command.js +2 -2
- package/dist/commands/agent/test-run-for-commit.command.js.map +1 -1
- package/dist/commands/agent/timeline.command.js +2 -2
- package/dist/commands/agent/timeline.command.js.map +1 -1
- package/dist/commands/agent/timeline.command.spec.js +2 -2
- package/dist/commands/agent/timeline.command.spec.js.map +1 -1
- package/dist/commands/agent/trigger-test-run.command.js +2 -2
- package/dist/commands/agent/trigger-test-run.command.js.map +1 -1
- package/dist/commands/agent/trigger-test-run.command.spec.js +2 -2
- package/dist/commands/agent/trigger-test-run.command.spec.js.map +1 -1
- package/dist/commands/agent/upload-build.command.js +2 -2
- package/dist/commands/agent/upload-build.command.js.map +1 -1
- package/dist/commands/all-commands.d.ts.map +1 -1
- package/dist/commands/all-commands.js +8 -6
- package/dist/commands/all-commands.js.map +1 -1
- package/dist/commands/auth/__tests__/get-project.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/get-project.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/list-projects.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/list-projects.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/login.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/login.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/logout.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/logout.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/set-project.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/set-project.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/whoami.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/whoami.command.spec.js.map +1 -1
- package/dist/commands/auth/get-project.command.js +2 -2
- package/dist/commands/auth/get-project.command.js.map +1 -1
- package/dist/commands/auth/index.js +2 -2
- package/dist/commands/auth/index.js.map +1 -1
- package/dist/commands/auth/list-projects.command.js +2 -2
- package/dist/commands/auth/list-projects.command.js.map +1 -1
- package/dist/commands/auth/login.command.js +2 -2
- package/dist/commands/auth/login.command.js.map +1 -1
- package/dist/commands/auth/logout.command.js +2 -2
- package/dist/commands/auth/logout.command.js.map +1 -1
- package/dist/commands/auth/set-project.command.js +2 -2
- package/dist/commands/auth/set-project.command.js.map +1 -1
- package/dist/commands/auth/whoami.command.js +2 -2
- package/dist/commands/auth/whoami.command.js.map +1 -1
- package/dist/commands/ci/__tests__/label-commit.utils.spec.js +2 -2
- package/dist/commands/ci/__tests__/label-commit.utils.spec.js.map +1 -1
- package/dist/commands/ci/__tests__/session-filter.utils.spec.js +2 -2
- package/dist/commands/ci/__tests__/session-filter.utils.spec.js.map +1 -1
- package/dist/commands/ci/agent-test.command.d.ts +2 -0
- package/dist/commands/ci/agent-test.command.d.ts.map +1 -1
- package/dist/commands/ci/agent-test.command.js +28 -3
- package/dist/commands/ci/agent-test.command.js.map +1 -1
- package/dist/commands/ci/agent-test.command.spec.d.ts +2 -0
- package/dist/commands/ci/agent-test.command.spec.d.ts.map +1 -0
- package/dist/commands/ci/agent-test.command.spec.js +133 -0
- package/dist/commands/ci/agent-test.command.spec.js.map +1 -0
- package/dist/commands/ci/deprecated-trigger-options.js +2 -2
- package/dist/commands/ci/deprecated-trigger-options.js.map +1 -1
- package/dist/commands/ci/index.js +2 -2
- package/dist/commands/ci/index.js.map +1 -1
- package/dist/commands/ci/label-commit.command.js +2 -2
- package/dist/commands/ci/label-commit.command.js.map +1 -1
- package/dist/commands/ci/label-commit.core.js +2 -2
- package/dist/commands/ci/label-commit.core.js.map +1 -1
- package/dist/commands/ci/label-commit.types.js +2 -2
- package/dist/commands/ci/label-commit.types.js.map +1 -1
- package/dist/commands/ci/label-commit.utils.js +2 -2
- package/dist/commands/ci/label-commit.utils.js.map +1 -1
- package/dist/commands/ci/prepare.command.js +2 -2
- package/dist/commands/ci/prepare.command.js.map +1 -1
- package/dist/commands/ci/resolve-git-options.js +2 -2
- package/dist/commands/ci/resolve-git-options.js.map +1 -1
- package/dist/commands/ci/run-local.command.js +2 -2
- package/dist/commands/ci/run-local.command.js.map +1 -1
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js +2 -2
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js.map +1 -1
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js +2 -2
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js.map +1 -1
- package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js +2 -2
- package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js.map +1 -1
- package/dist/commands/ci/run.command.js +2 -2
- package/dist/commands/ci/run.command.js.map +1 -1
- package/dist/commands/ci/session-filter.utils.js +2 -2
- package/dist/commands/ci/session-filter.utils.js.map +1 -1
- package/dist/commands/ci/start-tunnel.command.js +2 -2
- package/dist/commands/ci/start-tunnel.command.js.map +1 -1
- package/dist/commands/ci/trigger-test-run.core.js +2 -2
- package/dist/commands/ci/trigger-test-run.core.js.map +1 -1
- package/dist/commands/ci/trigger-test-run.types.js +2 -2
- package/dist/commands/ci/trigger-test-run.types.js.map +1 -1
- package/dist/commands/ci/upload-asset-chunk.command.js +2 -2
- package/dist/commands/ci/upload-asset-chunk.command.js.map +1 -1
- package/dist/commands/ci/upload-assets.command.js +2 -2
- package/dist/commands/ci/upload-assets.command.js.map +1 -1
- package/dist/commands/ci/upload-container.command.js +2 -2
- package/dist/commands/ci/upload-container.command.js.map +1 -1
- package/dist/commands/crawl.command.js +2 -2
- package/dist/commands/crawl.command.js.map +1 -1
- package/dist/commands/debug/clean-workspaces.js +2 -2
- package/dist/commands/debug/clean-workspaces.js.map +1 -1
- package/dist/commands/debug/index.js +2 -2
- package/dist/commands/debug/index.js.map +1 -1
- package/dist/commands/debug/present-workspace.js +2 -2
- package/dist/commands/debug/present-workspace.js.map +1 -1
- package/dist/commands/debug/project-worktree.js +2 -2
- package/dist/commands/debug/project-worktree.js.map +1 -1
- package/dist/commands/deprecated-aliases.js +2 -2
- package/dist/commands/deprecated-aliases.js.map +1 -1
- package/dist/commands/download/index.js +2 -2
- package/dist/commands/download/index.js.map +1 -1
- package/dist/commands/download/replay.command.js +2 -2
- package/dist/commands/download/replay.command.js.map +1 -1
- package/dist/commands/download/session.command.js +2 -2
- package/dist/commands/download/session.command.js.map +1 -1
- package/dist/commands/download/test-run.command.js +2 -2
- package/dist/commands/download/test-run.command.js.map +1 -1
- package/dist/commands/local/get-edited-files.utils.js +2 -2
- package/dist/commands/local/get-edited-files.utils.js.map +1 -1
- package/dist/commands/local/get-edited-files.utils.spec.js +2 -2
- package/dist/commands/local/get-edited-files.utils.spec.js.map +1 -1
- package/dist/commands/local/index.js +2 -2
- package/dist/commands/local/index.js.map +1 -1
- package/dist/commands/local/relevant-sessions.command.js +2 -2
- package/dist/commands/local/relevant-sessions.command.js.map +1 -1
- package/dist/commands/onboard/__tests__/build-context.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/build-context.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/build-context.spec.js +179 -0
- package/dist/commands/onboard/__tests__/build-context.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.js +164 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.js +73 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.js +277 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.js +109 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js +157 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.js +158 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.js +116 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.js +166 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js +137 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js +286 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js.map +1 -0
- package/dist/commands/onboard/build-context.d.ts +16 -0
- package/dist/commands/onboard/build-context.d.ts.map +1 -0
- package/dist/commands/onboard/build-context.js +104 -0
- package/dist/commands/onboard/build-context.js.map +1 -0
- package/dist/commands/onboard/check-vcs-link.d.ts +14 -0
- package/dist/commands/onboard/check-vcs-link.d.ts.map +1 -0
- package/dist/commands/onboard/check-vcs-link.js +111 -0
- package/dist/commands/onboard/check-vcs-link.js.map +1 -0
- package/dist/commands/onboard/codex-mcp.d.ts +24 -0
- package/dist/commands/onboard/codex-mcp.d.ts.map +1 -0
- package/dist/commands/onboard/codex-mcp.js +302 -0
- package/dist/commands/onboard/codex-mcp.js.map +1 -0
- package/dist/commands/onboard/customer-agents.d.ts +9 -0
- package/dist/commands/onboard/customer-agents.d.ts.map +1 -0
- package/dist/commands/onboard/customer-agents.js +19 -0
- package/dist/commands/onboard/customer-agents.js.map +1 -0
- package/dist/commands/onboard/customer-agents.json +17 -0
- package/dist/commands/onboard/customer-docs.d.ts +21 -0
- package/dist/commands/onboard/customer-docs.d.ts.map +1 -0
- package/dist/commands/onboard/customer-docs.js +31 -0
- package/dist/commands/onboard/customer-docs.js.map +1 -0
- package/dist/commands/onboard/customer-docs.json +35 -0
- package/dist/commands/onboard/detect-framework.d.ts +26 -0
- package/dist/commands/onboard/detect-framework.d.ts.map +1 -0
- package/dist/commands/onboard/detect-framework.js +305 -0
- package/dist/commands/onboard/detect-framework.js.map +1 -0
- package/dist/commands/onboard/discover-apps.d.ts +21 -0
- package/dist/commands/onboard/discover-apps.d.ts.map +1 -0
- package/dist/commands/onboard/discover-apps.js +318 -0
- package/dist/commands/onboard/discover-apps.js.map +1 -0
- package/dist/commands/onboard/docs-urls.d.ts +11 -0
- package/dist/commands/onboard/docs-urls.d.ts.map +1 -0
- package/dist/commands/onboard/docs-urls.js +17 -0
- package/dist/commands/onboard/docs-urls.js.map +1 -0
- package/dist/commands/onboard/git-repo-info.d.ts +15 -0
- package/dist/commands/onboard/git-repo-info.d.ts.map +1 -0
- package/dist/commands/onboard/git-repo-info.js +84 -0
- package/dist/commands/onboard/git-repo-info.js.map +1 -0
- package/dist/commands/onboard/index.d.ts +18 -0
- package/dist/commands/onboard/index.d.ts.map +1 -0
- package/dist/commands/onboard/index.js +164 -0
- package/dist/commands/onboard/index.js.map +1 -0
- package/dist/commands/onboard/inline-doc-constants.d.ts +21 -0
- package/dist/commands/onboard/inline-doc-constants.d.ts.map +1 -0
- package/dist/commands/onboard/inline-doc-constants.js +238 -0
- package/dist/commands/onboard/inline-doc-constants.js.map +1 -0
- package/dist/commands/onboard/launch-agent.d.ts +65 -0
- package/dist/commands/onboard/launch-agent.d.ts.map +1 -0
- package/dist/commands/onboard/launch-agent.js +311 -0
- package/dist/commands/onboard/launch-agent.js.map +1 -0
- package/dist/commands/onboard/materialize-workspace.d.ts +68 -0
- package/dist/commands/onboard/materialize-workspace.d.ts.map +1 -0
- package/dist/commands/onboard/materialize-workspace.js +177 -0
- package/dist/commands/onboard/materialize-workspace.js.map +1 -0
- package/dist/commands/onboard/print-summary.d.ts +10 -0
- package/dist/commands/onboard/print-summary.d.ts.map +1 -0
- package/dist/commands/onboard/print-summary.js +49 -0
- package/dist/commands/onboard/print-summary.js.map +1 -0
- package/dist/commands/onboard/resolve-app.d.ts +21 -0
- package/dist/commands/onboard/resolve-app.d.ts.map +1 -0
- package/dist/commands/onboard/resolve-app.js +78 -0
- package/dist/commands/onboard/resolve-app.js.map +1 -0
- package/dist/commands/onboard/resolve-project.d.ts +14 -0
- package/dist/commands/onboard/resolve-project.d.ts.map +1 -0
- package/dist/commands/onboard/resolve-project.js +92 -0
- package/dist/commands/onboard/resolve-project.js.map +1 -0
- package/dist/commands/onboard/safe-repo-fs.d.ts +59 -0
- package/dist/commands/onboard/safe-repo-fs.d.ts.map +1 -0
- package/dist/commands/onboard/safe-repo-fs.js +266 -0
- package/dist/commands/onboard/safe-repo-fs.js.map +1 -0
- package/dist/commands/onboard/setup-agent-integrations.d.ts +43 -0
- package/dist/commands/onboard/setup-agent-integrations.d.ts.map +1 -0
- package/dist/commands/onboard/setup-agent-integrations.js +324 -0
- package/dist/commands/onboard/setup-agent-integrations.js.map +1 -0
- package/dist/commands/onboard/templates/CLAUDE.md +213 -0
- package/dist/commands/onboard/templates/agents/auth-setup.md +117 -0
- package/dist/commands/onboard/templates/agents/ci-setup.md +742 -0
- package/dist/commands/onboard/templates/agents/csp-setup.md +78 -0
- package/dist/commands/onboard/templates/agents/false-positive-prevention.md +268 -0
- package/dist/commands/onboard/templates/agents/feature-flag-setup.md +133 -0
- package/dist/commands/onboard/templates/agents/local-simulation-verification.md +96 -0
- package/dist/commands/onboard/templates/agents/persisted-graphql-queries.md +150 -0
- package/dist/commands/onboard/templates/agents/recorder-installation.md +194 -0
- package/dist/commands/onboard/templates/agents/replay-fetch-retry-compatibility.md +252 -0
- package/dist/commands/onboard/templates/agents/reviewer.md +788 -0
- package/dist/commands/onboard/templates/agents/service-worker-compatibility.md +254 -0
- package/dist/commands/onboard/templates/agents/session-context.md +133 -0
- package/dist/commands/onboard/templates/agents/shared-worker-compatibility.md +187 -0
- package/dist/commands/onboard/templates/docs/additional-guides/backend-recorder.ts +340 -0
- package/dist/commands/onboard/templates/docs/ci/not-yet-run-checks.ts +58 -0
- package/dist/commands/onboard/templates/docs/ci.ts +19 -0
- package/dist/commands/onboard/templates/docs/cloud-replay.ts +145 -0
- package/dist/commands/onboard/templates/docs/constants.ts +37 -0
- package/dist/commands/onboard/templates/docs/github-actions-v2.ts +859 -0
- package/dist/commands/onboard/templates/docs/how-to/auth/bypassing-auth.ts +27 -0
- package/dist/commands/onboard/templates/docs/how-to/auth/enabling-full-auth.ts +91 -0
- package/dist/commands/onboard/templates/docs/how-to/configure-ignore-patterns.ts +77 -0
- package/dist/commands/onboard/templates/docs/how-to/enable-source-coverage.ts +84 -0
- package/dist/commands/onboard/templates/docs/how-to/fix-false-positive-diffs.ts +156 -0
- package/dist/commands/onboard/templates/docs/how-to/link-bitbucket.ts +15 -0
- package/dist/commands/onboard/templates/docs/how-to/link-gitlab.ts +22 -0
- package/dist/commands/onboard/templates/docs/how-to/record-session-context.ts +129 -0
- package/dist/commands/onboard/templates/docs/how-to/recorder-script.ts +139 -0
- package/dist/commands/onboard/templates/docs/how-to/testing-feature-flags.ts +97 -0
- package/dist/commands/onboard/templates/docs/how-to/testing-multiple-apps-or-app-variants.ts +40 -0
- package/dist/commands/onboard/templates/docs/how-to/troubleshoot-auth.ts +58 -0
- package/dist/commands/onboard/templates/docs/how-to/troubleshoot-failed-simulations.ts +97 -0
- package/dist/commands/onboard/templates/docs/how-to/typescript-types.ts +51 -0
- package/dist/commands/onboard/templates/docs/how-to/window-meticulous-object.ts +685 -0
- package/dist/commands/onboard/templates/docs/onboarding-guide.ts +415 -0
- package/dist/commands/onboard/templates/docs/recorder-getting-started.ts +24 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/constants.ts +1 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/explanation-of-methods-to-add-recorder.ts +21 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/angular-instructions.ts +34 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/any-other-framework-instructions.ts +118 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/vue-instructions.ts +39 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/next-js-instructions.ts +49 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/nuxtjs-instructions.ts +68 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/rsbuild-instructions.ts +66 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/storybook-instructions.ts +59 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/sveltekit-instructions.ts +113 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/vite-instructions.ts +58 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-requirements.ts +51 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/steps-after-installing-recorder.ts +25 -0
- package/dist/commands/onboard/templates/docs/reference/cli-commands.ts +1324 -0
- package/dist/commands/onboard/templates/docs/session-recording/csp-exceptions.ts +17 -0
- package/dist/commands/onboard/templates/docs/session-recording/recorder-npm-dependency.ts +62 -0
- package/dist/commands/onboard/templates/docs-imports/src/lib/next/next.constants.ts +46 -0
- package/dist/commands/onboard/templates/docs-imports/src/lib/utils/internal-urls/docs-urls.utils.ts +254 -0
- package/dist/commands/onboard/templates/settings.json +14 -0
- package/dist/commands/project/index.js +2 -2
- package/dist/commands/project/index.js.map +1 -1
- package/dist/commands/project/show.command.js +2 -2
- package/dist/commands/project/show.command.js.map +1 -1
- package/dist/commands/project/upload-source.command.js +2 -2
- package/dist/commands/project/upload-source.command.js.map +1 -1
- package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js +2 -2
- package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js.map +1 -1
- package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js +2 -2
- package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js.map +1 -1
- package/dist/commands/record/__tests__/backend.command.spec.js +2 -2
- package/dist/commands/record/__tests__/backend.command.spec.js.map +1 -1
- package/dist/commands/record/__tests__/login.command.spec.js +2 -2
- package/dist/commands/record/__tests__/login.command.spec.js.map +1 -1
- package/dist/commands/record/__tests__/session.command.spec.js +2 -2
- package/dist/commands/record/__tests__/session.command.spec.js.map +1 -1
- package/dist/commands/record/backend-dev-command.utils.js +2 -2
- package/dist/commands/record/backend-dev-command.utils.js.map +1 -1
- package/dist/commands/record/backend-sidecar.utils.js +2 -2
- package/dist/commands/record/backend-sidecar.utils.js.map +1 -1
- package/dist/commands/record/backend.command.js +2 -2
- package/dist/commands/record/backend.command.js.map +1 -1
- package/dist/commands/record/index.js +2 -2
- package/dist/commands/record/index.js.map +1 -1
- package/dist/commands/record/login.command.js +2 -2
- package/dist/commands/record/login.command.js.map +1 -1
- package/dist/commands/record/session.command.js +2 -2
- package/dist/commands/record/session.command.js.map +1 -1
- package/dist/commands/replay-debugger.ui.js +2 -2
- package/dist/commands/replay-debugger.ui.js.map +1 -1
- package/dist/commands/replay.command.js +2 -2
- package/dist/commands/replay.command.js.map +1 -1
- package/dist/commands/schema.command.js +2 -2
- package/dist/commands/schema.command.js.map +1 -1
- package/dist/commands/schema.command.spec.js +2 -2
- package/dist/commands/schema.command.spec.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/utils/__tests__/handle-auth-failure.spec.js +2 -2
- package/dist/utils/__tests__/handle-auth-failure.spec.js.map +1 -1
- package/dist/utils/__tests__/project-selection-hint.spec.js +2 -2
- package/dist/utils/__tests__/project-selection-hint.spec.js.map +1 -1
- package/dist/utils/__tests__/resolve-project-identifier.spec.js +2 -2
- package/dist/utils/__tests__/resolve-project-identifier.spec.js.map +1 -1
- package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js +2 -2
- package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js.map +1 -1
- package/dist/utils/__tests__/select-project.spec.js +5 -4
- package/dist/utils/__tests__/select-project.spec.js.map +1 -1
- package/dist/utils/cli-user-error.js +2 -2
- package/dist/utils/cli-user-error.js.map +1 -1
- package/dist/utils/constants.js +2 -2
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/environment.utils.js +2 -2
- package/dist/utils/environment.utils.js.map +1 -1
- package/dist/utils/format-coverage-ranges.js +2 -2
- package/dist/utils/format-coverage-ranges.js.map +1 -1
- package/dist/utils/handle-auth-failure.js +2 -2
- package/dist/utils/handle-auth-failure.js.map +1 -1
- package/dist/utils/out-of-date-client-error.js +2 -2
- package/dist/utils/out-of-date-client-error.js.map +1 -1
- package/dist/utils/project-selection-hint.js +2 -2
- package/dist/utils/project-selection-hint.js.map +1 -1
- package/dist/utils/resolve-project-identifier.js +2 -2
- package/dist/utils/resolve-project-identifier.js.map +1 -1
- package/dist/utils/resolve-test-run-from-commit.js +2 -2
- package/dist/utils/resolve-test-run-from-commit.js.map +1 -1
- package/dist/utils/select-project.d.ts +9 -0
- package/dist/utils/select-project.d.ts.map +1 -1
- package/dist/utils/select-project.js +58 -15
- package/dist/utils/select-project.js.map +1 -1
- package/package.json +14 -12
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: persisted-graphql-queries
|
|
3
|
+
description: Produces a customer-facing step to disable persisted GraphQL queries (both fully-persisted and Automatic Persisted Queries / APQ) in non-production environments so recorded sessions contain full operation bodies and network patching stays reliable. Use if the reviewer detected always-on persisted GraphQL queries (APQ or fully-persisted).
|
|
4
|
+
tools: Read, Grep, Glob, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a Meticulous onboarding specialist for **persisted GraphQL queries**.
|
|
9
|
+
|
|
10
|
+
Your job is to produce a customer-facing step that disables persisted GraphQL queries in the
|
|
11
|
+
environments Meticulous records and replays against, so recordings contain the full operation
|
|
12
|
+
body. Write the section to the output file path provided in the prompt.
|
|
13
|
+
|
|
14
|
+
The reviewer's structured summary will be provided in the prompt that launches you. The
|
|
15
|
+
prompt also gives the **selected app** path for monorepos. Scope all findings and diffs to
|
|
16
|
+
that app.
|
|
17
|
+
|
|
18
|
+
## Why this step exists
|
|
19
|
+
|
|
20
|
+
With persisted queries (Apollo Client `createPersistedQueryLink`, urql `persistedExchange`,
|
|
21
|
+
Relay persisted queries, or any hand-rolled equivalent) the client sends a **hash** of the
|
|
22
|
+
operation instead of the operation body. Two patterns exist:
|
|
23
|
+
|
|
24
|
+
1. **Automatic Persisted Queries (APQ).** The client first sends only the hash; the server
|
|
25
|
+
responds with `PersistedQueryNotFound`; the client retries with the full query body. The
|
|
26
|
+
recorded retry body does contain the `query` field, so recordings are debuggable — **but
|
|
27
|
+
the hash-first request plus the fallback retry make Meticulous's network stubbing and
|
|
28
|
+
patching harder and more fragile** when the backend or query changes (we have to patch
|
|
29
|
+
around the extra round-trip). Disabling APQ outside production removes that fragility, so
|
|
30
|
+
it **should also be disabled** even though it falls back to the full body.
|
|
31
|
+
2. **Fully persisted / "trusted documents" queries.** The client sends **only** the hash and
|
|
32
|
+
variables, never the operation body. The server maps the hash to a server-side query
|
|
33
|
+
manifest. The recorded request body has **no `query` field at all** — just
|
|
34
|
+
`extensions.persistedQuery.sha256Hash`, and often no `operationName` either.
|
|
35
|
+
|
|
36
|
+
**Matching is not the problem.** Meticulous's GraphQL matcher handles both patterns (it keys
|
|
37
|
+
on the hash + variables), so replays continue to work across code changes. The problems this
|
|
38
|
+
step solves are:
|
|
39
|
+
|
|
40
|
+
- **Network patching robustness (both APQ and fully-persisted).** Persisted queries make it
|
|
41
|
+
harder for Meticulous to patch stubbed network responses when the backend changes — APQ
|
|
42
|
+
because of the hash-first request + `PersistedQueryNotFound` retry, fully-persisted because
|
|
43
|
+
there is no operation body to key patches off of. Disabling them outside production keeps
|
|
44
|
+
network patching reliable.
|
|
45
|
+
- **Debuggability (mainly fully-persisted).** Anyone inspecting a recorded session — a human,
|
|
46
|
+
a network-transform author, or an AI agent triaging a diff — sees only a hash. They cannot
|
|
47
|
+
tell what the operation does without resolving the hash against the server-side manifest.
|
|
48
|
+
- **Per-operation network transformations (mainly fully-persisted).** Network patches and
|
|
49
|
+
transforms that target a named operation or query text have nothing to match on when the
|
|
50
|
+
body is hash-only.
|
|
51
|
+
|
|
52
|
+
**Recommendation:** disable persisted queries in the environments where the recorder runs
|
|
53
|
+
and where Meticulous replays. Production behavior is unaffected — gate the change on the
|
|
54
|
+
same `NODE_ENV` / `import.meta.env.MODE` / `window.Meticulous?.isRunningAsTest` signal the
|
|
55
|
+
customer already uses to gate the recorder.
|
|
56
|
+
|
|
57
|
+
## What to investigate
|
|
58
|
+
|
|
59
|
+
Use the reviewer's `### Persisted GraphQL Queries` section as the starting point. Confirm
|
|
60
|
+
each finding by reading the file at the reported line, then expand the search to any sibling
|
|
61
|
+
client config the reviewer might have missed.
|
|
62
|
+
|
|
63
|
+
Grep targets (run in the selected app's directory for monorepos):
|
|
64
|
+
|
|
65
|
+
- `createPersistedQueryLink` (Apollo Client, `@apollo/client/link/persisted-queries`)
|
|
66
|
+
- `apollo-link-persisted-queries` (legacy Apollo package)
|
|
67
|
+
- `persistedExchange` (urql, `@urql/exchange-persisted`)
|
|
68
|
+
- `RelayNetworkLayer` with persisted query handlers; `relay-compiler --persist-output`;
|
|
69
|
+
`persistConfig` in `relay.config.{js,json,ts}`
|
|
70
|
+
- `graphql-persisted-document-loader`, `babel-plugin-relay` with persisted IDs
|
|
71
|
+
- `automaticPersistedQueries`, `persistedQueries`, `usePersistedQueries`
|
|
72
|
+
- Hand-rolled: code that sends `extensions.persistedQuery` without the `query` field, or a
|
|
73
|
+
network layer that stores a hash → operation manifest
|
|
74
|
+
|
|
75
|
+
For each hit, note:
|
|
76
|
+
|
|
77
|
+
- The **file path and line** of the call.
|
|
78
|
+
- Whether the persisted-queries setup is **always on** or already gated on environment
|
|
79
|
+
(look for `NODE_ENV === "production"`, `import.meta.env.PROD`, an `if (isProduction)`
|
|
80
|
+
branch, or similar). If it is already gated to production only, **no change is needed**
|
|
81
|
+
— the recorder and Meticulous replays both run outside production.
|
|
82
|
+
|
|
83
|
+
## What to produce
|
|
84
|
+
|
|
85
|
+
Write the section to the **customer** output path provided in the prompt. Your step number
|
|
86
|
+
is the two-digit prefix in the filename (e.g. `12-persisted-graphql-queries.md` → Step 12).
|
|
87
|
+
|
|
88
|
+
If the only persisted-query setup is already gated to production, write a short section
|
|
89
|
+
that confirms this and explicitly states no code change is required — do not invent a
|
|
90
|
+
mitigation. Otherwise produce a section with this structure:
|
|
91
|
+
|
|
92
|
+
- A `## Step <N>: Disable Persisted GraphQL Queries Outside Production` heading.
|
|
93
|
+
- A `Files to modify:` list naming each GraphQL client config file you will diff.
|
|
94
|
+
- A one-paragraph rationale: Meticulous's GraphQL matcher handles persisted queries, but
|
|
95
|
+
they make network patching less reliable when the backend changes. For **APQ**, the
|
|
96
|
+
hash-first request plus the `PersistedQueryNotFound` retry add an extra round-trip
|
|
97
|
+
Meticulous has to patch around. For **fully-persisted** queries, the recorded request body
|
|
98
|
+
has no operation text or name, so sessions are hard to debug and per-operation network
|
|
99
|
+
transformations have nothing to target. Disabling persisted queries outside production
|
|
100
|
+
restores full operation bodies in recordings and keeps network patching robust. Production
|
|
101
|
+
behavior is unchanged.
|
|
102
|
+
- A `### Findings` subsection listing each persisted-query construction site with file path
|
|
103
|
+
and a one-line summary of how it is wired (Apollo link, urql exchange, Relay network
|
|
104
|
+
layer, custom). Note whether each is already gated to production.
|
|
105
|
+
- A `### Change` subsection with a unified diff for each construction site. The change
|
|
106
|
+
should gate the persisted-query link/exchange so it is only included in production
|
|
107
|
+
builds. Use the same environment signal the customer already uses to gate the recorder
|
|
108
|
+
snippet (typically `NODE_ENV === "production"` or `import.meta.env.PROD`). If the
|
|
109
|
+
customer uses `window.Meticulous?.isRunningAsTest` as a runtime signal elsewhere, prefer
|
|
110
|
+
matching that pattern instead.
|
|
111
|
+
- A `### Verification` subsection telling the customer to run the app locally (or in the
|
|
112
|
+
same environment the recorder runs in) and inspect a GraphQL request in DevTools — the
|
|
113
|
+
request body should contain the full `query` field (not just
|
|
114
|
+
`extensions.persistedQuery.sha256Hash`).
|
|
115
|
+
|
|
116
|
+
Example diff shape (Apollo Client; adapt to the customer's actual code):
|
|
117
|
+
|
|
118
|
+
```diff
|
|
119
|
+
import { ApolloClient, HttpLink, InMemoryCache, from } from "@apollo/client";
|
|
120
|
+
import { createPersistedQueryLink } from "@apollo/client/link/persisted-queries";
|
|
121
|
+
import { sha256 } from "crypto-hash";
|
|
122
|
+
|
|
123
|
+
const httpLink = new HttpLink({ uri: "/graphql" });
|
|
124
|
+
|
|
125
|
+
-const link = from([
|
|
126
|
+
- createPersistedQueryLink({ sha256 }),
|
|
127
|
+
- httpLink,
|
|
128
|
+
-]);
|
|
129
|
+
+// Persisted queries send only a hash, which makes recorded sessions hard to debug and
|
|
130
|
+
+// prevents per-operation network transformations. Enable them only in production.
|
|
131
|
+
+const link =
|
|
132
|
+
+ process.env.NODE_ENV === "production"
|
|
133
|
+
+ ? from([createPersistedQueryLink({ sha256 }), httpLink])
|
|
134
|
+
+ : httpLink;
|
|
135
|
+
|
|
136
|
+
export const client = new ApolloClient({ link, cache: new InMemoryCache() });
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Rules
|
|
140
|
+
|
|
141
|
+
- Do not modify the customer's code. Only write to the section file.
|
|
142
|
+
- Use `<YOUR_RECORDING_TOKEN>` placeholders only if you reference the recorder snippet — most
|
|
143
|
+
sections will not need to.
|
|
144
|
+
- Keep diffs scoped to the construction sites the reviewer found. Do not refactor surrounding
|
|
145
|
+
code.
|
|
146
|
+
- Match the customer's existing environment-gating idiom (`process.env.NODE_ENV`,
|
|
147
|
+
`import.meta.env.PROD`, `window.Meticulous?.isRunningAsTest`, etc.). If multiple idioms
|
|
148
|
+
exist in the file, prefer the one already used to gate the recorder snippet.
|
|
149
|
+
- If the only finding turns out to already be production-gated, say so and produce a short
|
|
150
|
+
"no change required" section rather than inventing a diff.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recorder-installation
|
|
3
|
+
description: Produces framework-specific recorder installation instructions for the onboarding plan. Use after the reviewer has produced a codebase summary.
|
|
4
|
+
tools: Read, Grep, Glob, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a recorder installation specialist for the Meticulous automated UI testing platform.
|
|
9
|
+
|
|
10
|
+
Your job is to scan the customer's codebase, read the reference docs, and produce a
|
|
11
|
+
self-contained "Install the Meticulous Recorder" section. Write the section to the
|
|
12
|
+
output file path provided in the prompt.
|
|
13
|
+
|
|
14
|
+
The reviewer's structured summary will be provided in the prompt that launches you.
|
|
15
|
+
|
|
16
|
+
## Reference Docs
|
|
17
|
+
|
|
18
|
+
Read the Meticulous doc source files in `.claude/docs/`. These are TypeScript files that
|
|
19
|
+
export template literals with Markdoc-like syntax -- read them for their content, ignoring
|
|
20
|
+
the `{% %}` markup tags.
|
|
21
|
+
|
|
22
|
+
**Top-level docs:**
|
|
23
|
+
|
|
24
|
+
- `.claude/docs/recorder-getting-started.ts` -- overview of recorder setup
|
|
25
|
+
- `.claude/docs/how-to/recorder-script.ts` -- script tag installation (all framework tabs)
|
|
26
|
+
- `.claude/docs/session-recording/recorder-npm-dependency.ts` -- NPM package installation
|
|
27
|
+
- `.claude/docs/how-to/typescript-types.ts` -- TypeScript type declarations for window.Meticulous
|
|
28
|
+
|
|
29
|
+
**Framework-specific snippets (referenced by the docs above):**
|
|
30
|
+
|
|
31
|
+
- `.claude/docs/recorder-snippets/script-requirements.ts` -- critical script tag requirements
|
|
32
|
+
- `.claude/docs/recorder-snippets/constants.ts` -- snippet URL
|
|
33
|
+
- `.claude/docs/recorder-snippets/steps-after-installing-recorder.ts` -- verification steps
|
|
34
|
+
- `.claude/docs/recorder-snippets/script-based-instructions/` -- per-framework script tag instructions
|
|
35
|
+
- `.claude/docs/recorder-snippets/npm-package-based-instructions/` -- per-framework NPM instructions
|
|
36
|
+
|
|
37
|
+
Read the appropriate framework-specific snippet file based on the reviewer's detected
|
|
38
|
+
framework. These files contain the exact code to use.
|
|
39
|
+
|
|
40
|
+
## Overview
|
|
41
|
+
|
|
42
|
+
There are two ways to add the Meticulous recorder:
|
|
43
|
+
|
|
44
|
+
1. **Script tag (recommended)** -- guarantees the recorder initializes before any other
|
|
45
|
+
scripts, ensuring all network requests are captured. For Vite, rsbuild, and Nuxt,
|
|
46
|
+
use `@alwaysmeticulous/recorder-plugin` as the script tag installation method; it
|
|
47
|
+
injects the script at build time while preserving the script tag guarantees.
|
|
48
|
+
2. **NPM package fallback** (`@alwaysmeticulous/recorder-loader`) -- for cases where
|
|
49
|
+
the script tag requirements cannot be met.
|
|
50
|
+
|
|
51
|
+
Always recommend the script tag approach unless there is a specific reason it won't work.
|
|
52
|
+
|
|
53
|
+
**Important: The recorder must only be installed in non-production environments** (local
|
|
54
|
+
development, staging, and preview/PR deployments). It should never run in production. The
|
|
55
|
+
plan must include environment gating that prevents the recorder from loading in production.
|
|
56
|
+
Make this clear to the customer both in the prose explanation and in the code diff.
|
|
57
|
+
|
|
58
|
+
The framework-specific doc files you read (see "Framework-Specific Instructions" below)
|
|
59
|
+
already contain the correct gating pattern for each framework. For recorder plugin docs,
|
|
60
|
+
use the default dev-only variant unless the customer explicitly wants recording in all
|
|
61
|
+
environments. Include a comment in the diff explaining that the condition ensures the
|
|
62
|
+
recorder only loads outside production.
|
|
63
|
+
|
|
64
|
+
## Critical Requirements for Script Tag
|
|
65
|
+
|
|
66
|
+
Read `.claude/docs/recorder-snippets/script-requirements.ts` for the full list of
|
|
67
|
+
requirements. In brief: the script must be the first script in `<head>`, have no
|
|
68
|
+
`async`/`defer`, be in the initial HTML (not injected dynamically), and use the native
|
|
69
|
+
`<script>` tag (not framework components like Next.js `Script`).
|
|
70
|
+
|
|
71
|
+
If any requirement cannot be met, fall back to the NPM package approach.
|
|
72
|
+
|
|
73
|
+
If there are cross-origin or sandboxed iFrames then the recorder should be added to each of these iFrames as well as the main frame. If the iFrame is neither cross-origin nor sandboxed the recorder does not need to be added.
|
|
74
|
+
|
|
75
|
+
## Backend recording — session-id header (conditional)
|
|
76
|
+
|
|
77
|
+
Apply this **only** when the onboarding prompt states that backend recording is enabled.
|
|
78
|
+
The frontend recorder must inject the `X-Meticulous-Session-Id` header on the app's own
|
|
79
|
+
XHR/fetch requests so backend spans can be attached to the right session. The header is
|
|
80
|
+
injected on **same-origin requests only**; the
|
|
81
|
+
initial document request is correlated by a time-window heuristic instead, so this covers
|
|
82
|
+
the rest.
|
|
83
|
+
|
|
84
|
+
Per installation method (pick the one your step uses):
|
|
85
|
+
|
|
86
|
+
- **Script tag:** add `data-inject-session-id-header="true"` to the snippet `<script>` tag
|
|
87
|
+
(alongside `data-recording-token`).
|
|
88
|
+
- **Recorder plugin (Vite / rsbuild / Nuxt):** add it via the plugin's `attributes`
|
|
89
|
+
option:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
meticulousRecorderPlugin({
|
|
93
|
+
recordingToken: "<YOUR_RECORDING_TOKEN>",
|
|
94
|
+
// Backend recording: stamp X-Meticulous-Session-Id on same-origin requests so
|
|
95
|
+
// backend spans correlate with this session.
|
|
96
|
+
attributes: { "data-inject-session-id-header": "true" },
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- **NPM loader (`@alwaysmeticulous/recorder-loader`):** the loader has NO option for
|
|
101
|
+
this. Set the window global BEFORE calling `tryLoadAndStartRecorder`:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
// Backend recording: stamp X-Meticulous-Session-Id on same-origin requests so
|
|
105
|
+
// backend spans correlate with this session.
|
|
106
|
+
window.METICULOUS_INJECT_SESSION_ID_HEADER = true;
|
|
107
|
+
await tryLoadAndStartRecorder({ recordingToken: "<YOUR_RECORDING_TOKEN>" });
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Show the attribute/global inside the SAME diff as the snippet installation (do not create
|
|
111
|
+
a separate step), with an inline comment explaining it. When backend recording is NOT
|
|
112
|
+
mentioned in your prompt, omit all of this — do not add the attribute speculatively.
|
|
113
|
+
|
|
114
|
+
## Framework-Specific Instructions
|
|
115
|
+
|
|
116
|
+
The per-framework code snippets are in `.claude/docs/recorder-snippets/script-based-instructions/`.
|
|
117
|
+
Read the file matching the detected framework:
|
|
118
|
+
|
|
119
|
+
- `next-js-instructions.ts` -- Next.js (App Router and Pages Router)
|
|
120
|
+
- `nuxtjs-instructions.ts` -- Nuxt
|
|
121
|
+
- `sveltekit-instructions.ts` -- SvelteKit
|
|
122
|
+
- `vite-instructions.ts` -- Vite (React, Vue, or other)
|
|
123
|
+
- `rsbuild-instructions.ts` -- rsbuild
|
|
124
|
+
- `storybook-instructions.ts` -- Storybook
|
|
125
|
+
|
|
126
|
+
For Angular and Vue, the NPM package approach is used instead -- see
|
|
127
|
+
`.claude/docs/recorder-snippets/npm-package-based-instructions/`:
|
|
128
|
+
|
|
129
|
+
- `angular-instructions.ts` -- Angular (NPM package)
|
|
130
|
+
- `vue-instructions.ts` -- Vue (NPM package)
|
|
131
|
+
- `any-other-framework-instructions.ts` -- fallback for other frameworks
|
|
132
|
+
|
|
133
|
+
Use the code from these files as the basis for your unified diff, adapted to the
|
|
134
|
+
customer's actual file contents.
|
|
135
|
+
|
|
136
|
+
Additional onboarding-specific notes:
|
|
137
|
+
|
|
138
|
+
- **Next.js**: Use the native `<script>` tag, NOT the `Script` component from `next/script`.
|
|
139
|
+
Add the `eslint-disable` comment to suppress the `no-sync-scripts` lint warning.
|
|
140
|
+
- **Vite**: Use `@alwaysmeticulous/recorder-plugin/vite`. Do not ask the customer to
|
|
141
|
+
write a custom `transformIndexHtml` plugin.
|
|
142
|
+
- **rsbuild**: Use `@alwaysmeticulous/recorder-plugin/rspack` through `tools.rspack`.
|
|
143
|
+
- **Nuxt**: Use the `@alwaysmeticulous/recorder-plugin/nuxt` module.
|
|
144
|
+
|
|
145
|
+
## What to Produce
|
|
146
|
+
|
|
147
|
+
Write your markdown section to the output file path provided in the prompt. It should contain:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
## Step <N>: Install the Meticulous Recorder
|
|
151
|
+
|
|
152
|
+
<Brief explanation of what the recorder does and why it's needed>
|
|
153
|
+
|
|
154
|
+
### Changes
|
|
155
|
+
|
|
156
|
+
<For each file, show the change as a unified diff or the complete new file contents>
|
|
157
|
+
|
|
158
|
+
### TypeScript Types (if the project uses TypeScript)
|
|
159
|
+
|
|
160
|
+
<Instructions to install @alwaysmeticulous/sdk-bundles-api and add type declarations
|
|
161
|
+
for window.Meticulous -- read typescript-types.ts for the exact code>
|
|
162
|
+
|
|
163
|
+
### Verification
|
|
164
|
+
|
|
165
|
+
<How to verify the recorder is working -- read steps-after-installing-recorder.ts>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
When producing this section:
|
|
169
|
+
|
|
170
|
+
1. Use the placeholder `<YOUR_RECORDING_TOKEN>` in all code snippets. Do NOT include any
|
|
171
|
+
real token values. Add a note telling the customer to get their recording token from
|
|
172
|
+
the **Tokens** section of their Meticulous project settings. Read
|
|
173
|
+
`.claude/onboard-context.json` and use the `meticulousTokensUrl` value as the direct link.
|
|
174
|
+
2. Reference the exact file path found by the reviewer.
|
|
175
|
+
3. Show changes as a unified diff (context lines prefixed with space, additions with `+`,
|
|
176
|
+
removals with `-`). For new files, show the complete contents.
|
|
177
|
+
4. Include environment gating so the recorder only loads in non-production environments
|
|
178
|
+
(local, staging, preview). Use the default dev-only recorder plugin variant for Vite,
|
|
179
|
+
rsbuild, and Nuxt, and the non-production variant from the framework-specific doc file
|
|
180
|
+
for other frameworks. The diff must show the condition or plugin option responsible
|
|
181
|
+
for gating and include a comment explaining it prevents the recorder from loading in
|
|
182
|
+
production.
|
|
183
|
+
5. Include the verification steps from `.claude/docs/recorder-snippets/steps-after-installing-recorder.ts`.
|
|
184
|
+
When the verification step tells the customer to confirm the recorded session appears
|
|
185
|
+
in the dashboard, link to the **Sessions** tab using the `meticulousSessionsUrl` value
|
|
186
|
+
from `.claude/onboard-context.json` (not the settings page).
|
|
187
|
+
6. Note any pitfalls relevant to the detected framework (see script-requirements.ts).
|
|
188
|
+
7. If the project uses TypeScript, include a subsection for adding `window.Meticulous`
|
|
189
|
+
type declarations. Read `.claude/docs/how-to/typescript-types.ts` for the exact setup:
|
|
190
|
+
install `@alwaysmeticulous/sdk-bundles-api` as a dev dependency and create a type
|
|
191
|
+
declaration file that extends the Window interface. This is **required** for TypeScript
|
|
192
|
+
apps because later steps call `window.Meticulous?.context` (`recordFeatureFlag`,
|
|
193
|
+
`recordCustomContext`, `recordUserId`, `recordUserEmail`) and `isRunningAsTest` — those
|
|
194
|
+
APIs are typed on `MeticulousPublicApi` from the same package.
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: replay-fetch-retry-compatibility
|
|
3
|
+
description: Produces a customer-facing step that skips load-time / SSR data fetches when running as a Meticulous build, so failing requests are not retried in a storm during replay. Self-detecting; dispatch for apps with server-side / load-time data fetching (Next.js, Remix, Nuxt, SvelteKit, or other SSR/SSG). Writes nothing if no retry-prone load-time fetches are found.
|
|
4
|
+
tools: Read, Grep, Glob, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a replay-reliability specialist for the Meticulous automated UI testing platform.
|
|
9
|
+
|
|
10
|
+
Your job is to produce a self-contained step that stops **data fetches from failing and
|
|
11
|
+
being retried repeatedly during replay**. The canonical failure mode: an app fetches data
|
|
12
|
+
during initial render — most often in a framework **server-side lifecycle hook**
|
|
13
|
+
(`getInitialProps`, `getServerSideProps`, a Remix/React Router `loader`, Nuxt `asyncData`,
|
|
14
|
+
SvelteKit `load`) — and wraps that fetch in retry logic. During a Meticulous replay the
|
|
15
|
+
request fails (see "Why this happens" below) and the retry logic re-fires it many times,
|
|
16
|
+
making the replay slow, flaky, or broken. The fix is to **skip these requests when running
|
|
17
|
+
in a Meticulous build**. Write the section to the output file path provided in the prompt.
|
|
18
|
+
|
|
19
|
+
The reviewer's structured summary will be provided in the prompt that launches you. For
|
|
20
|
+
monorepos the prompt also gives the **selected app** path — scope all findings and diffs to
|
|
21
|
+
that app.
|
|
22
|
+
|
|
23
|
+
The Meticulous CI build always sets the **`METICULOUS_BUILD=true`** environment variable
|
|
24
|
+
(provisioned by the **Set Up CI** step / the CI docs), so you can rely on it being present —
|
|
25
|
+
you only need to **consume** it here, not provision it.
|
|
26
|
+
|
|
27
|
+
## Reference Docs
|
|
28
|
+
|
|
29
|
+
Read the Meticulous doc source files in `.claude/docs/`:
|
|
30
|
+
|
|
31
|
+
- `.claude/docs/how-to/window-meticulous-object.ts` — `window.Meticulous` API reference for
|
|
32
|
+
the **client-side** `isRunningAsTest` signal.
|
|
33
|
+
|
|
34
|
+
> **Security note — do not gate server-side behaviour on the `meticulous-is-test` request
|
|
35
|
+
> header.** That header is documented for read-only backend detection, but it is
|
|
36
|
+
> **attacker-controllable on every request**: anyone could send `meticulous-is-test: 1` to
|
|
37
|
+
> the production server and trigger the test codepath (e.g. rendering empty / fallback data,
|
|
38
|
+
> or skipping a real fetch). For anything that **changes behaviour** — like skipping a fetch
|
|
39
|
+
> — gate server-side and build-time code on the **`METICULOUS_BUILD` build-time environment
|
|
40
|
+
> variable**, which exists only in Meticulous build artifacts and cannot be spoofed.
|
|
41
|
+
|
|
42
|
+
## Why this happens
|
|
43
|
+
|
|
44
|
+
During replay Meticulous serves stubbed responses from the recorded session. Two situations
|
|
45
|
+
leave a request **unstubbed**, so it hits the real (often unavailable or changed) backend and
|
|
46
|
+
fails:
|
|
47
|
+
|
|
48
|
+
1. **Server-side load-time fetches.** A fetch inside `getInitialProps` / `getServerSideProps`
|
|
49
|
+
/ a `loader` runs **outside the browser** on the initial document request. The browser
|
|
50
|
+
recorder never saw it, so there is no stub for it during replay. It hits the backend and
|
|
51
|
+
typically fails.
|
|
52
|
+
2. **Backend drift on client-side fetches.** A client-side request whose recorded stub no
|
|
53
|
+
longer matches after a backend or query change falls through and fails.
|
|
54
|
+
|
|
55
|
+
When the failing fetch is wrapped in retry logic (`axios-retry`, `fetch-retry`, `p-retry`,
|
|
56
|
+
`async-retry`, `ky` `retry`, React Query / SWR default retries, Apollo `RetryLink`, urql
|
|
57
|
+
`retryExchange`, or a hand-rolled `for`/`while` retry loop), each failure triggers more
|
|
58
|
+
requests — a **retry storm**. The fix is to short-circuit the fetch when running as a
|
|
59
|
+
Meticulous test so it never enters the retry loop.
|
|
60
|
+
|
|
61
|
+
## Applicability Check
|
|
62
|
+
|
|
63
|
+
Detect the relevant sites yourself by scanning the codebase (scoped to the selected app for
|
|
64
|
+
monorepos). You are looking for the two ingredients together: a **load-time fetch** and
|
|
65
|
+
**retry behaviour**.
|
|
66
|
+
|
|
67
|
+
- **Server-side / load-time data fetching:** grep for `getInitialProps`, `getServerSideProps`,
|
|
68
|
+
Remix / React Router `loader` / `action` exports, Nuxt `asyncData` / server `useFetch`,
|
|
69
|
+
SvelteKit `load`, and `fetch` / data-library calls inside App Router server components.
|
|
70
|
+
- **Retry wrappers:** grep for `axios-retry`, `fetch-retry`, `p-retry`, `async-retry`,
|
|
71
|
+
`retry(`, `ky` with a `retry` option, React Query / TanStack Query `retry`, SWR
|
|
72
|
+
`errorRetryCount`, Apollo `RetryLink`, urql `retryExchange`, and hand-rolled `for`/`while`
|
|
73
|
+
loops that re-issue a request on failure.
|
|
74
|
+
|
|
75
|
+
If you find **no** server-side / load-time fetches and **no** retry-wrapped load-time fetches,
|
|
76
|
+
stop and return an empty response — no section is needed. (A client-side fetch with no retry
|
|
77
|
+
logic is fine: it is stubbed normally and won't storm.)
|
|
78
|
+
|
|
79
|
+
## What to Investigate
|
|
80
|
+
|
|
81
|
+
For each candidate site you found:
|
|
82
|
+
|
|
83
|
+
1. **Open the file** and read the fetch plus its enclosing function/hook.
|
|
84
|
+
2. **Determine where it runs:**
|
|
85
|
+
- **Server-side** — `getInitialProps` when `ctx.req` is present, `getServerSideProps`, a
|
|
86
|
+
Remix/React Router `loader`/`action`, Nuxt `asyncData` / server `useFetch`, SvelteKit
|
|
87
|
+
server `load`, or any data fetch in an App Router server component.
|
|
88
|
+
- **Client-side** — `useEffect`, event handlers, React Query / SWR hooks, or
|
|
89
|
+
`getInitialProps` on client navigations (no `ctx.req`).
|
|
90
|
+
- **Both** — `getInitialProps` runs server-side on first load and client-side on
|
|
91
|
+
navigation, so it needs both guards.
|
|
92
|
+
3. **Identify the retry mechanism** (which library or hand-rolled loop), so the diff can
|
|
93
|
+
short-circuit _before_ the retry wrapper runs.
|
|
94
|
+
4. **Confirm it is not already gated** for Meticulous (no existing
|
|
95
|
+
`process.env.METICULOUS_BUILD` check or `window.Meticulous?.isRunningAsTest` guard). If a
|
|
96
|
+
site already gates **server-side** behaviour on the `meticulous-is-test` **request
|
|
97
|
+
header**, treat it as **not** safely gated: flag it and convert it to the
|
|
98
|
+
`process.env.METICULOUS_BUILD` build var (the header is attacker-controllable in
|
|
99
|
+
production).
|
|
100
|
+
|
|
101
|
+
## How to fix each case
|
|
102
|
+
|
|
103
|
+
Detect the Meticulous environment with the right signal for where the code runs, then skip
|
|
104
|
+
the network call and return a safe fallback (empty list, cached/default props, `null`, etc.)
|
|
105
|
+
instead of fetching:
|
|
106
|
+
|
|
107
|
+
- **Server-side / build-time data fetching** (`getServerSideProps`, `getStaticProps`, a
|
|
108
|
+
Remix/React Router `loader`, Nuxt `asyncData`, SvelteKit `load`, App Router server
|
|
109
|
+
components) — gate on a **build-time env var**, `process.env.METICULOUS_BUILD === "true"`.
|
|
110
|
+
This variable is baked into the Meticulous static build and Docker image **only**;
|
|
111
|
+
production never sets it, so unlike the `meticulous-is-test` header it cannot be spoofed.
|
|
112
|
+
- **Client-side** — gate on `window.Meticulous?.isRunningAsTest` (always use optional
|
|
113
|
+
chaining). This is set by the recorder only during an actual replay, so it is safe to use
|
|
114
|
+
on the client.
|
|
115
|
+
- **`getInitialProps` (runs in both)** — branch on `ctx.req`: when present (server) gate on
|
|
116
|
+
`process.env.METICULOUS_BUILD === "true"`; otherwise (client) gate on
|
|
117
|
+
`window.Meticulous?.isRunningAsTest`. (Plain `process.env.METICULOUS_BUILD` is only
|
|
118
|
+
inlined server-side, so the client branch must use the `window.Meticulous` signal.)
|
|
119
|
+
|
|
120
|
+
`METICULOUS_BUILD=true` is set automatically by the Meticulous CI build (the **Set Up CI**
|
|
121
|
+
step provisions it on the build / image), so you only consume it here — do **not** add your
|
|
122
|
+
own build/CI instructions for it. Add a one-line note pointing the customer at the Set Up CI
|
|
123
|
+
step for where the variable comes from.
|
|
124
|
+
|
|
125
|
+
Prefer **skipping** the fetch (return fallback data) over merely lowering the retry count —
|
|
126
|
+
skipping removes the storm entirely and keeps the replay fast and deterministic. Only fall
|
|
127
|
+
back to reducing the retry count when the page genuinely cannot render without the data and
|
|
128
|
+
no sensible fallback exists; note that as a `TODO(meticulous):` for the customer.
|
|
129
|
+
|
|
130
|
+
## What to Produce
|
|
131
|
+
|
|
132
|
+
Write your markdown section to the output file path provided in the prompt. Your step number
|
|
133
|
+
is the two-digit prefix in the filename (e.g. `13-replay-fetch-retry-compatibility.md` →
|
|
134
|
+
`## Step 13: ...`).
|
|
135
|
+
|
|
136
|
+
### Section heading and preamble
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
## Step <N>: Prevent Data-Fetch Retry Storms During Replay
|
|
140
|
+
|
|
141
|
+
During replay, data fetched outside the recorded browser session — chiefly server-side
|
|
142
|
+
fetches in `getInitialProps` / `getServerSideProps` / loaders — has no stubbed response, so
|
|
143
|
+
it hits the backend and fails. Retry logic then re-fires the request repeatedly, slowing or
|
|
144
|
+
breaking the replay. The changes below skip these fetches when running as a Meticulous test
|
|
145
|
+
so they never enter the retry loop. Production behavior is unchanged.
|
|
146
|
+
|
|
147
|
+
**Files to modify:**
|
|
148
|
+
|
|
149
|
+
- <list every file touched, one per line>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Findings
|
|
153
|
+
|
|
154
|
+
List each fetch site with its file path, whether it runs server-side / client-side / both,
|
|
155
|
+
and the retry mechanism wrapping it. If every site is already gated for Meticulous, write a
|
|
156
|
+
short "no change required" section and set **Files to modify: None** instead of inventing a
|
|
157
|
+
diff.
|
|
158
|
+
|
|
159
|
+
### Change
|
|
160
|
+
|
|
161
|
+
For each site, emit a unified diff that short-circuits the fetch before the retry wrapper
|
|
162
|
+
runs, using the correct detection signal for where the code executes. Show at least 3 lines
|
|
163
|
+
of surrounding context and add an inline comment on the guard explaining why it exists.
|
|
164
|
+
|
|
165
|
+
Example — server-side `getServerSideProps` (adapt to the customer's actual code):
|
|
166
|
+
|
|
167
|
+
```diff
|
|
168
|
+
export const getServerSideProps = async (ctx) => {
|
|
169
|
+
+ // During a Meticulous replay this server-side fetch has no recorded stub and would
|
|
170
|
+
+ // fail and be retried repeatedly. METICULOUS_BUILD is set only in the Meticulous
|
|
171
|
+
+ // build artifacts (never in production), so skip the fetch and render safe defaults.
|
|
172
|
+
+ if (process.env.METICULOUS_BUILD === "true") {
|
|
173
|
+
+ return { props: { items: [] } };
|
|
174
|
+
+ }
|
|
175
|
+
+
|
|
176
|
+
const items = await fetchWithRetry("/api/items");
|
|
177
|
+
return { props: { items } };
|
|
178
|
+
};
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Example — `getInitialProps` (runs server-side and client-side):
|
|
182
|
+
|
|
183
|
+
```diff
|
|
184
|
+
Page.getInitialProps = async (ctx) => {
|
|
185
|
+
+ // On the server, gate on the Meticulous-only build var; on the client, use the
|
|
186
|
+
+ // recorder signal (process.env.METICULOUS_BUILD is not inlined client-side).
|
|
187
|
+
+ const isMeticulousReplay = ctx.req
|
|
188
|
+
+ ? process.env.METICULOUS_BUILD === "true"
|
|
189
|
+
+ : typeof window !== "undefined" && Boolean(window.Meticulous?.isRunningAsTest);
|
|
190
|
+
+ // Skip the failing-and-retried fetch under Meticulous; render with safe defaults.
|
|
191
|
+
+ if (isMeticulousReplay) {
|
|
192
|
+
+ return { items: [] };
|
|
193
|
+
+ }
|
|
194
|
+
+
|
|
195
|
+
const items = await fetchWithRetry("/api/items");
|
|
196
|
+
return { items };
|
|
197
|
+
};
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Example — client-side fetch:
|
|
201
|
+
|
|
202
|
+
```diff
|
|
203
|
+
useEffect(() => {
|
|
204
|
+
+ // Skip this retry-wrapped fetch during Meticulous replay to avoid a retry storm.
|
|
205
|
+
+ if (typeof window !== "undefined" && window.Meticulous?.isRunningAsTest) {
|
|
206
|
+
+ return;
|
|
207
|
+
+ }
|
|
208
|
+
fetchWithRetry("/api/items").then(setItems);
|
|
209
|
+
}, []);
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### `window.Meticulous` type declaration
|
|
213
|
+
|
|
214
|
+
If you emit any `window.Meticulous?.isRunningAsTest` guard, the codebase is TypeScript, and
|
|
215
|
+
no global declaration for `window.Meticulous` already exists (grep for `window.Meticulous`
|
|
216
|
+
and `interface Window` first), include a diff adding one:
|
|
217
|
+
|
|
218
|
+
```diff
|
|
219
|
+
// src/types/meticulous.d.ts (new file)
|
|
220
|
+
+interface MeticulousWindow {
|
|
221
|
+
+ isRunningAsTest?: boolean;
|
|
222
|
+
+}
|
|
223
|
+
+
|
|
224
|
+
+declare global {
|
|
225
|
+
+ interface Window {
|
|
226
|
+
+ Meticulous?: MeticulousWindow;
|
|
227
|
+
+ }
|
|
228
|
+
+}
|
|
229
|
+
+
|
|
230
|
+
+export {};
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Verification
|
|
234
|
+
|
|
235
|
+
Tell the customer to run a local simulation (or replay the recorded session) and confirm the
|
|
236
|
+
page renders without repeated failed requests to the affected endpoint in the logs/Network
|
|
237
|
+
panel — the retry storm should be gone.
|
|
238
|
+
|
|
239
|
+
## Guidelines
|
|
240
|
+
|
|
241
|
+
- Never recommend removing the fetch or its retry logic from production code — only skip it
|
|
242
|
+
when running as a Meticulous test.
|
|
243
|
+
- Always use optional chaining for the client signal: `window.Meticulous?.isRunningAsTest`.
|
|
244
|
+
- **Never gate server-side behaviour on the `meticulous-is-test` request header** — it is
|
|
245
|
+
attacker-controllable and would let anyone trigger the test codepath in production. Use the
|
|
246
|
+
`process.env.METICULOUS_BUILD` build var (server/build-time) and `window.Meticulous` (client)
|
|
247
|
+
instead. Do not use `window.Meticulous` server-side — `window` does not exist there.
|
|
248
|
+
- `METICULOUS_BUILD` is provisioned by the Set Up CI step — **consume** it here; do not add
|
|
249
|
+
your own CI / build / Dockerfile instructions for setting it.
|
|
250
|
+
- Keep diffs scoped to the sites you found; do not refactor surrounding code.
|
|
251
|
+
- Prefer returning a safe fallback over lowering retry counts; only lower retries (with a
|
|
252
|
+
`TODO(meticulous):` note) when no fallback is possible.
|