edsger 0.50.0 → 0.52.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/.claude/settings.local.json +23 -3
- package/.env.local +12 -0
- package/README.md +25 -25
- package/dist/api/chat.d.ts +7 -7
- package/dist/api/chat.js +13 -13
- package/dist/api/cross-product.d.ts +10 -10
- package/dist/api/cross-product.js +30 -30
- package/dist/api/github.d.ts +5 -5
- package/dist/api/github.js +10 -10
- package/dist/api/intelligence.d.ts +3 -3
- package/dist/api/issues/approval-checker.d.ts +20 -0
- package/dist/api/{features → issues}/approval-checker.js +16 -16
- package/dist/api/issues/get-issue.d.ts +5 -0
- package/dist/api/issues/get-issue.js +21 -0
- package/dist/api/issues/index.d.ts +8 -0
- package/dist/api/issues/index.js +10 -0
- package/dist/api/issues/issue-utils.d.ts +23 -0
- package/dist/api/issues/issue-utils.js +80 -0
- package/dist/api/issues/status-updater.d.ts +41 -0
- package/dist/api/{features → issues}/status-updater.js +23 -23
- package/dist/api/{features → issues}/test-cases.d.ts +7 -7
- package/dist/api/{features → issues}/test-cases.js +12 -12
- package/dist/api/issues/update-issue.d.ts +20 -0
- package/dist/api/{features/update-feature.js → issues/update-issue.js} +22 -22
- package/dist/api/{features → issues}/user-stories.d.ts +5 -5
- package/dist/api/{features → issues}/user-stories.js +8 -8
- package/dist/api/products.d.ts +1 -1
- package/dist/api/tasks.d.ts +1 -1
- package/dist/api/test-reports.d.ts +2 -2
- package/dist/api/test-reports.js +4 -4
- package/dist/auth/login.js +1 -1
- package/dist/commands/agent-workflow/chat-worker.d.ts +7 -7
- package/dist/commands/agent-workflow/chat-worker.js +50 -50
- package/dist/commands/agent-workflow/index.d.ts +2 -2
- package/dist/commands/agent-workflow/index.js +3 -3
- package/dist/commands/agent-workflow/{feature-worker.d.ts → issue-worker.d.ts} +4 -4
- package/dist/commands/agent-workflow/{feature-worker.js → issue-worker.js} +12 -12
- package/dist/commands/agent-workflow/processor.d.ts +9 -9
- package/dist/commands/agent-workflow/processor.js +90 -90
- package/dist/commands/build/index.js +2 -2
- package/dist/commands/find-bugs/index.d.ts +11 -0
- package/dist/commands/find-bugs/index.js +39 -0
- package/dist/commands/find-features/index.d.ts +14 -0
- package/dist/commands/find-features/index.js +42 -0
- package/dist/commands/find-smells/index.d.ts +21 -0
- package/dist/commands/find-smells/index.js +65 -0
- package/dist/commands/init/prompts.js +1 -1
- package/dist/commands/init/templates.d.ts +1 -1
- package/dist/commands/init/templates.js +4 -4
- package/dist/commands/workflow/config/phase-configs.js +17 -17
- package/dist/commands/workflow/core/index.d.ts +1 -1
- package/dist/commands/workflow/core/index.js +2 -2
- package/dist/commands/workflow/core/issue-filter.d.ts +16 -0
- package/dist/commands/workflow/core/issue-filter.js +47 -0
- package/dist/commands/workflow/core/state-manager.d.ts +10 -10
- package/dist/commands/workflow/core/state-manager.js +10 -10
- package/dist/commands/workflow/core/workflow-logger.d.ts +9 -9
- package/dist/commands/workflow/core/workflow-logger.js +21 -21
- package/dist/commands/workflow/executors/phase-executor.d.ts +2 -2
- package/dist/commands/workflow/executors/phase-executor.js +32 -32
- package/dist/commands/workflow/issue-coordinator.d.ts +18 -0
- package/dist/commands/workflow/{feature-coordinator.js → issue-coordinator.js} +29 -29
- package/dist/commands/workflow/phase-orchestrator.d.ts +2 -2
- package/dist/commands/workflow/phase-orchestrator.js +82 -82
- package/dist/commands/workflow/processor.d.ts +7 -7
- package/dist/commands/workflow/processor.js +44 -44
- package/dist/config/{feature-status.d.ts → issue-status.d.ts} +14 -14
- package/dist/config/{feature-status.js → issue-status.js} +14 -14
- package/dist/errors/index.d.ts +6 -6
- package/dist/errors/index.js +11 -11
- package/dist/index.js +90 -1
- package/dist/phases/app-store-generation/context.js +6 -6
- package/dist/phases/app-store-generation/index.js +2 -2
- package/dist/phases/app-store-generation/prompts.js +2 -2
- package/dist/phases/autonomous/index.d.ts +3 -3
- package/dist/phases/autonomous/index.js +37 -37
- package/dist/phases/autonomous/prompts.d.ts +2 -2
- package/dist/phases/autonomous/prompts.js +4 -4
- package/dist/phases/branch-planning/context.d.ts +3 -3
- package/dist/phases/branch-planning/context.js +12 -12
- package/dist/phases/branch-planning/index.d.ts +3 -3
- package/dist/phases/branch-planning/index.js +32 -32
- package/dist/phases/branch-planning/outcome.d.ts +5 -5
- package/dist/phases/branch-planning/outcome.js +12 -12
- package/dist/phases/branch-planning/prompts.d.ts +3 -3
- package/dist/phases/branch-planning/prompts.js +13 -13
- package/dist/phases/bug-fixing/analyzer.d.ts +2 -2
- package/dist/phases/bug-fixing/analyzer.js +13 -13
- package/dist/phases/bug-fixing/context-fetcher.d.ts +3 -3
- package/dist/phases/bug-fixing/context-fetcher.js +18 -18
- package/dist/phases/bug-fixing/mcp-server.js +17 -18
- package/dist/phases/chat-processor/context.d.ts +5 -5
- package/dist/phases/chat-processor/context.js +17 -17
- package/dist/phases/chat-processor/index.d.ts +4 -4
- package/dist/phases/chat-processor/index.js +17 -17
- package/dist/phases/chat-processor/product-context.d.ts +3 -3
- package/dist/phases/chat-processor/product-context.js +16 -16
- package/dist/phases/chat-processor/product-prompts.d.ts +1 -1
- package/dist/phases/chat-processor/product-prompts.js +10 -10
- package/dist/phases/chat-processor/product-tools.d.ts +2 -2
- package/dist/phases/chat-processor/product-tools.js +33 -33
- package/dist/phases/chat-processor/prompts.d.ts +3 -3
- package/dist/phases/chat-processor/prompts.js +22 -22
- package/dist/phases/chat-processor/tools.js +46 -46
- package/dist/phases/code-implementation/branch-pr-creator.d.ts +3 -3
- package/dist/phases/code-implementation/branch-pr-creator.js +5 -5
- package/dist/phases/code-implementation/context.d.ts +3 -3
- package/dist/phases/code-implementation/context.js +18 -18
- package/dist/phases/code-implementation/index.d.ts +4 -4
- package/dist/phases/code-implementation/index.js +88 -88
- package/dist/phases/code-implementation/outcome.d.ts +3 -3
- package/dist/phases/code-implementation/outcome.js +6 -6
- package/dist/phases/code-implementation/prompts.d.ts +1 -1
- package/dist/phases/code-implementation/prompts.js +6 -6
- package/dist/phases/code-implementation-verification/agent.d.ts +3 -3
- package/dist/phases/code-implementation-verification/agent.js +5 -5
- package/dist/phases/code-implementation-verification/index.d.ts +3 -3
- package/dist/phases/code-implementation-verification/index.js +11 -11
- package/dist/phases/code-implementation-verification/prompts.d.ts +3 -3
- package/dist/phases/code-implementation-verification/prompts.js +7 -7
- package/dist/phases/code-refine/context.d.ts +8 -8
- package/dist/phases/code-refine/context.js +29 -29
- package/dist/phases/code-refine/index.d.ts +2 -2
- package/dist/phases/code-refine/index.js +20 -20
- package/dist/phases/code-refine/prompts.d.ts +1 -1
- package/dist/phases/code-refine/prompts.js +3 -3
- package/dist/phases/code-refine/refine-iteration.d.ts +1 -1
- package/dist/phases/code-refine/refine-iteration.js +4 -4
- package/dist/phases/code-refine/retry-handler.js +2 -2
- package/dist/phases/code-refine-verification/index.js +10 -10
- package/dist/phases/code-refine-verification/types.d.ts +2 -2
- package/dist/phases/code-review/context.d.ts +8 -8
- package/dist/phases/code-review/context.js +25 -25
- package/dist/phases/code-review/diff-utils.d.ts +1 -1
- package/dist/phases/code-review/diff-utils.js +1 -1
- package/dist/phases/code-review/index.d.ts +2 -2
- package/dist/phases/code-review/index.js +26 -26
- package/dist/phases/code-testing/analyzer.d.ts +2 -2
- package/dist/phases/code-testing/analyzer.js +18 -18
- package/dist/phases/code-testing/context-fetcher.d.ts +3 -3
- package/dist/phases/code-testing/context-fetcher.js +16 -16
- package/dist/phases/code-testing/prompts.d.ts +1 -1
- package/dist/phases/code-testing/prompts.js +5 -5
- package/dist/phases/find-bugs/index.d.ts +30 -0
- package/dist/phases/find-bugs/index.js +216 -0
- package/dist/phases/find-bugs/prompts.d.ts +22 -0
- package/dist/phases/find-bugs/prompts.js +101 -0
- package/dist/phases/find-bugs/state.d.ts +19 -0
- package/dist/phases/find-bugs/state.js +13 -0
- package/dist/phases/find-bugs/types.d.ts +21 -0
- package/dist/phases/find-bugs/types.js +16 -0
- package/dist/phases/find-features/index.d.ts +40 -0
- package/dist/phases/find-features/index.js +279 -0
- package/dist/phases/find-features/prompts.d.ts +43 -0
- package/dist/phases/find-features/prompts.js +138 -0
- package/dist/phases/find-features/state.d.ts +25 -0
- package/dist/phases/find-features/state.js +22 -0
- package/dist/phases/find-features/types.d.ts +27 -0
- package/dist/phases/find-features/types.js +16 -0
- package/dist/phases/find-shared/git.d.ts +24 -0
- package/dist/phases/find-shared/git.js +60 -0
- package/dist/phases/find-shared/mcp.d.ts +33 -0
- package/dist/phases/find-shared/mcp.js +69 -0
- package/dist/phases/find-shared/scan-state.d.ts +33 -0
- package/dist/phases/find-shared/scan-state.js +112 -0
- package/dist/phases/find-smells/index.d.ts +47 -0
- package/dist/phases/find-smells/index.js +278 -0
- package/dist/phases/find-smells/prompts.d.ts +30 -0
- package/dist/phases/find-smells/prompts.js +129 -0
- package/dist/phases/find-smells/state.d.ts +21 -0
- package/dist/phases/find-smells/state.js +17 -0
- package/dist/phases/find-smells/types.d.ts +51 -0
- package/dist/phases/find-smells/types.js +64 -0
- package/dist/phases/functional-testing/analyzer.d.ts +2 -2
- package/dist/phases/functional-testing/analyzer.js +40 -40
- package/dist/phases/functional-testing/context-fetcher.d.ts +3 -3
- package/dist/phases/functional-testing/context-fetcher.js +16 -16
- package/dist/phases/functional-testing/http-fallback.d.ts +2 -2
- package/dist/phases/functional-testing/http-fallback.js +9 -9
- package/dist/phases/functional-testing/mcp-server.js +23 -24
- package/dist/phases/functional-testing/prompts.d.ts +1 -1
- package/dist/phases/functional-testing/prompts.js +4 -4
- package/dist/phases/functional-testing/test-report-creator.d.ts +2 -2
- package/dist/phases/functional-testing/test-report-creator.js +10 -10
- package/dist/phases/functional-testing/test-retry-handler.js +3 -3
- package/dist/phases/growth-analysis/context.js +6 -6
- package/dist/phases/growth-analysis/index.js +2 -2
- package/dist/phases/growth-analysis/prompts.js +2 -2
- package/dist/phases/intelligence-analysis/context.js +7 -7
- package/dist/phases/intelligence-analysis/index.js +3 -3
- package/dist/phases/{feature-analysis → issue-analysis}/agent.js +1 -1
- package/dist/phases/issue-analysis/context.d.ts +24 -0
- package/dist/phases/{feature-analysis → issue-analysis}/context.js +30 -30
- package/dist/phases/issue-analysis/index.d.ts +8 -0
- package/dist/phases/{feature-analysis → issue-analysis}/index.js +29 -29
- package/dist/phases/issue-analysis/outcome.d.ts +40 -0
- package/dist/phases/{feature-analysis → issue-analysis}/outcome.js +17 -17
- package/dist/phases/{feature-analysis → issue-analysis}/prompts.d.ts +3 -3
- package/dist/phases/{feature-analysis → issue-analysis}/prompts.js +12 -12
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/agent.d.ts +2 -2
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/agent.js +1 -1
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/index.d.ts +5 -5
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/index.js +9 -9
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/prompts.d.ts +2 -2
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/prompts.js +7 -7
- package/dist/phases/output-contracts.js +37 -37
- package/dist/phases/pr-execution/context.d.ts +3 -3
- package/dist/phases/pr-execution/context.js +14 -14
- package/dist/phases/pr-execution/index.d.ts +2 -2
- package/dist/phases/pr-execution/index.js +22 -22
- package/dist/phases/pr-execution/outcome.d.ts +4 -4
- package/dist/phases/pr-execution/outcome.js +6 -6
- package/dist/phases/pr-execution/prompts.d.ts +4 -4
- package/dist/phases/pr-execution/prompts.js +6 -6
- package/dist/phases/pr-resolve/checklist-learner.js +2 -2
- package/dist/phases/pr-review/index.d.ts +1 -1
- package/dist/phases/pr-review/index.js +1 -1
- package/dist/phases/pr-review/prompts.d.ts +1 -1
- package/dist/phases/pr-review/prompts.js +1 -1
- package/dist/phases/pr-shared/context.d.ts +3 -3
- package/dist/phases/pr-shared/context.js +3 -3
- package/dist/phases/pr-splitting/context.d.ts +3 -3
- package/dist/phases/pr-splitting/context.js +16 -16
- package/dist/phases/pr-splitting/index.d.ts +4 -4
- package/dist/phases/pr-splitting/index.js +29 -29
- package/dist/phases/pr-splitting/outcome.d.ts +3 -3
- package/dist/phases/pr-splitting/outcome.js +7 -7
- package/dist/phases/pr-splitting/prompts.d.ts +3 -3
- package/dist/phases/pr-splitting/prompts.js +11 -11
- package/dist/phases/pull-request/creator.d.ts +4 -4
- package/dist/phases/pull-request/creator.js +25 -25
- package/dist/phases/pull-request/handler.d.ts +3 -3
- package/dist/phases/pull-request/handler.js +16 -16
- package/dist/phases/release-sync/index.js +2 -2
- package/dist/phases/run-sheet/agent.js +1 -2
- package/dist/phases/run-sheet/index.js +3 -3
- package/dist/phases/smoke-test/index.js +2 -2
- package/dist/phases/technical-design/context.d.ts +3 -3
- package/dist/phases/technical-design/context.js +11 -11
- package/dist/phases/technical-design/index.d.ts +2 -2
- package/dist/phases/technical-design/index.js +27 -27
- package/dist/phases/technical-design/outcome.d.ts +4 -4
- package/dist/phases/technical-design/outcome.js +6 -6
- package/dist/phases/technical-design/prompts.d.ts +2 -2
- package/dist/phases/technical-design/prompts.js +10 -10
- package/dist/phases/technical-design-verification/agent.d.ts +3 -3
- package/dist/phases/technical-design-verification/agent.js +4 -4
- package/dist/phases/technical-design-verification/index.d.ts +4 -4
- package/dist/phases/technical-design-verification/index.js +12 -12
- package/dist/phases/technical-design-verification/prompts.d.ts +3 -3
- package/dist/phases/technical-design-verification/prompts.js +6 -6
- package/dist/phases/test-cases-analysis/context.d.ts +5 -5
- package/dist/phases/test-cases-analysis/context.js +18 -18
- package/dist/phases/test-cases-analysis/formatters.js +7 -7
- package/dist/phases/test-cases-analysis/index.d.ts +1 -1
- package/dist/phases/test-cases-analysis/index.js +21 -21
- package/dist/phases/test-cases-analysis/outcome.d.ts +7 -7
- package/dist/phases/test-cases-analysis/outcome.js +13 -13
- package/dist/phases/test-cases-analysis/prompts.d.ts +3 -3
- package/dist/phases/test-cases-analysis/prompts.js +6 -6
- package/dist/phases/user-stories-analysis/context.d.ts +5 -5
- package/dist/phases/user-stories-analysis/context.js +18 -18
- package/dist/phases/user-stories-analysis/formatters.js +7 -7
- package/dist/phases/user-stories-analysis/index.d.ts +1 -1
- package/dist/phases/user-stories-analysis/index.js +21 -21
- package/dist/phases/user-stories-analysis/outcome.d.ts +7 -7
- package/dist/phases/user-stories-analysis/outcome.js +13 -13
- package/dist/phases/user-stories-analysis/prompts.d.ts +3 -3
- package/dist/phases/user-stories-analysis/prompts.js +10 -10
- package/dist/services/audit-logs.d.ts +10 -10
- package/dist/services/audit-logs.js +12 -12
- package/dist/services/branches.d.ts +6 -6
- package/dist/services/branches.js +16 -16
- package/dist/services/checklist.d.ts +3 -3
- package/dist/services/checklist.js +11 -11
- package/dist/services/coaching/coaching-agent.js +2 -2
- package/dist/services/coaching/coaching-loop.d.ts +1 -1
- package/dist/services/coaching/coaching-loop.js +2 -2
- package/dist/services/coaching/phase-coaching.d.ts +2 -2
- package/dist/services/coaching/phase-coaching.js +3 -3
- package/dist/services/coaching/self-rating.js +1 -1
- package/dist/services/feedbacks.d.ts +4 -4
- package/dist/services/feedbacks.js +8 -8
- package/dist/services/phase-hooks/bindings-fetcher.d.ts +4 -4
- package/dist/services/phase-hooks/bindings-fetcher.js +8 -8
- package/dist/services/phase-hooks/hook-executor.js +1 -1
- package/dist/services/phase-hooks/hook-logging.d.ts +2 -2
- package/dist/services/phase-hooks/hook-logging.js +4 -4
- package/dist/services/phase-hooks/hook-runner.d.ts +1 -1
- package/dist/services/phase-hooks/hook-runner.js +4 -4
- package/dist/services/phase-hooks/types.d.ts +3 -3
- package/dist/services/phase-ratings.d.ts +7 -7
- package/dist/services/phase-ratings.js +8 -8
- package/dist/services/pull-requests.d.ts +4 -4
- package/dist/services/pull-requests.js +11 -11
- package/dist/services/skill-resolver.d.ts +1 -1
- package/dist/services/skill-resolver.js +1 -1
- package/dist/skills/phase/app-store-generation/SKILL.md +9 -9
- package/dist/skills/phase/autonomous/SKILL.md +2 -2
- package/dist/skills/phase/branch-planning/SKILL.md +12 -12
- package/dist/skills/phase/bug-fixing/SKILL.md +1 -1
- package/dist/skills/phase/code-implementation/SKILL.md +6 -6
- package/dist/skills/phase/code-implementation-verification/SKILL.md +3 -3
- package/dist/skills/phase/code-testing/SKILL.md +5 -5
- package/dist/skills/phase/functional-testing/SKILL.md +3 -3
- package/dist/skills/phase/growth-analysis/SKILL.md +8 -8
- package/dist/skills/phase/incremental-sync/SKILL.md +6 -6
- package/dist/skills/phase/intelligence-analysis/SKILL.md +7 -7
- package/dist/skills/phase/{feature-analysis → issue-analysis}/SKILL.md +8 -8
- package/dist/skills/phase/pr-execution/SKILL.md +7 -7
- package/dist/skills/phase/pr-splitting/SKILL.md +14 -14
- package/dist/skills/phase/smoke-test/SKILL.md +1 -1
- package/dist/skills/phase/technical-design/SKILL.md +5 -5
- package/dist/skills/phase/test-cases-analysis/SKILL.md +4 -4
- package/dist/skills/phase/user-stories-analysis/SKILL.md +13 -13
- package/dist/system/session-manager.d.ts +3 -3
- package/dist/system/session-manager.js +3 -3
- package/dist/system/sleep-notification.js +2 -2
- package/dist/system/sleep-prevention.js +1 -1
- package/dist/types/index.d.ts +21 -21
- package/dist/types/{features.d.ts → issues.d.ts} +3 -3
- package/dist/types/pipeline.d.ts +4 -4
- package/dist/updater/auto-updater.d.ts +2 -2
- package/dist/updater/auto-updater.js +3 -3
- package/dist/utils/conflict-resolver.d.ts +1 -1
- package/dist/utils/conflict-resolver.js +5 -5
- package/dist/utils/formatters.d.ts +4 -4
- package/dist/utils/formatters.js +29 -29
- package/dist/utils/git-branch-manager-async.d.ts +6 -6
- package/dist/utils/git-branch-manager-async.js +41 -41
- package/dist/utils/git-branch-manager.d.ts +11 -11
- package/dist/utils/git-branch-manager.js +42 -42
- package/dist/utils/image-downloader.d.ts +4 -4
- package/dist/utils/image-downloader.js +17 -17
- package/dist/utils/pipeline-logger.d.ts +1 -1
- package/dist/utils/pipeline-logger.js +5 -5
- package/dist/workspace/workspace-manager.d.ts +17 -17
- package/dist/workspace/workspace-manager.js +21 -21
- package/package.json +1 -1
- package/vitest.config.ts +4 -0
- package/dist/api/__tests__/app-store.test.d.ts +0 -7
- package/dist/api/__tests__/app-store.test.js +0 -60
- package/dist/api/__tests__/intelligence.test.d.ts +0 -11
- package/dist/api/__tests__/intelligence.test.js +0 -315
- package/dist/api/features/__tests__/feature-utils.test.d.ts +0 -4
- package/dist/api/features/__tests__/feature-utils.test.js +0 -370
- package/dist/api/features/__tests__/status-updater.test.d.ts +0 -4
- package/dist/api/features/__tests__/status-updater.test.js +0 -88
- package/dist/api/features/approval-checker.d.ts +0 -20
- package/dist/api/features/feature-utils.d.ts +0 -23
- package/dist/api/features/feature-utils.js +0 -80
- package/dist/api/features/get-feature.d.ts +0 -5
- package/dist/api/features/get-feature.js +0 -21
- package/dist/api/features/index.d.ts +0 -8
- package/dist/api/features/index.js +0 -10
- package/dist/api/features/status-updater.d.ts +0 -41
- package/dist/api/features/update-feature.d.ts +0 -20
- package/dist/commands/build/__tests__/build.test.d.ts +0 -5
- package/dist/commands/build/__tests__/build.test.js +0 -206
- package/dist/commands/build/__tests__/detect-project.test.d.ts +0 -6
- package/dist/commands/build/__tests__/detect-project.test.js +0 -160
- package/dist/commands/build/__tests__/run-build.test.d.ts +0 -6
- package/dist/commands/build/__tests__/run-build.test.js +0 -433
- package/dist/commands/intelligence/__tests__/command.test.d.ts +0 -4
- package/dist/commands/intelligence/__tests__/command.test.js +0 -48
- package/dist/commands/workflow/core/__tests__/feature-filter.test.d.ts +0 -5
- package/dist/commands/workflow/core/__tests__/feature-filter.test.js +0 -316
- package/dist/commands/workflow/core/__tests__/pipeline-evaluator.test.d.ts +0 -4
- package/dist/commands/workflow/core/__tests__/pipeline-evaluator.test.js +0 -397
- package/dist/commands/workflow/core/__tests__/state-manager.test.d.ts +0 -4
- package/dist/commands/workflow/core/__tests__/state-manager.test.js +0 -384
- package/dist/commands/workflow/core/feature-filter.d.ts +0 -16
- package/dist/commands/workflow/core/feature-filter.js +0 -47
- package/dist/commands/workflow/feature-coordinator.d.ts +0 -18
- package/dist/config/__tests__/config.test.d.ts +0 -4
- package/dist/config/__tests__/config.test.js +0 -286
- package/dist/config/__tests__/feature-status.test.d.ts +0 -4
- package/dist/config/__tests__/feature-status.test.js +0 -111
- package/dist/errors/__tests__/index.test.d.ts +0 -4
- package/dist/errors/__tests__/index.test.js +0 -349
- package/dist/phases/app-store-generation/__tests__/agent.test.d.ts +0 -5
- package/dist/phases/app-store-generation/__tests__/agent.test.js +0 -142
- package/dist/phases/app-store-generation/__tests__/context.test.d.ts +0 -4
- package/dist/phases/app-store-generation/__tests__/context.test.js +0 -284
- package/dist/phases/app-store-generation/__tests__/prompts.test.d.ts +0 -4
- package/dist/phases/app-store-generation/__tests__/prompts.test.js +0 -122
- package/dist/phases/app-store-generation/__tests__/screenshot-composer.test.d.ts +0 -5
- package/dist/phases/app-store-generation/__tests__/screenshot-composer.test.js +0 -826
- package/dist/phases/code-review/__tests__/diff-utils.test.js +0 -101
- package/dist/phases/feature-analysis/context.d.ts +0 -24
- package/dist/phases/feature-analysis/index.d.ts +0 -8
- package/dist/phases/feature-analysis/outcome.d.ts +0 -40
- package/dist/phases/intelligence-analysis/__tests__/context.test.d.ts +0 -4
- package/dist/phases/intelligence-analysis/__tests__/context.test.js +0 -192
- package/dist/phases/intelligence-analysis/__tests__/matching.test.d.ts +0 -13
- package/dist/phases/intelligence-analysis/__tests__/matching.test.js +0 -154
- package/dist/phases/intelligence-analysis/__tests__/orchestration.test.d.ts +0 -5
- package/dist/phases/intelligence-analysis/__tests__/orchestration.test.js +0 -378
- package/dist/phases/intelligence-analysis/__tests__/prompts.test.d.ts +0 -4
- package/dist/phases/intelligence-analysis/__tests__/prompts.test.js +0 -33
- package/dist/phases/pr-execution/__tests__/file-assigner.test.d.ts +0 -1
- package/dist/phases/pr-execution/__tests__/file-assigner.test.js +0 -303
- package/dist/phases/pr-resolve/__tests__/checklist-learner.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/checklist-learner.test.js +0 -157
- package/dist/phases/pr-resolve/__tests__/prompts.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/prompts.test.js +0 -116
- package/dist/phases/pr-resolve/__tests__/resolve-mapping.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/resolve-mapping.test.js +0 -138
- package/dist/phases/pr-resolve/__tests__/types.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/types.test.js +0 -43
- package/dist/phases/pr-resolve/__tests__/workspace.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/workspace.test.js +0 -111
- package/dist/phases/pr-review/__tests__/prompts.test.d.ts +0 -1
- package/dist/phases/pr-review/__tests__/prompts.test.js +0 -49
- package/dist/phases/pr-review/__tests__/review-comments.test.d.ts +0 -1
- package/dist/phases/pr-review/__tests__/review-comments.test.js +0 -110
- package/dist/phases/pr-shared/__tests__/agent-utils.test.d.ts +0 -1
- package/dist/phases/pr-shared/__tests__/agent-utils.test.js +0 -91
- package/dist/phases/pr-shared/__tests__/context.test.d.ts +0 -1
- package/dist/phases/pr-shared/__tests__/context.test.js +0 -94
- package/dist/phases/pr-splitting/__tests__/import-dep-validator.test.d.ts +0 -1
- package/dist/phases/pr-splitting/__tests__/import-dep-validator.test.js +0 -331
- package/dist/phases/run-sheet/render.d.ts +0 -60
- package/dist/phases/run-sheet/render.js +0 -297
- package/dist/phases/smoke-test/__tests__/agent.test.d.ts +0 -4
- package/dist/phases/smoke-test/__tests__/agent.test.js +0 -84
- package/dist/phases/smoke-test/__tests__/github.test.d.ts +0 -9
- package/dist/phases/smoke-test/__tests__/github.test.js +0 -120
- package/dist/phases/smoke-test/__tests__/snapshot.test.d.ts +0 -8
- package/dist/phases/smoke-test/__tests__/snapshot.test.js +0 -93
- package/dist/phases/smoke-test/github.d.ts +0 -54
- package/dist/phases/smoke-test/github.js +0 -101
- package/dist/phases/smoke-test/snapshot.d.ts +0 -27
- package/dist/phases/smoke-test/snapshot.js +0 -157
- package/dist/services/coaching/__tests__/coaching-agent.test.d.ts +0 -1
- package/dist/services/coaching/__tests__/coaching-agent.test.js +0 -74
- package/dist/services/coaching/__tests__/coaching-loop.test.d.ts +0 -1
- package/dist/services/coaching/__tests__/coaching-loop.test.js +0 -59
- package/dist/services/coaching/__tests__/self-rating.test.d.ts +0 -1
- package/dist/services/coaching/__tests__/self-rating.test.js +0 -188
- package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.d.ts +0 -4
- package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.js +0 -133
- package/dist/services/lifecycle-agent/__tests__/transition-rules.test.d.ts +0 -4
- package/dist/services/lifecycle-agent/__tests__/transition-rules.test.js +0 -336
- package/dist/services/lifecycle-agent/index.d.ts +0 -24
- package/dist/services/lifecycle-agent/index.js +0 -25
- package/dist/services/lifecycle-agent/phase-criteria.d.ts +0 -57
- package/dist/services/lifecycle-agent/phase-criteria.js +0 -335
- package/dist/services/lifecycle-agent/transition-rules.d.ts +0 -60
- package/dist/services/lifecycle-agent/transition-rules.js +0 -184
- package/dist/services/lifecycle-agent/types.d.ts +0 -190
- package/dist/services/lifecycle-agent/types.js +0 -12
- package/dist/services/phase-hooks/__tests__/bindings-fetcher.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/bindings-fetcher.test.js +0 -122
- package/dist/services/phase-hooks/__tests__/hook-executor.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/hook-executor.test.js +0 -321
- package/dist/services/phase-hooks/__tests__/hook-runner.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/hook-runner.test.js +0 -261
- package/dist/services/phase-hooks/__tests__/plugin-loader.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/plugin-loader.test.js +0 -158
- package/dist/services/video/__tests__/video-pipeline.test.d.ts +0 -6
- package/dist/services/video/__tests__/video-pipeline.test.js +0 -249
- package/dist/types/features.js +0 -1
- package/dist/workspace/__tests__/workspace-manager.test.d.ts +0 -7
- package/dist/workspace/__tests__/workspace-manager.test.js +0 -52
- /package/dist/api/{features → issues}/batch-operations.d.ts +0 -0
- /package/dist/api/{features → issues}/batch-operations.js +0 -0
- /package/dist/phases/{feature-analysis → issue-analysis}/agent.d.ts +0 -0
- /package/dist/skills/phase/{feature-analysis-verification → issue-analysis-verification}/SKILL.md +0 -0
- /package/dist/{phases/code-review/__tests__/diff-utils.test.d.ts → types/issues.js} +0 -0
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for workflow state management utilities
|
|
3
|
-
*/
|
|
4
|
-
import assert from 'node:assert';
|
|
5
|
-
import { describe, it } from 'node:test';
|
|
6
|
-
import { calculateStats, createCompletedState, createFailedState, createInitialState, createProcessingState, updateFeatureState, } from '../state-manager.js';
|
|
7
|
-
void describe('State Manager', () => {
|
|
8
|
-
void describe('createInitialState', () => {
|
|
9
|
-
void it('should return an empty Map', () => {
|
|
10
|
-
const state = createInitialState();
|
|
11
|
-
assert.ok(state instanceof Map, 'Should return a Map instance');
|
|
12
|
-
assert.strictEqual(state.size, 0, 'Map should be empty');
|
|
13
|
-
});
|
|
14
|
-
void it('should return a new Map on each call', () => {
|
|
15
|
-
const state1 = createInitialState();
|
|
16
|
-
const state2 = createInitialState();
|
|
17
|
-
assert.notStrictEqual(state1, state2, 'Each call should return a distinct Map');
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
void describe('createProcessingState', () => {
|
|
21
|
-
void it('should create a new processing state with retryCount 1 when no current state', () => {
|
|
22
|
-
const state = createProcessingState('feat-1');
|
|
23
|
-
assert.strictEqual(state.featureId, 'feat-1');
|
|
24
|
-
assert.strictEqual(state.retryCount, 1);
|
|
25
|
-
assert.strictEqual(state.status, 'processing');
|
|
26
|
-
assert.ok(state.lastAttempt instanceof Date, 'lastAttempt should be a Date');
|
|
27
|
-
});
|
|
28
|
-
void it('should increment retryCount when current state is provided', () => {
|
|
29
|
-
const currentState = {
|
|
30
|
-
featureId: 'feat-1',
|
|
31
|
-
retryCount: 2,
|
|
32
|
-
lastAttempt: new Date('2024-01-01'),
|
|
33
|
-
status: 'failed',
|
|
34
|
-
};
|
|
35
|
-
const state = createProcessingState('feat-1', currentState);
|
|
36
|
-
assert.strictEqual(state.retryCount, 3, 'Should increment retryCount by 1');
|
|
37
|
-
assert.strictEqual(state.status, 'processing');
|
|
38
|
-
});
|
|
39
|
-
void it('should set a recent lastAttempt date', () => {
|
|
40
|
-
const before = new Date();
|
|
41
|
-
const state = createProcessingState('feat-1');
|
|
42
|
-
const after = new Date();
|
|
43
|
-
assert.ok(state.lastAttempt.getTime() >= before.getTime(), 'lastAttempt should be at or after the call');
|
|
44
|
-
assert.ok(state.lastAttempt.getTime() <= after.getTime(), 'lastAttempt should be at or before now');
|
|
45
|
-
});
|
|
46
|
-
void it('should increment from retryCount 1 to 2', () => {
|
|
47
|
-
const currentState = {
|
|
48
|
-
featureId: 'feat-1',
|
|
49
|
-
retryCount: 1,
|
|
50
|
-
lastAttempt: new Date('2024-01-01'),
|
|
51
|
-
status: 'completed',
|
|
52
|
-
};
|
|
53
|
-
const state = createProcessingState('feat-1', currentState);
|
|
54
|
-
assert.strictEqual(state.retryCount, 2);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
void describe('createCompletedState', () => {
|
|
58
|
-
void it('should create a completed state with retryCount 1 when no current state', () => {
|
|
59
|
-
const state = createCompletedState('feat-2');
|
|
60
|
-
assert.strictEqual(state.featureId, 'feat-2');
|
|
61
|
-
assert.strictEqual(state.retryCount, 1);
|
|
62
|
-
assert.strictEqual(state.status, 'completed');
|
|
63
|
-
assert.ok(state.lastAttempt instanceof Date);
|
|
64
|
-
});
|
|
65
|
-
void it('should preserve retryCount from current state', () => {
|
|
66
|
-
const currentState = {
|
|
67
|
-
featureId: 'feat-2',
|
|
68
|
-
retryCount: 5,
|
|
69
|
-
lastAttempt: new Date('2024-01-01'),
|
|
70
|
-
status: 'processing',
|
|
71
|
-
};
|
|
72
|
-
const state = createCompletedState('feat-2', currentState);
|
|
73
|
-
assert.strictEqual(state.retryCount, 5, 'Should preserve the existing retryCount');
|
|
74
|
-
assert.strictEqual(state.status, 'completed');
|
|
75
|
-
});
|
|
76
|
-
void it('should not increment retryCount (unlike createProcessingState)', () => {
|
|
77
|
-
const currentState = {
|
|
78
|
-
featureId: 'feat-2',
|
|
79
|
-
retryCount: 3,
|
|
80
|
-
lastAttempt: new Date('2024-01-01'),
|
|
81
|
-
status: 'processing',
|
|
82
|
-
};
|
|
83
|
-
const state = createCompletedState('feat-2', currentState);
|
|
84
|
-
assert.strictEqual(state.retryCount, 3, 'retryCount should stay the same, not increment');
|
|
85
|
-
});
|
|
86
|
-
void it('should update lastAttempt to current time', () => {
|
|
87
|
-
const oldDate = new Date('2024-01-01');
|
|
88
|
-
const currentState = {
|
|
89
|
-
featureId: 'feat-2',
|
|
90
|
-
retryCount: 1,
|
|
91
|
-
lastAttempt: oldDate,
|
|
92
|
-
status: 'processing',
|
|
93
|
-
};
|
|
94
|
-
const state = createCompletedState('feat-2', currentState);
|
|
95
|
-
assert.ok(state.lastAttempt.getTime() > oldDate.getTime(), 'lastAttempt should be newer than the old date');
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
void describe('createFailedState', () => {
|
|
99
|
-
void it('should create a failed state with retryCount 1 when no current state', () => {
|
|
100
|
-
const state = createFailedState('feat-3');
|
|
101
|
-
assert.strictEqual(state.featureId, 'feat-3');
|
|
102
|
-
assert.strictEqual(state.retryCount, 1);
|
|
103
|
-
assert.strictEqual(state.status, 'failed');
|
|
104
|
-
assert.ok(state.lastAttempt instanceof Date);
|
|
105
|
-
});
|
|
106
|
-
void it('should preserve retryCount from current state', () => {
|
|
107
|
-
const currentState = {
|
|
108
|
-
featureId: 'feat-3',
|
|
109
|
-
retryCount: 4,
|
|
110
|
-
lastAttempt: new Date('2024-01-01'),
|
|
111
|
-
status: 'processing',
|
|
112
|
-
};
|
|
113
|
-
const state = createFailedState('feat-3', currentState);
|
|
114
|
-
assert.strictEqual(state.retryCount, 4, 'Should preserve the existing retryCount');
|
|
115
|
-
assert.strictEqual(state.status, 'failed');
|
|
116
|
-
});
|
|
117
|
-
void it('should not increment retryCount (unlike createProcessingState)', () => {
|
|
118
|
-
const currentState = {
|
|
119
|
-
featureId: 'feat-3',
|
|
120
|
-
retryCount: 2,
|
|
121
|
-
lastAttempt: new Date('2024-01-01'),
|
|
122
|
-
status: 'processing',
|
|
123
|
-
};
|
|
124
|
-
const state = createFailedState('feat-3', currentState);
|
|
125
|
-
assert.strictEqual(state.retryCount, 2);
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
void describe('updateFeatureState', () => {
|
|
129
|
-
void it('should return a new Map (immutability)', () => {
|
|
130
|
-
const original = new Map();
|
|
131
|
-
const updated = updateFeatureState(original, 'feat-1', () => createProcessingState('feat-1'));
|
|
132
|
-
assert.notStrictEqual(updated, original, 'Should return a different Map instance');
|
|
133
|
-
});
|
|
134
|
-
void it('should not mutate the original Map', () => {
|
|
135
|
-
const original = new Map();
|
|
136
|
-
updateFeatureState(original, 'feat-1', () => createProcessingState('feat-1'));
|
|
137
|
-
assert.strictEqual(original.size, 0, 'Original Map should remain empty');
|
|
138
|
-
});
|
|
139
|
-
void it('should add a new feature to the Map', () => {
|
|
140
|
-
const states = new Map();
|
|
141
|
-
const updated = updateFeatureState(states, 'feat-1', () => createProcessingState('feat-1'));
|
|
142
|
-
assert.strictEqual(updated.size, 1, 'Map should have one entry');
|
|
143
|
-
assert.strictEqual(updated.get('feat-1')?.status, 'processing');
|
|
144
|
-
});
|
|
145
|
-
void it('should update an existing feature in the Map', () => {
|
|
146
|
-
const initial = new Map([
|
|
147
|
-
[
|
|
148
|
-
'feat-1',
|
|
149
|
-
{
|
|
150
|
-
featureId: 'feat-1',
|
|
151
|
-
retryCount: 1,
|
|
152
|
-
lastAttempt: new Date('2024-01-01'),
|
|
153
|
-
status: 'processing',
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
]);
|
|
157
|
-
const updated = updateFeatureState(initial, 'feat-1', (current) => createCompletedState('feat-1', current));
|
|
158
|
-
assert.strictEqual(updated.get('feat-1')?.status, 'completed');
|
|
159
|
-
assert.strictEqual(updated.get('feat-1')?.retryCount, 1, 'retryCount should be preserved');
|
|
160
|
-
});
|
|
161
|
-
void it('should pass current state to the update function', () => {
|
|
162
|
-
const existingState = {
|
|
163
|
-
featureId: 'feat-1',
|
|
164
|
-
retryCount: 3,
|
|
165
|
-
lastAttempt: new Date('2024-01-01'),
|
|
166
|
-
status: 'processing',
|
|
167
|
-
};
|
|
168
|
-
const states = new Map([
|
|
169
|
-
['feat-1', existingState],
|
|
170
|
-
]);
|
|
171
|
-
let receivedState;
|
|
172
|
-
updateFeatureState(states, 'feat-1', (current) => {
|
|
173
|
-
receivedState = current;
|
|
174
|
-
return createCompletedState('feat-1', current);
|
|
175
|
-
});
|
|
176
|
-
assert.deepStrictEqual(receivedState, existingState, 'Update function should receive the current state');
|
|
177
|
-
});
|
|
178
|
-
void it('should pass undefined for non-existent feature', () => {
|
|
179
|
-
const states = new Map();
|
|
180
|
-
let receivedState = {
|
|
181
|
-
featureId: 'sentinel',
|
|
182
|
-
retryCount: 999,
|
|
183
|
-
lastAttempt: new Date(),
|
|
184
|
-
status: 'completed',
|
|
185
|
-
};
|
|
186
|
-
updateFeatureState(states, 'feat-new', (current) => {
|
|
187
|
-
receivedState = current;
|
|
188
|
-
return createProcessingState('feat-new', current);
|
|
189
|
-
});
|
|
190
|
-
assert.strictEqual(receivedState, undefined, 'Update function should receive undefined for non-existent feature');
|
|
191
|
-
});
|
|
192
|
-
void it('should preserve other features in the Map', () => {
|
|
193
|
-
const states = new Map([
|
|
194
|
-
[
|
|
195
|
-
'feat-1',
|
|
196
|
-
{
|
|
197
|
-
featureId: 'feat-1',
|
|
198
|
-
retryCount: 1,
|
|
199
|
-
lastAttempt: new Date('2024-01-01'),
|
|
200
|
-
status: 'completed',
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
[
|
|
204
|
-
'feat-2',
|
|
205
|
-
{
|
|
206
|
-
featureId: 'feat-2',
|
|
207
|
-
retryCount: 2,
|
|
208
|
-
lastAttempt: new Date('2024-01-02'),
|
|
209
|
-
status: 'processing',
|
|
210
|
-
},
|
|
211
|
-
],
|
|
212
|
-
]);
|
|
213
|
-
const updated = updateFeatureState(states, 'feat-2', (current) => createFailedState('feat-2', current));
|
|
214
|
-
assert.strictEqual(updated.size, 2, 'Map should still have two entries');
|
|
215
|
-
assert.strictEqual(updated.get('feat-1')?.status, 'completed', 'feat-1 should remain unchanged');
|
|
216
|
-
assert.strictEqual(updated.get('feat-2')?.status, 'failed', 'feat-2 should be updated');
|
|
217
|
-
});
|
|
218
|
-
});
|
|
219
|
-
void describe('calculateStats', () => {
|
|
220
|
-
void it('should return zeros for an empty Map', () => {
|
|
221
|
-
const states = new Map();
|
|
222
|
-
const stats = calculateStats(states, false);
|
|
223
|
-
assert.deepStrictEqual(stats, {
|
|
224
|
-
totalProcessed: 0,
|
|
225
|
-
completed: 0,
|
|
226
|
-
failed: 0,
|
|
227
|
-
processing: 0,
|
|
228
|
-
isRunning: false,
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
void it('should count all completed features', () => {
|
|
232
|
-
const states = new Map([
|
|
233
|
-
[
|
|
234
|
-
'feat-1',
|
|
235
|
-
{
|
|
236
|
-
featureId: 'feat-1',
|
|
237
|
-
retryCount: 1,
|
|
238
|
-
lastAttempt: new Date(),
|
|
239
|
-
status: 'completed',
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
[
|
|
243
|
-
'feat-2',
|
|
244
|
-
{
|
|
245
|
-
featureId: 'feat-2',
|
|
246
|
-
retryCount: 1,
|
|
247
|
-
lastAttempt: new Date(),
|
|
248
|
-
status: 'completed',
|
|
249
|
-
},
|
|
250
|
-
],
|
|
251
|
-
]);
|
|
252
|
-
const stats = calculateStats(states, true);
|
|
253
|
-
assert.strictEqual(stats.totalProcessed, 2);
|
|
254
|
-
assert.strictEqual(stats.completed, 2);
|
|
255
|
-
assert.strictEqual(stats.failed, 0);
|
|
256
|
-
assert.strictEqual(stats.processing, 0);
|
|
257
|
-
assert.strictEqual(stats.isRunning, true);
|
|
258
|
-
});
|
|
259
|
-
void it('should count mixed states correctly', () => {
|
|
260
|
-
const states = new Map([
|
|
261
|
-
[
|
|
262
|
-
'feat-1',
|
|
263
|
-
{
|
|
264
|
-
featureId: 'feat-1',
|
|
265
|
-
retryCount: 1,
|
|
266
|
-
lastAttempt: new Date(),
|
|
267
|
-
status: 'completed',
|
|
268
|
-
},
|
|
269
|
-
],
|
|
270
|
-
[
|
|
271
|
-
'feat-2',
|
|
272
|
-
{
|
|
273
|
-
featureId: 'feat-2',
|
|
274
|
-
retryCount: 2,
|
|
275
|
-
lastAttempt: new Date(),
|
|
276
|
-
status: 'failed',
|
|
277
|
-
},
|
|
278
|
-
],
|
|
279
|
-
[
|
|
280
|
-
'feat-3',
|
|
281
|
-
{
|
|
282
|
-
featureId: 'feat-3',
|
|
283
|
-
retryCount: 1,
|
|
284
|
-
lastAttempt: new Date(),
|
|
285
|
-
status: 'processing',
|
|
286
|
-
},
|
|
287
|
-
],
|
|
288
|
-
[
|
|
289
|
-
'feat-4',
|
|
290
|
-
{
|
|
291
|
-
featureId: 'feat-4',
|
|
292
|
-
retryCount: 1,
|
|
293
|
-
lastAttempt: new Date(),
|
|
294
|
-
status: 'completed',
|
|
295
|
-
},
|
|
296
|
-
],
|
|
297
|
-
]);
|
|
298
|
-
const stats = calculateStats(states, true);
|
|
299
|
-
assert.strictEqual(stats.totalProcessed, 4);
|
|
300
|
-
assert.strictEqual(stats.completed, 2);
|
|
301
|
-
assert.strictEqual(stats.failed, 1);
|
|
302
|
-
assert.strictEqual(stats.processing, 1);
|
|
303
|
-
assert.strictEqual(stats.isRunning, true);
|
|
304
|
-
});
|
|
305
|
-
void it('should reflect isRunning as false when stopped', () => {
|
|
306
|
-
const states = new Map([
|
|
307
|
-
[
|
|
308
|
-
'feat-1',
|
|
309
|
-
{
|
|
310
|
-
featureId: 'feat-1',
|
|
311
|
-
retryCount: 1,
|
|
312
|
-
lastAttempt: new Date(),
|
|
313
|
-
status: 'completed',
|
|
314
|
-
},
|
|
315
|
-
],
|
|
316
|
-
]);
|
|
317
|
-
const stats = calculateStats(states, false);
|
|
318
|
-
assert.strictEqual(stats.isRunning, false);
|
|
319
|
-
});
|
|
320
|
-
void it('should count all failed features', () => {
|
|
321
|
-
const states = new Map([
|
|
322
|
-
[
|
|
323
|
-
'feat-1',
|
|
324
|
-
{
|
|
325
|
-
featureId: 'feat-1',
|
|
326
|
-
retryCount: 3,
|
|
327
|
-
lastAttempt: new Date(),
|
|
328
|
-
status: 'failed',
|
|
329
|
-
},
|
|
330
|
-
],
|
|
331
|
-
[
|
|
332
|
-
'feat-2',
|
|
333
|
-
{
|
|
334
|
-
featureId: 'feat-2',
|
|
335
|
-
retryCount: 1,
|
|
336
|
-
lastAttempt: new Date(),
|
|
337
|
-
status: 'failed',
|
|
338
|
-
},
|
|
339
|
-
],
|
|
340
|
-
]);
|
|
341
|
-
const stats = calculateStats(states, false);
|
|
342
|
-
assert.strictEqual(stats.totalProcessed, 2);
|
|
343
|
-
assert.strictEqual(stats.completed, 0);
|
|
344
|
-
assert.strictEqual(stats.failed, 2);
|
|
345
|
-
assert.strictEqual(stats.processing, 0);
|
|
346
|
-
});
|
|
347
|
-
void it('should count all processing features', () => {
|
|
348
|
-
const states = new Map([
|
|
349
|
-
[
|
|
350
|
-
'feat-1',
|
|
351
|
-
{
|
|
352
|
-
featureId: 'feat-1',
|
|
353
|
-
retryCount: 1,
|
|
354
|
-
lastAttempt: new Date(),
|
|
355
|
-
status: 'processing',
|
|
356
|
-
},
|
|
357
|
-
],
|
|
358
|
-
[
|
|
359
|
-
'feat-2',
|
|
360
|
-
{
|
|
361
|
-
featureId: 'feat-2',
|
|
362
|
-
retryCount: 1,
|
|
363
|
-
lastAttempt: new Date(),
|
|
364
|
-
status: 'processing',
|
|
365
|
-
},
|
|
366
|
-
],
|
|
367
|
-
[
|
|
368
|
-
'feat-3',
|
|
369
|
-
{
|
|
370
|
-
featureId: 'feat-3',
|
|
371
|
-
retryCount: 1,
|
|
372
|
-
lastAttempt: new Date(),
|
|
373
|
-
status: 'processing',
|
|
374
|
-
},
|
|
375
|
-
],
|
|
376
|
-
]);
|
|
377
|
-
const stats = calculateStats(states, true);
|
|
378
|
-
assert.strictEqual(stats.totalProcessed, 3);
|
|
379
|
-
assert.strictEqual(stats.completed, 0);
|
|
380
|
-
assert.strictEqual(stats.failed, 0);
|
|
381
|
-
assert.strictEqual(stats.processing, 3);
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature filtering utilities for workflow processor
|
|
3
|
-
* Pure functions for filtering and selecting features for processing
|
|
4
|
-
*/
|
|
5
|
-
import type { FeatureInfo } from '../../../types/features.js';
|
|
6
|
-
import type { FeatureProcessingState } from './state-manager.js';
|
|
7
|
-
export declare const shouldProcessFeature: (maxRetries: number) => (feature: FeatureInfo, states: Map<string, FeatureProcessingState>) => boolean;
|
|
8
|
-
export declare const findNextFeature: (features: readonly FeatureInfo[], states: Map<string, FeatureProcessingState>, maxRetries: number) => FeatureInfo | undefined;
|
|
9
|
-
export declare const isFeatureProcessing: (featureId: string, states: Map<string, FeatureProcessingState>) => boolean;
|
|
10
|
-
export declare const isFeatureCompleted: (featureId: string, states: Map<string, FeatureProcessingState>) => boolean;
|
|
11
|
-
export declare const isFeatureFailed: (featureId: string, states: Map<string, FeatureProcessingState>) => boolean;
|
|
12
|
-
export declare const hasReachedMaxRetries: (featureId: string, states: Map<string, FeatureProcessingState>, maxRetries: number) => boolean;
|
|
13
|
-
export declare const filterProcessingFeatures: (features: readonly FeatureInfo[], states: Map<string, FeatureProcessingState>) => FeatureInfo[];
|
|
14
|
-
export declare const filterCompletedFeatures: (features: readonly FeatureInfo[], states: Map<string, FeatureProcessingState>) => FeatureInfo[];
|
|
15
|
-
export declare const filterFailedFeatures: (features: readonly FeatureInfo[], states: Map<string, FeatureProcessingState>) => FeatureInfo[];
|
|
16
|
-
export declare const filterAvailableFeatures: (features: readonly FeatureInfo[], states: Map<string, FeatureProcessingState>, maxRetries: number) => FeatureInfo[];
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature filtering utilities for workflow processor
|
|
3
|
-
* Pure functions for filtering and selecting features for processing
|
|
4
|
-
*/
|
|
5
|
-
// Feature filtering functions (pure)
|
|
6
|
-
export const shouldProcessFeature = (maxRetries) => (feature, states) => {
|
|
7
|
-
const state = states.get(feature.id);
|
|
8
|
-
// If never processed, should process
|
|
9
|
-
if (!state) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
// If feature was updated after last processing attempt, should reprocess
|
|
13
|
-
// This handles cases where user manually changes status back to ready_for_ai
|
|
14
|
-
if (feature.updated_at) {
|
|
15
|
-
const featureUpdatedTime = new Date(feature.updated_at).getTime();
|
|
16
|
-
const lastAttemptTime = state.lastAttempt.getTime();
|
|
17
|
-
if (featureUpdatedTime > lastAttemptTime) {
|
|
18
|
-
// Feature has been updated since last processing, reprocess it
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
// If failed and haven't exceeded retry limit, should retry
|
|
23
|
-
return state.status === 'failed' && state.retryCount < maxRetries;
|
|
24
|
-
};
|
|
25
|
-
export const findNextFeature = (features, states, maxRetries) => features.find((feature) => shouldProcessFeature(maxRetries)(feature, states));
|
|
26
|
-
// Feature status checking functions (pure)
|
|
27
|
-
export const isFeatureProcessing = (featureId, states) => {
|
|
28
|
-
const state = states.get(featureId);
|
|
29
|
-
return state?.status === 'processing';
|
|
30
|
-
};
|
|
31
|
-
export const isFeatureCompleted = (featureId, states) => {
|
|
32
|
-
const state = states.get(featureId);
|
|
33
|
-
return state?.status === 'completed';
|
|
34
|
-
};
|
|
35
|
-
export const isFeatureFailed = (featureId, states) => {
|
|
36
|
-
const state = states.get(featureId);
|
|
37
|
-
return state?.status === 'failed';
|
|
38
|
-
};
|
|
39
|
-
export const hasReachedMaxRetries = (featureId, states, maxRetries) => {
|
|
40
|
-
const state = states.get(featureId);
|
|
41
|
-
return state ? state.retryCount >= maxRetries : false;
|
|
42
|
-
};
|
|
43
|
-
// Feature collection filtering functions (pure)
|
|
44
|
-
export const filterProcessingFeatures = (features, states) => features.filter((feature) => isFeatureProcessing(feature.id, states));
|
|
45
|
-
export const filterCompletedFeatures = (features, states) => features.filter((feature) => isFeatureCompleted(feature.id, states));
|
|
46
|
-
export const filterFailedFeatures = (features, states) => features.filter((feature) => isFeatureFailed(feature.id, states));
|
|
47
|
-
export const filterAvailableFeatures = (features, states, maxRetries) => features.filter((feature) => shouldProcessFeature(maxRetries)(feature, states));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature Coordinator - High-level workflow orchestration
|
|
3
|
-
*
|
|
4
|
-
* Responsibilities:
|
|
5
|
-
* - Fetch feature configuration from API
|
|
6
|
-
* - Execute phases based on workflow field (pending phases in order)
|
|
7
|
-
* - Coordinate feature-level workflow initialization
|
|
8
|
-
* - Handle phase execution results and stop on failure/blocked
|
|
9
|
-
*
|
|
10
|
-
* This is the entry point for feature workflow execution
|
|
11
|
-
*/
|
|
12
|
-
import { type EdsgerConfig } from '../../types/index.js';
|
|
13
|
-
import { type PipelinePhaseOptions, type PipelineResult } from '../../types/pipeline.js';
|
|
14
|
-
/**
|
|
15
|
-
* Run workflow for a feature based on its workflow field
|
|
16
|
-
* Executes all pending phases in order, stopping on failure or blocked
|
|
17
|
-
*/
|
|
18
|
-
export declare function runFeatureWorkflow(options: PipelinePhaseOptions, config: EdsgerConfig): Promise<readonly PipelineResult[]>;
|