@apralabs/apra-fleet 0.4.2 → 0.4.3
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 +38 -5
- package/dist/agents/backlog-groomer.md +25 -0
- package/dist/agents/ci-watcher.md +11 -0
- package/dist/agents/deployer.md +37 -2
- package/dist/agents/doer.md +36 -12
- package/dist/agents/harvester.md +11 -0
- package/dist/agents/integ-test-runner.md +11 -0
- package/dist/agents/kb-reconciler.md +9 -0
- package/dist/agents/plan-reviewer.md +110 -22
- package/dist/agents/planner.md +125 -37
- package/dist/agents/regression-test-runner.md +11 -0
- package/dist/agents/reviewer.md +13 -2
- package/dist/agents/schemas/plan-reviewer-output.json +37 -0
- package/dist/cli/agent-transform.d.ts +83 -2
- package/dist/cli/agent-transform.d.ts.map +1 -1
- package/dist/cli/agent-transform.js +266 -21
- package/dist/cli/agent-transform.js.map +1 -1
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +28 -9
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/config.d.ts +7 -5
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +44 -34
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/install.d.ts +33 -0
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js +290 -23
- package/dist/cli/install.js.map +1 -1
- package/dist/cli/kb-directives.d.ts.map +1 -1
- package/dist/cli/kb-directives.js +2 -1
- package/dist/cli/kb-directives.js.map +1 -1
- package/dist/cli/register-member.d.ts.map +1 -1
- package/dist/cli/register-member.js +6 -2
- package/dist/cli/register-member.js.map +1 -1
- package/dist/commands/kb-server.d.ts +3 -0
- package/dist/commands/kb-server.d.ts.map +1 -1
- package/dist/commands/kb-server.js +43 -3
- package/dist/commands/kb-server.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/os/linux.d.ts +6 -0
- package/dist/os/linux.d.ts.map +1 -1
- package/dist/os/linux.js +35 -2
- package/dist/os/linux.js.map +1 -1
- package/dist/os/os-commands.d.ts +61 -2
- package/dist/os/os-commands.d.ts.map +1 -1
- package/dist/os/windows-gitbash.d.ts +5 -0
- package/dist/os/windows-gitbash.d.ts.map +1 -1
- package/dist/os/windows-gitbash.js +15 -0
- package/dist/os/windows-gitbash.js.map +1 -1
- package/dist/os/windows.d.ts +6 -0
- package/dist/os/windows.d.ts.map +1 -1
- package/dist/os/windows.js +46 -3
- package/dist/os/windows.js.map +1 -1
- package/dist/providers/agy.d.ts +115 -6
- package/dist/providers/agy.d.ts.map +1 -1
- package/dist/providers/agy.js +569 -53
- package/dist/providers/agy.js.map +1 -1
- package/dist/providers/claude.d.ts +81 -3
- package/dist/providers/claude.d.ts.map +1 -1
- package/dist/providers/claude.js +344 -10
- package/dist/providers/claude.js.map +1 -1
- package/dist/providers/codex.d.ts +4 -2
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +19 -2
- package/dist/providers/codex.js.map +1 -1
- package/dist/providers/copilot.d.ts +4 -2
- package/dist/providers/copilot.d.ts.map +1 -1
- package/dist/providers/copilot.js +20 -2
- package/dist/providers/copilot.js.map +1 -1
- package/dist/providers/none.d.ts +4 -2
- package/dist/providers/none.d.ts.map +1 -1
- package/dist/providers/none.js +17 -2
- package/dist/providers/none.js.map +1 -1
- package/dist/providers/opencode.d.ts +3 -1
- package/dist/providers/opencode.d.ts.map +1 -1
- package/dist/providers/opencode.js +22 -2
- package/dist/providers/opencode.js.map +1 -1
- package/dist/providers/provider.d.ts +201 -6
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/provider.js +56 -0
- package/dist/providers/provider.js.map +1 -1
- package/dist/services/agy-project.d.ts +102 -0
- package/dist/services/agy-project.d.ts.map +1 -0
- package/dist/services/agy-project.js +356 -0
- package/dist/services/agy-project.js.map +1 -0
- package/dist/services/auth-socket.js +4 -4
- package/dist/services/auth-web.js +1 -1
- package/dist/services/cloud/lifecycle.d.ts.map +1 -1
- package/dist/services/cloud/lifecycle.js +33 -4
- package/dist/services/cloud/lifecycle.js.map +1 -1
- package/dist/services/credential-cleanup.d.ts.map +1 -1
- package/dist/services/credential-cleanup.js +35 -17
- package/dist/services/credential-cleanup.js.map +1 -1
- package/dist/services/exit-drain.d.ts +44 -0
- package/dist/services/exit-drain.d.ts.map +1 -0
- package/dist/services/exit-drain.js +52 -0
- package/dist/services/exit-drain.js.map +1 -0
- package/dist/services/github-app.d.ts.map +1 -1
- package/dist/services/github-app.js +32 -4
- package/dist/services/github-app.js.map +1 -1
- package/dist/services/http-transport.d.ts +1 -0
- package/dist/services/http-transport.d.ts.map +1 -1
- package/dist/services/http-transport.js +48 -1
- package/dist/services/http-transport.js.map +1 -1
- package/dist/services/knowledge/kb-config.d.ts +42 -0
- package/dist/services/knowledge/kb-config.d.ts.map +1 -0
- package/dist/services/knowledge/kb-config.js +54 -0
- package/dist/services/knowledge/kb-config.js.map +1 -0
- package/dist/services/knowledge/kb-providers.d.ts +7 -1
- package/dist/services/knowledge/kb-providers.d.ts.map +1 -1
- package/dist/services/knowledge/kb-providers.js +191 -17
- package/dist/services/knowledge/kb-providers.js.map +1 -1
- package/dist/services/knowledge/require-sqlite-project.d.ts +32 -0
- package/dist/services/knowledge/require-sqlite-project.d.ts.map +1 -0
- package/dist/services/knowledge/require-sqlite-project.js +38 -0
- package/dist/services/knowledge/require-sqlite-project.js.map +1 -0
- package/dist/services/model-pricing.d.ts.map +1 -1
- package/dist/services/model-pricing.js +7 -3
- package/dist/services/model-pricing.js.map +1 -1
- package/dist/services/secret-token.d.ts +38 -0
- package/dist/services/secret-token.d.ts.map +1 -0
- package/dist/services/secret-token.js +51 -0
- package/dist/services/secret-token.js.map +1 -0
- package/dist/services/service-manager/types.d.ts +3 -1
- package/dist/services/service-manager/types.d.ts.map +1 -1
- package/dist/services/service-manager/windows.d.ts +14 -2
- package/dist/services/service-manager/windows.d.ts.map +1 -1
- package/dist/services/service-manager/windows.js +65 -7
- package/dist/services/service-manager/windows.js.map +1 -1
- package/dist/services/ssh.d.ts.map +1 -1
- package/dist/services/ssh.js +58 -2
- package/dist/services/ssh.js.map +1 -1
- package/dist/services/stall/read-log-tail.d.ts.map +1 -1
- package/dist/services/stall/read-log-tail.js +20 -10
- package/dist/services/stall/read-log-tail.js.map +1 -1
- package/dist/services/stall/stall-detector.d.ts +53 -4
- package/dist/services/stall/stall-detector.d.ts.map +1 -1
- package/dist/services/stall/stall-detector.js +212 -34
- package/dist/services/stall/stall-detector.js.map +1 -1
- package/dist/services/strategy.d.ts.map +1 -1
- package/dist/services/strategy.js +79 -2
- package/dist/services/strategy.js.map +1 -1
- package/dist/services/substitution-engine.js +2 -2
- package/dist/services/substitution-engine.js.map +1 -1
- package/dist/services/tool-registry.d.ts.map +1 -1
- package/dist/services/tool-registry.js +5 -3
- package/dist/services/tool-registry.js.map +1 -1
- package/dist/services/vcs/azure-devops.d.ts +66 -1
- package/dist/services/vcs/azure-devops.d.ts.map +1 -1
- package/dist/services/vcs/azure-devops.js +192 -21
- package/dist/services/vcs/azure-devops.js.map +1 -1
- package/dist/services/vcs/types.d.ts +1 -1
- package/dist/skills/fleet-sprint-cli/SKILL.md +18 -0
- package/dist/skills/pm/SKILL.md +1 -1
- package/dist/skills/pm/cost.md +0 -3
- package/dist/skills/pm/fleet-addendum.md +2 -2
- package/dist/tools/check-status.d.ts +7 -4
- package/dist/tools/check-status.d.ts.map +1 -1
- package/dist/tools/check-status.js +2 -0
- package/dist/tools/check-status.js.map +1 -1
- package/dist/tools/compose-permissions.d.ts +6 -0
- package/dist/tools/compose-permissions.d.ts.map +1 -1
- package/dist/tools/compose-permissions.js +182 -34
- package/dist/tools/compose-permissions.js.map +1 -1
- package/dist/tools/credential-store-set.js +1 -1
- package/dist/tools/execute-command.d.ts.map +1 -1
- package/dist/tools/execute-command.js +31 -20
- package/dist/tools/execute-command.js.map +1 -1
- package/dist/tools/execute-prompt.d.ts +15 -2
- package/dist/tools/execute-prompt.d.ts.map +1 -1
- package/dist/tools/execute-prompt.js +1196 -892
- package/dist/tools/execute-prompt.js.map +1 -1
- package/dist/tools/kb-capture.d.ts +2 -2
- package/dist/tools/kb-capture.d.ts.map +1 -1
- package/dist/tools/kb-capture.js +29 -5
- package/dist/tools/kb-capture.js.map +1 -1
- package/dist/tools/kb-export.d.ts +2 -2
- package/dist/tools/kb-export.d.ts.map +1 -1
- package/dist/tools/kb-export.js +3 -28
- package/dist/tools/kb-export.js.map +1 -1
- package/dist/tools/kb-feedback.d.ts.map +1 -1
- package/dist/tools/kb-feedback.js +3 -1
- package/dist/tools/kb-feedback.js.map +1 -1
- package/dist/tools/kb-freshness-sweep.d.ts.map +1 -1
- package/dist/tools/kb-freshness-sweep.js +3 -1
- package/dist/tools/kb-freshness-sweep.js.map +1 -1
- package/dist/tools/kb-import.d.ts.map +1 -1
- package/dist/tools/kb-import.js +2 -1
- package/dist/tools/kb-import.js.map +1 -1
- package/dist/tools/kb-list.d.ts.map +1 -1
- package/dist/tools/kb-list.js +3 -1
- package/dist/tools/kb-list.js.map +1 -1
- package/dist/tools/kb-query.d.ts +2 -2
- package/dist/tools/kb-reconcile-prefilter.d.ts.map +1 -1
- package/dist/tools/kb-reconcile-prefilter.js +3 -1
- package/dist/tools/kb-reconcile-prefilter.js.map +1 -1
- package/dist/tools/kb-resolve-contradiction.d.ts.map +1 -1
- package/dist/tools/kb-resolve-contradiction.js +3 -1
- package/dist/tools/kb-resolve-contradiction.js.map +1 -1
- package/dist/tools/kb-setup.d.ts.map +1 -1
- package/dist/tools/kb-setup.js +125 -20
- package/dist/tools/kb-setup.js.map +1 -1
- package/dist/tools/kb-stats.d.ts.map +1 -1
- package/dist/tools/kb-stats.js +64 -43
- package/dist/tools/kb-stats.js.map +1 -1
- package/dist/tools/list-members.d.ts +2 -2
- package/dist/tools/list-members.d.ts.map +1 -1
- package/dist/tools/list-members.js +1 -0
- package/dist/tools/list-members.js.map +1 -1
- package/dist/tools/member-detail.d.ts +2 -2
- package/dist/tools/member-detail.d.ts.map +1 -1
- package/dist/tools/member-detail.js +17 -0
- package/dist/tools/member-detail.js.map +1 -1
- package/dist/tools/member-reservation.d.ts +58 -1
- package/dist/tools/member-reservation.d.ts.map +1 -1
- package/dist/tools/member-reservation.js +61 -20
- package/dist/tools/member-reservation.js.map +1 -1
- package/dist/tools/provision-auth.d.ts +80 -1
- package/dist/tools/provision-auth.d.ts.map +1 -1
- package/dist/tools/provision-auth.js +142 -54
- package/dist/tools/provision-auth.js.map +1 -1
- package/dist/tools/provision-vcs-auth.d.ts +91 -1
- package/dist/tools/provision-vcs-auth.d.ts.map +1 -1
- package/dist/tools/provision-vcs-auth.js +209 -49
- package/dist/tools/provision-vcs-auth.js.map +1 -1
- package/dist/tools/register-member.d.ts +12 -9
- package/dist/tools/register-member.d.ts.map +1 -1
- package/dist/tools/register-member.js +99 -12
- package/dist/tools/register-member.js.map +1 -1
- package/dist/tools/remove-member.d.ts.map +1 -1
- package/dist/tools/remove-member.js +27 -2
- package/dist/tools/remove-member.js.map +1 -1
- package/dist/tools/send-email.d.ts +2 -2
- package/dist/tools/setup-git-app.d.ts.map +1 -1
- package/dist/tools/setup-git-app.js +11 -7
- package/dist/tools/setup-git-app.js.map +1 -1
- package/dist/tools/shutdown-server.d.ts +2 -0
- package/dist/tools/shutdown-server.d.ts.map +1 -1
- package/dist/tools/shutdown-server.js +23 -1
- package/dist/tools/shutdown-server.js.map +1 -1
- package/dist/tools/update-member.d.ts +12 -9
- package/dist/tools/update-member.d.ts.map +1 -1
- package/dist/tools/update-member.js +43 -11
- package/dist/tools/update-member.js.map +1 -1
- package/dist/tools/vcs-credential-exec.d.ts +127 -0
- package/dist/tools/vcs-credential-exec.d.ts.map +1 -0
- package/dist/tools/vcs-credential-exec.js +197 -0
- package/dist/tools/vcs-credential-exec.js.map +1 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/log-helpers.d.ts.map +1 -1
- package/dist/utils/log-helpers.js +2 -2
- package/dist/utils/log-helpers.js.map +1 -1
- package/dist/utils/prompt-errors.d.ts.map +1 -1
- package/dist/utils/prompt-errors.js +7 -1
- package/dist/utils/prompt-errors.js.map +1 -1
- package/dist/utils/shell-escape.d.ts +16 -0
- package/dist/utils/shell-escape.d.ts.map +1 -1
- package/dist/utils/shell-escape.js +22 -2
- package/dist/utils/shell-escape.js.map +1 -1
- package/dist/utils/vcs-provider-detect.d.ts +65 -0
- package/dist/utils/vcs-provider-detect.d.ts.map +1 -0
- package/dist/utils/vcs-provider-detect.js +109 -0
- package/dist/utils/vcs-provider-detect.js.map +1 -0
- package/dist/utils/workspace-trust.d.ts +20 -17
- package/dist/utils/workspace-trust.d.ts.map +1 -1
- package/dist/utils/workspace-trust.js +87 -1
- package/dist/utils/workspace-trust.js.map +1 -1
- package/dist/workflows/auto-sprint.js +176 -15
- package/package.json +6 -4
- package/packages/apra-fleet-client/src/client/api.mjs +319 -17
- package/packages/apra-fleet-client/src/client/errors.mjs +6 -2
- package/packages/apra-fleet-se/apra-pm/agents/_shared/GRAPH-SEMANTICS.md +10 -2
- package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +25 -0
- package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +11 -0
- package/packages/apra-fleet-se/apra-pm/agents/deployer.md +37 -2
- package/packages/apra-fleet-se/apra-pm/agents/doer.md +36 -12
- package/packages/apra-fleet-se/apra-pm/agents/harvester.md +11 -0
- package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +11 -0
- package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +9 -0
- package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +110 -22
- package/packages/apra-fleet-se/apra-pm/agents/planner.md +125 -37
- package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +11 -0
- package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +13 -2
- package/packages/apra-fleet-se/apra-pm/agents/schemas/plan-reviewer-output.json +37 -0
- package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +1 -1
- package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +0 -3
- package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +2 -2
- package/packages/apra-fleet-se/bin/cli.mjs +149 -1
- package/packages/apra-fleet-se/bin/serve.mjs +78 -4
- package/packages/apra-fleet-se/fleet-sprint/abort.mjs +481 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-children.mjs +491 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-identity-check.mjs +282 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-identity.mjs +208 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-scope.mjs +638 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-transitions.mjs +301 -0
- package/packages/apra-fleet-se/fleet-sprint/branch-ensure.mjs +96 -0
- package/packages/apra-fleet-se/fleet-sprint/conflict-ladder.mjs +8 -0
- package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +61 -14
- package/packages/apra-fleet-se/fleet-sprint/coordination.mjs +516 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-failure.mjs +184 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-role.mjs +1121 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-safety-guard.mjs +216 -4
- package/packages/apra-fleet-se/fleet-sprint/docs/README.md +1 -1
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +276 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +1 -1
- package/packages/apra-fleet-se/fleet-sprint/docs/run-sprint-cycle-prelude-decision.md +215 -0
- package/packages/apra-fleet-se/fleet-sprint/dolt-literal-guard.mjs +56 -1
- package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +996 -32
- package/packages/apra-fleet-se/fleet-sprint/errors.mjs +267 -0
- package/packages/apra-fleet-se/fleet-sprint/explicit-id-create-guard.mjs +501 -0
- package/packages/apra-fleet-se/fleet-sprint/fatal-diagnostics.mjs +134 -0
- package/packages/apra-fleet-se/fleet-sprint/full-db-fetch-guard.mjs +102 -0
- package/packages/apra-fleet-se/fleet-sprint/git-sync.mjs +556 -0
- package/packages/apra-fleet-se/fleet-sprint/git-topology.mjs +495 -0
- package/packages/apra-fleet-se/fleet-sprint/guarded-modules.mjs +564 -0
- package/packages/apra-fleet-se/fleet-sprint/inline-ladder-guard.mjs +216 -0
- package/packages/apra-fleet-se/fleet-sprint/kb.mjs +728 -0
- package/packages/apra-fleet-se/fleet-sprint/mcp-result.mjs +75 -0
- package/packages/apra-fleet-se/fleet-sprint/member-provisioning.mjs +252 -0
- package/packages/apra-fleet-se/fleet-sprint/member-sync.mjs +581 -0
- package/packages/apra-fleet-se/fleet-sprint/member-target.mjs +93 -0
- package/packages/apra-fleet-se/fleet-sprint/newtask-text.mjs +266 -0
- package/packages/apra-fleet-se/fleet-sprint/parent-notes-staleness.mjs +201 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/deploy.mjs +136 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/develop.mjs +822 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/ensure-sprint-branch.mjs +294 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/final-review.mjs +403 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/harvest.mjs +180 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/integ-test.mjs +358 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/plan.mjs +390 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/publish-pr.mjs +323 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/re-review.mjs +232 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/regression-test.mjs +174 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/replan.mjs +197 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/review.mjs +305 -0
- package/packages/apra-fleet-se/fleet-sprint/prompts.mjs +559 -0
- package/packages/apra-fleet-se/fleet-sprint/role-policies.mjs +1416 -0
- package/packages/apra-fleet-se/fleet-sprint/round-session.mjs +100 -0
- package/packages/apra-fleet-se/fleet-sprint/runner.js +1467 -9798
- package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +17 -12
- package/packages/apra-fleet-se/fleet-sprint/shell-command-guard.mjs +304 -0
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +18 -0
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +21 -2
- package/packages/apra-fleet-se/fleet-sprint/sprint-args.mjs +454 -0
- package/packages/apra-fleet-se/fleet-sprint/sprint-report.mjs +239 -0
- package/packages/apra-fleet-se/fleet-sprint/sprint-state.mjs +163 -0
- package/packages/apra-fleet-se/fleet-sprint/unbracketed-push-guard.mjs +234 -0
- package/packages/apra-fleet-se/fleet-sprint/usage-limit-controller.mjs +211 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-auth.mjs +1279 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +153 -19
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +71 -21
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/bitbucket.mjs +28 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +131 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +140 -16
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +1 -0
- package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +77 -2
- package/packages/apra-fleet-se/fleet-sprint/worklists.mjs +559 -0
- package/packages/apra-fleet-se/package.json +1 -1
- package/packages/apra-fleet-workflow/src/viewer/index.mjs +17 -6
- package/packages/apra-fleet-workflow/src/workflow/index.mjs +49 -7
- package/skills/fleet/SKILL.md +8 -8
- package/skills/fleet/auth-azdevops.md +14 -3
- package/skills/fleet/auth-bitbucket.md +2 -2
- package/skills/fleet/auth-github.md +5 -4
- package/skills/fleet/onboarding.md +3 -3
- package/skills/fleet/permissions.md +5 -1
- package/skills/fleet/profiles/node.json +1 -1
- package/skills/fleet/troubleshooting.md +3 -3
- package/version.json +1 -1
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// PHASE MODULE: Integ Test (apra-fleet-3swo.6.8).
|
|
3
|
+
//
|
|
4
|
+
// The SEVENTH of runSprintCycle's twelve phase() boundaries -- the per-cycle
|
|
5
|
+
// integration-test pass against the build the Deploy phase just stood up. It
|
|
6
|
+
// scopes the run (this cycle's open features plus the verify-set beads whose
|
|
7
|
+
// children have ALL closed), dispatches the integ-test-runner ladder, records
|
|
8
|
+
// the verdict -- PASSED, FAILED or INCONCLUSIVE, the last being an infra
|
|
9
|
+
// dispatch failure that produced no verdict at all -- and applies the
|
|
10
|
+
// verify-fail bounce cap to any gap bug filed under a verify-set parent. Moved
|
|
11
|
+
// verbatim out of runner.js: every prompt, log line, dispatch option, branch
|
|
12
|
+
// and bd command is byte-identical to the inline version, so the golden
|
|
13
|
+
// transcript is unchanged. Move-only, no behaviour change.
|
|
14
|
+
//
|
|
15
|
+
// WHERE THIS PHASE STARTS AND STOPS. It is the body of runSprintCycle's
|
|
16
|
+
// `if (hasPlaybook && deployedThisCycle)` branch, and nothing else. The two
|
|
17
|
+
// `probeFileExists` runbook probes that produce `hasPlaybook`/`deployedThisCycle`,
|
|
18
|
+
// the `let verifySetForIntegTest = []` declaration hoisted ABOVE that `if`
|
|
19
|
+
// (apra-fleet-66u.2 -- Cycle Evaluation reads it whether or not this phase
|
|
20
|
+
// ran) and both `else` branches' "Skipping Integration Test Phase" log lines
|
|
21
|
+
// all stay in runner.js: the probes decide WHETHER this phase runs at all, and
|
|
22
|
+
// the flags they produce are read by phases this one does not own. Same
|
|
23
|
+
// boundary rule as ./deploy.mjs's `if (hasDeploy)` branch and ./replan.mjs's
|
|
24
|
+
// `if (eligibleReplan.length > 0)` one. The trailing `await updateDashboard()`
|
|
25
|
+
// IS part of this phase -- unlike Review's, it is the last statement of the
|
|
26
|
+
// phase's own branch body rather than the surrounding loop's continue/break
|
|
27
|
+
// decision.
|
|
28
|
+
//
|
|
29
|
+
// EXPLICIT STATE, NOT A CLOSURE -- AND WHY THREE VALUES COME BACK. The inline
|
|
30
|
+
// version read its inputs off the enclosing runSprintCycle scope; they arrive
|
|
31
|
+
// as one explicit state argument now. What this phase writes is mostly
|
|
32
|
+
// MUTATED IN PLACE on objects the caller still holds -- `integFailures` (an
|
|
33
|
+
// array it pushes a FAILED/INCONCLUSIVE record onto), `verifyEverIds` (the
|
|
34
|
+
// monotone Set feeding the stall-abort's still-open-verify report) and
|
|
35
|
+
// `verifyGapCounts` (the Map the bounce cap counts in) -- which is exactly
|
|
36
|
+
// equivalent to the closure it replaces, because runner.js never reassigns
|
|
37
|
+
// those bindings either.
|
|
38
|
+
//
|
|
39
|
+
// Three values are genuinely REASSIGNED rather than mutated, so they cannot
|
|
40
|
+
// travel that way and are returned instead: `verifySetForIntegTest` (reset to
|
|
41
|
+
// [] then re-derived from classifyVerifySet every dispatch attempt, and read
|
|
42
|
+
// afterwards by Cycle Evaluation's verifyDispatchAttempts/verifyDispatchClosures
|
|
43
|
+
// tracking), `integTestRunnerDispatchCount` and `integTestRunnerSpend` (the two
|
|
44
|
+
// per-phase cost accumulators buildCostAnalysis() reports at Harvest time).
|
|
45
|
+
// All three are also passed IN, so the caller's single destructuring
|
|
46
|
+
// assignment restores them and no `if` is needed at the call site.
|
|
47
|
+
//
|
|
48
|
+
// WHY SOME HELPERS ARE INJECTED RATHER THAN IMPORTED. bdListScoped,
|
|
49
|
+
// fetchAllBeadsShared, updateDashboard, getMemberForRole, ensureUnattendedAuto,
|
|
50
|
+
// ensureDeployPermissions, budget and VERIFY_GAP_LIMIT are all
|
|
51
|
+
// runSprintCycle-scoped (several of them context-overridable seams), so there
|
|
52
|
+
// is nothing to import. parseBdJson is exported BY runner.js; importing it here
|
|
53
|
+
// would make phases/integ-test.mjs <-> runner.js a circular pair for the sake
|
|
54
|
+
// of one helper, so it comes through the state argument instead -- the same
|
|
55
|
+
// rule ./plan.mjs's, ./develop.mjs's and ./review.mjs's headers state. The one
|
|
56
|
+
// dependency that lives in a real sibling module -- classifyVerifySet from
|
|
57
|
+
// ../beads-scope.mjs -- is imported directly, even though runner.js also
|
|
58
|
+
// re-exports it.
|
|
59
|
+
//
|
|
60
|
+
// GUARD COVERAGE: registered as 'phases/integ-test.mjs' in
|
|
61
|
+
// ../guarded-modules.mjs. It took TWO member_name-bearing command() call sites
|
|
62
|
+
// out of runner.js -- the bounce cap's `bd show <bugId> --json` parent lookup
|
|
63
|
+
// and its `bd update <parentId> --status=deferred --append-notes` deferral --
|
|
64
|
+
// plus the ONE dispatchRole call site for the integ-test-runner ladder, which
|
|
65
|
+
// is exactly what dispatch-safety-guard and the phase 3 dispatch census must
|
|
66
|
+
// keep seeing after the slice.
|
|
67
|
+
// =============================================================================
|
|
68
|
+
|
|
69
|
+
import { dispatchRole, TURN_BASES } from '../dispatch-role.mjs';
|
|
70
|
+
import { classifyVerifySet } from '../beads-scope.mjs';
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Runs the per-cycle Integ Test phase.
|
|
74
|
+
*
|
|
75
|
+
* @param {object} state Explicit phase state; see this file's header.
|
|
76
|
+
* @returns {Promise<{
|
|
77
|
+
* verifySetForIntegTest: string[],
|
|
78
|
+
* integTestRunnerDispatchCount: number,
|
|
79
|
+
* integTestRunnerSpend: number,
|
|
80
|
+
* }>} The three REASSIGNED values described in the header. Every other output
|
|
81
|
+
* of this phase is an in-place mutation of an array/Set/Map the caller still
|
|
82
|
+
* holds (`integFailures`, `verifyEverIds`, `verifyGapCounts`).
|
|
83
|
+
*/
|
|
84
|
+
export async function runIntegTestPhase({
|
|
85
|
+
// Presentation + dispatch seams.
|
|
86
|
+
phase,
|
|
87
|
+
log,
|
|
88
|
+
command,
|
|
89
|
+
dispatchCtx,
|
|
90
|
+
// Sprint identity/config.
|
|
91
|
+
cycle,
|
|
92
|
+
targetIssues,
|
|
93
|
+
orchestratorMember,
|
|
94
|
+
sprintSelfIdLine,
|
|
95
|
+
// The per-sprint budget meter -- read for this phase's own spend delta.
|
|
96
|
+
budget,
|
|
97
|
+
// Mutated in place; never reassigned by this phase (see header).
|
|
98
|
+
integFailures,
|
|
99
|
+
verifyEverIds,
|
|
100
|
+
verifyGapCounts,
|
|
101
|
+
// Reassigned, so passed in and returned (see header).
|
|
102
|
+
verifySetForIntegTest,
|
|
103
|
+
integTestRunnerDispatchCount,
|
|
104
|
+
integTestRunnerSpend,
|
|
105
|
+
// runSprintCycle-scoped locals and runner.js-exported helpers, injected
|
|
106
|
+
// rather than imported (see header).
|
|
107
|
+
getMemberForRole,
|
|
108
|
+
ensureUnattendedAuto,
|
|
109
|
+
ensureDeployPermissions,
|
|
110
|
+
bdListScoped,
|
|
111
|
+
fetchAllBeadsShared,
|
|
112
|
+
parseBdJson,
|
|
113
|
+
updateDashboard,
|
|
114
|
+
VERIFY_GAP_LIMIT,
|
|
115
|
+
}) {
|
|
116
|
+
phase(`Integ Test C${cycle}`);
|
|
117
|
+
await ensureUnattendedAuto(getMemberForRole('integ-test-runner'));
|
|
118
|
+
await ensureDeployPermissions(getMemberForRole('integ-test-runner'));
|
|
119
|
+
// apra-fleet-nwh.1: snapshot the running total BEFORE this
|
|
120
|
+
// cycle's Integ Test dispatch(es) so the delta after (below) is
|
|
121
|
+
// this phase's own spend, not the whole run's. budget.spent()
|
|
122
|
+
// may be absent on an injected test double; that degrades to
|
|
123
|
+
// "not tracked" exactly like buildCostAnalysis()'s own total
|
|
124
|
+
// spend line already does, never a thrown error.
|
|
125
|
+
const integSpendBefore = typeof budget?.spent === 'function' ? budget.spent() : null;
|
|
126
|
+
integTestRunnerDispatchCount += 1;
|
|
127
|
+
let integResult;
|
|
128
|
+
// Set when the integ dispatch failed for an INFRASTRUCTURE reason
|
|
129
|
+
// (empty_response / inactivity timeout / orphan-recovery timeout)
|
|
130
|
+
// rather than producing a real pass/fail verdict -- recorded as
|
|
131
|
+
// INCONCLUSIVE below instead of a false passed:false FAIL. Carries
|
|
132
|
+
// {reason, message} for the note.
|
|
133
|
+
let integInfraInconclusive = null;
|
|
134
|
+
// apra-fleet-jfo: verifySetForIntegTest is now declared at the
|
|
135
|
+
// outer per-cycle scope (apra-fleet-66u.2, just above this `if`
|
|
136
|
+
// block) rather than here, so the bounce-cap logic after the
|
|
137
|
+
// try/catch AND Cycle Evaluation's dispatch-outcome tracking can
|
|
138
|
+
// both still see it even when the try block throws early or
|
|
139
|
+
// never runs at all. Reset to empty at the top of every dispatch
|
|
140
|
+
// attempt regardless -- an early-thrown dispatch simply skips the
|
|
141
|
+
// bounce-cap block below (its `verifySetForIntegTest.length > 0`
|
|
142
|
+
// guard short-circuits).
|
|
143
|
+
verifySetForIntegTest = [];
|
|
144
|
+
let verifySetIdSet = new Set();
|
|
145
|
+
// apra-fleet-3swo.5.7: the try/catch that used to wrap this whole
|
|
146
|
+
// block was the integ ladder's degrade, which is now the
|
|
147
|
+
// 'integ-test-runner' policy row executed by dispatchRole. Nothing
|
|
148
|
+
// else it covered was ever caught by it: the bd scope reads below
|
|
149
|
+
// throw CommandError, which the old catch's final `else` rethrew
|
|
150
|
+
// anyway, so removing the wrapper changes no failure path.
|
|
151
|
+
// integ-test-runner.md's contract requires "an explicit list of
|
|
152
|
+
// feature ids ... already scoped for you by the orchestrator" as
|
|
153
|
+
// a required input, and forbids the agent from deriving that list
|
|
154
|
+
// itself via a bare, unscoped `bd list --type=feature`. Fetch the
|
|
155
|
+
// scope's open features here and name them explicitly -- always
|
|
156
|
+
// dispatch, even with zero open features this cycle: deploy
|
|
157
|
+
// succeeded and a playbook exists, so this phase runs regardless,
|
|
158
|
+
// per the fixed per-cycle phase sequence every other
|
|
159
|
+
// cycle-evaluation check in this file assumes.
|
|
160
|
+
const openFeatures = await bdListScoped('--type=feature --status=open --json');
|
|
161
|
+
// apra-fleet-jfo: replaces the old bug-only pendingClosureBugs
|
|
162
|
+
// derivation. Any issue_type qualifies (bug, feature, task-parent,
|
|
163
|
+
// epic); classified against the FULL unfiltered project bead list
|
|
164
|
+
// (fetchAllBeadsShared, not a scope-filtered subset) so an
|
|
165
|
+
// out-of-scope open child still blocks eligibility. These beads
|
|
166
|
+
// have no other closure owner: doers refuse non-task beads,
|
|
167
|
+
// reviewers may not close, and the plain feature prompt below only
|
|
168
|
+
// names features -- without this they would linger open at goal
|
|
169
|
+
// priority forever. The integ runner has bead-closing authority
|
|
170
|
+
// and pushBeads: true, so it owns verify-set closure.
|
|
171
|
+
({ verifyIds: verifySetForIntegTest } = classifyVerifySet(await fetchAllBeadsShared(), targetIssues));
|
|
172
|
+
// apra-fleet-66u.2: a bead can become verify-eligible AFTER
|
|
173
|
+
// this cycle's Route step already ran (e.g. its last child
|
|
174
|
+
// closes during THIS cycle's own Develop/Review, before
|
|
175
|
+
// Deploy/IntegTest) -- this classifyVerifySet call, not the
|
|
176
|
+
// Route step's, is what first discovers it. Feed it into
|
|
177
|
+
// verifyEverIds here too so the exit-gate's
|
|
178
|
+
// stillOpenVerifyIds safety net (further down) never has a
|
|
179
|
+
// same-cycle blind spot for a bead that was genuinely just
|
|
180
|
+
// dispatched to verify but not yet closed.
|
|
181
|
+
for (const id of verifySetForIntegTest) verifyEverIds.add(id);
|
|
182
|
+
verifySetIdSet = new Set(verifySetForIntegTest);
|
|
183
|
+
// Dedupe: a feature already in the verify set gets the stronger
|
|
184
|
+
// verify clause below (real evidence, gap filed under itself), not
|
|
185
|
+
// also the generic "run tests for this feature" line.
|
|
186
|
+
const openFeaturesNotInVerifySet = openFeatures.filter((f) => !verifySetIdSet.has(f.id));
|
|
187
|
+
const verifyClause = verifySetForIntegTest.length > 0
|
|
188
|
+
? ` Additionally, these bead(s) have ALL their children closed and await ` +
|
|
189
|
+
`verification-closure: ${verifySetForIntegTest.join(', ')}. For each, verify against the ` +
|
|
190
|
+
`deployed build per the playbook. If your pass shows the underlying work holds (the ` +
|
|
191
|
+
`defect no longer reproduces, or the feature behaves as specified), close it (bd close) ` +
|
|
192
|
+
`with a note citing the commands run and the observed output. If it does NOT hold, leave ` +
|
|
193
|
+
`it open and file a bug describing the gap with evidence, parented under THAT bead ` +
|
|
194
|
+
`specifically (--parent <that bead's own id>, NOT ${targetIssues[0]}) -- filing it under ` +
|
|
195
|
+
`the right parent is required so the gap is correctly attributed and that parent is ` +
|
|
196
|
+
`re-routed to development next cycle instead of staying stuck in verify.`
|
|
197
|
+
: '';
|
|
198
|
+
// The per-cycle Integ Test phase is FEATURE CLOSURE ONLY:
|
|
199
|
+
// integ-test-playbook.md owns no sandbox, no smoke test, and no
|
|
200
|
+
// real-bd suite -- those belong to regression-test-playbook.md,
|
|
201
|
+
// dispatched once per sprint in Finalization below.
|
|
202
|
+
const featurePrompt = (openFeaturesNotInVerifySet.length > 0
|
|
203
|
+
? `Run tests using integ-test-playbook.md, for these open feature id(s) only: ` +
|
|
204
|
+
`${openFeaturesNotInVerifySet.map((f) => f.id).join(', ')}. Add bug beads if needed, filed under ` +
|
|
205
|
+
`--parent ${targetIssues[0]}.`
|
|
206
|
+
: `Run tests using integ-test-playbook.md. No open type=feature beads are in scope ` +
|
|
207
|
+
`this cycle -- report nothing to test. Add bug beads if needed, filed under ` +
|
|
208
|
+
`--parent ${targetIssues[0]}.`) + verifyClause +
|
|
209
|
+
// Generic hand-off to a target that deploys an isolated test
|
|
210
|
+
// instance per sprint (see sprintSelfIdLine above): the
|
|
211
|
+
// playbook, not this engine, says how to locate it from the
|
|
212
|
+
// id and what tearing it down means.
|
|
213
|
+
`\n${sprintSelfIdLine}\n` +
|
|
214
|
+
`If this cycle's deploy stood up an isolated test instance for this sprint, the playbook ` +
|
|
215
|
+
`says how to locate it from that id; tear it down before you return, pass or fail.`;
|
|
216
|
+
// integ-test-runner does NOT touch code (pushCode: false, no git
|
|
217
|
+
// push) but it DOES mutate beads -- it closes passing features
|
|
218
|
+
// and files bug beads -- so it must D-push those mutations
|
|
219
|
+
// (pushBeads: true), a D-push with no git push. G-pull before,
|
|
220
|
+
// no-op G-push after.
|
|
221
|
+
// apra-fleet-3swo.5.7: the integ ladder -- its dispatch, its
|
|
222
|
+
// pushBeads git-sync bracket, its max_turns-exhaustion resume
|
|
223
|
+
// at doubled turns, its ONE bounded infra-failure recovery
|
|
224
|
+
// resume, its auth self-heal and its degrade -- is now the
|
|
225
|
+
// 'integ-test-runner' row of fleet-sprint/role-policies.mjs.
|
|
226
|
+
//
|
|
227
|
+
// WHY THE INCONCLUSIVE PATH IS POLICY DATA. An INFRA dispatch
|
|
228
|
+
// failure (empty_response / inactivity timeout / orphan-recovery
|
|
229
|
+
// timeout) is NOT a test verdict: the runner's CLI died mid-turn
|
|
230
|
+
// or lost its result envelope without ever reporting pass or
|
|
231
|
+
// fail. Recording it as passed:false is a false negative that
|
|
232
|
+
// blocks the sprint's confidence check on an infra fault. The
|
|
233
|
+
// row says this as data: degrade.classifiesInfraFailures makes
|
|
234
|
+
// 'infra' a class of its own, retry.infraResumeAttempts spends
|
|
235
|
+
// ONE session resume trying to recover it (the run may have made
|
|
236
|
+
// real progress and merely lost its envelope, and the resume
|
|
237
|
+
// prompt already restates the full scope), and 'infra' is
|
|
238
|
+
// deliberately absent from degrade.classes so the engine
|
|
239
|
+
// fabricates no report for it -- it returns an `inconclusive`
|
|
240
|
+
// record instead, which is what this call site turns into an
|
|
241
|
+
// INCONCLUSIVE cycle entry below.
|
|
242
|
+
//
|
|
243
|
+
// The max_total_s ceiling is a HARD kill regardless of activity
|
|
244
|
+
// and surfaces as a plain AgentDispatchError, so it gets real
|
|
245
|
+
// headroom (INTEG_MAX_TOTAL_S) while the shorter INACTIVITY
|
|
246
|
+
// timer still kills a genuinely hung runner. Both budgets are
|
|
247
|
+
// named symbolically by the row.
|
|
248
|
+
const integOutcome = await dispatchRole(dispatchCtx, 'integ-test-runner', {
|
|
249
|
+
prompt: featurePrompt,
|
|
250
|
+
// A resumed dispatch DELIVERS A NEW PROMPT ARTIFACT to the
|
|
251
|
+
// member (replacing the original one, e.g. .fleet-task.md),
|
|
252
|
+
// so a bare "continue" resume erases the dispatch's scope
|
|
253
|
+
// from the artifact a contract may treat as its scope source
|
|
254
|
+
// of truth. Every resume prompt that carries per-dispatch
|
|
255
|
+
// scope must restate it.
|
|
256
|
+
resumePrompt:
|
|
257
|
+
'Continue the integration test run exactly where you left off in this same session -- do not restart the playbook or rebuild the sandbox if it is already up. Finish the remaining suites, close passing features / file bugs per your contract, and return your final report now. ' +
|
|
258
|
+
'Your original scope, restated so a resumed dispatch never loses it: ' + featurePrompt,
|
|
259
|
+
roleLabel: 'Integ Test Runner',
|
|
260
|
+
resumeLabel: `Integ Test (resume, max_turns=${TURN_BASES.INTEG_TEST_MAX_TURNS * 2})`,
|
|
261
|
+
});
|
|
262
|
+
integResult = integOutcome.value;
|
|
263
|
+
integInfraInconclusive = integOutcome.inconclusive;
|
|
264
|
+
if (integInfraInconclusive) {
|
|
265
|
+
// integResult is stubbed only so downstream references stay
|
|
266
|
+
// defined; the integInfraInconclusive branch below owns what
|
|
267
|
+
// actually gets recorded.
|
|
268
|
+
integResult = {
|
|
269
|
+
featuresClosed: 0,
|
|
270
|
+
issuesCreated: 0,
|
|
271
|
+
passed: false,
|
|
272
|
+
bugsFiled: [],
|
|
273
|
+
summary: `Integ test runner infra dispatch failure (${integInfraInconclusive.reason}): ${integInfraInconclusive.message}`,
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
// No duplicate log() dump -- see dispatchReview() for why.
|
|
277
|
+
//
|
|
278
|
+
// Feature closure is judged against the features' own `[test]` tasks
|
|
279
|
+
// in the branch working tree, which is inherently current, so no
|
|
280
|
+
// SHA-freshness gate is needed here.
|
|
281
|
+
//
|
|
282
|
+
// An infra dispatch failure (empty_response / inactivity timeout /
|
|
283
|
+
// orphan-recovery timeout) produced no test verdict at all, and must
|
|
284
|
+
// be recorded INCONCLUSIVE -- tagged and worded distinctly -- so the
|
|
285
|
+
// final reviewer/harvester can tell an infra fault apart from real
|
|
286
|
+
// test evidence, and it is never counted as a genuine pass or fail.
|
|
287
|
+
// Checked BEFORE `passed` because the stubbed integResult carries no
|
|
288
|
+
// meaningful verdict.
|
|
289
|
+
if (integInfraInconclusive) {
|
|
290
|
+
const inconclusiveNote = `INCONCLUSIVE (infra dispatch failure -- ${integInfraInconclusive.reason}; the member CLI produced no test verdict): ${integInfraInconclusive.message}`;
|
|
291
|
+
integFailures.push({ cycle, notes: inconclusiveNote, bugsFiled: [], inconclusive: true });
|
|
292
|
+
log(`Integration tests INCONCLUSIVE this cycle (C${cycle}): infra dispatch failure (${integInfraInconclusive.reason}) -- not accepted as pass or fail evidence.`);
|
|
293
|
+
} else if (integResult.passed !== true) {
|
|
294
|
+
// Never swallow a failure just because the agent chose to (or
|
|
295
|
+
// didn't) file bugs -- `passed` is the source of truth, checked
|
|
296
|
+
// explicitly and propagated below regardless of
|
|
297
|
+
// `bugsFiled.length`.
|
|
298
|
+
integFailures.push({ cycle, notes: integResult.summary, bugsFiled: integResult.bugsFiled });
|
|
299
|
+
log(`Integration tests FAILED this cycle (C${cycle}, bugsFiled: ${integResult.bugsFiled.join(', ') || 'none'}): ${integResult.summary}`);
|
|
300
|
+
} else {
|
|
301
|
+
// apra-fleet-4bg: a successful/no-op cycle previously produced NO
|
|
302
|
+
// log line at all, making it indistinguishable from a silent
|
|
303
|
+
// contract violation (an agent that never touched its scope but
|
|
304
|
+
// still reported passed:true). Log every outcome, not just
|
|
305
|
+
// failures.
|
|
306
|
+
log(`Integration tests PASSED this cycle (C${cycle}): ${integResult.featuresClosed} feature(s) closed, ${integResult.issuesCreated} bug(s) filed. ${integResult.summary}`);
|
|
307
|
+
}
|
|
308
|
+
// apra-fleet: Step 1c in integ-test-runner.md requires out-of-scope
|
|
309
|
+
// failures observed during verification to be cross-linked or filed,
|
|
310
|
+
// not silently dropped just because the cycle otherwise passed.
|
|
311
|
+
if (Array.isArray(integResult.observedFailures) && integResult.observedFailures.length > 0) {
|
|
312
|
+
log(`Integration tests C${cycle}: ${integResult.observedFailures.length} out-of-scope failure(s) observed and tracked -- ` +
|
|
313
|
+
integResult.observedFailures.map((f) => `${f.test} (${f.cause}) -> ${f.beadId}`).join(' | '));
|
|
314
|
+
}
|
|
315
|
+
// apra-fleet-jfo D6: verify-fail bounce cap. A gap bug filed under a
|
|
316
|
+
// verify-set parent makes that parent structurally ineligible again
|
|
317
|
+
// at next classification (its child count now includes an open bug)
|
|
318
|
+
// -- no sticky "bounced" flag is needed for the round-trip itself.
|
|
319
|
+
// This only tracks HOW MANY TIMES a given parent has bounced, so a
|
|
320
|
+
// parent that keeps failing verification is deferred rather than
|
|
321
|
+
// looping forever.
|
|
322
|
+
if (Array.isArray(integResult.bugsFiled) && integResult.bugsFiled.length > 0 && verifySetForIntegTest.length > 0) {
|
|
323
|
+
for (const bugId of integResult.bugsFiled) {
|
|
324
|
+
try {
|
|
325
|
+
const bugShowRaw = await command(`bd show ${bugId} --json`, { member_name: orchestratorMember, silent: true });
|
|
326
|
+
const bugBeads = parseBdJson(bugShowRaw, `bd show ${bugId} --json`);
|
|
327
|
+
const parentId = Array.isArray(bugBeads) ? bugBeads[0]?.parent : bugBeads?.parent;
|
|
328
|
+
if (!parentId || !verifySetIdSet.has(parentId)) continue;
|
|
329
|
+
const gapCount = (verifyGapCounts.get(parentId) ?? 0) + 1;
|
|
330
|
+
verifyGapCounts.set(parentId, gapCount);
|
|
331
|
+
if (gapCount > VERIFY_GAP_LIMIT) {
|
|
332
|
+
log(`Verify-route bounce cap: ${parentId} has failed verification ${gapCount} time(s) this sprint (limit ${VERIFY_GAP_LIMIT}) -- deferring rather than bouncing again.`);
|
|
333
|
+
await command(
|
|
334
|
+
`bd update ${parentId} --status=deferred --append-notes "Deferred by the verify-route bounce cap: failed integration-test verification ${gapCount} times this sprint (limit ${VERIFY_GAP_LIMIT}). Latest gap: ${bugId}."`,
|
|
335
|
+
{ member_name: orchestratorMember, silent: true }
|
|
336
|
+
);
|
|
337
|
+
} else {
|
|
338
|
+
log(`Verify-route bounce: ${parentId} failed verification (gap bug ${bugId} filed), attempt ${gapCount}/${VERIFY_GAP_LIMIT} -- will re-route to plan/develop once ${bugId} closes.`);
|
|
339
|
+
}
|
|
340
|
+
} catch (bugLookupErr) {
|
|
341
|
+
log(`Verify-route bounce-cap lookup for ${bugId} failed (non-fatal, cap tracking skipped for this bug): ${bugLookupErr.message}`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
// apra-fleet-nwh.1: fold this cycle's Integ Test spend (dispatch
|
|
346
|
+
// plus any resume/retry inside the try/catch above) into the
|
|
347
|
+
// running total buildCostAnalysis() reports at Harvest time. A
|
|
348
|
+
// negative/NaN delta (a test double whose spent() does not
|
|
349
|
+
// monotonically increase) is clamped to 0 rather than corrupting
|
|
350
|
+
// the accumulator.
|
|
351
|
+
if (integSpendBefore !== null && typeof budget?.spent === 'function') {
|
|
352
|
+
const delta = budget.spent() - integSpendBefore;
|
|
353
|
+
if (Number.isFinite(delta) && delta > 0) integTestRunnerSpend += delta;
|
|
354
|
+
}
|
|
355
|
+
await updateDashboard();
|
|
356
|
+
|
|
357
|
+
return { verifySetForIntegTest, integTestRunnerDispatchCount, integTestRunnerSpend };
|
|
358
|
+
}
|