gsd-pi 2.44.0-dev.848dd4c → 2.44.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/README.md +12 -30
- package/dist/resources/extensions/gsd/auto-start.js +0 -10
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +0 -5
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +14 -14
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +5 -5
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +14 -14
- package/dist/web/standalone/.next/server/chunks/229.js +1 -1
- package/dist/web/standalone/.next/server/chunks/471.js +3 -3
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware.js +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-f2a7482d42a5614b.js → page-2f24283c162b6ab3.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/{layout-a16c7a7ecdf0c2cf.js → layout-9ecfd95f343793f0.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-7e9530a7122506c5.js +1 -0
- package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +1 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +8 -6
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.test.js +26 -24
- package/packages/pi-coding-agent/dist/core/extensions/runner.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/fs-utils.test.js +48 -29
- package/packages/pi-coding-agent/dist/core/fs-utils.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js +44 -34
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/session-manager.test.js +34 -30
- package/packages/pi-coding-agent/dist/core/session-manager.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js +12 -10
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js +47 -43
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js.map +1 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +7 -7
- package/packages/pi-coding-agent/src/core/extensions/runner.test.ts +26 -26
- package/packages/pi-coding-agent/src/core/fs-utils.test.ts +43 -31
- package/packages/pi-coding-agent/src/core/resolve-config-value.test.ts +45 -40
- package/packages/pi-coding-agent/src/core/session-manager.test.ts +33 -33
- package/packages/pi-coding-agent/src/core/tools/edit-diff.test.ts +17 -17
- package/packages/pi-coding-agent/src/resources/extensions/memory/storage.test.ts +74 -74
- package/src/resources/extensions/gsd/auto-start.ts +0 -14
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +0 -8
- package/src/resources/extensions/gsd/tests/all-milestones-complete-merge.test.ts +99 -99
- package/src/resources/extensions/gsd/tests/auto-lock-creation.test.ts +16 -14
- package/src/resources/extensions/gsd/tests/auto-paused-session-validation.test.ts +57 -43
- package/src/resources/extensions/gsd/tests/auto-preflight.test.ts +13 -11
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +523 -465
- package/src/resources/extensions/gsd/tests/auto-secrets-gate.test.ts +75 -73
- package/src/resources/extensions/gsd/tests/auto-start-needs-discussion.test.ts +56 -34
- package/src/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +656 -533
- package/src/resources/extensions/gsd/tests/auto-worktree.test.ts +143 -165
- package/src/resources/extensions/gsd/tests/cache-staleness-regression.test.ts +52 -29
- package/src/resources/extensions/gsd/tests/captures.test.ts +176 -148
- package/src/resources/extensions/gsd/tests/claude-import-tui.test.ts +33 -32
- package/src/resources/extensions/gsd/tests/collect-from-manifest.test.ts +143 -141
- package/src/resources/extensions/gsd/tests/commands-inspect-open-db.test.ts +25 -25
- package/src/resources/extensions/gsd/tests/commands-logs.test.ts +81 -81
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +59 -38
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +263 -228
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +302 -250
- package/src/resources/extensions/gsd/tests/context-store.test.ts +367 -354
- package/src/resources/extensions/gsd/tests/continue-here.test.ts +72 -68
- package/src/resources/extensions/gsd/tests/cost-projection.test.ts +106 -92
- package/src/resources/extensions/gsd/tests/crash-recovery.test.ts +35 -27
- package/src/resources/extensions/gsd/tests/dashboard-budget.test.ts +237 -220
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +420 -390
- package/src/resources/extensions/gsd/tests/definition-loader.test.ts +92 -76
- package/src/resources/extensions/gsd/tests/derive-state-crossval.test.ts +83 -68
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +183 -152
- package/src/resources/extensions/gsd/tests/derive-state-deps.test.ts +101 -78
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +227 -192
- package/src/resources/extensions/gsd/tests/detection.test.ts +278 -232
- package/src/resources/extensions/gsd/tests/dev-engine-wrapper.test.ts +34 -30
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +180 -164
- package/src/resources/extensions/gsd/tests/dispatch-missing-task-plans.test.ts +49 -43
- package/src/resources/extensions/gsd/tests/dispatch-uat-last-completed.test.ts +32 -28
- package/src/resources/extensions/gsd/tests/doctor-completion-deferral.test.ts +29 -27
- package/src/resources/extensions/gsd/tests/doctor-delimiter-fix.test.ts +38 -34
- package/src/resources/extensions/gsd/tests/doctor-enhancements.test.ts +75 -54
- package/src/resources/extensions/gsd/tests/doctor-environment-worktree.test.ts +32 -21
- package/src/resources/extensions/gsd/tests/doctor-environment.test.ts +97 -72
- package/src/resources/extensions/gsd/tests/doctor-fixlevel.test.ts +44 -38
- package/src/resources/extensions/gsd/tests/doctor-git.test.ts +145 -104
- package/src/resources/extensions/gsd/tests/doctor-proactive.test.ts +106 -84
- package/src/resources/extensions/gsd/tests/doctor-roadmap-summary-atomicity.test.ts +60 -54
- package/src/resources/extensions/gsd/tests/doctor-runtime.test.ts +93 -72
- package/src/resources/extensions/gsd/tests/doctor.test.ts +134 -104
- package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +131 -123
- package/src/resources/extensions/gsd/tests/exit-command.test.ts +24 -20
- package/src/resources/extensions/gsd/tests/feature-branch-lifecycle-integration.test.ts +57 -48
- package/src/resources/extensions/gsd/tests/files-loadfile-eisdir.test.ts +7 -5
- package/src/resources/extensions/gsd/tests/flag-file-db.test.ts +42 -30
- package/src/resources/extensions/gsd/tests/freeform-decisions.test.ts +206 -198
- package/src/resources/extensions/gsd/tests/git-locale.test.ts +27 -13
- package/src/resources/extensions/gsd/tests/git-service.test.ts +388 -285
- package/src/resources/extensions/gsd/tests/gitignore-tracked-gsd.test.ts +39 -31
- package/src/resources/extensions/gsd/tests/graph-operations.test.ts +69 -63
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +264 -255
- package/src/resources/extensions/gsd/tests/gsd-inspect.test.ts +119 -108
- package/src/resources/extensions/gsd/tests/gsd-recover.test.ts +103 -81
- package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +262 -229
- package/src/resources/extensions/gsd/tests/headless-answers.test.ts +13 -13
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +37 -29
- package/src/resources/extensions/gsd/tests/idle-recovery.test.ts +102 -81
- package/src/resources/extensions/gsd/tests/init-wizard.test.ts +18 -16
- package/src/resources/extensions/gsd/tests/integration-edge.test.ts +46 -41
- package/src/resources/extensions/gsd/tests/integration-lifecycle.test.ts +53 -42
- package/src/resources/extensions/gsd/tests/integration-mixed-milestones.test.ts +91 -75
- package/src/resources/extensions/gsd/tests/integration-proof.test.ts +18 -18
- package/src/resources/extensions/gsd/tests/markdown-renderer.test.ts +194 -150
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +125 -101
- package/src/resources/extensions/gsd/tests/memory-extractor.test.ts +54 -45
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +93 -80
- package/src/resources/extensions/gsd/tests/migrate-command.test.ts +66 -57
- package/src/resources/extensions/gsd/tests/migrate-hierarchy.test.ts +93 -83
- package/src/resources/extensions/gsd/tests/migrate-parser.test.ts +170 -161
- package/src/resources/extensions/gsd/tests/migrate-transformer.test.ts +141 -125
- package/src/resources/extensions/gsd/tests/migrate-validator-parsers.test.ts +131 -107
- package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +96 -87
- package/src/resources/extensions/gsd/tests/migrate-writer.test.ts +164 -125
- package/src/resources/extensions/gsd/tests/must-have-parser.test.ts +94 -81
- package/src/resources/extensions/gsd/tests/none-mode-gates.test.ts +36 -35
- package/src/resources/extensions/gsd/tests/overrides.test.ts +106 -99
- package/src/resources/extensions/gsd/tests/parallel-crash-recovery.test.ts +47 -40
- package/src/resources/extensions/gsd/tests/parallel-worker-monitoring.test.ts +28 -25
- package/src/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +83 -66
- package/src/resources/extensions/gsd/tests/park-edge-cases.test.ts +77 -54
- package/src/resources/extensions/gsd/tests/park-milestone.test.ts +115 -68
- package/src/resources/extensions/gsd/tests/parsers.test.ts +611 -546
- package/src/resources/extensions/gsd/tests/paths.test.ts +87 -72
- package/src/resources/extensions/gsd/tests/post-unit-hooks.test.ts +117 -77
- package/src/resources/extensions/gsd/tests/prompt-db.test.ts +56 -56
- package/src/resources/extensions/gsd/tests/queue-draft-detection.test.ts +119 -93
- package/src/resources/extensions/gsd/tests/queue-order.test.ts +82 -70
- package/src/resources/extensions/gsd/tests/queue-reorder-e2e.test.ts +55 -42
- package/src/resources/extensions/gsd/tests/quick-branch-lifecycle.test.ts +73 -45
- package/src/resources/extensions/gsd/tests/reassess-prompt.test.ts +38 -28
- package/src/resources/extensions/gsd/tests/replan-slice.test.ts +80 -73
- package/src/resources/extensions/gsd/tests/repo-identity-worktree.test.ts +74 -71
- package/src/resources/extensions/gsd/tests/requirements.test.ts +75 -70
- package/src/resources/extensions/gsd/tests/retry-state-reset.test.ts +66 -44
- package/src/resources/extensions/gsd/tests/roadmap-parse-regression.test.ts +181 -114
- package/src/resources/extensions/gsd/tests/rule-registry.test.ts +65 -63
- package/src/resources/extensions/gsd/tests/run-uat.test.ts +128 -66
- package/src/resources/extensions/gsd/tests/session-lock-multipath.test.ts +25 -18
- package/src/resources/extensions/gsd/tests/session-lock-regression.test.ts +44 -37
- package/src/resources/extensions/gsd/tests/shared-wal.test.ts +26 -19
- package/src/resources/extensions/gsd/tests/stalled-tool-recovery.test.ts +8 -6
- package/src/resources/extensions/gsd/tests/symlink-numbered-variants.test.ts +28 -22
- package/src/resources/extensions/gsd/tests/token-savings.test.ts +56 -54
- package/src/resources/extensions/gsd/tests/tool-call-loop-guard.test.ts +25 -23
- package/src/resources/extensions/gsd/tests/tool-naming.test.ts +11 -9
- package/src/resources/extensions/gsd/tests/unique-milestone-ids.test.ts +82 -66
- package/src/resources/extensions/gsd/tests/unit-runtime.test.ts +47 -46
- package/src/resources/extensions/gsd/tests/visualizer-critical-path.test.ts +22 -20
- package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +86 -84
- package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +43 -41
- package/src/resources/extensions/gsd/tests/visualizer-views.test.ts +96 -94
- package/src/resources/extensions/gsd/tests/windows-path-normalization.test.ts +13 -11
- package/src/resources/extensions/gsd/tests/worker-registry.test.ts +29 -27
- package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +52 -50
- package/src/resources/extensions/gsd/tests/worktree-bugfix.test.ts +13 -10
- package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +18 -14
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +39 -38
- package/src/resources/extensions/gsd/tests/worktree-e2e.test.ts +21 -17
- package/src/resources/extensions/gsd/tests/worktree-health.test.ts +30 -25
- package/src/resources/extensions/gsd/tests/worktree-integration.test.ts +37 -30
- package/src/resources/extensions/gsd/tests/worktree-symlink-removal.test.ts +22 -15
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +66 -59
- package/src/resources/extensions/gsd/tests/worktree.test.ts +50 -44
- package/dist/web/standalone/.next/static/chunks/app/page-b9367c5ae13b99c6.js +0 -1
- package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +0 -1
- package/src/resources/extensions/gsd/tests/quick-auto-guard.test.ts +0 -100
- package/src/resources/extensions/gsd/tests/sqlite-unavailable-gate.test.ts +0 -63
- /package/dist/web/standalone/.next/static/{-zps1Q9mQmioAKLcQiCr8 → mgkxN0mGP6gSUmGPEzbk_}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{-zps1Q9mQmioAKLcQiCr8 → mgkxN0mGP6gSUmGPEzbk_}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { describe, test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
1
|
/**
|
|
4
2
|
* doctor-environment-worktree.test.ts — Worktree-aware dependency checks (#2303).
|
|
5
3
|
*
|
|
@@ -21,6 +19,10 @@ import {
|
|
|
21
19
|
environmentResultsToDoctorIssues,
|
|
22
20
|
checkEnvironmentHealth,
|
|
23
21
|
} from "../doctor-environment.ts";
|
|
22
|
+
import { createTestContext } from "./test-helpers.ts";
|
|
23
|
+
|
|
24
|
+
const { assertEq, assertTrue, report } = createTestContext();
|
|
25
|
+
|
|
24
26
|
/** Create a directory tree with files. */
|
|
25
27
|
function createDir(files: Record<string, string> = {}): string {
|
|
26
28
|
const dir = mkdtempSync(join(tmpdir(), "gsd-wt-env-"));
|
|
@@ -32,12 +34,13 @@ function createDir(files: Record<string, string> = {}): string {
|
|
|
32
34
|
return dir;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
async function main(): Promise<void> {
|
|
36
38
|
const cleanups: string[] = [];
|
|
37
39
|
|
|
38
40
|
try {
|
|
39
41
|
// ── Reproduction: worktree path without node_modules ───────────────
|
|
40
|
-
|
|
42
|
+
console.log("\n=== worktree: missing node_modules should NOT error when project root has them ===");
|
|
43
|
+
{
|
|
41
44
|
// Simulate project root with node_modules
|
|
42
45
|
const projectRoot = createDir({
|
|
43
46
|
"package.json": JSON.stringify({ name: "test-project" }),
|
|
@@ -59,14 +62,15 @@ describe('doctor-environment-worktree', async () => {
|
|
|
59
62
|
|
|
60
63
|
// Before fix: this would return status "error" with "node_modules missing"
|
|
61
64
|
// After fix: should return "ok" because project root has node_modules
|
|
62
|
-
|
|
65
|
+
assertTrue(
|
|
63
66
|
depsCheck === undefined || depsCheck.status !== "error",
|
|
64
67
|
"worktree should not report env_dependencies error when project root has node_modules",
|
|
65
68
|
);
|
|
66
|
-
}
|
|
69
|
+
}
|
|
67
70
|
|
|
68
71
|
// ── Worktree with NO node_modules anywhere should still error ──────
|
|
69
|
-
|
|
72
|
+
console.log("\n=== worktree: missing node_modules everywhere should still error ===");
|
|
73
|
+
{
|
|
70
74
|
const projectRoot = createDir({
|
|
71
75
|
"package.json": JSON.stringify({ name: "test-project" }),
|
|
72
76
|
});
|
|
@@ -82,12 +86,13 @@ describe('doctor-environment-worktree', async () => {
|
|
|
82
86
|
|
|
83
87
|
const results = runEnvironmentChecks(worktreeDir);
|
|
84
88
|
const depsCheck = results.find(r => r.name === "dependencies");
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
89
|
+
assertTrue(depsCheck !== undefined, "dependencies check still runs in worktree");
|
|
90
|
+
assertEq(depsCheck!.status, "error", "reports error when node_modules missing everywhere");
|
|
91
|
+
}
|
|
88
92
|
|
|
89
93
|
// ── Worktree env_dependencies not in doctor issues ──────────────────
|
|
90
|
-
|
|
94
|
+
console.log("\n=== worktree: checkEnvironmentHealth should not add env_dependencies for valid worktree ===");
|
|
95
|
+
{
|
|
91
96
|
const projectRoot = createDir({
|
|
92
97
|
"package.json": JSON.stringify({ name: "test-project" }),
|
|
93
98
|
});
|
|
@@ -104,27 +109,29 @@ describe('doctor-environment-worktree', async () => {
|
|
|
104
109
|
const issues: any[] = [];
|
|
105
110
|
await checkEnvironmentHealth(worktreeDir, issues);
|
|
106
111
|
const depIssue = issues.find(i => i.code === "env_dependencies");
|
|
107
|
-
|
|
112
|
+
assertEq(
|
|
108
113
|
depIssue,
|
|
109
114
|
undefined,
|
|
110
115
|
"no env_dependencies issue for worktree with project root node_modules",
|
|
111
116
|
);
|
|
112
|
-
}
|
|
117
|
+
}
|
|
113
118
|
|
|
114
119
|
// ── Non-worktree path still catches missing node_modules ───────────
|
|
115
|
-
|
|
120
|
+
console.log("\n=== non-worktree: missing node_modules still detected ===");
|
|
121
|
+
{
|
|
116
122
|
const dir = createDir({
|
|
117
123
|
"package.json": JSON.stringify({ name: "test" }),
|
|
118
124
|
});
|
|
119
125
|
cleanups.push(dir);
|
|
120
126
|
const results = runEnvironmentChecks(dir);
|
|
121
127
|
const depsCheck = results.find(r => r.name === "dependencies");
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
128
|
+
assertTrue(depsCheck !== undefined, "dependencies check runs");
|
|
129
|
+
assertEq(depsCheck!.status, "error", "missing node_modules is an error for non-worktree");
|
|
130
|
+
}
|
|
125
131
|
|
|
126
132
|
// ── GSD_WORKTREE env var detection ─────────────────────────────────
|
|
127
|
-
|
|
133
|
+
console.log("\n=== GSD_WORKTREE env: should resolve project root node_modules ===");
|
|
134
|
+
{
|
|
128
135
|
const projectRoot = createDir({
|
|
129
136
|
"package.json": JSON.stringify({ name: "test-project" }),
|
|
130
137
|
});
|
|
@@ -143,7 +150,7 @@ describe('doctor-environment-worktree', async () => {
|
|
|
143
150
|
process.env.GSD_WORKTREE = projectRoot;
|
|
144
151
|
const results = runEnvironmentChecks(someDir);
|
|
145
152
|
const depsCheck = results.find(r => r.name === "dependencies");
|
|
146
|
-
|
|
153
|
+
assertTrue(
|
|
147
154
|
depsCheck === undefined || depsCheck.status !== "error",
|
|
148
155
|
"GSD_WORKTREE env allows fallback to project root node_modules",
|
|
149
156
|
);
|
|
@@ -154,11 +161,15 @@ describe('doctor-environment-worktree', async () => {
|
|
|
154
161
|
process.env.GSD_WORKTREE = origEnv;
|
|
155
162
|
}
|
|
156
163
|
}
|
|
157
|
-
}
|
|
164
|
+
}
|
|
158
165
|
|
|
159
166
|
} finally {
|
|
160
167
|
for (const dir of cleanups) {
|
|
161
168
|
try { rmSync(dir, { recursive: true, force: true }); } catch { /* ignore */ }
|
|
162
169
|
}
|
|
163
170
|
}
|
|
164
|
-
|
|
171
|
+
|
|
172
|
+
report();
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
main();
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { describe, test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
1
|
/**
|
|
4
2
|
* doctor-environment.test.ts — Tests for environment health checks (#1221).
|
|
5
3
|
*
|
|
@@ -27,6 +25,10 @@ import {
|
|
|
27
25
|
checkEnvironmentHealth,
|
|
28
26
|
type EnvironmentCheckResult,
|
|
29
27
|
} from "../doctor-environment.ts";
|
|
28
|
+
import { createTestContext } from "./test-helpers.ts";
|
|
29
|
+
|
|
30
|
+
const { assertEq, assertTrue, assertMatch, report } = createTestContext();
|
|
31
|
+
|
|
30
32
|
function createProjectDir(files: Record<string, string> = {}): string {
|
|
31
33
|
const dir = mkdtempSync(join(tmpdir(), "gsd-env-test-"));
|
|
32
34
|
for (const [name, content] of Object.entries(files)) {
|
|
@@ -37,31 +39,34 @@ function createProjectDir(files: Record<string, string> = {}): string {
|
|
|
37
39
|
return dir;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
async function main(): Promise<void> {
|
|
41
43
|
const cleanups: string[] = [];
|
|
42
44
|
|
|
43
45
|
try {
|
|
44
46
|
// ── Node Version Check ─────────────────────────────────────────────
|
|
45
|
-
|
|
47
|
+
console.log("\n=== env: no package.json returns empty ===");
|
|
48
|
+
{
|
|
46
49
|
const dir = createProjectDir();
|
|
47
50
|
cleanups.push(dir);
|
|
48
51
|
const results = runEnvironmentChecks(dir);
|
|
49
52
|
// No package.json → no node checks
|
|
50
53
|
const nodeCheck = results.find(r => r.name === "node_version");
|
|
51
|
-
|
|
52
|
-
}
|
|
54
|
+
assertEq(nodeCheck, undefined, "no node version check without package.json");
|
|
55
|
+
}
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
console.log("\n=== env: package.json without engines returns no node check ===");
|
|
58
|
+
{
|
|
55
59
|
const dir = createProjectDir({
|
|
56
60
|
"package.json": JSON.stringify({ name: "test", version: "1.0.0" }),
|
|
57
61
|
});
|
|
58
62
|
cleanups.push(dir);
|
|
59
63
|
const results = runEnvironmentChecks(dir);
|
|
60
64
|
const nodeCheck = results.find(r => r.name === "node_version");
|
|
61
|
-
|
|
62
|
-
}
|
|
65
|
+
assertEq(nodeCheck, undefined, "no node version check without engines field");
|
|
66
|
+
}
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
console.log("\n=== env: package.json with engines returns node check ===");
|
|
69
|
+
{
|
|
65
70
|
const dir = createProjectDir({
|
|
66
71
|
"package.json": JSON.stringify({
|
|
67
72
|
name: "test",
|
|
@@ -72,25 +77,27 @@ describe('doctor-environment', async () => {
|
|
|
72
77
|
cleanups.push(dir);
|
|
73
78
|
const results = runEnvironmentChecks(dir);
|
|
74
79
|
const nodeCheck = results.find(r => r.name === "node_version");
|
|
75
|
-
|
|
80
|
+
assertTrue(nodeCheck !== undefined, "node version check runs with engines field");
|
|
76
81
|
// Current node should be >= 18 in CI
|
|
77
|
-
|
|
78
|
-
}
|
|
82
|
+
assertEq(nodeCheck!.status, "ok", "node version meets requirement");
|
|
83
|
+
}
|
|
79
84
|
|
|
80
85
|
// ── Dependencies Check ─────────────────────────────────────────────
|
|
81
|
-
|
|
86
|
+
console.log("\n=== env: missing node_modules detected ===");
|
|
87
|
+
{
|
|
82
88
|
const dir = createProjectDir({
|
|
83
89
|
"package.json": JSON.stringify({ name: "test" }),
|
|
84
90
|
});
|
|
85
91
|
cleanups.push(dir);
|
|
86
92
|
const results = runEnvironmentChecks(dir);
|
|
87
93
|
const depsCheck = results.find(r => r.name === "dependencies");
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
94
|
+
assertTrue(depsCheck !== undefined, "dependencies check runs");
|
|
95
|
+
assertEq(depsCheck!.status, "error", "missing node_modules is an error");
|
|
96
|
+
assertTrue(depsCheck!.message.includes("node_modules missing"), "reports missing node_modules");
|
|
97
|
+
}
|
|
92
98
|
|
|
93
|
-
|
|
99
|
+
console.log("\n=== env: existing node_modules detected ===");
|
|
100
|
+
{
|
|
94
101
|
const dir = createProjectDir({
|
|
95
102
|
"package.json": JSON.stringify({ name: "test" }),
|
|
96
103
|
});
|
|
@@ -98,23 +105,25 @@ describe('doctor-environment', async () => {
|
|
|
98
105
|
cleanups.push(dir);
|
|
99
106
|
const results = runEnvironmentChecks(dir);
|
|
100
107
|
const depsCheck = results.find(r => r.name === "dependencies");
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
108
|
+
assertTrue(depsCheck !== undefined, "dependencies check runs");
|
|
109
|
+
assertEq(depsCheck!.status, "ok", "existing node_modules is ok");
|
|
110
|
+
}
|
|
104
111
|
|
|
105
112
|
// ── Env File Check ─────────────────────────────────────────────────
|
|
106
|
-
|
|
113
|
+
console.log("\n=== env: .env.example without .env detected ===");
|
|
114
|
+
{
|
|
107
115
|
const dir = createProjectDir({
|
|
108
116
|
".env.example": "DB_URL=xxx\nAPI_KEY=xxx\n",
|
|
109
117
|
});
|
|
110
118
|
cleanups.push(dir);
|
|
111
119
|
const results = runEnvironmentChecks(dir);
|
|
112
120
|
const envCheck = results.find(r => r.name === "env_file");
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
121
|
+
assertTrue(envCheck !== undefined, "env file check runs");
|
|
122
|
+
assertEq(envCheck!.status, "warning", "missing .env is a warning");
|
|
123
|
+
}
|
|
116
124
|
|
|
117
|
-
|
|
125
|
+
console.log("\n=== env: .env.example with .env is ok ===");
|
|
126
|
+
{
|
|
118
127
|
const dir = createProjectDir({
|
|
119
128
|
".env.example": "DB_URL=xxx\n",
|
|
120
129
|
".env": "DB_URL=postgres://localhost/test\n",
|
|
@@ -122,11 +131,12 @@ describe('doctor-environment', async () => {
|
|
|
122
131
|
cleanups.push(dir);
|
|
123
132
|
const results = runEnvironmentChecks(dir);
|
|
124
133
|
const envCheck = results.find(r => r.name === "env_file");
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
134
|
+
assertTrue(envCheck !== undefined, "env file check runs");
|
|
135
|
+
assertEq(envCheck!.status, "ok", "present .env is ok");
|
|
136
|
+
}
|
|
128
137
|
|
|
129
|
-
|
|
138
|
+
console.log("\n=== env: .env.example with .env.local is ok ===");
|
|
139
|
+
{
|
|
130
140
|
const dir = createProjectDir({
|
|
131
141
|
".env.example": "DB_URL=xxx\n",
|
|
132
142
|
".env.local": "DB_URL=postgres://localhost/test\n",
|
|
@@ -134,23 +144,25 @@ describe('doctor-environment', async () => {
|
|
|
134
144
|
cleanups.push(dir);
|
|
135
145
|
const results = runEnvironmentChecks(dir);
|
|
136
146
|
const envCheck = results.find(r => r.name === "env_file");
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
147
|
+
assertTrue(envCheck !== undefined, "env file check runs");
|
|
148
|
+
assertEq(envCheck!.status, "ok", ".env.local counts as present");
|
|
149
|
+
}
|
|
140
150
|
|
|
141
151
|
// ── Disk Space Check ───────────────────────────────────────────────
|
|
152
|
+
console.log("\n=== env: disk space check returns result ===");
|
|
142
153
|
if (process.platform !== "win32") {
|
|
143
154
|
const dir = createProjectDir();
|
|
144
155
|
cleanups.push(dir);
|
|
145
156
|
const results = runEnvironmentChecks(dir);
|
|
146
157
|
const diskCheck = results.find(r => r.name === "disk_space");
|
|
147
|
-
|
|
158
|
+
assertTrue(diskCheck !== undefined, "disk space check runs on unix");
|
|
148
159
|
// Should be ok on dev machines with reasonable disk
|
|
149
|
-
|
|
160
|
+
assertTrue(diskCheck!.status === "ok" || diskCheck!.status === "warning", "disk check returns valid status");
|
|
150
161
|
}
|
|
151
162
|
|
|
152
163
|
// ── Project Tools Check ────────────────────────────────────────────
|
|
153
|
-
|
|
164
|
+
console.log("\n=== env: detects missing python when pyproject.toml exists ===");
|
|
165
|
+
{
|
|
154
166
|
const dir = createProjectDir({
|
|
155
167
|
"package.json": JSON.stringify({ name: "test" }),
|
|
156
168
|
"pyproject.toml": "[build-system]\nrequires = ['setuptools']\n",
|
|
@@ -161,10 +173,11 @@ describe('doctor-environment', async () => {
|
|
|
161
173
|
const pythonCheck = results.find(r => r.name === "python");
|
|
162
174
|
// Python is likely installed on CI/dev machines, so just verify the check runs
|
|
163
175
|
// without error — the result depends on the system
|
|
164
|
-
|
|
165
|
-
}
|
|
176
|
+
assertTrue(true, "python check runs without error");
|
|
177
|
+
}
|
|
166
178
|
|
|
167
|
-
|
|
179
|
+
console.log("\n=== env: detects Cargo.toml ===");
|
|
180
|
+
{
|
|
168
181
|
const dir = createProjectDir({
|
|
169
182
|
"package.json": JSON.stringify({ name: "test" }),
|
|
170
183
|
"Cargo.toml": "[package]\nname = 'test'\n",
|
|
@@ -173,11 +186,12 @@ describe('doctor-environment', async () => {
|
|
|
173
186
|
cleanups.push(dir);
|
|
174
187
|
const results = runEnvironmentChecks(dir);
|
|
175
188
|
// Just verify it runs without error
|
|
176
|
-
|
|
177
|
-
}
|
|
189
|
+
assertTrue(true, "cargo check runs without error");
|
|
190
|
+
}
|
|
178
191
|
|
|
179
192
|
// ── Docker Check ───────────────────────────────────────────────────
|
|
180
|
-
|
|
193
|
+
console.log("\n=== env: no docker check without Dockerfile ===");
|
|
194
|
+
{
|
|
181
195
|
const dir = createProjectDir({
|
|
182
196
|
"package.json": JSON.stringify({ name: "test" }),
|
|
183
197
|
});
|
|
@@ -185,10 +199,11 @@ describe('doctor-environment', async () => {
|
|
|
185
199
|
cleanups.push(dir);
|
|
186
200
|
const results = runEnvironmentChecks(dir);
|
|
187
201
|
const dockerCheck = results.find(r => r.name === "docker");
|
|
188
|
-
|
|
189
|
-
}
|
|
202
|
+
assertEq(dockerCheck, undefined, "no docker check without Dockerfile");
|
|
203
|
+
}
|
|
190
204
|
|
|
191
|
-
|
|
205
|
+
console.log("\n=== env: docker check with Dockerfile ===");
|
|
206
|
+
{
|
|
192
207
|
const dir = createProjectDir({
|
|
193
208
|
"package.json": JSON.stringify({ name: "test" }),
|
|
194
209
|
"Dockerfile": "FROM node:22\n",
|
|
@@ -198,11 +213,12 @@ describe('doctor-environment', async () => {
|
|
|
198
213
|
const results = runEnvironmentChecks(dir);
|
|
199
214
|
const dockerCheck = results.find(r => r.name === "docker");
|
|
200
215
|
// Docker may or may not be installed on the test machine
|
|
201
|
-
|
|
202
|
-
}
|
|
216
|
+
assertTrue(dockerCheck !== undefined, "docker check runs when Dockerfile present");
|
|
217
|
+
}
|
|
203
218
|
|
|
204
219
|
// ── Doctor Issue Conversion ────────────────────────────────────────
|
|
205
|
-
|
|
220
|
+
console.log("\n=== env: converts results to doctor issues ===");
|
|
221
|
+
{
|
|
206
222
|
const results: EnvironmentCheckResult[] = [
|
|
207
223
|
{ name: "node_version", status: "ok", message: "Node.js v22.0.0" },
|
|
208
224
|
{ name: "dependencies", status: "error", message: "node_modules missing" },
|
|
@@ -210,15 +226,16 @@ describe('doctor-environment', async () => {
|
|
|
210
226
|
];
|
|
211
227
|
|
|
212
228
|
const issues = environmentResultsToDoctorIssues(results);
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
229
|
+
assertEq(issues.length, 2, "only non-ok results converted");
|
|
230
|
+
assertEq(issues[0]!.severity, "error", "error severity preserved");
|
|
231
|
+
assertEq(issues[0]!.code, "env_dependencies", "code prefixed with env_");
|
|
232
|
+
assertEq(issues[1]!.severity, "warning", "warning severity preserved");
|
|
233
|
+
assertTrue(issues[1]!.message.includes("Copy .env.example"), "detail included in message");
|
|
234
|
+
}
|
|
219
235
|
|
|
220
236
|
// ── checkEnvironmentHealth integration ──────────────────────────────
|
|
221
|
-
|
|
237
|
+
console.log("\n=== env: checkEnvironmentHealth adds issues to array ===");
|
|
238
|
+
{
|
|
222
239
|
const dir = createProjectDir({
|
|
223
240
|
"package.json": JSON.stringify({ name: "test" }),
|
|
224
241
|
});
|
|
@@ -227,11 +244,12 @@ describe('doctor-environment', async () => {
|
|
|
227
244
|
const issues: any[] = [];
|
|
228
245
|
await checkEnvironmentHealth(dir, issues);
|
|
229
246
|
// Should have at least the missing node_modules issue
|
|
230
|
-
|
|
231
|
-
}
|
|
247
|
+
assertTrue(issues.some(i => i.code === "env_dependencies"), "environment issues added to array");
|
|
248
|
+
}
|
|
232
249
|
|
|
233
250
|
// ── Report Formatting ──────────────────────────────────────────────
|
|
234
|
-
|
|
251
|
+
console.log("\n=== env: formatEnvironmentReport ===");
|
|
252
|
+
{
|
|
235
253
|
const results: EnvironmentCheckResult[] = [
|
|
236
254
|
{ name: "node_version", status: "ok", message: "Node.js v22.0.0" },
|
|
237
255
|
{ name: "dependencies", status: "error", message: "node_modules missing", detail: "Run npm install" },
|
|
@@ -239,29 +257,32 @@ describe('doctor-environment', async () => {
|
|
|
239
257
|
];
|
|
240
258
|
|
|
241
259
|
const report = formatEnvironmentReport(results);
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
260
|
+
assertTrue(report.includes("Environment Health:"), "has header");
|
|
261
|
+
assertTrue(report.includes("Node.js v22.0.0"), "includes ok result");
|
|
262
|
+
assertTrue(report.includes("node_modules missing"), "includes error result");
|
|
263
|
+
assertTrue(report.includes("Run npm install"), "includes detail for errors");
|
|
264
|
+
}
|
|
247
265
|
|
|
248
|
-
|
|
266
|
+
console.log("\n=== env: formatEnvironmentReport empty ===");
|
|
267
|
+
{
|
|
249
268
|
const report = formatEnvironmentReport([]);
|
|
250
|
-
|
|
251
|
-
}
|
|
269
|
+
assertEq(report, "No environment checks applicable.", "empty report message");
|
|
270
|
+
}
|
|
252
271
|
|
|
253
272
|
// ── Full environment checks include git remote ─────────────────────
|
|
254
|
-
|
|
273
|
+
console.log("\n=== env: runFullEnvironmentChecks includes git remote ===");
|
|
274
|
+
{
|
|
255
275
|
// runFullEnvironmentChecks adds git remote check
|
|
256
276
|
// We can't easily test this without a real git repo, but verify it doesn't throw
|
|
257
277
|
const dir = createProjectDir();
|
|
258
278
|
cleanups.push(dir);
|
|
259
279
|
const results = runFullEnvironmentChecks(dir);
|
|
260
280
|
// No git repo → no remote check, but should not throw
|
|
261
|
-
|
|
262
|
-
}
|
|
281
|
+
assertTrue(true, "runFullEnvironmentChecks does not throw on non-git dir");
|
|
282
|
+
}
|
|
263
283
|
|
|
264
284
|
// ── Port Detection from package.json ───────────────────────────────
|
|
285
|
+
console.log("\n=== env: port detection from scripts ===");
|
|
265
286
|
if (process.platform !== "win32") {
|
|
266
287
|
const dir = createProjectDir({
|
|
267
288
|
"package.json": JSON.stringify({
|
|
@@ -278,7 +299,7 @@ describe('doctor-environment', async () => {
|
|
|
278
299
|
// Port 3456 is unlikely to be in use, so no conflicts expected
|
|
279
300
|
const portConflicts = results.filter(r => r.name === "port_conflict");
|
|
280
301
|
// Just verify it ran without error
|
|
281
|
-
|
|
302
|
+
assertTrue(true, "port check with script-detected ports runs without error");
|
|
282
303
|
}
|
|
283
304
|
|
|
284
305
|
} finally {
|
|
@@ -286,4 +307,8 @@ describe('doctor-environment', async () => {
|
|
|
286
307
|
try { rmSync(dir, { recursive: true, force: true }); } catch { /* ignore */ }
|
|
287
308
|
}
|
|
288
309
|
}
|
|
289
|
-
|
|
310
|
+
|
|
311
|
+
report();
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
main();
|
|
@@ -76,53 +76,56 @@ const REMOVED_CODES = [
|
|
|
76
76
|
"slice_checked_missing_uat",
|
|
77
77
|
];
|
|
78
78
|
|
|
79
|
-
test("fixLevel:task — no reconciliation issue codes are reported", async (
|
|
79
|
+
test("fixLevel:task — no reconciliation issue codes are reported", async () => {
|
|
80
80
|
const tmp = makeTmp("task-level");
|
|
81
|
-
|
|
81
|
+
try {
|
|
82
|
+
buildScaffold(tmp);
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
const report = await runGSDDoctor(tmp, { fix: true, fixLevel: "task" });
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
const codes = report.issues.map(i => i.code);
|
|
87
|
+
for (const removed of REMOVED_CODES) {
|
|
88
|
+
assert.ok(!codes.includes(removed as any), `should NOT report removed code: ${removed}`);
|
|
89
|
+
}
|
|
90
|
+
} finally {
|
|
91
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
90
92
|
}
|
|
91
93
|
});
|
|
92
94
|
|
|
93
|
-
test("fixLevel:all — no reconciliation issue codes are reported", async (
|
|
95
|
+
test("fixLevel:all — no reconciliation issue codes are reported", async () => {
|
|
94
96
|
const tmp = makeTmp("all-level");
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
buildScaffold(tmp);
|
|
97
|
+
try {
|
|
98
|
+
buildScaffold(tmp);
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
const report = await runGSDDoctor(tmp, { fix: true });
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
const codes = report.issues.map(i => i.code);
|
|
103
|
+
for (const removed of REMOVED_CODES) {
|
|
104
|
+
assert.ok(!codes.includes(removed as any), `should NOT report removed code: ${removed}`);
|
|
105
|
+
}
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
// Summary and UAT stubs should NOT be created (no reconciliation)
|
|
108
|
+
const sliceSummaryPath = join(tmp, ".gsd", "milestones", "M001", "slices", "S01", "S01-SUMMARY.md");
|
|
109
|
+
assert.ok(!existsSync(sliceSummaryPath), "should NOT have created summary stub");
|
|
109
110
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
// Roadmap should remain unchecked (no reconciliation)
|
|
112
|
+
const roadmapContent = readFileSync(join(tmp, ".gsd", "milestones", "M001", "M001-ROADMAP.md"), "utf8");
|
|
113
|
+
assert.ok(roadmapContent.includes("- [ ] **S01"), "roadmap should remain unchecked");
|
|
114
|
+
} finally {
|
|
115
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
116
|
+
}
|
|
113
117
|
});
|
|
114
118
|
|
|
115
|
-
test("fixLevel:all — delimiter_in_title still fixable", async (
|
|
119
|
+
test("fixLevel:all — delimiter_in_title still fixable", async () => {
|
|
116
120
|
const tmp = makeTmp("delimiter-fix");
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
mkdirSync(s, { recursive: true });
|
|
121
|
+
try {
|
|
122
|
+
const gsd = join(tmp, ".gsd");
|
|
123
|
+
const m = join(gsd, "milestones", "M001");
|
|
124
|
+
const s = join(m, "slices", "S01", "tasks");
|
|
125
|
+
mkdirSync(s, { recursive: true });
|
|
123
126
|
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
// Roadmap with em dash in milestone title (should still be fixable)
|
|
128
|
+
writeFileSync(join(m, "M001-ROADMAP.md"), `# M001: Foundation \u2014 Build Core
|
|
126
129
|
|
|
127
130
|
## Slices
|
|
128
131
|
|
|
@@ -130,7 +133,7 @@ test("fixLevel:all — delimiter_in_title still fixable", async (t) => {
|
|
|
130
133
|
> Demo
|
|
131
134
|
`);
|
|
132
135
|
|
|
133
|
-
|
|
136
|
+
writeFileSync(join(m, "slices", "S01", "S01-PLAN.md"), `# S01: Test Slice
|
|
134
137
|
|
|
135
138
|
**Goal:** test
|
|
136
139
|
|
|
@@ -139,10 +142,13 @@ test("fixLevel:all — delimiter_in_title still fixable", async (t) => {
|
|
|
139
142
|
- [ ] **T01: Do stuff** \`est:5m\`
|
|
140
143
|
`);
|
|
141
144
|
|
|
142
|
-
|
|
145
|
+
const report = await runGSDDoctor(tmp, { fix: true });
|
|
143
146
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
const delimiterIssues = report.issues.filter(i => i.code === "delimiter_in_title");
|
|
148
|
+
// The milestone-level delimiter is auto-fixed, but the report may or may not include it
|
|
149
|
+
// depending on whether it was fixed successfully. Just verify it ran without crashing.
|
|
150
|
+
assert.ok(report.issues !== undefined, "doctor produces a report");
|
|
151
|
+
} finally {
|
|
152
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
153
|
+
}
|
|
148
154
|
});
|