@apralabs/apra-fleet 0.4.2 → 0.4.4
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 +103 -34
- package/dist/agents/backlog-groomer.md +87 -14
- package/dist/agents/ci-watcher.md +35 -9
- package/dist/agents/deployer.md +63 -11
- package/dist/agents/doer.md +99 -41
- package/dist/agents/harvester.md +47 -27
- package/dist/agents/integ-test-runner.md +38 -10
- package/dist/agents/kb-reconciler.md +37 -7
- package/dist/agents/plan-reviewer.md +145 -32
- package/dist/agents/planner.md +180 -69
- package/dist/agents/regression-test-runner.md +98 -64
- package/dist/agents/reviewer.md +117 -45
- package/dist/agents/schemas/backlog-groomer-output.json +1 -1
- package/dist/agents/schemas/doer-output.json +32 -0
- package/dist/agents/schemas/harvester-input.json +1 -5
- package/dist/agents/schemas/plan-reviewer-output.json +37 -0
- package/dist/agents/schemas/planner-output.json +1 -1
- package/dist/agents/schemas/regression-test-runner-output.json +41 -7
- package/dist/agents/schemas/reviewer-output.json +62 -3
- package/dist/cli/agent-transform.d.ts +90 -2
- package/dist/cli/agent-transform.js +310 -20
- package/dist/cli/auth.d.ts +1 -0
- package/dist/cli/auth.js +66 -17
- package/dist/cli/beads-install.d.ts +35 -0
- package/dist/cli/beads-install.js +125 -0
- package/dist/cli/beads-pin.d.ts +5 -0
- package/dist/cli/beads-pin.js +27 -0
- package/dist/cli/call.d.ts +27 -0
- package/dist/cli/call.js +177 -0
- package/dist/cli/config.d.ts +31 -6
- package/dist/cli/config.js +113 -36
- package/dist/cli/dolt-install.d.ts +18 -2
- package/dist/cli/dolt-install.js +46 -15
- package/dist/cli/fleet-se-guard.d.ts +51 -0
- package/dist/cli/fleet-se-guard.js +215 -0
- package/dist/cli/install-guard.d.ts +54 -0
- package/dist/cli/install-guard.js +132 -4
- package/dist/cli/install.d.ts +100 -11
- package/dist/cli/install.js +864 -139
- package/dist/cli/kb-commit.d.ts +2 -1
- package/dist/cli/kb-commit.js +1 -1
- package/dist/cli/kb-directives.js +2 -1
- package/dist/cli/kb-import.d.ts +2 -1
- package/dist/cli/kb-import.js +1 -1
- package/dist/cli/register-member.js +26 -5
- package/dist/cli/remove-member.d.ts +4 -0
- package/dist/cli/remove-member.js +63 -0
- package/dist/cli/secret.js +9 -0
- package/dist/cli/start.js +59 -4
- package/dist/cli/status.d.ts +3 -0
- package/dist/cli/status.js +45 -12
- package/dist/cli/stop.js +64 -9
- package/dist/cli/uninstall.js +101 -15
- package/dist/cli/update.js +33 -2
- package/dist/cli/watch.js +1 -1
- package/dist/cli/workflow.js +3 -2
- package/dist/commands/kb-server.d.ts +3 -0
- package/dist/commands/kb-server.js +52 -5
- package/dist/hub-service/http-server.d.ts +5 -1
- package/dist/hub-service/http-server.js +55 -5
- package/dist/index.js +158 -11
- package/dist/os/child-env-bound.d.ts +77 -0
- package/dist/os/child-env-bound.js +171 -0
- package/dist/os/linux.d.ts +13 -2
- package/dist/os/linux.js +75 -16
- package/dist/os/macos.d.ts +1 -1
- package/dist/os/macos.js +2 -11
- package/dist/os/os-commands.d.ts +78 -4
- package/dist/os/windows-gitbash.d.ts +6 -0
- package/dist/os/windows-gitbash.js +32 -3
- package/dist/os/windows-wrapper.d.ts +0 -4
- package/dist/os/windows-wrapper.js +2 -1
- package/dist/os/windows.d.ts +11 -2
- package/dist/os/windows.js +121 -32
- package/dist/paths.d.ts +21 -0
- package/dist/paths.js +35 -0
- package/dist/providers/agy.d.ts +120 -7
- package/dist/providers/agy.js +741 -86
- package/dist/providers/claude-permission-denial.d.ts +7 -0
- package/dist/providers/claude-permission-denial.js +137 -0
- package/dist/providers/claude.d.ts +132 -6
- package/dist/providers/claude.js +644 -48
- package/dist/providers/codex.d.ts +4 -2
- package/dist/providers/codex.js +23 -2
- package/dist/providers/copilot.d.ts +4 -2
- package/dist/providers/copilot.js +24 -2
- package/dist/providers/none.d.ts +4 -2
- package/dist/providers/none.js +17 -2
- package/dist/providers/opencode.d.ts +12 -2
- package/dist/providers/opencode.js +135 -54
- package/dist/providers/provider.d.ts +368 -35
- package/dist/providers/provider.js +219 -2
- package/dist/services/agent-provisioner.d.ts +29 -0
- package/dist/services/agent-provisioner.js +107 -0
- package/dist/services/agent-shadow.d.ts +96 -0
- package/dist/services/agent-shadow.js +479 -0
- package/dist/services/agy-project.d.ts +103 -0
- package/dist/services/agy-project.js +354 -0
- package/dist/services/auth-socket.d.ts +25 -0
- package/dist/services/auth-socket.js +72 -27
- package/dist/services/auth-web.js +2 -2
- package/dist/services/budget-awareness.d.ts +11 -11
- package/dist/services/budget-awareness.js +15 -3
- package/dist/services/claude-local-scope-mcp.d.ts +19 -0
- package/dist/services/claude-local-scope-mcp.js +91 -0
- package/dist/services/cloud/aws.js +2 -1
- package/dist/services/cloud/lifecycle.js +52 -6
- package/dist/services/cloud/task-wrapper.d.ts +0 -9
- package/dist/services/cloud/task-wrapper.js +15 -6
- package/dist/services/credential-cleanup.js +35 -17
- package/dist/services/event-loop-watchdog.d.ts +32 -0
- package/dist/services/event-loop-watchdog.js +140 -0
- package/dist/services/exit-drain.d.ts +44 -0
- package/dist/services/exit-drain.js +52 -0
- package/dist/services/github-app.js +32 -4
- package/dist/services/http-transport.d.ts +50 -1
- package/dist/services/http-transport.js +238 -25
- package/dist/services/in-flight-agents.d.ts +2 -0
- package/dist/services/in-flight-agents.js +4 -0
- package/dist/services/knowledge/bible-basis-filter.d.ts +53 -0
- package/dist/services/knowledge/bible-basis-filter.js +134 -0
- package/dist/services/knowledge/bible-blob-id.d.ts +44 -0
- package/dist/services/knowledge/bible-blob-id.js +113 -0
- package/dist/services/knowledge/bible-import.d.ts +65 -0
- package/dist/services/knowledge/bible-import.js +211 -0
- package/dist/services/knowledge/file-hash.d.ts +31 -0
- package/dist/services/knowledge/file-hash.js +153 -23
- package/dist/services/knowledge/http-provider.d.ts +4 -3
- package/dist/services/knowledge/http-provider.js +17 -5
- package/dist/services/knowledge/kb-config.d.ts +42 -0
- package/dist/services/knowledge/kb-config.js +54 -0
- package/dist/services/knowledge/kb-maintainer-grant.d.ts +15 -0
- package/dist/services/knowledge/kb-maintainer-grant.js +34 -0
- package/dist/services/knowledge/kb-providers.d.ts +11 -1
- package/dist/services/knowledge/kb-providers.js +199 -17
- package/dist/services/knowledge/kb-removed-scope-keys.d.ts +28 -0
- package/dist/services/knowledge/kb-removed-scope-keys.js +59 -0
- package/dist/services/knowledge/kb-scopes.d.ts +14 -0
- package/dist/services/knowledge/kb-scopes.js +47 -0
- package/dist/services/knowledge/kb-self.d.ts +91 -0
- package/dist/services/knowledge/kb-self.js +198 -0
- package/dist/services/knowledge/member-bible-view.d.ts +21 -0
- package/dist/services/knowledge/member-bible-view.js +194 -0
- package/dist/services/knowledge/pre-init.js +1 -0
- package/dist/services/knowledge/project-slug.js +2 -2
- package/dist/services/knowledge/require-sqlite-project.d.ts +32 -0
- package/dist/services/knowledge/require-sqlite-project.js +38 -0
- package/dist/services/knowledge/sqlite-provider.d.ts +64 -11
- package/dist/services/knowledge/sqlite-provider.js +303 -41
- package/dist/services/knowledge/types.d.ts +45 -2
- package/dist/services/member-access-secret.d.ts +70 -0
- package/dist/services/member-access-secret.js +195 -0
- package/dist/services/member-call-counts.d.ts +24 -0
- package/dist/services/member-call-counts.js +58 -0
- package/dist/services/member-config-io.d.ts +192 -0
- package/dist/services/member-config-io.js +443 -0
- package/dist/services/member-fleet-install.d.ts +710 -0
- package/dist/services/member-fleet-install.js +1895 -0
- package/dist/services/member-secret-env.d.ts +42 -0
- package/dist/services/member-secret-env.js +68 -0
- package/dist/services/member-tool-allowlist.d.ts +49 -0
- package/dist/services/member-tool-allowlist.js +111 -0
- package/dist/services/model-pricing.d.ts +19 -0
- package/dist/services/model-pricing.js +60 -10
- package/dist/services/port-holder.d.ts +86 -0
- package/dist/services/port-holder.js +351 -0
- package/dist/services/preflight-check.js +2 -0
- package/dist/services/registry.d.ts +13 -2
- package/dist/services/registry.js +27 -1
- package/dist/services/relay-strategy.d.ts +2 -0
- package/dist/services/relay-strategy.js +8 -0
- package/dist/services/secret-token.d.ts +38 -0
- package/dist/services/secret-token.js +51 -0
- package/dist/services/server-lifecycle.d.ts +26 -0
- package/dist/services/server-lifecycle.js +85 -0
- package/dist/services/service-manager/index.d.ts +7 -1
- package/dist/services/service-manager/index.js +17 -4
- package/dist/services/service-manager/linux.d.ts +1 -1
- package/dist/services/service-manager/linux.js +15 -7
- package/dist/services/service-manager/macos.d.ts +11 -1
- package/dist/services/service-manager/macos.js +45 -7
- package/dist/services/service-manager/service-path.d.ts +24 -0
- package/dist/services/service-manager/service-path.js +55 -0
- package/dist/services/service-manager/types.d.ts +39 -2
- package/dist/services/service-manager/types.js +29 -0
- package/dist/services/service-manager/windows.d.ts +194 -3
- package/dist/services/service-manager/windows.js +705 -30
- package/dist/services/service-notice.d.ts +14 -0
- package/dist/services/service-notice.js +62 -0
- package/dist/services/service-start-guard.d.ts +20 -0
- package/dist/services/service-start-guard.js +86 -0
- package/dist/services/session-cost.d.ts +24 -0
- package/dist/services/session-cost.js +105 -0
- package/dist/services/session-mcp-config.d.ts +83 -0
- package/dist/services/session-mcp-config.js +211 -0
- package/dist/services/sftp.d.ts +34 -0
- package/dist/services/sftp.js +304 -76
- package/dist/services/shell-probe.d.ts +0 -24
- package/dist/services/shell-probe.js +28 -3
- package/dist/services/singleton.d.ts +68 -2
- package/dist/services/singleton.js +168 -11
- package/dist/services/sprint-coordination.js +9 -3
- package/dist/services/ssh.d.ts +27 -0
- package/dist/services/ssh.js +287 -40
- package/dist/services/stall/find-log-file.js +12 -5
- package/dist/services/stall/index.d.ts +1 -1
- package/dist/services/stall/read-log-tail.d.ts +23 -0
- package/dist/services/stall/read-log-tail.js +53 -12
- package/dist/services/stall/stall-detector.d.ts +78 -5
- package/dist/services/stall/stall-detector.js +296 -39
- package/dist/services/stall/stall-poller.d.ts +16 -0
- package/dist/services/stall/stall-poller.js +50 -6
- package/dist/services/stopped-marker.d.ts +16 -0
- package/dist/services/stopped-marker.js +55 -0
- package/dist/services/strategy.d.ts +33 -1
- package/dist/services/strategy.js +165 -19
- package/dist/services/substitution-engine.js +2 -2
- package/dist/services/supervisor-service-cleanup.d.ts +52 -0
- package/dist/services/supervisor-service-cleanup.js +332 -0
- package/dist/services/tool-registry.d.ts +8 -1
- package/dist/services/tool-registry.js +164 -61
- package/dist/services/tool-scope.d.ts +58 -0
- package/dist/services/tool-scope.js +99 -0
- package/dist/services/vcs/azure-devops.d.ts +66 -1
- package/dist/services/vcs/azure-devops.js +192 -21
- package/dist/services/vcs/types.d.ts +1 -1
- package/dist/services/watch/project-resolver.js +1 -0
- package/dist/skills/auto-sprint-args/SKILL.md +2 -2
- package/dist/skills/fleet-sprint-cli/SKILL.md +48 -6
- package/dist/skills/pm/SKILL.md +4 -4
- package/dist/skills/pm/cost.md +0 -3
- package/dist/skills/pm/fleet-addendum.md +2 -2
- package/dist/skills/pm/index.md +4 -2
- package/dist/skills/pm/kb-reconcile.md +29 -14
- package/dist/skills/pm/kb-review.md +1 -0
- package/dist/skills/pm/sprint.md +5 -5
- package/dist/tools/check-status.d.ts +60 -9
- package/dist/tools/check-status.js +211 -52
- package/dist/tools/child-id-allocator.d.ts +2 -2
- package/dist/tools/child-id-allocator.js +1 -1
- package/dist/tools/code-index-heal.d.ts +8 -0
- package/dist/tools/code-index-heal.js +21 -0
- package/dist/tools/code-index-state.d.ts +45 -0
- package/dist/tools/code-index-state.js +115 -0
- package/dist/tools/code-intelligence-codebase-memory.js +6 -33
- package/dist/tools/code-intelligence-freshness.js +1 -1
- package/dist/tools/code-intelligence-gitnexus.d.ts +30 -0
- package/dist/tools/code-intelligence-gitnexus.js +333 -57
- package/dist/tools/code-intelligence-kb-enrich.js +7 -6
- package/dist/tools/code-intelligence-readiness.d.ts +99 -0
- package/dist/tools/code-intelligence-readiness.js +206 -0
- package/dist/tools/code-intelligence-reindex.d.ts +195 -0
- package/dist/tools/code-intelligence-reindex.js +530 -50
- package/dist/tools/code-intelligence-telemetry.d.ts +6 -1
- package/dist/tools/code-intelligence-telemetry.js +12 -3
- package/dist/tools/code-intelligence.d.ts +81 -31
- package/dist/tools/code-intelligence.js +156 -52
- package/dist/tools/compose-permissions.d.ts +63 -2
- package/dist/tools/compose-permissions.js +673 -72
- package/dist/tools/credential-store-set.js +1 -1
- package/dist/tools/execute-command.d.ts +11 -0
- package/dist/tools/execute-command.js +111 -32
- package/dist/tools/execute-prompt.d.ts +69 -12
- package/dist/tools/execute-prompt.js +1610 -895
- package/dist/tools/kb-bible-commit.d.ts +65 -0
- package/dist/tools/kb-bible-commit.js +239 -0
- package/dist/tools/kb-capture.d.ts +15 -11
- package/dist/tools/kb-capture.js +71 -16
- package/dist/tools/kb-context.d.ts +27 -7
- package/dist/tools/kb-context.js +60 -9
- package/dist/tools/kb-export.d.ts +98 -9
- package/dist/tools/kb-export.js +230 -92
- package/dist/tools/kb-feedback.d.ts +13 -9
- package/dist/tools/kb-feedback.js +16 -8
- package/dist/tools/kb-freshness-sweep.d.ts +11 -7
- package/dist/tools/kb-freshness-sweep.js +10 -8
- package/dist/tools/kb-harvest.d.ts +11 -7
- package/dist/tools/kb-harvest.js +7 -7
- package/dist/tools/kb-import.d.ts +26 -10
- package/dist/tools/kb-import.js +170 -159
- package/dist/tools/kb-invalidate.d.ts +17 -10
- package/dist/tools/kb-invalidate.js +41 -8
- package/dist/tools/kb-list.d.ts +14 -10
- package/dist/tools/kb-list.js +33 -11
- package/dist/tools/kb-promote.d.ts +11 -7
- package/dist/tools/kb-promote.js +14 -8
- package/dist/tools/kb-query.d.ts +21 -11
- package/dist/tools/kb-query.js +76 -13
- package/dist/tools/kb-reconcile-prefilter.d.ts +11 -7
- package/dist/tools/kb-reconcile-prefilter.js +13 -9
- package/dist/tools/kb-resolve-contradiction.d.ts +11 -7
- package/dist/tools/kb-resolve-contradiction.js +10 -8
- package/dist/tools/kb-session-prime.d.ts +14 -7
- package/dist/tools/kb-session-prime.js +44 -44
- package/dist/tools/kb-setup.d.ts +11 -4
- package/dist/tools/kb-setup.js +146 -27
- package/dist/tools/kb-stats.d.ts +11 -10
- package/dist/tools/kb-stats.js +84 -82
- package/dist/tools/list-members.d.ts +2 -2
- package/dist/tools/list-members.js +6 -2
- package/dist/tools/member-detail.d.ts +5 -2
- package/dist/tools/member-detail.js +105 -17
- package/dist/tools/member-reservation.d.ts +60 -3
- package/dist/tools/member-reservation.js +61 -20
- package/dist/tools/provision-auth.d.ts +118 -1
- package/dist/tools/provision-auth.js +402 -92
- package/dist/tools/provision-vcs-auth.d.ts +93 -3
- package/dist/tools/provision-vcs-auth.js +209 -49
- package/dist/tools/receive-files.js +3 -1
- package/dist/tools/register-member.d.ts +44 -15
- package/dist/tools/register-member.js +175 -70
- package/dist/tools/remove-member.js +118 -15
- package/dist/tools/send-email.d.ts +2 -2
- package/dist/tools/send-files.js +6 -4
- package/dist/tools/session-stats.d.ts +17 -0
- package/dist/tools/session-stats.js +27 -0
- package/dist/tools/setup-git-app.js +11 -7
- package/dist/tools/shutdown-server.d.ts +2 -0
- package/dist/tools/shutdown-server.js +28 -1
- package/dist/tools/update-agent-cli.d.ts +19 -0
- package/dist/tools/update-agent-cli.js +59 -2
- package/dist/tools/update-member.d.ts +23 -17
- package/dist/tools/update-member.js +181 -18
- package/dist/tools/vcs-credential-exec.d.ts +127 -0
- package/dist/tools/vcs-credential-exec.js +203 -0
- package/dist/types.d.ts +111 -1
- package/dist/utils/agent-helpers.js +2 -0
- package/dist/utils/auth-env.d.ts +15 -4
- package/dist/utils/auth-env.js +52 -23
- package/dist/utils/find-on-path.d.ts +37 -0
- package/dist/utils/find-on-path.js +85 -0
- package/dist/utils/log-helpers.d.ts +37 -0
- package/dist/utils/log-helpers.js +108 -22
- package/dist/utils/owner-only-fs.d.ts +56 -0
- package/dist/utils/owner-only-fs.js +98 -0
- package/dist/utils/process-utils.d.ts +28 -0
- package/dist/utils/process-utils.js +68 -0
- package/dist/utils/prompt-errors.js +11 -2
- package/dist/utils/session-caller.d.ts +4 -2
- package/dist/utils/session-caller.js +3 -2
- package/dist/utils/shell-escape.d.ts +58 -3
- package/dist/utils/shell-escape.js +91 -5
- package/dist/utils/ssh-error-messages.js +3 -0
- package/dist/utils/vcs-provider-detect.d.ts +65 -0
- package/dist/utils/vcs-provider-detect.js +109 -0
- package/dist/utils/workspace-trust.d.ts +26 -0
- package/dist/utils/workspace-trust.js +91 -1
- package/dist/workflows/auto-sprint.js +397 -56
- package/package.json +15 -10
- package/packages/apra-fleet-client/package.json +2 -2
- package/packages/apra-fleet-client/src/client/api.mjs +864 -31
- package/packages/apra-fleet-client/src/client/auto-start.mjs +434 -0
- package/packages/apra-fleet-client/src/client/client.mjs +9 -0
- package/packages/apra-fleet-client/src/client/errors.mjs +6 -2
- package/packages/apra-fleet-client/src/client/factory.mjs +23 -4
- package/packages/apra-fleet-client/src/client/reconnecting-transport.mjs +137 -0
- package/packages/apra-fleet-client/src/client/server-resolution.mjs +267 -30
- package/packages/apra-fleet-client/src/client/transport.mjs +37 -3
- 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 +87 -14
- package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +35 -9
- package/packages/apra-fleet-se/apra-pm/agents/deployer.md +63 -11
- package/packages/apra-fleet-se/apra-pm/agents/doer.md +99 -41
- package/packages/apra-fleet-se/apra-pm/agents/harvester.md +47 -27
- package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +38 -10
- package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +37 -7
- package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +145 -32
- package/packages/apra-fleet-se/apra-pm/agents/planner.md +180 -69
- package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +98 -64
- package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +117 -45
- package/packages/apra-fleet-se/apra-pm/agents/schemas/backlog-groomer-output.json +1 -1
- package/packages/apra-fleet-se/apra-pm/agents/schemas/doer-output.json +32 -0
- package/packages/apra-fleet-se/apra-pm/agents/schemas/harvester-input.json +1 -5
- package/packages/apra-fleet-se/apra-pm/agents/schemas/plan-reviewer-output.json +37 -0
- package/packages/apra-fleet-se/apra-pm/agents/schemas/planner-output.json +1 -1
- package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +41 -7
- package/packages/apra-fleet-se/apra-pm/agents/schemas/reviewer-output.json +62 -3
- package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +4 -4
- 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/apra-pm/skills/pm/index.md +4 -2
- package/packages/apra-fleet-se/apra-pm/skills/pm/kb-reconcile.md +29 -14
- package/packages/apra-fleet-se/apra-pm/skills/pm/kb-review.md +1 -0
- package/packages/apra-fleet-se/apra-pm/skills/pm/sprint.md +5 -5
- package/packages/apra-fleet-se/bin/cli.mjs +326 -48
- package/packages/apra-fleet-se/bin/serve.mjs +218 -11
- package/packages/apra-fleet-se/fleet-sprint/abort.mjs +517 -0
- package/packages/apra-fleet-se/fleet-sprint/backlog-role.mjs +93 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-children.mjs +646 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-identity-check.mjs +825 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-identity.mjs +217 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-memory-hygiene.mjs +201 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-scope.mjs +745 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-transitions.mjs +447 -0
- package/packages/apra-fleet-se/fleet-sprint/branch-ensure.mjs +96 -0
- package/packages/apra-fleet-se/fleet-sprint/ci-gate.mjs +353 -0
- package/packages/apra-fleet-se/fleet-sprint/conflict-ladder.mjs +20 -0
- package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +121 -15
- package/packages/apra-fleet-se/fleet-sprint/coordination.mjs +539 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-accounting.mjs +270 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-failure.mjs +204 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-role.mjs +1310 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-safety-guard.mjs +216 -4
- package/packages/apra-fleet-se/fleet-sprint/docs/README.md +53 -15
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +281 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +1 -1
- package/packages/apra-fleet-se/fleet-sprint/docs/fleet-sprint-diagram.md +3 -3
- 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 +1327 -44
- package/packages/apra-fleet-se/fleet-sprint/errors.mjs +470 -4
- 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 +747 -0
- package/packages/apra-fleet-se/fleet-sprint/git-topology.mjs +543 -0
- package/packages/apra-fleet-se/fleet-sprint/guarded-modules.mjs +613 -0
- package/packages/apra-fleet-se/fleet-sprint/inline-ladder-guard.mjs +216 -0
- package/packages/apra-fleet-se/fleet-sprint/kb-hints.mjs +181 -0
- package/packages/apra-fleet-se/fleet-sprint/kb-injection.mjs +64 -0
- package/packages/apra-fleet-se/fleet-sprint/kb-maintainer.mjs +298 -0
- package/packages/apra-fleet-se/fleet-sprint/kb.mjs +1684 -0
- package/packages/apra-fleet-se/fleet-sprint/lower-quality.mjs +39 -0
- package/packages/apra-fleet-se/fleet-sprint/mcp-result.mjs +75 -0
- package/packages/apra-fleet-se/fleet-sprint/member-align.mjs +391 -0
- package/packages/apra-fleet-se/fleet-sprint/member-call.mjs +374 -0
- package/packages/apra-fleet-se/fleet-sprint/member-init-probe.mjs +644 -0
- package/packages/apra-fleet-se/fleet-sprint/member-provisioning.mjs +699 -0
- package/packages/apra-fleet-se/fleet-sprint/member-sync.mjs +802 -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/orphan-reclaim.mjs +153 -0
- package/packages/apra-fleet-se/fleet-sprint/parent-notes-staleness.mjs +201 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/deploy.mjs +218 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/develop.mjs +869 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/ensure-sprint-branch.mjs +295 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/final-review.mjs +466 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/harvest.mjs +212 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/integ-test.mjs +358 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/plan.mjs +395 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/publish-pr.mjs +345 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/re-review.mjs +264 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/regression-test.mjs +179 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/replan.mjs +230 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/review.mjs +365 -0
- package/packages/apra-fleet-se/fleet-sprint/pr-body.mjs +259 -0
- package/packages/apra-fleet-se/fleet-sprint/prompts.mjs +617 -0
- package/packages/apra-fleet-se/fleet-sprint/role-policies.mjs +1434 -0
- package/packages/apra-fleet-se/fleet-sprint/round-session.mjs +100 -0
- package/packages/apra-fleet-se/fleet-sprint/runner.js +2289 -9928
- package/packages/apra-fleet-se/fleet-sprint/se-os-commands.mjs +24 -0
- package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +147 -12
- package/packages/apra-fleet-se/fleet-sprint/se-windows.mjs +111 -0
- package/packages/apra-fleet-se/fleet-sprint/shell-command-guard.mjs +347 -0
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +48 -6
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +98 -25
- package/packages/apra-fleet-se/fleet-sprint/sprint-args.mjs +590 -0
- package/packages/apra-fleet-se/fleet-sprint/sprint-report.mjs +339 -0
- package/packages/apra-fleet-se/fleet-sprint/sprint-state.mjs +185 -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 +218 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-auth.mjs +1445 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +284 -23
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +170 -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 +354 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +189 -16
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +9 -4
- package/packages/apra-fleet-se/fleet-sprint/verify-block.mjs +152 -0
- package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +311 -22
- package/packages/apra-fleet-se/fleet-sprint/worklists.mjs +559 -0
- package/packages/apra-fleet-se/package.json +2 -2
- package/packages/apra-fleet-se/src/supervisor/api.mjs +919 -0
- package/packages/apra-fleet-se/src/supervisor/backlog-member.mjs +332 -0
- package/packages/apra-fleet-se/src/supervisor/backlog.mjs +982 -0
- package/packages/apra-fleet-se/src/supervisor/beads-identity.mjs +246 -0
- package/packages/apra-fleet-se/src/supervisor/beads-view.mjs +438 -0
- package/packages/apra-fleet-se/src/supervisor/child-port.mjs +36 -0
- package/packages/apra-fleet-se/src/supervisor/dashboard.mjs +1659 -0
- package/packages/apra-fleet-se/src/supervisor/dolt-mutex.mjs +350 -0
- package/packages/apra-fleet-se/src/supervisor/dolt-orphan-sweep.mjs +338 -0
- package/packages/apra-fleet-se/src/supervisor/fleet-members.mjs +279 -0
- package/packages/apra-fleet-se/src/supervisor/history-view.mjs +276 -0
- package/packages/apra-fleet-se/src/supervisor/history.mjs +328 -0
- package/packages/apra-fleet-se/src/supervisor/id-allocator.mjs +521 -0
- package/packages/apra-fleet-se/src/supervisor/launch-form.mjs +444 -0
- package/packages/apra-fleet-se/src/supervisor/ledger.mjs +629 -0
- package/packages/apra-fleet-se/src/supervisor/lib/exec-bd.mjs +303 -0
- package/packages/apra-fleet-se/src/supervisor/log-timestamp.mjs +51 -0
- package/packages/apra-fleet-se/src/supervisor/log-view.mjs +159 -0
- package/packages/apra-fleet-se/src/supervisor/proxy.mjs +474 -0
- package/packages/apra-fleet-se/src/supervisor/readopt.mjs +136 -0
- package/packages/apra-fleet-se/src/supervisor/reconcile.mjs +263 -0
- package/packages/apra-fleet-se/src/supervisor/rename-with-retry.mjs +87 -0
- package/packages/apra-fleet-se/src/supervisor/scope-overlap.mjs +327 -0
- package/packages/apra-fleet-se/src/supervisor/self-log.mjs +133 -0
- package/packages/apra-fleet-se/src/supervisor/server.mjs +399 -0
- package/packages/apra-fleet-se/src/supervisor/spawner.mjs +542 -0
- package/packages/apra-fleet-se/src/supervisor/sprint-identity.mjs +96 -0
- package/packages/apra-fleet-se/src/supervisor/watchdog.mjs +987 -0
- package/packages/apra-fleet-workflow/package.json +1 -1
- package/packages/apra-fleet-workflow/src/viewer/index.mjs +81 -15
- package/packages/apra-fleet-workflow/src/viewer/run-summary.mjs +127 -0
- package/packages/apra-fleet-workflow/src/workflow/index.mjs +118 -10
- package/packages/apra-fleet-workflow/src/workflow/pricing.mjs +75 -25
- 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 +14 -1
- package/skills/fleet/profiles/node.json +1 -1
- package/skills/fleet/profiles/tag-kb-reconciler.json +2 -6
- package/skills/fleet/troubleshooting.md +3 -3
- package/version.json +1 -1
- package/dist/cli/agent-transform.d.ts.map +0 -1
- package/dist/cli/agent-transform.js.map +0 -1
- package/dist/cli/auth.d.ts.map +0 -1
- package/dist/cli/auth.js.map +0 -1
- package/dist/cli/config.d.ts.map +0 -1
- package/dist/cli/config.js.map +0 -1
- package/dist/cli/dolt-install.d.ts.map +0 -1
- package/dist/cli/dolt-install.js.map +0 -1
- package/dist/cli/install-guard.d.ts.map +0 -1
- package/dist/cli/install-guard.js.map +0 -1
- package/dist/cli/install.d.ts.map +0 -1
- package/dist/cli/install.js.map +0 -1
- package/dist/cli/join.d.ts.map +0 -1
- package/dist/cli/join.js.map +0 -1
- package/dist/cli/kb-commit.d.ts.map +0 -1
- package/dist/cli/kb-commit.js.map +0 -1
- package/dist/cli/kb-directives.d.ts.map +0 -1
- package/dist/cli/kb-directives.js.map +0 -1
- package/dist/cli/kb-import.d.ts.map +0 -1
- package/dist/cli/kb-import.js.map +0 -1
- package/dist/cli/register-member.d.ts.map +0 -1
- package/dist/cli/register-member.js.map +0 -1
- package/dist/cli/restart.d.ts.map +0 -1
- package/dist/cli/restart.js.map +0 -1
- package/dist/cli/secret.d.ts.map +0 -1
- package/dist/cli/secret.js.map +0 -1
- package/dist/cli/spoke.d.ts.map +0 -1
- package/dist/cli/spoke.js.map +0 -1
- package/dist/cli/start.d.ts.map +0 -1
- package/dist/cli/start.js.map +0 -1
- package/dist/cli/status.d.ts.map +0 -1
- package/dist/cli/status.js.map +0 -1
- package/dist/cli/stop.d.ts.map +0 -1
- package/dist/cli/stop.js.map +0 -1
- package/dist/cli/uninstall.d.ts.map +0 -1
- package/dist/cli/uninstall.js.map +0 -1
- package/dist/cli/update.d.ts.map +0 -1
- package/dist/cli/update.js.map +0 -1
- package/dist/cli/watch.d.ts.map +0 -1
- package/dist/cli/watch.js.map +0 -1
- package/dist/cli/workflow-assets.d.ts.map +0 -1
- package/dist/cli/workflow-assets.js.map +0 -1
- package/dist/cli/workflow.d.ts.map +0 -1
- package/dist/cli/workflow.js.map +0 -1
- package/dist/commands/kb-server.d.ts.map +0 -1
- package/dist/commands/kb-server.js.map +0 -1
- package/dist/delivery-mode.d.ts.map +0 -1
- package/dist/delivery-mode.js.map +0 -1
- package/dist/hub-service/activity.d.ts.map +0 -1
- package/dist/hub-service/activity.js.map +0 -1
- package/dist/hub-service/audit-log.d.ts.map +0 -1
- package/dist/hub-service/audit-log.js.map +0 -1
- package/dist/hub-service/db/pool.d.ts.map +0 -1
- package/dist/hub-service/db/pool.js.map +0 -1
- package/dist/hub-service/enrollment.d.ts.map +0 -1
- package/dist/hub-service/enrollment.js.map +0 -1
- package/dist/hub-service/envelope-routes.d.ts.map +0 -1
- package/dist/hub-service/envelope-routes.js.map +0 -1
- package/dist/hub-service/handlers/installers.d.ts.map +0 -1
- package/dist/hub-service/handlers/installers.js.map +0 -1
- package/dist/hub-service/http-server.d.ts.map +0 -1
- package/dist/hub-service/http-server.js.map +0 -1
- package/dist/hub-service/hub-jwt.d.ts.map +0 -1
- package/dist/hub-service/hub-jwt.js.map +0 -1
- package/dist/hub-service/jwt-revocation.d.ts.map +0 -1
- package/dist/hub-service/jwt-revocation.js.map +0 -1
- package/dist/hub-service/machines.d.ts.map +0 -1
- package/dist/hub-service/machines.js.map +0 -1
- package/dist/hub-service/main.d.ts.map +0 -1
- package/dist/hub-service/main.js.map +0 -1
- package/dist/hub-service/member-tokens.d.ts.map +0 -1
- package/dist/hub-service/member-tokens.js.map +0 -1
- package/dist/hub-service/member-view.d.ts.map +0 -1
- package/dist/hub-service/member-view.js.map +0 -1
- package/dist/hub-service/members.d.ts.map +0 -1
- package/dist/hub-service/members.js.map +0 -1
- package/dist/hub-service/presence.d.ts.map +0 -1
- package/dist/hub-service/presence.js.map +0 -1
- package/dist/hub-service/project-view.d.ts.map +0 -1
- package/dist/hub-service/project-view.js.map +0 -1
- package/dist/hub-service/projects.d.ts.map +0 -1
- package/dist/hub-service/projects.js.map +0 -1
- package/dist/hub-service/relay-queue.d.ts.map +0 -1
- package/dist/hub-service/relay-queue.js.map +0 -1
- package/dist/hub-service/session-jwt.d.ts.map +0 -1
- package/dist/hub-service/session-jwt.js.map +0 -1
- package/dist/hub-service/usage.d.ts.map +0 -1
- package/dist/hub-service/usage.js.map +0 -1
- package/dist/hub-service/users.d.ts.map +0 -1
- package/dist/hub-service/users.js.map +0 -1
- package/dist/hub-service/workspaces.d.ts.map +0 -1
- package/dist/hub-service/workspaces.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/onboarding/text.d.ts.map +0 -1
- package/dist/onboarding/text.js.map +0 -1
- package/dist/os/git-bash-candidates.d.ts.map +0 -1
- package/dist/os/git-bash-candidates.js.map +0 -1
- package/dist/os/index.d.ts.map +0 -1
- package/dist/os/index.js.map +0 -1
- package/dist/os/linux.d.ts.map +0 -1
- package/dist/os/linux.js.map +0 -1
- package/dist/os/macos.d.ts.map +0 -1
- package/dist/os/macos.js.map +0 -1
- package/dist/os/os-commands.d.ts.map +0 -1
- package/dist/os/os-commands.js.map +0 -1
- package/dist/os/windows-gitbash.d.ts.map +0 -1
- package/dist/os/windows-gitbash.js.map +0 -1
- package/dist/os/windows-wrapper.d.ts.map +0 -1
- package/dist/os/windows-wrapper.js.map +0 -1
- package/dist/os/windows.d.ts.map +0 -1
- package/dist/os/windows.js.map +0 -1
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/providers/agy.d.ts.map +0 -1
- package/dist/providers/agy.js.map +0 -1
- package/dist/providers/claude.d.ts.map +0 -1
- package/dist/providers/claude.js.map +0 -1
- package/dist/providers/codex.d.ts.map +0 -1
- package/dist/providers/codex.js.map +0 -1
- package/dist/providers/copilot.d.ts.map +0 -1
- package/dist/providers/copilot.js.map +0 -1
- package/dist/providers/email/headers.d.ts.map +0 -1
- package/dist/providers/email/headers.js.map +0 -1
- package/dist/providers/email/index.d.ts.map +0 -1
- package/dist/providers/email/index.js.map +0 -1
- package/dist/providers/email/provider.d.ts.map +0 -1
- package/dist/providers/email/provider.js.map +0 -1
- package/dist/providers/email/sendgrid.d.ts.map +0 -1
- package/dist/providers/email/sendgrid.js.map +0 -1
- package/dist/providers/email/smtp.d.ts.map +0 -1
- package/dist/providers/email/smtp.js.map +0 -1
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/none.d.ts.map +0 -1
- package/dist/providers/none.js.map +0 -1
- package/dist/providers/opencode.d.ts.map +0 -1
- package/dist/providers/opencode.js.map +0 -1
- package/dist/providers/provider.d.ts.map +0 -1
- package/dist/providers/provider.js.map +0 -1
- package/dist/services/agent-provisioner.d.ts.map +0 -1
- package/dist/services/agent-provisioner.js.map +0 -1
- package/dist/services/auth-socket.d.ts.map +0 -1
- package/dist/services/auth-socket.js.map +0 -1
- package/dist/services/auth-web.d.ts.map +0 -1
- package/dist/services/auth-web.js.map +0 -1
- package/dist/services/budget-awareness.d.ts.map +0 -1
- package/dist/services/budget-awareness.js.map +0 -1
- package/dist/services/cloud/activity.d.ts.map +0 -1
- package/dist/services/cloud/activity.js.map +0 -1
- package/dist/services/cloud/aws.d.ts.map +0 -1
- package/dist/services/cloud/aws.js.map +0 -1
- package/dist/services/cloud/cost.d.ts.map +0 -1
- package/dist/services/cloud/cost.js.map +0 -1
- package/dist/services/cloud/idle-manager.d.ts.map +0 -1
- package/dist/services/cloud/idle-manager.js.map +0 -1
- package/dist/services/cloud/lifecycle.d.ts.map +0 -1
- package/dist/services/cloud/lifecycle.js.map +0 -1
- package/dist/services/cloud/task-wrapper.d.ts.map +0 -1
- package/dist/services/cloud/task-wrapper.js.map +0 -1
- package/dist/services/cloud/types.d.ts.map +0 -1
- package/dist/services/cloud/types.js.map +0 -1
- package/dist/services/cloud-sync.d.ts.map +0 -1
- package/dist/services/cloud-sync.js.map +0 -1
- package/dist/services/context-admission.d.ts.map +0 -1
- package/dist/services/context-admission.js.map +0 -1
- package/dist/services/credential-cleanup.d.ts.map +0 -1
- package/dist/services/credential-cleanup.js.map +0 -1
- package/dist/services/credential-store.d.ts.map +0 -1
- package/dist/services/credential-store.js.map +0 -1
- package/dist/services/event-bus.d.ts.map +0 -1
- package/dist/services/event-bus.js.map +0 -1
- package/dist/services/file-chunker.d.ts.map +0 -1
- package/dist/services/file-chunker.js.map +0 -1
- package/dist/services/file-transfer-relay.d.ts.map +0 -1
- package/dist/services/file-transfer-relay.js.map +0 -1
- package/dist/services/file-transfer.d.ts.map +0 -1
- package/dist/services/file-transfer.js.map +0 -1
- package/dist/services/git-config.d.ts.map +0 -1
- package/dist/services/git-config.js.map +0 -1
- package/dist/services/github-app.d.ts.map +0 -1
- package/dist/services/github-app.js.map +0 -1
- package/dist/services/http-transport.d.ts.map +0 -1
- package/dist/services/http-transport.js.map +0 -1
- package/dist/services/hub-client.d.ts.map +0 -1
- package/dist/services/hub-client.js.map +0 -1
- package/dist/services/icons.d.ts.map +0 -1
- package/dist/services/icons.js.map +0 -1
- package/dist/services/jwt.d.ts.map +0 -1
- package/dist/services/jwt.js.map +0 -1
- package/dist/services/knowledge/audn.d.ts.map +0 -1
- package/dist/services/knowledge/audn.js.map +0 -1
- package/dist/services/knowledge/file-hash.d.ts.map +0 -1
- package/dist/services/knowledge/file-hash.js.map +0 -1
- package/dist/services/knowledge/http-provider.d.ts.map +0 -1
- package/dist/services/knowledge/http-provider.js.map +0 -1
- package/dist/services/knowledge/kb-providers.d.ts.map +0 -1
- package/dist/services/knowledge/kb-providers.js.map +0 -1
- package/dist/services/knowledge/kb-scope-input.d.ts +0 -5
- package/dist/services/knowledge/kb-scope-input.d.ts.map +0 -1
- package/dist/services/knowledge/kb-scope-input.js +0 -11
- package/dist/services/knowledge/kb-scope-input.js.map +0 -1
- package/dist/services/knowledge/kb-service.d.ts.map +0 -1
- package/dist/services/knowledge/kb-service.js.map +0 -1
- package/dist/services/knowledge/path-validation.d.ts.map +0 -1
- package/dist/services/knowledge/path-validation.js.map +0 -1
- package/dist/services/knowledge/pre-init.d.ts.map +0 -1
- package/dist/services/knowledge/pre-init.js.map +0 -1
- package/dist/services/knowledge/project-slug.d.ts.map +0 -1
- package/dist/services/knowledge/project-slug.js.map +0 -1
- package/dist/services/knowledge/sqlite-provider.d.ts.map +0 -1
- package/dist/services/knowledge/sqlite-provider.js.map +0 -1
- package/dist/services/knowledge/types.d.ts.map +0 -1
- package/dist/services/knowledge/types.js.map +0 -1
- package/dist/services/known-hosts.d.ts.map +0 -1
- package/dist/services/known-hosts.js.map +0 -1
- package/dist/services/known-sessions.d.ts.map +0 -1
- package/dist/services/known-sessions.js.map +0 -1
- package/dist/services/member-home.d.ts.map +0 -1
- package/dist/services/member-home.js.map +0 -1
- package/dist/services/member-remote-url.d.ts.map +0 -1
- package/dist/services/member-remote-url.js.map +0 -1
- package/dist/services/model-pricing.d.ts.map +0 -1
- package/dist/services/model-pricing.js.map +0 -1
- package/dist/services/onboarding.d.ts.map +0 -1
- package/dist/services/onboarding.js.map +0 -1
- package/dist/services/orphan-recovery.d.ts.map +0 -1
- package/dist/services/orphan-recovery.js.map +0 -1
- package/dist/services/pending-responses.d.ts.map +0 -1
- package/dist/services/pending-responses.js.map +0 -1
- package/dist/services/preflight-check.d.ts.map +0 -1
- package/dist/services/preflight-check.js.map +0 -1
- package/dist/services/registry.d.ts.map +0 -1
- package/dist/services/registry.js.map +0 -1
- package/dist/services/relay-context.d.ts.map +0 -1
- package/dist/services/relay-context.js.map +0 -1
- package/dist/services/relay-executor.d.ts.map +0 -1
- package/dist/services/relay-executor.js.map +0 -1
- package/dist/services/relay-request.d.ts.map +0 -1
- package/dist/services/relay-request.js.map +0 -1
- package/dist/services/relay-strategy.d.ts.map +0 -1
- package/dist/services/relay-strategy.js.map +0 -1
- package/dist/services/service-manager/index.d.ts.map +0 -1
- package/dist/services/service-manager/index.js.map +0 -1
- package/dist/services/service-manager/linux.d.ts.map +0 -1
- package/dist/services/service-manager/linux.js.map +0 -1
- package/dist/services/service-manager/macos.d.ts.map +0 -1
- package/dist/services/service-manager/macos.js.map +0 -1
- package/dist/services/service-manager/types.d.ts.map +0 -1
- package/dist/services/service-manager/types.js.map +0 -1
- package/dist/services/service-manager/windows.d.ts.map +0 -1
- package/dist/services/service-manager/windows.js.map +0 -1
- package/dist/services/session-registry.d.ts.map +0 -1
- package/dist/services/session-registry.js.map +0 -1
- package/dist/services/sftp.d.ts.map +0 -1
- package/dist/services/sftp.js.map +0 -1
- package/dist/services/shell-probe.d.ts.map +0 -1
- package/dist/services/shell-probe.js.map +0 -1
- package/dist/services/singleton.d.ts.map +0 -1
- package/dist/services/singleton.js.map +0 -1
- package/dist/services/sprint-coordination.d.ts.map +0 -1
- package/dist/services/sprint-coordination.js.map +0 -1
- package/dist/services/ssh.d.ts.map +0 -1
- package/dist/services/ssh.js.map +0 -1
- package/dist/services/stall/find-log-file.d.ts.map +0 -1
- package/dist/services/stall/find-log-file.js.map +0 -1
- package/dist/services/stall/index.d.ts.map +0 -1
- package/dist/services/stall/index.js.map +0 -1
- package/dist/services/stall/log-path-resolver.d.ts.map +0 -1
- package/dist/services/stall/log-path-resolver.js.map +0 -1
- package/dist/services/stall/read-log-tail.d.ts.map +0 -1
- package/dist/services/stall/read-log-tail.js.map +0 -1
- package/dist/services/stall/stall-detector.d.ts.map +0 -1
- package/dist/services/stall/stall-detector.js.map +0 -1
- package/dist/services/stall/stall-poller.d.ts.map +0 -1
- package/dist/services/stall/stall-poller.js.map +0 -1
- package/dist/services/stall/time-utils.d.ts.map +0 -1
- package/dist/services/stall/time-utils.js.map +0 -1
- package/dist/services/statusline.d.ts.map +0 -1
- package/dist/services/statusline.js.map +0 -1
- package/dist/services/strategy.d.ts.map +0 -1
- package/dist/services/strategy.js.map +0 -1
- package/dist/services/substitution-engine.d.ts.map +0 -1
- package/dist/services/substitution-engine.js.map +0 -1
- package/dist/services/task-cleanup.d.ts.map +0 -1
- package/dist/services/task-cleanup.js.map +0 -1
- package/dist/services/token-issuer.d.ts.map +0 -1
- package/dist/services/token-issuer.js.map +0 -1
- package/dist/services/tool-registry.d.ts.map +0 -1
- package/dist/services/tool-registry.js.map +0 -1
- package/dist/services/update-check.d.ts.map +0 -1
- package/dist/services/update-check.js.map +0 -1
- package/dist/services/user-config.d.ts.map +0 -1
- package/dist/services/user-config.js.map +0 -1
- package/dist/services/vcs/azure-devops.d.ts.map +0 -1
- package/dist/services/vcs/azure-devops.js.map +0 -1
- package/dist/services/vcs/bitbucket.d.ts.map +0 -1
- package/dist/services/vcs/bitbucket.js.map +0 -1
- package/dist/services/vcs/constants.d.ts.map +0 -1
- package/dist/services/vcs/constants.js.map +0 -1
- package/dist/services/vcs/github.d.ts.map +0 -1
- package/dist/services/vcs/github.js.map +0 -1
- package/dist/services/vcs/types.d.ts.map +0 -1
- package/dist/services/vcs/types.js.map +0 -1
- package/dist/services/version-check.d.ts.map +0 -1
- package/dist/services/version-check.js.map +0 -1
- package/dist/services/watch/fleet-log.d.ts.map +0 -1
- package/dist/services/watch/fleet-log.js.map +0 -1
- package/dist/services/watch/project-resolver.d.ts.map +0 -1
- package/dist/services/watch/project-resolver.js.map +0 -1
- package/dist/services/watch/transcript-formatter.d.ts.map +0 -1
- package/dist/services/watch/transcript-formatter.js.map +0 -1
- package/dist/smoke-test.d.ts.map +0 -1
- package/dist/smoke-test.js.map +0 -1
- package/dist/tools/check-status.d.ts.map +0 -1
- package/dist/tools/check-status.js.map +0 -1
- package/dist/tools/child-id-allocator.d.ts.map +0 -1
- package/dist/tools/child-id-allocator.js.map +0 -1
- package/dist/tools/cloud-control.d.ts.map +0 -1
- package/dist/tools/cloud-control.js.map +0 -1
- package/dist/tools/code-intelligence-codebase-memory.d.ts.map +0 -1
- package/dist/tools/code-intelligence-codebase-memory.js.map +0 -1
- package/dist/tools/code-intelligence-freshness.d.ts.map +0 -1
- package/dist/tools/code-intelligence-freshness.js.map +0 -1
- package/dist/tools/code-intelligence-gitnexus.d.ts.map +0 -1
- package/dist/tools/code-intelligence-gitnexus.js.map +0 -1
- package/dist/tools/code-intelligence-kb-enrich.d.ts.map +0 -1
- package/dist/tools/code-intelligence-kb-enrich.js.map +0 -1
- package/dist/tools/code-intelligence-reindex.d.ts.map +0 -1
- package/dist/tools/code-intelligence-reindex.js.map +0 -1
- package/dist/tools/code-intelligence-telemetry.d.ts.map +0 -1
- package/dist/tools/code-intelligence-telemetry.js.map +0 -1
- package/dist/tools/code-intelligence-tests.d.ts.map +0 -1
- package/dist/tools/code-intelligence-tests.js.map +0 -1
- package/dist/tools/code-intelligence.d.ts.map +0 -1
- package/dist/tools/code-intelligence.js.map +0 -1
- package/dist/tools/compose-permissions.d.ts.map +0 -1
- package/dist/tools/compose-permissions.js.map +0 -1
- package/dist/tools/credential-store-delete.d.ts.map +0 -1
- package/dist/tools/credential-store-delete.js.map +0 -1
- package/dist/tools/credential-store-list.d.ts.map +0 -1
- package/dist/tools/credential-store-list.js.map +0 -1
- package/dist/tools/credential-store-set.d.ts.map +0 -1
- package/dist/tools/credential-store-set.js.map +0 -1
- package/dist/tools/credential-store-update.d.ts.map +0 -1
- package/dist/tools/credential-store-update.js.map +0 -1
- package/dist/tools/dolt-push-mutex.d.ts.map +0 -1
- package/dist/tools/dolt-push-mutex.js.map +0 -1
- package/dist/tools/execute-command.d.ts.map +0 -1
- package/dist/tools/execute-command.js.map +0 -1
- package/dist/tools/execute-prompt.d.ts.map +0 -1
- package/dist/tools/execute-prompt.js.map +0 -1
- package/dist/tools/get-member-model-pricing.d.ts.map +0 -1
- package/dist/tools/get-member-model-pricing.js.map +0 -1
- package/dist/tools/kb-capture.d.ts.map +0 -1
- package/dist/tools/kb-capture.js.map +0 -1
- package/dist/tools/kb-context.d.ts.map +0 -1
- package/dist/tools/kb-context.js.map +0 -1
- package/dist/tools/kb-export.d.ts.map +0 -1
- package/dist/tools/kb-export.js.map +0 -1
- package/dist/tools/kb-feedback.d.ts.map +0 -1
- package/dist/tools/kb-feedback.js.map +0 -1
- package/dist/tools/kb-freshness-sweep.d.ts.map +0 -1
- package/dist/tools/kb-freshness-sweep.js.map +0 -1
- package/dist/tools/kb-harvest.d.ts.map +0 -1
- package/dist/tools/kb-harvest.js.map +0 -1
- package/dist/tools/kb-import.d.ts.map +0 -1
- package/dist/tools/kb-import.js.map +0 -1
- package/dist/tools/kb-invalidate.d.ts.map +0 -1
- package/dist/tools/kb-invalidate.js.map +0 -1
- package/dist/tools/kb-list.d.ts.map +0 -1
- package/dist/tools/kb-list.js.map +0 -1
- package/dist/tools/kb-promote.d.ts.map +0 -1
- package/dist/tools/kb-promote.js.map +0 -1
- package/dist/tools/kb-query.d.ts.map +0 -1
- package/dist/tools/kb-query.js.map +0 -1
- package/dist/tools/kb-reconcile-prefilter.d.ts.map +0 -1
- package/dist/tools/kb-reconcile-prefilter.js.map +0 -1
- package/dist/tools/kb-resolve-contradiction.d.ts.map +0 -1
- package/dist/tools/kb-resolve-contradiction.js.map +0 -1
- package/dist/tools/kb-session-prime.d.ts.map +0 -1
- package/dist/tools/kb-session-prime.js.map +0 -1
- package/dist/tools/kb-setup.d.ts.map +0 -1
- package/dist/tools/kb-setup.js.map +0 -1
- package/dist/tools/kb-stats.d.ts.map +0 -1
- package/dist/tools/kb-stats.js.map +0 -1
- package/dist/tools/list-members.d.ts.map +0 -1
- package/dist/tools/list-members.js.map +0 -1
- package/dist/tools/member-detail.d.ts.map +0 -1
- package/dist/tools/member-detail.js.map +0 -1
- package/dist/tools/member-reservation.d.ts.map +0 -1
- package/dist/tools/member-reservation.js.map +0 -1
- package/dist/tools/monitor-task.d.ts.map +0 -1
- package/dist/tools/monitor-task.js.map +0 -1
- package/dist/tools/provision-auth.d.ts.map +0 -1
- package/dist/tools/provision-auth.js.map +0 -1
- package/dist/tools/provision-vcs-auth.d.ts.map +0 -1
- package/dist/tools/provision-vcs-auth.js.map +0 -1
- package/dist/tools/receive-files.d.ts.map +0 -1
- package/dist/tools/receive-files.js.map +0 -1
- package/dist/tools/register-member.d.ts.map +0 -1
- package/dist/tools/register-member.js.map +0 -1
- package/dist/tools/remove-member.d.ts.map +0 -1
- package/dist/tools/remove-member.js.map +0 -1
- package/dist/tools/report-status.d.ts.map +0 -1
- package/dist/tools/report-status.js.map +0 -1
- package/dist/tools/respond-to-message.d.ts.map +0 -1
- package/dist/tools/respond-to-message.js.map +0 -1
- package/dist/tools/revoke-vcs-auth.d.ts.map +0 -1
- package/dist/tools/revoke-vcs-auth.js.map +0 -1
- package/dist/tools/send-email.d.ts.map +0 -1
- package/dist/tools/send-email.js.map +0 -1
- package/dist/tools/send-files.d.ts.map +0 -1
- package/dist/tools/send-files.js.map +0 -1
- package/dist/tools/send-message.d.ts.map +0 -1
- package/dist/tools/send-message.js.map +0 -1
- package/dist/tools/setup-git-app.d.ts.map +0 -1
- package/dist/tools/setup-git-app.js.map +0 -1
- package/dist/tools/setup-ssh-key.d.ts.map +0 -1
- package/dist/tools/setup-ssh-key.js.map +0 -1
- package/dist/tools/shutdown-server.d.ts.map +0 -1
- package/dist/tools/shutdown-server.js.map +0 -1
- package/dist/tools/stop-prompt.d.ts.map +0 -1
- package/dist/tools/stop-prompt.js.map +0 -1
- package/dist/tools/update-agent-cli.d.ts.map +0 -1
- package/dist/tools/update-agent-cli.js.map +0 -1
- package/dist/tools/update-member.d.ts.map +0 -1
- package/dist/tools/update-member.js.map +0 -1
- package/dist/tools/version.d.ts.map +0 -1
- package/dist/tools/version.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/agent-helpers.d.ts.map +0 -1
- package/dist/utils/agent-helpers.js.map +0 -1
- package/dist/utils/ansi.d.ts.map +0 -1
- package/dist/utils/ansi.js.map +0 -1
- package/dist/utils/auth-env.d.ts.map +0 -1
- package/dist/utils/auth-env.js.map +0 -1
- package/dist/utils/collect-secret.d.ts.map +0 -1
- package/dist/utils/collect-secret.js.map +0 -1
- package/dist/utils/credential-validation.d.ts.map +0 -1
- package/dist/utils/credential-validation.js.map +0 -1
- package/dist/utils/crypto.d.ts.map +0 -1
- package/dist/utils/crypto.js.map +0 -1
- package/dist/utils/deep-merge.d.ts.map +0 -1
- package/dist/utils/deep-merge.js.map +0 -1
- package/dist/utils/file-permissions.d.ts.map +0 -1
- package/dist/utils/file-permissions.js.map +0 -1
- package/dist/utils/gpu-parser.d.ts.map +0 -1
- package/dist/utils/gpu-parser.js.map +0 -1
- package/dist/utils/log-helpers.d.ts.map +0 -1
- package/dist/utils/log-helpers.js.map +0 -1
- package/dist/utils/oob-timeout.d.ts.map +0 -1
- package/dist/utils/oob-timeout.js.map +0 -1
- package/dist/utils/opencode-model-validation.d.ts.map +0 -1
- package/dist/utils/opencode-model-validation.js.map +0 -1
- package/dist/utils/pid-helpers.d.ts.map +0 -1
- package/dist/utils/pid-helpers.js.map +0 -1
- package/dist/utils/platform.d.ts.map +0 -1
- package/dist/utils/platform.js.map +0 -1
- package/dist/utils/process-utils.d.ts.map +0 -1
- package/dist/utils/process-utils.js.map +0 -1
- package/dist/utils/prompt-errors.d.ts.map +0 -1
- package/dist/utils/prompt-errors.js.map +0 -1
- package/dist/utils/resolve-member.d.ts.map +0 -1
- package/dist/utils/resolve-member.js.map +0 -1
- package/dist/utils/secure-input.d.ts.map +0 -1
- package/dist/utils/secure-input.js.map +0 -1
- package/dist/utils/session-caller.d.ts.map +0 -1
- package/dist/utils/session-caller.js.map +0 -1
- package/dist/utils/shell-escape.d.ts.map +0 -1
- package/dist/utils/shell-escape.js.map +0 -1
- package/dist/utils/skill-matrix.d.ts.map +0 -1
- package/dist/utils/skill-matrix.js.map +0 -1
- package/dist/utils/ssh-error-messages.d.ts.map +0 -1
- package/dist/utils/ssh-error-messages.js.map +0 -1
- package/dist/utils/work-folder-validation.d.ts.map +0 -1
- package/dist/utils/work-folder-validation.js.map +0 -1
- package/dist/utils/workspace-trust.d.ts.map +0 -1
- package/dist/utils/workspace-trust.js.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
|
@@ -1193,6 +1193,57 @@ For the target member M, starting from both clones at the same sandbox head:
|
|
|
1193
1193
|
declared verified. It is intentionally NOT in any default CI pass, and no
|
|
1194
1194
|
CI configuration should be added that pretends otherwise.
|
|
1195
1195
|
|
|
1196
|
+
### 6.7 Re-affirmed CI-exclusion decision (apra-fleet-j918.5.3, current pass)
|
|
1197
|
+
|
|
1198
|
+
**Decided 2026-09-15, against tree `f4eda6e08e53412c5cffe5bae25d686280987cbd`
|
|
1199
|
+
(branch `chore/j918-test-suite-cleanup`).** A test-suite audit flagged that
|
|
1200
|
+
the merge-conflict recovery path (`settleDoltConflicts()`,
|
|
1201
|
+
`fleet-sprint/dolt-settle.mjs`) is exercised in `npm test` ONLY by
|
|
1202
|
+
`test/dolt-settle.test.mjs`'s hand-written SQL-string simulator -- a scripted
|
|
1203
|
+
`command()` mock that regex-matches emitted SQL text (`CALL DOLT_MERGE`,
|
|
1204
|
+
`SELECT * FROM dolt_conflicts`, `CALL DOLT_CONFLICTS_RESOLVE`, ...; see e.g.
|
|
1205
|
+
`test/dolt-settle.test.mjs:389-423`) rather than running a real `dolt`
|
|
1206
|
+
process. This 6.2/6.6 exclusion was decided in 2026-08 for a different
|
|
1207
|
+
reason (no generic CI runner has a live fleet server or SSH-reachable
|
|
1208
|
+
members) and never separately weighed against the fact that CI's only
|
|
1209
|
+
coverage of the real recovery path is that simulator. Re-examining now
|
|
1210
|
+
because the failure mode this path guards -- a Dolt-CLI/SQL-dialect
|
|
1211
|
+
regression silently corrupting or losing rows in the SHARED beads DB during
|
|
1212
|
+
a real merge -- is a data-loss risk, and an inherited justification for a
|
|
1213
|
+
different concern is not evidence this specific gap is acceptable.
|
|
1214
|
+
|
|
1215
|
+
**The header's exclusion claim was re-verified against the current file
|
|
1216
|
+
before writing this section** (`scripts/dolt-settle-integration.mjs:24-27`):
|
|
1217
|
+
it still requires a live `apra-fleet` server (`ApraFleet`/`McpClient` over
|
|
1218
|
+
`resolveFleetServerConnection`) plus SSH-reachable members
|
|
1219
|
+
(`createMemberReservationClient`, real `execute_command` dispatch) -- nothing
|
|
1220
|
+
about that dependency has changed since Part 6.2, so **this script itself
|
|
1221
|
+
stays excluded from `npm test`/`test:unit`/`test:slow`, unchanged.** Its
|
|
1222
|
+
live-fleet/SSH requirement is a hard blocker for any generic CI runner
|
|
1223
|
+
regardless of how cheap `dolt` itself is to run.
|
|
1224
|
+
|
|
1225
|
+
That said, the data-loss coverage gap is real and worth closing separately,
|
|
1226
|
+
because it does not actually require this script's live-fleet/SSH machinery:
|
|
1227
|
+
`dolt` is a single, statically-linked binary, already version-pinned
|
|
1228
|
+
(`DOLT_VERSION`, Part 5.1), and `settleDoltConflicts()` only needs an
|
|
1229
|
+
injected `command()` -- it never requires the fleet/SSH transport itself.
|
|
1230
|
+
A much narrower job -- two local `bd` clones on the CI runner, a local
|
|
1231
|
+
merge conflict manufactured directly (no fleet server, no member
|
|
1232
|
+
reservation, no SSH), and `settleDoltConflicts()` wired to a `command()`
|
|
1233
|
+
that shells out to the pinned local `dolt` binary -- is plausible without
|
|
1234
|
+
reproducing any of the live-fleet dependency that justifies excluding
|
|
1235
|
+
*this* script. Weighed against that: added CI runtime, and the blast
|
|
1236
|
+
radius of any CI job that manipulates real Dolt merge state (mitigated by
|
|
1237
|
+
running entirely in a disposable local temp dir, same isolation principle
|
|
1238
|
+
as Part 6.4, never touching a shared remote).
|
|
1239
|
+
|
|
1240
|
+
**Decision: add that narrower, local-only, live-`dolt` test as a follow-up,
|
|
1241
|
+
filed as apra-fleet-j918.9 (linked from this doc; not implemented by this
|
|
1242
|
+
task).** `scripts/dolt-settle-integration.mjs` remains excluded from CI as
|
|
1243
|
+
Part 6.2/6.6 already state -- this section adds the current-pass
|
|
1244
|
+
justification and the follow-up, it does not change the exclusion itself.
|
|
1245
|
+
No CI configuration is added by this task.
|
|
1246
|
+
|
|
1196
1247
|
---
|
|
1197
1248
|
|
|
1198
1249
|
## Part 7 -- persistent vs. ephemeral `dolt sql-server`, answered precisely
|
|
@@ -1485,3 +1536,233 @@ so the list below reads as history rather than as a pending action:
|
|
|
1485
1536
|
integrity bug (a filed bead reference vanished), but not a sync/conflict
|
|
1486
1537
|
issue and not something settle() affects. Left open, unrelated.
|
|
1487
1538
|
|
|
1539
|
+
## Part 9 -- sync COST: fewer and cheaper syncs per sprint
|
|
1540
|
+
|
|
1541
|
+
Parts 1-8 are about sync CORRECTNESS (what happens when a sync conflicts).
|
|
1542
|
+
This part is about sync COST, from a separate read-only review of where a
|
|
1543
|
+
fleet-sprint actually spends its `bd dolt pull` / `bd dolt push` minutes. The
|
|
1544
|
+
measured shape on the reference machine: about 20 D-pull/D-push pairs per
|
|
1545
|
+
sprint, each bracketed by 1-2 uncached `bd config get sync.remote` probes
|
|
1546
|
+
(0.6s each), against a 548 MB embedded Dolt store whose full open-and-walk
|
|
1547
|
+
cost is paid on every invocation regardless of how little changed.
|
|
1548
|
+
|
|
1549
|
+
Three changes landed in `dolt-sync.mjs` (a fourth, in the supervisor's
|
|
1550
|
+
pre-launch scope guard, is described in `src/supervisor/scope-overlap.mjs`).
|
|
1551
|
+
|
|
1552
|
+
### 9.1 The `sync.remote` probe is memoized per member
|
|
1553
|
+
|
|
1554
|
+
`isMemberSyncRemoteConfigured()` spawned a fresh `bd config get sync.remote
|
|
1555
|
+
--json` on every call -- the D-pull pre-gate, the D-push pre-gate, and
|
|
1556
|
+
`status()` -- which totals roughly 90-160 spawns per sprint for a value that
|
|
1557
|
+
never changes mid-run. A codebase search confirmed no production path in this
|
|
1558
|
+
package writes `sync.remote` during a live sprint; only test fixtures and
|
|
1559
|
+
one-time setup scripts do.
|
|
1560
|
+
|
|
1561
|
+
The result is now cached per member for the process lifetime (one runner
|
|
1562
|
+
process per sprint). Two properties matter:
|
|
1563
|
+
|
|
1564
|
+
- **Only a positively parsed answer is cached.** Every fail-safe path (the
|
|
1565
|
+
command threw, a `failSoft` error result, no output, unparseable output)
|
|
1566
|
+
still reports "configured" and is deliberately NOT cached, so one transient
|
|
1567
|
+
probe failure cannot pin the fail-safe answer for the rest of the run. The
|
|
1568
|
+
fail-CLOSED contract is unchanged.
|
|
1569
|
+
- **Explicit invalidation, not a TTL.** A TTL re-adds spawns for no real
|
|
1570
|
+
safety. Three HARD seams drop the memo, and every one of them drops the 9.3
|
|
1571
|
+
remote-tip fingerprint alongside it (the two are always forgotten
|
|
1572
|
+
together): `noteMemberCommand()`, called from the runner's central
|
|
1573
|
+
`command()` wrapper for any `bd config set` / `bd dolt remote` / `bd init` /
|
|
1574
|
+
`bd bootstrap` the orchestrator issues on that member; the auth self-heal
|
|
1575
|
+
firing inside `runDoltStep`; and `repair()`. The beads preflight's member
|
|
1576
|
+
set-up (beads-identity-check.mjs `setupMemberBeads`: `bd config set
|
|
1577
|
+
sync.remote <expected>` + `bd bootstrap`, or `bd dolt remote add origin` +
|
|
1578
|
+
`bd dolt pull` on an existing database, for a beads-reading member with no
|
|
1579
|
+
database or no sync.remote) is such an orchestrator-issued command and goes
|
|
1580
|
+
through that wrapper, so it hits this seam before the first D-pull.
|
|
1581
|
+
- **The per-dispatch seam is SOFT (round 4).** A dispatched agent runs its
|
|
1582
|
+
`bd` commands in its own session on the member, never through the
|
|
1583
|
+
`command()` wrapper, so `noteMemberCommand()` cannot see them; the runner's
|
|
1584
|
+
central `agent()` wrapper calls `noteMemberDispatchCompleted()` the moment
|
|
1585
|
+
any dispatch settles. Round 3 made that an unconditional wipe of both
|
|
1586
|
+
memos. Combined with "a push never mints a fingerprint" (9.3), the
|
|
1587
|
+
fingerprint was then EMPTY at the start of every dispatch bracket -- the
|
|
1588
|
+
module's primary path -- so the primary path paid one `ls-remote` more
|
|
1589
|
+
than before the feature and skipped nothing, and the probe was re-spawned
|
|
1590
|
+
once per dispatch (golden mock-sprint transcript: 1 -> 14). The hazards
|
|
1591
|
+
the wipe guarded were checked against what bd actually does:
|
|
1592
|
+
`bd bootstrap` -- the one self-heal this repo's agent instructions
|
|
1593
|
+
prescribe -- is non-destructive (an existing DB is validated and reported,
|
|
1594
|
+
never replaced) and, where it creates a DB, CLONES it from `sync.remote`,
|
|
1595
|
+
so a surviving fingerprint that still equals the remote tip is still the
|
|
1596
|
+
truth; `bd init` refuses on an existing DB unless forced, and a forced
|
|
1597
|
+
re-init yields an unrelated history that no pull can fast-forward (its next
|
|
1598
|
+
push diverges into the terminals that already forget the tip and settle).
|
|
1599
|
+
The one event a surviving fingerprint would get WRONG is an agent-side
|
|
1600
|
+
`bd config set sync.remote <other>`. So the seam now MARKS the member as
|
|
1601
|
+
dispatched-since-verified and drops nothing; the fingerprint is bound to
|
|
1602
|
+
the URL it was minted against; and a marked member's `sync.remote` is
|
|
1603
|
+
re-read (one `bd config get`, a plain config.yaml read, no Dolt engine)
|
|
1604
|
+
only at the one decision a stale memo could turn into stale data -- the
|
|
1605
|
+
moment a D-pull is about to be SKIPPED on that fingerprint. Same URL:
|
|
1606
|
+
skip. Different or unreadable: fingerprint forgotten, real pull. Every
|
|
1607
|
+
other consumer of the memo fails closed anyway (a wrong "configured"
|
|
1608
|
+
answer just issues a real pull/push against whatever remote bd itself has
|
|
1609
|
+
configured). The re-read is therefore paid once per skip-after-dispatch,
|
|
1610
|
+
never per dispatch; a bracket whose tip moved pays nothing extra; a
|
|
1611
|
+
member with a remote is back to one probe per process. The one case that
|
|
1612
|
+
never reaches that check is a member memoized as having NO remote (both
|
|
1613
|
+
pre-gates exit on it first): its memo is re-read once after any dispatch,
|
|
1614
|
+
because an agent wiring a remote mid-dispatch would otherwise leave every
|
|
1615
|
+
later D-push of that member reporting a benign no-remote skip -- success
|
|
1616
|
+
-- while its bead closes never left the clone. That costs one config.yaml
|
|
1617
|
+
read per dispatch for no-remote members only (sandboxes; the no-remote
|
|
1618
|
+
mock sprint's golden transcript shows one probe per dispatch for exactly
|
|
1619
|
+
this reason).
|
|
1620
|
+
- **The probe never waits on a prompt, and switches itself off when it
|
|
1621
|
+
cannot work.** The probe URL carries no userinfo (9.3), so a member whose
|
|
1622
|
+
only credential for the host was URL-embedded would have git try to
|
|
1623
|
+
PROMPT -- under Git Credential Manager on Windows, a dialog that blocks
|
|
1624
|
+
until the 30s probe timeout, on every bracket. The probe runs with
|
|
1625
|
+
`-c credential.interactive=never -c core.askPass=` (config flags, never a
|
|
1626
|
+
shell env prefix -- the member's shell may be PowerShell) so it fails at
|
|
1627
|
+
once, and after two consecutive failed probes the member's probe is
|
|
1628
|
+
disabled for the process (re-armed by the hard seams), so every pull is
|
|
1629
|
+
simply real again. Two rather than one so a single blip does not cost the
|
|
1630
|
+
feature.
|
|
1631
|
+
|
|
1632
|
+
### 9.2 The transient retry ladder is time-boxed, not count-boxed
|
|
1633
|
+
|
|
1634
|
+
The ladder was widened to 8 retries with a 30s backoff cap to survive a live
|
|
1635
|
+
Windows machine-wide `git.exe` spawn outage (`fork/exec ... "Not enough memory
|
|
1636
|
+
resources"`), measured at 1-3 minutes. That was the right diagnosis but the
|
|
1637
|
+
wrong bound: it applied the long budget to EVERY transient kind, and the unit
|
|
1638
|
+
suite went from 80s to 6m15s because ordinary transients in fixtures now
|
|
1639
|
+
walked the full ladder (91.5s of pure sleep in one exhausted ladder, before
|
|
1640
|
+
counting the 600s per-attempt timeout).
|
|
1641
|
+
|
|
1642
|
+
The budget was never really about a count -- it was about spanning a
|
|
1643
|
+
wall-clock outage window. So the ladder is split by error class:
|
|
1644
|
+
|
|
1645
|
+
| class | bound | backoff cap |
|
|
1646
|
+
|---|---|---|
|
|
1647
|
+
| spawn outage (`fork/exec`, "Not enough memory resources") | 3 min WALL CLOCK | 30s |
|
|
1648
|
+
| every other transient | 5 retries (`maxTransientRetries`) | 8s |
|
|
1649
|
+
|
|
1650
|
+
A wall-clock bound is the same 3 minutes whether each attempt returns
|
|
1651
|
+
instantly or sits on the 600s step timeout; the old count-based bound
|
|
1652
|
+
multiplied out to a worst case of 9 attempts x 600s. The generic default is
|
|
1653
|
+
the pre-widening 5 (a first cut mis-restored it as 2; corrected). An
|
|
1654
|
+
explicitly passed `maxTransientRetries` is honored by BOTH ladders: it bounds
|
|
1655
|
+
the generic class as before, and it is a hard attempt cap on the spawn-outage
|
|
1656
|
+
ladder too (the wall-clock budget still applies underneath it). Left unset --
|
|
1657
|
+
the production shape, since no runner call site passes one -- the spawn-outage
|
|
1658
|
+
class keeps its full wall-clock budget. A `diverged` classification is still
|
|
1659
|
+
never retried, under either ladder. The spawn-outage sub-classifier matches
|
|
1660
|
+
only the `fork/exec` line: the "Not enough memory resources" wording on its
|
|
1661
|
+
own never classifies `transient` in the first place (it is not in the dolt
|
|
1662
|
+
provider's TRANSIENT table), so a pattern for it was dead and was removed.
|
|
1663
|
+
|
|
1664
|
+
### 9.3 Remote-tip fingerprint: skip a D-pull only when it is provably a no-op
|
|
1665
|
+
|
|
1666
|
+
**The correctness anchor.** The shared remote's `refs/dolt/data` is the ONLY
|
|
1667
|
+
channel through which beads state moves between machines. A member's clone can
|
|
1668
|
+
therefore be stale in exactly one way: that ref advanced since the member last
|
|
1669
|
+
pulled or pushed. "Is a D-pull needed?" then has a cheap, EXACT answer --
|
|
1670
|
+
compare the remote SHA now against the SHA this member last synchronized to --
|
|
1671
|
+
rather than a policy bet about who else might be writing.
|
|
1672
|
+
|
|
1673
|
+
This is why the alternatives were rejected. "Skip for read-only roles" and
|
|
1674
|
+
"skip within N seconds of the last pull" both trade real staleness for speed:
|
|
1675
|
+
a reviewer reads acceptance criteria a remote doer just pushed, and a
|
|
1676
|
+
plan-reviewer reads the planner's freshly pushed DAG. Any fixed bound is a
|
|
1677
|
+
guess about other writers, and a wrong guess produces exactly the
|
|
1678
|
+
false-FAILED-streak failure the post-streak verify pull exists to prevent. A
|
|
1679
|
+
tip-equal skip removes only pulls that are provably no-ops, so no operator has
|
|
1680
|
+
to pick a risk bound at all.
|
|
1681
|
+
|
|
1682
|
+
**Mechanism.** Before a real `bd dolt pull`, one `git ls-remote <sync.remote>
|
|
1683
|
+
refs/dolt/data` -- one network round trip, no Dolt engine startup, no 548 MB
|
|
1684
|
+
chunk store to open (0.35s measured, against multi-minute real pulls). On a
|
|
1685
|
+
match the pull is not spawned and the step returns `{ ok: true, member,
|
|
1686
|
+
skipped: true, reason: 'remote-unchanged', remoteTip }`.
|
|
1687
|
+
|
|
1688
|
+
**The recorded tip is minted in exactly one place, from a value the clone is
|
|
1689
|
+
provably current with:**
|
|
1690
|
+
|
|
1691
|
+
- after a successful PULL, record the SHA observed IMMEDIATELY BEFORE it --
|
|
1692
|
+
never one read afterwards. A push racing in during the pull is not in what
|
|
1693
|
+
was fetched, so recording the later SHA would claim freshness the clone does
|
|
1694
|
+
not have. Recording the earlier one can only cost one redundant future pull.
|
|
1695
|
+
- after a successful PUSH by this member, FORGET the recorded tip. A push never
|
|
1696
|
+
records anything.
|
|
1697
|
+
|
|
1698
|
+
**Why a push cannot mint a fingerprint.** Two earlier cuts recorded a SHA read
|
|
1699
|
+
from the remote after the push -- unconditionally at first, then only when the
|
|
1700
|
+
ref had "advanced" past a pre-push read. Both lose the same race: the push
|
|
1701
|
+
mutex serializes this fleet's pushes against each other and nothing else, so
|
|
1702
|
+
an unrelated machine can push in the gap between our push landing and our
|
|
1703
|
+
post-push `ls-remote` returning. That read then observes a stranger's commit
|
|
1704
|
+
this clone has never seen, records it as ours, and the next D-pull is wrongly
|
|
1705
|
+
skipped -- exactly the staleness the feature exists to prevent. A network read
|
|
1706
|
+
of "the remote's current tip" is never a proxy for "what my push published".
|
|
1707
|
+
Nor is there a local proxy for this transport: bd's git-backed remote is Dolt's
|
|
1708
|
+
git blobstore, where a push wraps the chunk-store manifest in a fresh git
|
|
1709
|
+
commit built inside the push on top of the remote head it just fetched. That
|
|
1710
|
+
commit -- the remote's new `refs/dolt/data` -- is not a function of local Dolt
|
|
1711
|
+
state, is not printed by `bd dolt push`, and lands locally only in a
|
|
1712
|
+
per-process UUID-named ref (`refs/dolt/blobstore/<remote>/dolt/data/<uuid>`)
|
|
1713
|
+
inside a sha256-named cache dir under `.beads/`, reachable only by a
|
|
1714
|
+
shell-dialect-specific scan of the member's disk (verified against a live
|
|
1715
|
+
clone: the cache repo's tracking refs and `FETCH_HEAD` already disagreed with
|
|
1716
|
+
the remote's live tip). So the pusher forgets its tip and pays one real pull
|
|
1717
|
+
at its next bracket, after which the skip is re-armed. A no-op push is treated
|
|
1718
|
+
identically -- it proves nothing about the clone's freshness. As a side
|
|
1719
|
+
effect no `ls-remote` is issued anywhere in the D-push bracket: the mutex hold
|
|
1720
|
+
is exactly push + reconcile + settle.
|
|
1721
|
+
|
|
1722
|
+
**Fail-open, always.** Every uncertainty falls through to a REAL pull: no
|
|
1723
|
+
recorded tip yet, an `ls-remote` failure or timeout, unparseable output, a
|
|
1724
|
+
`sync.remote` that could not be positively read, or a URL that fails the
|
|
1725
|
+
strict safe-charset gate. A divergence, a settle, a successful push, an auth
|
|
1726
|
+
self-heal, a `repair()`, an orchestrator-issued `bd init`/`bootstrap`/`config
|
|
1727
|
+
set`, and a `sync.remote` found changed under a dispatch (9.1) all FORGET the
|
|
1728
|
+
recorded tip rather than leave a stale one. The recorded tip is bound to the
|
|
1729
|
+
URL it was observed at and never validates a probe of any other URL. There
|
|
1730
|
+
is deliberately no path in which doubt produces a skip.
|
|
1731
|
+
|
|
1732
|
+
**Three implementation constraints worth restating:**
|
|
1733
|
+
|
|
1734
|
+
- The probe target is resolved from `sync.remote` (through the 9.1 memo, so it
|
|
1735
|
+
costs no extra `bd config get`), NEVER from git's `origin`. The two can
|
|
1736
|
+
legitimately differ on a member, and probing `origin` would compare this
|
|
1737
|
+
member's freshness against the wrong ref. bd spells a git-transport remote
|
|
1738
|
+
`git+https://...`; the `git+` prefix is bd's own scheme marker and is
|
|
1739
|
+
stripped before `ls-remote`. A `sync.remote` with NO scheme -- a bare Dolt
|
|
1740
|
+
remote NAME (`origin`, which the integration fixtures legitimately set) or
|
|
1741
|
+
a bare path (a Dolt file remote, never a git repository) -- yields no probe
|
|
1742
|
+
at all, because `git ls-remote origin` would silently resolve against
|
|
1743
|
+
git's origin, the exact target this rule forbids.
|
|
1744
|
+
- The probe command string is journaled VERBATIM into the persisted,
|
|
1745
|
+
dashboard-visible run transcript (`silent` only suppresses the console
|
|
1746
|
+
line). An http(s) userinfo (`user:token@`) in `sync.remote` is therefore
|
|
1747
|
+
stripped before the URL is interpolated into the command; previously such
|
|
1748
|
+
a token only ever appeared as command OUTPUT (`bd config get`). The
|
|
1749
|
+
stripped URL still authenticates through the git credential helper every
|
|
1750
|
+
provisioned member carries (that is how `git push` works on members); a
|
|
1751
|
+
member whose only credential was URL-embedded gets a failed probe, which is
|
|
1752
|
+
a real pull. ssh URLs keep their `git@` -- a login name, not a secret.
|
|
1753
|
+
- The probe string reaches the member's own shell, which may be PowerShell or
|
|
1754
|
+
a POSIX shell. Rather than trying to quote correctly for both, any remote URL
|
|
1755
|
+
containing a character outside a conservative safe charset (no whitespace,
|
|
1756
|
+
no quote, no metacharacter of either dialect) is REFUSED -- which yields no
|
|
1757
|
+
fingerprint and a real pull, the safe direction.
|
|
1758
|
+
|
|
1759
|
+
Disable per call site with `remoteTipFingerprint: false`.
|
|
1760
|
+
|
|
1761
|
+
### 9.4 Not done here, on purpose
|
|
1762
|
+
|
|
1763
|
+
Two larger items from the same review are deliberately out of scope: squashing
|
|
1764
|
+
the Dolt history and re-bootstrapping every member clone (the largest per-op
|
|
1765
|
+
win, but a destructive operational change needing a quiescent window and its
|
|
1766
|
+
own runbook), and moving `sync.remote` off the git transport onto a native
|
|
1767
|
+
Dolt bucket remote.
|
|
1768
|
+
|
|
@@ -703,7 +703,7 @@ ENGINE's maintainers without silent uploads -- and its flow is adopted whole:
|
|
|
703
703
|
|
|
704
704
|
- **Sanitize FIRST, locally, always** -- before the report is even written to disk: absolute
|
|
705
705
|
paths -> stable placeholders (`<work-folder>/...`, `<home>/...`); hostnames/usernames/IPs/
|
|
706
|
-
emails -> redacted tokens; anything matching secret patterns (keys, tokens, `{{
|
|
706
|
+
emails -> redacted tokens; anything matching secret patterns (keys, tokens, `{{secret.*}}`
|
|
707
707
|
values, env dumps) -> stripped outright, never placeholdered; target-repo identifiers (repo
|
|
708
708
|
name, branch names, bead titles) -> anonymized to `<target-repo>`/`<sprint-branch>` by
|
|
709
709
|
default, with an opt-in tier for internal users to keep them; code snippets excluded by
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# fleet-sprint Workflow Architecture
|
|
2
2
|
|
|
3
3
|
This diagram illustrates the complex, multi-agent lifecycle of a single sprint. It highlights the outer iterative cycle (Sprint Cycles) and the inner tight feedback loops (Planning Loop, Development Loop).
|
|
4
4
|
|
|
@@ -74,7 +74,7 @@ The runner spreads roles across members: the orchestrator issues every `bd` comm
|
|
|
74
74
|
Two topology modes are supported, selected explicitly at sprint start:
|
|
75
75
|
|
|
76
76
|
- **`legacy` mode** -- no cross-member sync layer. Orchestrator `bd` commands
|
|
77
|
-
hit the
|
|
77
|
+
hit the backlog member's beads DB; a doer's `bd close` hits its own
|
|
78
78
|
member's DB; the sprint git branch is only coherent if all members share
|
|
79
79
|
the same working state. This coheres for **single-member** sprints (one
|
|
80
80
|
member does everything) or a **verified shared-workspace fleet** (all
|
|
@@ -88,7 +88,7 @@ Two topology modes are supported, selected explicitly at sprint start:
|
|
|
88
88
|
|
|
89
89
|
Guards enforcing whichever mode is selected:
|
|
90
90
|
|
|
91
|
-
1. **Branch-ensure everywhere** (both modes) -- before the first doer round the runner git-ensures the sprint branch (`git fetch` + `git checkout -B`) on every member in the union of the
|
|
91
|
+
1. **Branch-ensure everywhere** (both modes) -- before the first doer round the runner git-ensures the sprint branch (`git fetch` + `git checkout -B`) on every member in the union of the backlog/doer/reviewer pools (not just the backlog member), then non-destructively re-checks-out the branch at the start of later cycles (never resetting committed work back to base).
|
|
92
92
|
2. **Topology precondition** (`checkMemberTopology`, called from `bin/cli.mjs`) -- in `legacy` mode, compares `git rev-parse HEAD` across the configured members and refuses to start on a mismatch; in `synced` mode, HEADs are allowed to differ but every member must share the same git remote origin and pass a live `bd dolt pull` probe. Single-member sprints trivially pass either check.
|
|
93
93
|
|
|
94
94
|
See `packages/apra-fleet-se/docs/architecture.md` -> "Multi-member topology", "Orchestrator-bracketed git sync", and "Dolt sync discipline" for the full rationale.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Decision: runSprintCycle's closure prelude stays; the "~700-line runner.js" target is restated
|
|
2
|
+
|
|
3
|
+
Status: DECIDED. **Option (1) -- KEEP the prelude as composition-root wiring, and
|
|
4
|
+
restate the epic's roughly 700-line aspiration for `runner.js`.**
|
|
5
|
+
|
|
6
|
+
This note records a decision only. **No code was moved, no module was created or
|
|
7
|
+
deleted, and no behaviour changed by the task that wrote it.** If a later change
|
|
8
|
+
makes the reasoning below false, reopen the question (see "What would reopen
|
|
9
|
+
this") rather than quietly extracting.
|
|
10
|
+
|
|
11
|
+
Scope of the question: `runSprintCycle()` in
|
|
12
|
+
`packages/apra-fleet-se/fleet-sprint/runner.js` is a closure. Everything declared
|
|
13
|
+
inside it captures the per-cycle context, so slicing it is not the move-only
|
|
14
|
+
mechanical operation the twelve `phases/*` extractions were -- it is a design
|
|
15
|
+
change about what the per-cycle context IS and who owns it. The prelude here
|
|
16
|
+
means everything from the `runSprintCycle` function header down to the FIRST
|
|
17
|
+
phase invocation (the `runEnsureSprintBranchPhase` call).
|
|
18
|
+
|
|
19
|
+
## How the figures below were measured
|
|
20
|
+
|
|
21
|
+
Anchored by symbol, never by line number: the script locates the header, the
|
|
22
|
+
closing brace and the first `run*Phase(` call itself. Run from
|
|
23
|
+
`packages/apra-fleet-se`:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
F=fleet-sprint/runner.js
|
|
27
|
+
S=$(grep -n '^async function runSprintCycle' $F | cut -d: -f1)
|
|
28
|
+
E=$(awk -v s="$S" 'NR>s && /^}/ {print NR; exit}' $F)
|
|
29
|
+
P=$(awk -v s="$S" -v e="$E" 'NR>s && NR<e && /await run[A-Za-z]*Phase\(/ {print NR; exit}' $F)
|
|
30
|
+
body() { sed -n "$1,$2p" $F; }
|
|
31
|
+
|
|
32
|
+
echo "runSprintCycle total=$(body $S $E | wc -l)"
|
|
33
|
+
echo "prelude total=$(body $S $((P-1)) | wc -l)" \
|
|
34
|
+
"comment=$(body $S $((P-1)) | grep -cE '^\s*(//|/\*|\*)')" \
|
|
35
|
+
"blank=$(body $S $((P-1)) | grep -cE '^\s*$')"
|
|
36
|
+
echo "runner.js total=$(wc -l < $F) comment=$(grep -cE '^\s*(//|/\*|\*)' $F)" \
|
|
37
|
+
"imports=$(grep -cE '^import ' $F) exports=$(grep -cE '^export ' $F)"
|
|
38
|
+
|
|
39
|
+
# named inner closures of runSprintCycle
|
|
40
|
+
body $S $E | grep -nE '^ (async )?function [A-Za-z_$]+|^ const [A-Za-z_$]+ = (async )?\(|^ const dispatchCtx = \{' \
|
|
41
|
+
| awk -F: -v s="$S" '{print " line "($1+s-1)": "$2}'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## The measurement (observations at the HEAD this note was written against)
|
|
45
|
+
|
|
46
|
+
These are observations of one tree, not targets and not literals to assert
|
|
47
|
+
against. Re-run the script above before relying on any of them.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
runSprintCycle 769..2934 total=2166
|
|
51
|
+
first phase invocation at 1780: await runEnsureSprintBranchPhase({
|
|
52
|
+
prelude 769..1779 total=1011 comment=630 blank=41
|
|
53
|
+
runner.js total=3097 comment=1862 imports=49 exports=28
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Derived: the prelude is 1011 lines of which **630 are comment lines and 41 are
|
|
57
|
+
blank, leaving roughly 340 lines that are actually code**. Across the whole file,
|
|
58
|
+
1862 of 3097 lines are comments -- `runner.js` is about 60% prose. The part of
|
|
59
|
+
`runSprintCycle` after the first phase invocation is 1155 lines, of which 605 are
|
|
60
|
+
comments and 72 blank, leaving roughly 478 code lines. `main()` is 142 lines.
|
|
61
|
+
|
|
62
|
+
### The named inner closures
|
|
63
|
+
|
|
64
|
+
Sizes are the declaration's own span. "Captures mutable" lists which of
|
|
65
|
+
`runSprintCycle`'s fourteen `let` bindings the body references -- the property
|
|
66
|
+
that decides whether a helper can be lifted at all.
|
|
67
|
+
|
|
68
|
+
| Closure | Lines | Captures per-cycle MUTABLE state | Cycle-scope bindings captured |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| `agent` | 12 | none | dispatch wrapper over `context.agent` |
|
|
71
|
+
| `unmappedRoleFallbackPool` | 12 | none | few |
|
|
72
|
+
| `getMemberForRole` | 6 | none | few |
|
|
73
|
+
| `getMembersForRole` | 12 | none | few |
|
|
74
|
+
| `withGitSync` | 1 | none | alias onto `gitSync.withGitSync` |
|
|
75
|
+
| `dispatchCtx` (dispatchRole engine context) | 112 | none | 15 |
|
|
76
|
+
| `decomposedParentIds` | 4 | none | 1 (`bdListScoped`) |
|
|
77
|
+
| `readyLeafBeads` | 7 | none | 1 (`bdListScoped`) |
|
|
78
|
+
| `reclaimStaleInProgress` | 32 | `sprintLaunchTime` | 6 |
|
|
79
|
+
| `dispatchReview` | 109 | `cycle` | 8 |
|
|
80
|
+
| `reEnsureBranchOnMembers` | 13 | none | 3 |
|
|
81
|
+
| `updateDashboard` | 63 | none | 5 |
|
|
82
|
+
| `probeFileExists` | 11 | none | 3 |
|
|
83
|
+
| `recordReopen` | 3 | none | `reopenCounts` |
|
|
84
|
+
| `thrashingBeadIds` | 5 | none | `reopenCounts` |
|
|
85
|
+
|
|
86
|
+
Summed declaration bodies: **401 lines**; including each one's leading doc
|
|
87
|
+
comment block (which would move with it): **537 lines**.
|
|
88
|
+
|
|
89
|
+
## The decision, and the arithmetic that forces it
|
|
90
|
+
|
|
91
|
+
**Extracting the prelude cannot deliver the stated goal, so it is not worth its
|
|
92
|
+
cost.** If every one of the fourteen closures above were extracted -- the
|
|
93
|
+
maximal, most aggressive version of option (2) -- `runner.js` would fall from
|
|
94
|
+
3097 lines to roughly **2560**. That is still about 3.6x the roughly 700-line
|
|
95
|
+
aspiration, and it is an *over*-estimate of the saving: each extracted helper
|
|
96
|
+
must be re-injected at its call sites, which adds lines back. No amount of
|
|
97
|
+
prelude extraction reaches ~700. The target was never going to be met this way,
|
|
98
|
+
so choosing between "extract" and "keep" on the basis of that number is choosing
|
|
99
|
+
between two ways of missing it.
|
|
100
|
+
|
|
101
|
+
### Why the prelude is composition-root wiring rather than implementation
|
|
102
|
+
|
|
103
|
+
The concrete, checkable property: **essentially every code-bearing statement in
|
|
104
|
+
the prelude either resolves an injectable seam or constructs a collaborator, and
|
|
105
|
+
almost none of them compute anything about the sprint.** The dominant shapes are
|
|
106
|
+
|
|
107
|
+
```js
|
|
108
|
+
const X = context.X ?? createX({ ...wiring }); // injectable seam with a default
|
|
109
|
+
const { a, b, c } = createY({ ...wiring }); // collaborator construction
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
covering `createSyncBrackets`, `createBeadsScope`, `createSprintState`,
|
|
113
|
+
`createMemberSessionGuard`, `createRoundSessionRegistry`, `createKbPrimingClient`,
|
|
114
|
+
`createKbWorkClient`, `createGitSync`, the dolt-push mutex, the child-id
|
|
115
|
+
allocator, and the `dispatchCtx` engine context. That is the definition of a
|
|
116
|
+
composition root: the one place that knows how the object graph is assembled and
|
|
117
|
+
is therefore allowed to depend on everything. Pushing it into a "context module"
|
|
118
|
+
does not remove the wiring, it renames its file -- and it breaks the one property
|
|
119
|
+
a composition root exists to provide, that there is exactly ONE place to look to
|
|
120
|
+
see how a sprint is assembled.
|
|
121
|
+
|
|
122
|
+
The second property: **the prelude is mostly prose.** 630 of its 1011 lines are
|
|
123
|
+
comments, and they are not decoration -- they record why each seam has the
|
|
124
|
+
precedence order it has (the four-source ladders for the push mutex and the id
|
|
125
|
+
allocator), why the `agent` wrapper is the single place `sprint_id` and the
|
|
126
|
+
knowledge-bank block are attached, and why the pause guard is registered before
|
|
127
|
+
any dispatch can occur. A line count that treats those lines as debt is measuring
|
|
128
|
+
the wrong thing; deleting them to hit a number would be a strict loss.
|
|
129
|
+
|
|
130
|
+
### Why option (2) -- a per-cycle context module -- is rejected
|
|
131
|
+
|
|
132
|
+
Beyond the arithmetic above: it trades closure capture for parameter passing at
|
|
133
|
+
a bad exchange rate. `dispatchCtx` alone captures 15 cycle-scope bindings and
|
|
134
|
+
`dispatchReview` captures 8. Converting those to explicit parameters widens every
|
|
135
|
+
signature and every call site, and the resulting module would still have to be
|
|
136
|
+
constructed from the same wiring, in the same place, in the same order. The
|
|
137
|
+
`phases/*` slices were worth their widened signatures because each one removed a
|
|
138
|
+
self-contained *phase body* -- a unit with a name in the sprint's vocabulary. A
|
|
139
|
+
"per-cycle context" module is not such a unit; it is the composition root with an
|
|
140
|
+
extra import hop.
|
|
141
|
+
|
|
142
|
+
### Why option (3) -- extract only the non-capturing subset -- is rejected
|
|
143
|
+
|
|
144
|
+
The measurement makes option (3) look more attractive than it is: only two of the
|
|
145
|
+
fourteen closures capture mutable state (`reclaimStaleInProgress` ->
|
|
146
|
+
`sprintLaunchTime`, `dispatchReview` -> `cycle`), so a naive reading says the
|
|
147
|
+
other twelve are liftable. But mutable capture is not the real cost -- immutable
|
|
148
|
+
capture is. The twelve non-mutating closures still capture between 1 and 15
|
|
149
|
+
cycle-scope bindings each, and the two largest (`dispatchCtx` at 112 lines,
|
|
150
|
+
`updateDashboard` at 63) are among the heaviest capturers. What is left after
|
|
151
|
+
excluding them is genuinely tiny: `decomposedParentIds` (4 lines),
|
|
152
|
+
`readyLeafBeads` (7), `recordReopen` (3), `thrashingBeadIds` (5),
|
|
153
|
+
`getMemberForRole` (6) -- roughly 25 lines of body. Creating a module to hold
|
|
154
|
+
25 lines of one-liners, each of which then needs to be threaded back in, makes
|
|
155
|
+
the codebase harder to read to save nothing. Option (3) is a real option; it is
|
|
156
|
+
rejected on measured size, not on principle.
|
|
157
|
+
|
|
158
|
+
`dispatchReview` deserves a specific note because it is the largest genuinely
|
|
159
|
+
shared helper. It is injected into `phases/review.mjs` and `phases/re-review.mjs`
|
|
160
|
+
(both name it in their "WHY SOME HELPERS ARE INJECTED RATHER THAN IMPORTED"
|
|
161
|
+
headers). Being shared by two phases is exactly why it sits at cycle scope rather
|
|
162
|
+
than in either phase module, and it captures `cycle`, so it is the single worst
|
|
163
|
+
candidate for a mechanical lift.
|
|
164
|
+
|
|
165
|
+
## The roughly 700-line target is restated
|
|
166
|
+
|
|
167
|
+
The `~700-line` figure originated in the Phase 0 epic description, derived
|
|
168
|
+
against a tree where `phases/*` did not exist and `runner.js` was 11,678 lines.
|
|
169
|
+
It was an aspiration attached to an estimate, never a computed budget, and the
|
|
170
|
+
work since has shown it is unreachable: the composition root plus the facade plus
|
|
171
|
+
their documentation costs more than 700 lines on their own, and the floor
|
|
172
|
+
computed above puts even a maximal extraction at roughly 2560.
|
|
173
|
+
|
|
174
|
+
**Stop quoting ~700.** It is replaced by two properties that are already
|
|
175
|
+
mechanically enforced, and which say what the refactor was actually for:
|
|
176
|
+
|
|
177
|
+
1. **`runner.js` hosts no phase body.** Pinned by
|
|
178
|
+
`test/phase-sequence-order.test.mjs`, which asserts a zero-match shape scan
|
|
179
|
+
over `runner.js` with a `>= 12` count across `phases/*` as its non-vacuity
|
|
180
|
+
control.
|
|
181
|
+
2. **`runner.js` is a complete facade.** Every previously-exported symbol is
|
|
182
|
+
still importable from it, so no importer or mock-sprint file changes.
|
|
183
|
+
|
|
184
|
+
Size becomes an *observation* reported alongside those gates, not a gate itself.
|
|
185
|
+
For context, `runner.js` at 3097 lines is not an outlier in its own package:
|
|
186
|
+
`dolt-sync.mjs` is 2325, and `dolt-settle.mjs`, `role-policies.mjs`,
|
|
187
|
+
`contracts.mjs`, `dispatch-role.mjs` and `vcs-auth.mjs` are all around 1000+.
|
|
188
|
+
|
|
189
|
+
## What would reopen this
|
|
190
|
+
|
|
191
|
+
Any one of these makes the reasoning above false and the question worth asking
|
|
192
|
+
again:
|
|
193
|
+
|
|
194
|
+
- A **third** consumer appears for `dispatchReview`, or `dispatchReview` stops
|
|
195
|
+
capturing `cycle`. It would then be a shared service rather than cycle-scoped
|
|
196
|
+
glue, and `phases/`-adjacent placement becomes defensible.
|
|
197
|
+
- The prelude starts doing **sprint computation** rather than wiring -- i.e. new
|
|
198
|
+
statements that are not `context.X ?? createX(...)`-shaped and that derive
|
|
199
|
+
decisions about beads, members or scheduling. That is implementation, and it
|
|
200
|
+
belongs in a module.
|
|
201
|
+
- `updateDashboard` or `probeFileExists` grows materially, or acquires a second
|
|
202
|
+
caller outside `runSprintCycle`.
|
|
203
|
+
- The comment-to-code ratio inverts: if the prelude's code lines exceed its
|
|
204
|
+
comment lines, the "it is mostly prose" argument no longer holds and the raw
|
|
205
|
+
code size should be re-weighed.
|
|
206
|
+
|
|
207
|
+
## Correction to an inherited claim
|
|
208
|
+
|
|
209
|
+
The planning note for this decision stated that "Review, Re-Review and Final
|
|
210
|
+
Review all share `dispatchReview`". **That is not true at this HEAD.** Only
|
|
211
|
+
`phases/review.mjs` and `phases/re-review.mjs` receive it;
|
|
212
|
+
`phases/final-review.mjs` merely cites it in a comment ("No duplicate log() dump
|
|
213
|
+
-- see dispatchReview() for why") and runs its own dispatch. The conclusion is
|
|
214
|
+
unaffected -- two sharers is still more than one, which is still the reason the
|
|
215
|
+
helper is cycle-scoped -- but the count is two, not three.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import { doltLiteralModulePaths, DOLT_LITERAL_EXEMPT } from './guarded-modules.mjs';
|
|
3
4
|
|
|
4
5
|
// =============================================================================
|
|
5
6
|
// apra-fleet-417.2.3 -- dolt-literal guard checker.
|
|
@@ -24,6 +25,15 @@ import path from 'path';
|
|
|
24
25
|
// Anything else -- a live command()/template-literal/string containing the
|
|
25
26
|
// literal substring -- is a violation: the sync module must be called by its
|
|
26
27
|
// exported entry points, never re-inlined.
|
|
28
|
+
//
|
|
29
|
+
// MODULE-LIST GENERALIZATION: this guard is no longer pointed at a single
|
|
30
|
+
// hard-coded file. checkDoltLiteralModules() below reads the SHARED
|
|
31
|
+
// guarded-module list (./guarded-modules.mjs) -- the one place a newly
|
|
32
|
+
// extracted fleet-sprint module is registered -- and defines no list of its
|
|
33
|
+
// own. The dolt-sync.mjs carve-out described above is now MECHANICALLY
|
|
34
|
+
// enforced there (DOLT_LITERAL_EXEMPT) rather than left to whoever wires up
|
|
35
|
+
// the call. checkDoltLiteralPath() remains exported and behaves exactly as
|
|
36
|
+
// before.
|
|
27
37
|
// =============================================================================
|
|
28
38
|
|
|
29
39
|
const DOLT_LITERAL_RE = /\bbd dolt (pull|push)\b/;
|
|
@@ -63,10 +73,55 @@ export function findDoltLiteralViolations(src) {
|
|
|
63
73
|
export function checkDoltLiteralPath(filePath) {
|
|
64
74
|
const src = fs.readFileSync(filePath, 'utf8');
|
|
65
75
|
const fileLabel = path.basename(filePath);
|
|
76
|
+
// The single-surface rule this message enforces was established by
|
|
77
|
+
// apra-fleet-417.2.1/417.2.2 (dolt command consolidation into
|
|
78
|
+
// ./dolt-sync.mjs). Provenance stays in this comment: the message itself
|
|
79
|
+
// is runtime output and must not cite a tracker id.
|
|
66
80
|
const violations = findDoltLiteralViolations(src).map(({ line, text }) =>
|
|
67
81
|
`${fileLabel}:${line} issues a direct 'bd dolt pull'/'bd dolt push' literal ("${text}") -- ` +
|
|
68
82
|
`route it through ./dolt-sync.mjs (DoltSync.syncBefore/syncAfter/status) instead, the single ` +
|
|
69
|
-
`permitted dolt command surface
|
|
83
|
+
`permitted dolt command surface.`
|
|
70
84
|
);
|
|
71
85
|
return { violations };
|
|
72
86
|
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Aggregate entry point: scans every module in the SHARED guarded-module list
|
|
90
|
+
* (./guarded-modules.mjs), MINUS the dolt-literal exemptions, and returns the
|
|
91
|
+
* union of their violations. Follows checkModules() in
|
|
92
|
+
* dispatch-safety-guard.mjs -- the reference implementation -- so a dolt
|
|
93
|
+
* command that moves out of runner.js into a newly extracted module stays
|
|
94
|
+
* covered instead of silently falling out of scan scope.
|
|
95
|
+
*
|
|
96
|
+
* Each violation string already names the basename of the file it came from
|
|
97
|
+
* (checkDoltLiteralPath's `fileLabel`), so an aggregate run attributes every
|
|
98
|
+
* finding to the correct module.
|
|
99
|
+
*
|
|
100
|
+
* THE EXEMPTION IS ENFORCED HERE, NOT ASSUMED: dolt-sync.mjs is the single
|
|
101
|
+
* permitted dolt command surface -- it BUILDS the `bd dolt pull`/`bd dolt
|
|
102
|
+
* push` strings on purpose -- so it is filtered out by basename via
|
|
103
|
+
* DOLT_LITERAL_EXEMPT even if someone registers it in the shared list or
|
|
104
|
+
* passes it here explicitly. Byte-identical content under any OTHER name is
|
|
105
|
+
* still a violation. This guard defines no list of its own.
|
|
106
|
+
*
|
|
107
|
+
* @param {string[]} [paths]
|
|
108
|
+
* @returns {{ violations: string[], files: string[], skipped: string[] }}
|
|
109
|
+
*/
|
|
110
|
+
export function checkDoltLiteralModules(paths = doltLiteralModulePaths()) {
|
|
111
|
+
if (!Array.isArray(paths)) {
|
|
112
|
+
throw new TypeError('checkDoltLiteralModules(paths): paths must be an array of file paths');
|
|
113
|
+
}
|
|
114
|
+
const violations = [];
|
|
115
|
+
const files = [];
|
|
116
|
+
const skipped = [];
|
|
117
|
+
for (const p of paths) {
|
|
118
|
+
const file = path.basename(p);
|
|
119
|
+
if (DOLT_LITERAL_EXEMPT.includes(file)) {
|
|
120
|
+
skipped.push(file);
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
files.push(file);
|
|
124
|
+
violations.push(...checkDoltLiteralPath(p).violations);
|
|
125
|
+
}
|
|
126
|
+
return { violations, files, skipped };
|
|
127
|
+
}
|