@wildo-ai/dev-companion 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +21 -0
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +37 -4
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +9 -2
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +66 -0
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +183 -7
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +6 -2
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js +16 -39
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +31 -2
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.d.ts +2 -0
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.js +8 -0
- package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +7 -0
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +26 -12
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts +17 -0
- package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts.map +1 -0
- package/dist/esm/companion-api/controllers/long-held-request.companion.js +33 -0
- package/dist/esm/companion-api/controllers/long-held-request.companion.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +9 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +12 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +7 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +8 -20
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +37 -142
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts +64 -0
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.js +304 -0
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.js.map +1 -0
- package/dist/esm/core/runtime/companion-language-model-route.d.ts +16 -1
- package/dist/esm/core/runtime/companion-language-model-route.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-language-model-route.js +23 -1
- package/dist/esm/core/runtime/companion-language-model-route.js.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.js +3 -2
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/utils/git-read-broker.companion.d.ts +62 -0
- package/dist/esm/core/utils/git-read-broker.companion.d.ts.map +1 -0
- package/dist/esm/core/utils/git-read-broker.companion.js +282 -0
- package/dist/esm/core/utils/git-read-broker.companion.js.map +1 -0
- package/dist/esm/core/utils/local-write-recording.companion.d.ts +8 -1
- package/dist/esm/core/utils/local-write-recording.companion.d.ts.map +1 -1
- package/dist/esm/core/utils/local-write-recording.companion.js +7 -23
- package/dist/esm/core/utils/local-write-recording.companion.js.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js.map +1 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts.map +1 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +2 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js +2 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +2 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +3 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts +2 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js +3 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.d.ts +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +2 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +3 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts +3 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js +4 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +17 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +18 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts +17 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js +18 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts +206 -195
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js +206 -195
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts +10 -0
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js +12 -2
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts +70 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js +70 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts +12 -2
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js +12 -2
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts +10 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js +10 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts +25 -20
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js +25 -20
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.d.ts +32 -32
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js +32 -32
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.d.ts +65 -65
- package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js +65 -65
- package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts +20 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js +20 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts +12 -0
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js +13 -1
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.fr.d.ts +170 -170
- package/dist/esm/i18n/system_enums/application-creation.fr.js +170 -170
- package/dist/esm/i18n/system_enums/application-creation.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/flows-actors.fr.d.ts +22 -22
- package/dist/esm/i18n/system_enums/flows-actors.fr.js +22 -22
- package/dist/esm/i18n/system_enums/flows-actors.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/run-records.fr.d.ts +21 -21
- package/dist/esm/i18n/system_enums/run-records.fr.js +21 -21
- package/dist/esm/i18n/system_enums/run-records.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +1 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.js +1 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts +37 -33
- package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.fr.js +37 -33
- package/dist/esm/i18n/system_enums/workbench-build.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +1 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +1 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts +18 -17
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js +18 -17
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts +7 -5
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.js +8 -6
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-secrets.fr.d.ts +12 -12
- package/dist/esm/i18n/system_enums/workbench-secrets.fr.js +12 -12
- package/dist/esm/i18n/system_enums/workbench-secrets.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts +1 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js +2 -1
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +3 -4
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +11 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +21 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +120 -16
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +875 -191
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +102 -13
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +243 -57
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.d.ts +3 -3
- package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js +3 -3
- package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts +9 -0
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js +19 -0
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +4 -5
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +6 -3
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js +3 -5
- package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +38 -21
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/package.json +18 -18
package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-build-follow-up-derivation.companion.js","sourceRoot":"","sources":["../../../../src/meta-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GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sCAAsC,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAAE,SAAS;QAC1H,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,IAAI,EAAE,EAAE,CAAC;YACzF,IAAI,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3G,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport { BuildPlanTaskTargetKind, type BuildPlanTask } from '@wildo-ai/saas-specifications/application-creation';\n\nimport type { ApplicationCodingMetRequirement, ApplicationCodingUnmetRequirement } from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { resolveBuildTaskLandedProbes } from './application-build-task-coding-policy.companion.service';\n\n/**\n * The ref prefix of a FOLLOW-UP task the host derives when a completed coding run reports a requirement it could not\n * fully meet (#2496): `build-task-follow-up-<origin>-<token>`. A follow-up's own report derives nothing further, so\n * the chain is one step long; what it leaves unmet is shown on its record.\n */\nexport const HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX = 'build-task-follow-up-';\n\n/** What the derivation reads of a task's latest COMPLETED coding run. */\nexport interface FollowUpReportingRun {\n readonly runTaskId: string;\n readonly startedAt: string;\n readonly settledAt?: string;\n readonly unmetRequirements?: readonly ApplicationCodingUnmetRequirement[];\n /** What the run STATED is met, with where (#3227); absent states nothing. */\n readonly metRequirements?: readonly ApplicationCodingMetRequirement[];\n}\n\n/**\n * What a task's TARGET can do about a requirement it reports unmet (#3701), total over {@link BuildPlanTaskTargetKind}: a\n * kind added to the vocabulary does not compile until somebody says whether its follow-up can close a product gap.\n */\nexport enum FollowUpTargetReach {\n /** Its scope builds the product: a follow-up on it can close what the product lacks. */\n DELIVERS = 'DELIVERS',\n /**\n * Its scope PRESENTS the product (the marketing website, the technical documentation): it can describe a feature, and\n * never build one. A follow-up on it can only reword the page, which is how the reference run of 2026-11-10 landed 31\n * follow-ups with the features they reported still missing.\n */\n PRESENTS = 'PRESENTS',\n /** A companion generation step: no coding run ever runs it. */\n GENERATES = 'GENERATES',\n}\n\nexport const BUILD_TARGET_FOLLOW_UP_REACH: Readonly<Record<BuildPlanTaskTargetKind, FollowUpTargetReach>> = {\n [BuildPlanTaskTargetKind.MODULE]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.RESOURCE_STAGE]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.RELATIONSHIP]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP]: FollowUpTargetReach.GENERATES,\n [BuildPlanTaskTargetKind.SHELL_PLACEMENT]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.MODULE_FRONTEND]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.MODULE_BACKEND]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.WEBSITE]: FollowUpTargetReach.PRESENTS,\n [BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION]: FollowUpTargetReach.PRESENTS,\n [BuildPlanTaskTargetKind.WORKER]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.MINION]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.PROVIDER_BINDING]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.BILLING_CATALOG]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.APPLICATION_ROLES]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.ORGANIZATION_MODEL]: FollowUpTargetReach.DELIVERS,\n};\n\n/**\n * The skill a follow-up lifted to a whole MODULE carries beside its serving tasks' skills: the MODULE kind's own reason to\n * exist is registering the module in every layer, and that is the skill that teaches it.\n */\nexport const MODULE_FOLLOW_UP_SKILL_REF = 'module-registration';\n\n/**\n * The scope that CLOSES a product gap on one serving task's target (#3701). Every module-scoped kind writes a subset of\n * its module's MODULE scope (the coding policy's own prefixes: a resource stage, a relationship file, a module's frontend\n * or backend layer), and only the MODULE scope reaches the module registries. A gap a presenting task reports can be\n * anywhere in the module, so it goes to the module; an application-wide target closes in its own scope.\n */\nexport function productClosingTarget(target: BuildPlanTask['target']): BuildPlanTask['target'] | undefined {\n switch (target.kind) {\n case BuildPlanTaskTargetKind.MODULE:\n case BuildPlanTaskTargetKind.RESOURCE_STAGE:\n case BuildPlanTaskTargetKind.RELATIONSHIP:\n case BuildPlanTaskTargetKind.MODULE_FRONTEND:\n case BuildPlanTaskTargetKind.MODULE_BACKEND:\n return { kind: BuildPlanTaskTargetKind.MODULE, moduleRef: target.moduleRef } as BuildPlanTask['target'];\n case BuildPlanTaskTargetKind.SHELL_PLACEMENT:\n case BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG:\n case BuildPlanTaskTargetKind.WORKER:\n case BuildPlanTaskTargetKind.MINION:\n case BuildPlanTaskTargetKind.PROVIDER_BINDING:\n case BuildPlanTaskTargetKind.BILLING_CATALOG:\n case BuildPlanTaskTargetKind.APPLICATION_ROLES:\n case BuildPlanTaskTargetKind.ORGANIZATION_MODEL:\n return target;\n case BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP:\n case BuildPlanTaskTargetKind.WEBSITE:\n case BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION:\n return undefined;\n default: {\n const unhandled: never = target;\n throw new Error(`Unhandled build-plan target ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/** Where one reported gap's follow-up runs: its target, the tasks it was derived from, and their skills and topic. */\nexport interface FollowUpClosingScope {\n readonly target: BuildPlanTask['target'];\n /** Empty when the follow-up stays on its origin's target; else the product tasks serving the requirement in this scope. */\n readonly servingTaskRefs: readonly string[];\n readonly skillRefs: readonly string[];\n readonly functionalTopic: BuildPlanTask['functionalTopic'];\n}\n\n/**\n * WHERE a gap one origin reported is closed (#3701), through the decomposer's own mapping from a requirement to the work\n * that delivers it: the plan's `servesRefs`.\n *\n * - An origin whose target DELIVERS the product closes its own gap: one scope, the origin's (unchanged since #2496).\n * - An origin that PRESENTS the product (a website section, a documentation chapter) reported that the product does not\n * do what the page describes. The gap goes to every product task serving the same requirement, lifted to the scope that\n * closes it ({@link productClosingTarget}), one scope per distinct target, in plan order. The reference run's\n * bid-records gap (\"not registered in the backend or frontend module registries\") was reported by a website section and\n * went back to that section; it now goes to the bid-records MODULE.\n * - A presenting origin whose requirement no product task serves is a requirement only pages deliver (a public case\n * study): it stays on the origin's target.\n */\nexport function resolveFollowUpClosingScopes(origin: BuildPlanTask, requirementRef: string, planTasks: readonly BuildPlanTask[]): readonly FollowUpClosingScope[] {\n const own: FollowUpClosingScope = { target: origin.target, servingTaskRefs: [], skillRefs: origin.skillRefs, functionalTopic: origin.functionalTopic };\n if (BUILD_TARGET_FOLLOW_UP_REACH[origin.target.kind] !== FollowUpTargetReach.PRESENTS) return [own];\n const scopes = new Map<string, { target: BuildPlanTask['target']; serving: BuildPlanTask[] }>();\n for (const task of planTasks) {\n if (task.taskRef === origin.taskRef || !task.servesRefs.includes(requirementRef)) continue;\n if (BUILD_TARGET_FOLLOW_UP_REACH[task.target.kind] !== FollowUpTargetReach.DELIVERS) continue;\n const target = productClosingTarget(task.target);\n if (target === undefined) continue;\n const key = targetKey(target);\n const entry = scopes.get(key) ?? { target, serving: [] };\n entry.serving.push(task);\n scopes.set(key, entry);\n }\n if (scopes.size === 0) return [own];\n return [...scopes.values()].map(({ target, serving }) => ({\n target,\n servingTaskRefs: serving.map((task) => task.taskRef),\n skillRefs: [...new Set([...(target.kind === BuildPlanTaskTargetKind.MODULE ? [MODULE_FOLLOW_UP_SKILL_REF] : []), ...serving.flatMap((task) => task.skillRefs)])],\n functionalTopic: serving[0]!.functionalTopic,\n }));\n}\n\n/** One gap one origin's run reported, as a follow-up carries it. */\nexport interface FollowUpGap {\n readonly originTaskRef: string;\n readonly reportingRunTaskId: string;\n readonly requirementRef: string;\n readonly missing: string;\n}\n\n/** A reported gap the derivation did not turn into a follow-up, and why, so the log can say it. */\nexport interface FollowUpGapNotDerived extends FollowUpGap {\n readonly reason: FollowUpGapNotDerivedReason;\n /** For {@link FollowUpGapNotDerivedReason.MET_SINCE}: the run that stated it met, and where. */\n readonly metSince?: Omit<FollowUpGapMetSince, 'gap' | 'followUpTaskRef'>;\n}\n\n/** Why a reported gap derives no follow-up task (#2496). */\nexport enum FollowUpGapNotDerivedReason {\n /** The origin's target lands by its own probe (a shell placement), so a follow-up would read as landed without running. */\n TARGET_LANDS_BY_ITS_OWN_PROBE = 'TARGET_LANDS_BY_ITS_OWN_PROBE',\n /** The origin is a companion generation step, which no coding run ever runs. */\n GENERATION_STEP = 'GENERATION_STEP',\n /**\n * A LANDED later run of another task on the same target, serving the same requirement, STATED it met (#3227): its closing\n * report's `wildo-requirements-met` block names the requirement, with where. Measured on app-creation-test-007: six of\n * eleven follow-ups changed nothing, their workers saying another task had already met the gap, at about 20 minutes of\n * selection and a run each. Only that positive statement drops a gap; silence and a malformed block never do.\n */\n MET_SINCE = 'MET_SINCE',\n}\n\n/** A reported gap a later run states is met (#3227): the candidate a host may drop, once it has checked the run landed. */\nexport interface FollowUpGapMetSince {\n readonly gap: FollowUpGap;\n /** The follow-up the gap would derive: a host keeps the gap when that follow-up was ever attempted (#2530). */\n readonly followUpTaskRef: string;\n /** The task whose run stated it met. */\n readonly metByTaskRef: string;\n /** That run: a host drops the gap only when the run LANDED (everything it wrote is committed). */\n readonly metByRunTaskId: string;\n /** Where the run said it is met. */\n readonly evidence: string;\n}\n\n/** The key one gap is addressed by: its origin, its reporting run and its requirement. */\nexport function followUpGapKey(gap: Pick<FollowUpGap, 'originTaskRef' | 'reportingRunTaskId' | 'requirementRef'>): string {\n return `${gap.originTaskRef}\\u0000${gap.reportingRunTaskId}\\u0000${gap.requirementRef}`;\n}\n\n/** One derived follow-up task, with every gap it answers. */\nexport interface DerivedFollowUp {\n /** The task, chained after the follow-up before it on its target (see {@link chainFollowUpAfter}). */\n readonly task: BuildPlanTask;\n readonly gaps: readonly FollowUpGap[];\n /** Its target's identity: the follow-ups sharing one are chained, in the order their reports settled. */\n readonly targetKey: string;\n}\n\nexport interface FollowUpDerivation {\n readonly followUps: readonly DerivedFollowUp[];\n readonly notDerived: readonly FollowUpGapNotDerived[];\n /** The follow-up that carries one origin's reported requirement, when one does (the website claim delivery asks). */\n followUpTaskRefFor(originTaskRef: string, requirementRef: string): string | undefined;\n /** Whether one origin's reported requirement was dropped because a landed later run stated it met (#3227). */\n gapMetSince(originTaskRef: string, requirementRef: string): boolean;\n}\n\n/**\n * The follow-up ref of ONE origin's ONE reporting run: the origin, then a token of the run, so the same report derives the\n * same task on every read while a later run reporting again derives a NEW task (the old follow-up's completed run must not\n * land the new report at birth). Always a slug the graph schema accepts: an origin ref with no ASCII letter or digit is\n * named by a digest instead, so no agent-written string can make the plan unreadable.\n *\n * The requirement is not part of the ref (#3227): one run reporting two requirements is ONE follow-up. app-creation-test-007\n * ran `…job-config-…-building-customer-lifecycle-3d9049` and `…job-config-…-shared-office-field-customer-context-3d9049`,\n * the same task, from the same run, twice, both changing nothing.\n */\nexport function deriveFollowUpTaskRef(originTaskRef: string, reportingRunTaskId: string): string {\n const slug = (value: string) => value.toLowerCase().replace(/[^a-z0-9]+/gu, '-').replace(/^-+|-+$/gu, '');\n const digest = (value: string) => createHash('sha256').update(value).digest('hex');\n const origin = slug(originTaskRef.replace(/^build-task-/u, '')) || `t${digest(originTaskRef).slice(0, 8)}`;\n return `${HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX}${origin}-${digest(reportingRunTaskId).slice(0, 6)}`;\n}\n\n/**\n * A follow-up waiting on its origin and, when there is one, on the follow-up before it on its target. One function, so the\n * dispatch host can re-link a follow-up after one it could not append (a name collision, a schema refusal): a chain\n * naming a task the plan does not hold would make the plan unreadable.\n */\nexport function chainFollowUpAfter(followUp: BuildPlanTask, previousOnTarget: string | undefined): BuildPlanTask {\n const origin = followUp.prerequisiteTaskRefs[0]!;\n return { ...followUp, prerequisiteTaskRefs: previousOnTarget === undefined ? [origin] : [origin, previousOnTarget] };\n}\n\n/** A target's identity: two tasks with equal targets write the same scope (#3227). */\nexport function targetKey(target: BuildPlanTask['target']): string {\n const entries = Object.entries(target as Record<string, unknown>).sort(([left], [right]) => left.localeCompare(right));\n return JSON.stringify(entries);\n}\n\n/**\n * The follow-up tasks the reported gaps derive (#2496, #3227). Pure: the dispatch host supplies the plan and each task's\n * latest completed run.\n *\n * ## One follow-up per reporting run, chained per target\n *\n * - **Every requirement one run reported is folded into one follow-up** (#3227): one scope, one worker, one set of\n * checks, instead of the same task once per requirement.\n * - **Its identity is the origin and the reporting run, and nothing else**, so it is STABLE while that report stands:\n * another task on the same target reporting later derives a NEW follow-up rather than renaming this one. A follow-up\n * the build is running, or has run, therefore never leaves the plan because somebody else reported (#2530); and a\n * completed follow-up is never re-derived with gaps it already answered.\n * - **Follow-ups on one target are chained IN THE ORDER THEIR REPORTS SETTLED** (then by origin ref), each waiting on the\n * one before it: they write one scope, and two of them at once would overwrite each other (the interference that made\n * the wave re-run each alone). Report order rather than plan order, so a new report always joins the TAIL: in plan\n * order, an origin earlier in the plan reporting later went to the head, made a running follow-up wait on it, and was\n * ready at once beside it (review of f077ae7db). A follow-up declares no product, so no interference check could see it.\n *\n * ## A gap a later run STATED met is dropped; silence drops nothing\n *\n * Dropping on ABSENCE was tried and withdrawn (review of 5e3ab7d76): a missing block, a malformed one and a run that never\n * looked at the requirement all read the same, so it closed gaps nobody had closed. The worker contract now carries the\n * positive half, a `wildo-requirements-met` block, and a gap is dropped only when {@link collectFollowUpGapsMetSince} finds\n * a later run that states it and the host confirms that run LANDED and the follow-up was never attempted (`metSince`).\n * Every drop is in `notDerived`, with the run and its evidence, so the host logs it. The follow-up's own worker is still\n * told to read what was built since and change nothing when a gap is met.\n *\n * Unchanged: the chain is one step long (a follow-up's own report derives nothing), and an origin whose target lands by\n * its own probe or is a generation step derives nothing. A follow-up keeps its origin's target and skills, EXCEPT when the\n * origin only presents the product (#3701): its gaps go to the product scopes serving the requirement, see\n * {@link resolveFollowUpClosingScopes}.\n */\nexport function deriveBuildPlanFollowUpTasks(input: {\n readonly tasks: readonly BuildPlanTask[];\n readonly latestCompletedRuns: ReadonlyMap<string, FollowUpReportingRun>;\n /**\n * The gaps a host CONFIRMED met since (#3227), by {@link followUpGapKey}: candidates from\n * {@link collectFollowUpGapsMetSince} whose stating run landed and whose follow-up was never attempted. Absent drops\n * nothing, which is the reading when the host could not check.\n */\n readonly metSince?: ReadonlyMap<string, FollowUpGapMetSince>;\n}): FollowUpDerivation {\n const notDerived: FollowUpGapNotDerived[] = [];\n const reports: { readonly origin: BuildPlanTask; readonly run: FollowUpReportingRun; readonly gaps: readonly FollowUpGap[] }[] = [];\n const planTasks = input.tasks.filter((task) => !task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX));\n for (const origin of planTasks) {\n const run = input.latestCompletedRuns.get(origin.taskRef);\n const reported = run?.unmetRequirements ?? [];\n if (run === undefined || reported.length === 0) continue;\n const reportedGaps = reported.map((entry) => ({ originTaskRef: origin.taskRef, reportingRunTaskId: run.runTaskId, requirementRef: entry.requirementRef, missing: entry.missing }));\n if (origin.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n notDerived.push(...reportedGaps.map((gap) => ({ ...gap, reason: FollowUpGapNotDerivedReason.GENERATION_STEP })));\n continue;\n }\n if (resolveBuildTaskLandedProbes({ ...origin, produces: [] }).length > 0) {\n notDerived.push(...reportedGaps.map((gap) => ({ ...gap, reason: FollowUpGapNotDerivedReason.TARGET_LANDS_BY_ITS_OWN_PROBE })));\n continue;\n }\n // A gap a landed later run stated met, as the host confirmed (#3227): dropped, and named.\n const gaps = reportedGaps.filter((gap) => {\n const met = input.metSince?.get(followUpGapKey(gap));\n if (met === undefined) return true;\n notDerived.push({ ...gap, reason: FollowUpGapNotDerivedReason.MET_SINCE, metSince: { metByTaskRef: met.metByTaskRef, metByRunTaskId: met.metByRunTaskId, evidence: met.evidence } });\n return false;\n });\n if (gaps.length === 0) continue;\n reports.push({ origin, run, gaps });\n }\n // Report order: when the reporting run settled (its start when it recorded no settlement), then the origin's ref. A\n // timestamp that does not parse sorts last, never as 1970, so it cannot jump ahead of reports whose time is known.\n const reportedAt = (run: FollowUpReportingRun): number => {\n const at = Date.parse(run.settledAt ?? run.startedAt);\n return Number.isNaN(at) ? Number.POSITIVE_INFINITY : at;\n };\n const byReportedAt = (left: number, right: number): number => (left === right ? 0 : left < right ? -1 : 1);\n reports.sort((left, right) => byReportedAt(reportedAt(left.run), reportedAt(right.run)) || left.origin.taskRef.localeCompare(right.origin.taskRef));\n\n const followUps: DerivedFollowUp[] = [];\n const refByOriginRequirement = new Map<string, string>();\n const previousOnTarget = new Map<string, string>();\n for (const { origin, run, gaps } of reports) {\n /*\n * One follow-up per CLOSING SCOPE of this report (#3701): the origin's own, unless the origin only presents the product,\n * in which case each product scope serving a reported requirement gets the gaps it can close. A routed follow-up's ref\n * adds its scope to the run's token, so the same report keeps deriving the same tasks.\n */\n const byScope = new Map<string, { scope: FollowUpClosingScope; gaps: FollowUpGap[] }>();\n for (const gap of gaps) {\n for (const scope of resolveFollowUpClosingScopes(origin, gap.requirementRef, planTasks)) {\n const key = targetKey(scope.target);\n const entry = byScope.get(key) ?? { scope, gaps: [] };\n entry.gaps.push(gap);\n byScope.set(key, entry);\n }\n }\n for (const [key, { scope, gaps: scopeGaps }] of byScope) {\n const routed = scope.servingTaskRefs.length > 0;\n const taskRef = routed ? deriveFollowUpTaskRef(origin.taskRef, `${run.runTaskId}\\u0000${key}`) : deriveFollowUpTaskRef(origin.taskRef, run.runTaskId);\n const previous = previousOnTarget.get(key);\n previousOnTarget.set(key, taskRef);\n const requirementRefs = [...new Set(scopeGaps.map((gap) => gap.requirementRef))];\n const servingTasks = [...new Set(planTasks\n .filter((task) => task.taskRef !== origin.taskRef && requirementRefs.some((ref) => task.servesRefs.includes(ref)))\n .map((task) => task.taskRef))];\n const task = chainFollowUpAfter({\n taskRef,\n objective: (routed\n ? `${origin.taskRef} presents the product and reported that the product does not yet deliver: `\n + scopeGaps.map((gap) => `${gap.requirementRef}: ${gap.missing}`).join(' ')\n + ` Build what is missing in this scope, where ${scope.servingTaskRefs.join(', ')} built the requirement; a page cannot. `\n + 'If what is missing lies outside this scope, change nothing and report it. '\n : `Meet what ${origin.taskRef} reported still unmet: `\n + scopeGaps.map((gap) => `${gap.requirementRef}: ${gap.missing}`).join(' ') + ' ')\n + 'Read what is already built first: if a task that ran since has met one, change nothing for it and say so. '\n + (servingTasks.length > 0 ? `Other tasks serving them: ${servingTasks.join(', ')}; their work is theirs. ` : '')\n + 'Derived by the dispatch host from that run\\'s closing report.',\n target: scope.target,\n produces: [],\n functionalTopic: scope.functionalTopic,\n skillRefs: [...scope.skillRefs],\n // The origin FIRST (`followUpOf` reads it); the follow-up before it on the same target is added by the chain.\n prerequisiteTaskRefs: [origin.taskRef],\n // Only refs the origin serves: a free-text ref would be a dangling citation in the plan.\n servesRefs: requirementRefs.filter((ref) => origin.servesRefs.includes(ref)),\n } as BuildPlanTask, previous);\n followUps.push({ task, gaps: scopeGaps, targetKey: key });\n for (const gap of scopeGaps) {\n const originRequirement = `${gap.originTaskRef}\\u0000${gap.requirementRef}`;\n if (!refByOriginRequirement.has(originRequirement)) refByOriginRequirement.set(originRequirement, taskRef);\n }\n }\n }\n return {\n followUps,\n notDerived,\n followUpTaskRefFor: (originTaskRef, requirementRef) => refByOriginRequirement.get(`${originTaskRef}\\u0000${requirementRef}`),\n gapMetSince: (originTaskRef, requirementRef) => notDerived.some((gap) => gap.reason === FollowUpGapNotDerivedReason.MET_SINCE\n && gap.originTaskRef === originTaskRef && gap.requirementRef === requirementRef),\n };\n}\n\n/**\n * The reported gaps a LATER run states met (#3227), pure: the candidates a host may drop. For each gap an eligible origin\n * reported (one the derivation would turn into a follow-up), the first other task that\n *\n * - writes the SAME target (two tasks with equal targets write the same scope, so its statement is about the same surface),\n * - serves the same requirement,\n * - completed a run that STARTED after the reporting run settled (it read the tree the report described, or a later one),\n * - and whose run's `wildo-requirements-met` block names the requirement and its unmet block does not.\n *\n * EVERY such task is a candidate, in plan order, so a statement whose run has not landed does not hide one that has. A\n * gap's own follow-up is never its verifier: once it has run, it is attempted and keeps the gap anyway. The host must\n * still confirm that the stating run LANDED and that the follow-up was never attempted before it passes a candidate on as\n * `metSince`; this function only finds who said so.\n */\nexport function collectFollowUpGapsMetSince(input: {\n readonly tasks: readonly BuildPlanTask[];\n readonly latestCompletedRuns: ReadonlyMap<string, FollowUpReportingRun>;\n}): readonly FollowUpGapMetSince[] {\n const candidates: FollowUpGapMetSince[] = [];\n const planTasks = input.tasks.filter((task) => !task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX));\n for (const origin of planTasks) {\n const run = input.latestCompletedRuns.get(origin.taskRef);\n if (run === undefined || (run.unmetRequirements ?? []).length === 0) continue;\n if (origin.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP || resolveBuildTaskLandedProbes({ ...origin, produces: [] }).length > 0) continue;\n const reportedAt = Date.parse(run.settledAt ?? run.startedAt);\n if (Number.isNaN(reportedAt)) continue;\n const followUpTaskRef = deriveFollowUpTaskRef(origin.taskRef, run.runTaskId);\n for (const entry of run.unmetRequirements ?? []) {\n /*\n * A statement counts from a task writing a scope that CLOSES the gap (#3701): the origin's own, or for a presenting\n * origin the product scopes its gap is routed to, where a task's target is read through the same lift.\n */\n const scopes = resolveFollowUpClosingScopes(origin, entry.requirementRef, planTasks);\n const closingKeys = new Set(scopes.map((scope) => targetKey(scope.target)));\n const routedRefs = new Set(scopes.filter((scope) => scope.servingTaskRefs.length > 0)\n .map((scope) => deriveFollowUpTaskRef(origin.taskRef, `${run.runTaskId}\\u0000${targetKey(scope.target)}`)));\n const routed = routedRefs.size > 0;\n for (const task of input.tasks) {\n if (task.taskRef === origin.taskRef || task.taskRef === followUpTaskRef || routedRefs.has(task.taskRef)) continue;\n const taskScope = routed ? productClosingTarget(task.target) : task.target;\n if (taskScope === undefined || !closingKeys.has(targetKey(taskScope)) || !task.servesRefs.includes(entry.requirementRef)) continue;\n const later = input.latestCompletedRuns.get(task.taskRef);\n if (later === undefined || !(Date.parse(later.startedAt) > reportedAt)) continue;\n if ((later.unmetRequirements ?? []).some((unmet) => unmet.requirementRef === entry.requirementRef)) continue;\n const met = (later.metRequirements ?? []).find((statement) => statement.requirementRef === entry.requirementRef);\n if (met === undefined) continue;\n candidates.push({\n gap: { originTaskRef: origin.taskRef, reportingRunTaskId: run.runTaskId, requirementRef: entry.requirementRef, missing: entry.missing },\n // A routed gap's first follow-up (#3701): the host keeps the gap when it was ever attempted.\n followUpTaskRef: routed ? [...routedRefs][0]! : followUpTaskRef,\n metByTaskRef: task.taskRef,\n metByRunTaskId: later.runTaskId,\n evidence: met.evidence,\n });\n }\n }\n }\n return candidates;\n}\n\n/** One reported gap still open, on one requirement (#2580): what the maturity reading caps the requirement for. */\nexport interface OpenReportedGap {\n readonly requirementRef: string;\n /** The task whose latest completed run reported it: an origin, or a follow-up still reporting it. */\n readonly originTaskRef: string;\n readonly missing: string;\n /** The follow-up derived to answer it, not landed yet. Absent when none was derived, or for a follow-up's own report. */\n readonly followUpTaskRef?: string;\n}\n\n/**\n * The reported gaps still OPEN (#2580), pure: a requirement carrying one is partly met, whatever probe found its file.\n *\n * - **A derived follow-up not landed yet**: every gap it carries is open, and names it.\n * - **A gap that derived no follow-up** because its target lands by its own probe or is a generation step: open, with no\n * follow-up, since nothing in the build will answer it. A gap a landed later run STATED met (`MET_SINCE`) is closed.\n * - **A LANDED follow-up whose own latest run still reports a requirement**: open, under the follow-up's ref. A follow-up's\n * report derives nothing further (the chain is one step long), so this is the only place it is still counted.\n *\n * A landed follow-up whose run reports nothing has closed its origin's gaps. Read from the same derivation that appends\n * the follow-ups to the plan, so the reading and the plan cannot disagree about which follow-up answers which gap.\n */\nexport function collectOpenReportedGaps(input: {\n readonly derivation: Pick<FollowUpDerivation, 'followUps' | 'notDerived'>;\n readonly tasks: readonly BuildPlanTask[];\n readonly latestCompletedRuns: ReadonlyMap<string, FollowUpReportingRun>;\n readonly landedTaskRefs: ReadonlySet<string>;\n}): readonly OpenReportedGap[] {\n const open: OpenReportedGap[] = [];\n for (const followUp of input.derivation.followUps) {\n if (input.landedTaskRefs.has(followUp.task.taskRef)) continue;\n for (const gap of followUp.gaps) {\n open.push({ requirementRef: gap.requirementRef, originTaskRef: gap.originTaskRef, missing: gap.missing, followUpTaskRef: followUp.task.taskRef });\n }\n }\n for (const gap of input.derivation.notDerived) {\n if (gap.reason === FollowUpGapNotDerivedReason.MET_SINCE) continue;\n open.push({ requirementRef: gap.requirementRef, originTaskRef: gap.originTaskRef, missing: gap.missing });\n }\n for (const task of input.tasks) {\n if (!task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX) || !input.landedTaskRefs.has(task.taskRef)) continue;\n for (const entry of input.latestCompletedRuns.get(task.taskRef)?.unmetRequirements ?? []) {\n open.push({ requirementRef: entry.requirementRef, originTaskRef: task.taskRef, missing: entry.missing });\n }\n }\n return open;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"application-build-follow-up-derivation.companion.js","sourceRoot":"","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zF,IAAI,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3G,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport { BuildPlanTaskTargetKind, type BuildPlanTask } from '@wildo-ai/saas-specifications/application-creation';\n\nimport type { ApplicationCodingMetRequirement, ApplicationCodingUnmetRequirement } from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { resolveBuildTaskLandedProbes } from './application-build-task-coding-policy.companion.service';\n\n/**\n * The ref prefix of a FOLLOW-UP task the host derives when a completed coding run reports a requirement it could not\n * fully meet (#2496): `build-task-follow-up-<origin>-<token>`. A follow-up's own report derives nothing further, so\n * the chain is one step long; what it leaves unmet is shown on its record.\n */\nexport const HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX = 'build-task-follow-up-';\n\n/** What the derivation reads of a task's latest COMPLETED coding run. */\nexport interface FollowUpReportingRun {\n readonly runTaskId: string;\n readonly startedAt: string;\n readonly settledAt?: string;\n readonly unmetRequirements?: readonly ApplicationCodingUnmetRequirement[];\n /** What the run STATED is met, with where (#3227); absent states nothing. */\n readonly metRequirements?: readonly ApplicationCodingMetRequirement[];\n}\n\n/**\n * What a task's TARGET can do about a requirement it reports unmet (#3701), total over {@link BuildPlanTaskTargetKind}: a\n * kind added to the vocabulary does not compile until somebody says whether its follow-up can close a product gap.\n */\nexport enum FollowUpTargetReach {\n /** Its scope builds the product: a follow-up on it can close what the product lacks. */\n DELIVERS = 'DELIVERS',\n /**\n * Its scope PRESENTS the product (the marketing website, the technical documentation): it can describe a feature, and\n * never build one. A follow-up on it can only reword the page, which is how the reference run of 2026-11-10 landed 31\n * follow-ups with the features they reported still missing.\n */\n PRESENTS = 'PRESENTS',\n /** A companion generation step: no coding run ever runs it. */\n GENERATES = 'GENERATES',\n}\n\nexport const BUILD_TARGET_FOLLOW_UP_REACH: Readonly<Record<BuildPlanTaskTargetKind, FollowUpTargetReach>> = {\n [BuildPlanTaskTargetKind.MODULE]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.RESOURCE_STAGE]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.RELATIONSHIP]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP]: FollowUpTargetReach.GENERATES,\n [BuildPlanTaskTargetKind.SHELL_PLACEMENT]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.MODULE_FRONTEND]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.MODULE_BACKEND]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.WEBSITE]: FollowUpTargetReach.PRESENTS,\n [BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION]: FollowUpTargetReach.PRESENTS,\n [BuildPlanTaskTargetKind.WORKER]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.MINION]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.PROVIDER_BINDING]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.BILLING_CATALOG]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.APPLICATION_ROLES]: FollowUpTargetReach.DELIVERS,\n [BuildPlanTaskTargetKind.ORGANIZATION_MODEL]: FollowUpTargetReach.DELIVERS,\n};\n\n/**\n * The skill a follow-up lifted to a whole MODULE carries beside its serving tasks' skills: the MODULE kind's own reason to\n * exist is registering the module in every layer, and that is the skill that teaches it.\n */\nexport const MODULE_FOLLOW_UP_SKILL_REF = 'module-registration';\n\n/**\n * The scope that CLOSES a product gap on one serving task's target (#3701). Every module-scoped kind writes a subset of\n * its module's MODULE scope (the coding policy's own prefixes: a resource stage, a relationship file, a module's frontend\n * or backend layer), and only the MODULE scope reaches the module registries. A gap a presenting task reports can be\n * anywhere in the module, so it goes to the module; an application-wide target closes in its own scope.\n */\nexport function productClosingTarget(target: BuildPlanTask['target']): BuildPlanTask['target'] | undefined {\n switch (target.kind) {\n case BuildPlanTaskTargetKind.MODULE:\n case BuildPlanTaskTargetKind.RESOURCE_STAGE:\n case BuildPlanTaskTargetKind.RELATIONSHIP:\n case BuildPlanTaskTargetKind.MODULE_FRONTEND:\n case BuildPlanTaskTargetKind.MODULE_BACKEND:\n return { kind: BuildPlanTaskTargetKind.MODULE, moduleRef: target.moduleRef } as BuildPlanTask['target'];\n case BuildPlanTaskTargetKind.SHELL_PLACEMENT:\n case BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG:\n case BuildPlanTaskTargetKind.WORKER:\n case BuildPlanTaskTargetKind.MINION:\n case BuildPlanTaskTargetKind.PROVIDER_BINDING:\n case BuildPlanTaskTargetKind.BILLING_CATALOG:\n case BuildPlanTaskTargetKind.APPLICATION_ROLES:\n case BuildPlanTaskTargetKind.ORGANIZATION_MODEL:\n return target;\n case BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP:\n case BuildPlanTaskTargetKind.WEBSITE:\n case BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION:\n return undefined;\n default: {\n const unhandled: never = target;\n throw new Error(`Unhandled build-plan target ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/** Where one reported gap's follow-up runs: its target, the tasks it was derived from, and their skills and topic. */\nexport interface FollowUpClosingScope {\n readonly target: BuildPlanTask['target'];\n /** Empty when the follow-up stays on its origin's target; else the product tasks serving the requirement in this scope. */\n readonly servingTaskRefs: readonly string[];\n readonly skillRefs: readonly string[];\n readonly functionalTopic: BuildPlanTask['functionalTopic'];\n}\n\n/**\n * WHERE a gap one origin reported is closed (#3701), through the decomposer's own mapping from a requirement to the work\n * that delivers it: the plan's `servesRefs`.\n *\n * - An origin whose target DELIVERS the product closes its own gap: one scope, the origin's (unchanged since #2496).\n * - An origin that PRESENTS the product (a website section, a documentation chapter) reported that the product does not\n * do what the page describes. The gap goes to every product task serving the same requirement, lifted to the scope that\n * closes it ({@link productClosingTarget}), one scope per distinct target, in plan order. The reference run's\n * bid-records gap (\"not registered in the backend or frontend module registries\") was reported by a website section and\n * went back to that section; it now goes to the bid-records MODULE.\n * - A presenting origin whose requirement no product task serves is a requirement only pages deliver (a public case\n * study): it stays on the origin's target.\n */\nexport function resolveFollowUpClosingScopes(origin: BuildPlanTask, requirementRef: string, planTasks: readonly BuildPlanTask[]): readonly FollowUpClosingScope[] {\n const own: FollowUpClosingScope = { target: origin.target, servingTaskRefs: [], skillRefs: origin.skillRefs, functionalTopic: origin.functionalTopic };\n if (BUILD_TARGET_FOLLOW_UP_REACH[origin.target.kind] !== FollowUpTargetReach.PRESENTS) return [own];\n const scopes = new Map<string, { target: BuildPlanTask['target']; serving: BuildPlanTask[] }>();\n for (const task of planTasks) {\n if (task.taskRef === origin.taskRef || !task.servesRefs.includes(requirementRef)) continue;\n if (BUILD_TARGET_FOLLOW_UP_REACH[task.target.kind] !== FollowUpTargetReach.DELIVERS) continue;\n const target = productClosingTarget(task.target);\n if (target === undefined) continue;\n const key = targetKey(target);\n const entry = scopes.get(key) ?? { target, serving: [] };\n entry.serving.push(task);\n scopes.set(key, entry);\n }\n if (scopes.size === 0) return [own];\n return [...scopes.values()].map(({ target, serving }) => ({\n target,\n servingTaskRefs: serving.map((task) => task.taskRef),\n skillRefs: [...new Set([...(target.kind === BuildPlanTaskTargetKind.MODULE ? [MODULE_FOLLOW_UP_SKILL_REF] : []), ...serving.flatMap((task) => task.skillRefs)])],\n functionalTopic: serving[0]!.functionalTopic,\n }));\n}\n\n/** One gap one origin's run reported, as a follow-up carries it. */\nexport interface FollowUpGap {\n readonly originTaskRef: string;\n readonly reportingRunTaskId: string;\n readonly requirementRef: string;\n readonly missing: string;\n /** The planned task whose own work is missing, as the report named it (#3886): its follow-up waits for that task. */\n readonly ownedByTaskRef?: string;\n /** The decision a person must make first, as the report named it (#3886): no follow-up, the gap goes to ASKED. */\n readonly needsDecision?: string;\n}\n\n/** A reported gap the derivation did not turn into a follow-up, and why, so the log can say it. */\nexport interface FollowUpGapNotDerived extends FollowUpGap {\n readonly reason: FollowUpGapNotDerivedReason;\n /** For {@link FollowUpGapNotDerivedReason.MET_SINCE}: the run that stated it met, and where. */\n readonly metSince?: Omit<FollowUpGapMetSince, 'gap' | 'followUpTaskRef'>;\n}\n\n/** Why a reported gap derives no follow-up task (#2496). */\nexport enum FollowUpGapNotDerivedReason {\n /** The origin's target lands by its own probe (a shell placement), so a follow-up would read as landed without running. */\n TARGET_LANDS_BY_ITS_OWN_PROBE = 'TARGET_LANDS_BY_ITS_OWN_PROBE',\n /** The origin is a companion generation step, which no coding run ever runs. */\n GENERATION_STEP = 'GENERATION_STEP',\n /**\n * A LANDED later run of another task on the same target, serving the same requirement, STATED it met (#3227): its closing\n * report's `wildo-requirements-met` block names the requirement, with where. Measured on app-creation-test-007: six of\n * eleven follow-ups changed nothing, their workers saying another task had already met the gap, at about 20 minutes of\n * selection and a run each. Only that positive statement drops a gap; silence and a malformed block never do.\n */\n MET_SINCE = 'MET_SINCE',\n /**\n * The follow-up that would carry it could not join the plan (#3204): its ref already names a task, or the plan refused\n * it. Recorded so the gap still reads OPEN, with no follow-up, rather than falling out of every reading.\n */\n FOLLOW_UP_NOT_APPENDED = 'FOLLOW_UP_NOT_APPENDED',\n /**\n * The report said a PERSON must decide something first (#3886: `needsDecision`): no coding task can close it, so none is\n * derived. It stays OPEN, for the maturity reading and on the creation Home's ASKED section. On reference run 43691253927\n * six follow-up runs changed nothing for this reason (\"the creator must decide the RESOURCE_DATA retention period\").\n */\n AWAITS_DECISION = 'AWAITS_DECISION',\n}\n\n/** A reported gap a later run states is met (#3227): the candidate a host may drop, once it has checked the run landed. */\nexport interface FollowUpGapMetSince {\n readonly gap: FollowUpGap;\n /**\n * The follow-up the gap's own report would derive: a host keeps the gap when that follow-up was ever attempted (#2530),\n * and ALSO when the follow-up that carries it was (#3204: an absorbed gap is carried under another report's ref, so a\n * host asks {@link FollowUpDerivation.followUpTaskRefFor} as well).\n */\n readonly followUpTaskRef: string;\n /** The task whose run stated it met. */\n readonly metByTaskRef: string;\n /** That run: a host drops the gap only when the run LANDED (everything it wrote is committed). */\n readonly metByRunTaskId: string;\n /** Where the run said it is met. */\n readonly evidence: string;\n}\n\n/** The key one gap is addressed by: its origin, its reporting run and its requirement. */\nexport function followUpGapKey(gap: Pick<FollowUpGap, 'originTaskRef' | 'reportingRunTaskId' | 'requirementRef'>): string {\n return `${gap.originTaskRef}\\u0000${gap.reportingRunTaskId}\\u0000${gap.requirementRef}`;\n}\n\n/**\n * The reference a PERSON is shown for one report a derived follow-up covers (#3833): `<requirementRef>@<originTaskRef>/<run>`,\n * so `wildo build tasks` can list it and `wildo build close|approve --covers` can send back what was seen. It names the\n * same three parts as {@link followUpGapKey}, so two reports never share one. The requirement ref and the run id come\n * from a run's report and the plan, so each part is percent-encoded: the result never holds a comma (the CLI splits\n * `--covers` on commas), whitespace, or a separator of its own (`@`, `/`). A task ref is already a slug.\n */\nexport function followUpReportRefOf(gap: Pick<FollowUpGap, 'originTaskRef' | 'reportingRunTaskId' | 'requirementRef'>): string {\n return `${encodeURIComponent(gap.requirementRef)}@${encodeURIComponent(gap.originTaskRef)}/${encodeURIComponent(gap.reportingRunTaskId)}`;\n}\n\n/** One derived follow-up task, with every gap it answers. */\nexport interface DerivedFollowUp {\n /** The task, chained after the follow-up before it on its target (see {@link chainFollowUpAfter}). */\n readonly task: BuildPlanTask;\n readonly gaps: readonly FollowUpGap[];\n /**\n * Its CHAIN's identity: its target's, or its target's for one owner (#3886). The follow-ups sharing one are chained, in\n * the order their reports settled.\n */\n readonly targetKey: string;\n /**\n * What it waits on before the chain link: its first report's origin (`followUpOf` reads it), never every origin it\n * carries (#3204). {@link chainFollowUpAfter} appends the follow-up before it on its target.\n */\n readonly ownPrerequisiteTaskRefs: readonly string[];\n /**\n * The reports it absorbed, each as the follow-up it would be on its own (#3204): what the host appends instead when this\n * one cannot join the plan (its ref already names a task, the plan refuses it), so an absorbed report is never lost\n * with it. Empty when it carries only its own report.\n */\n readonly absorbed: readonly Omit<DerivedFollowUp, 'absorbed'>[];\n}\n\n/**\n * What the follow-ups the build already dispatched CARRIED (#3204): per dispatched follow-up ref, every gap key\n * ({@link followUpGapKey}) recorded on its runs at dispatch, read from the same derivation that wrote the objective the\n * run received. A ref absent from the map was never dispatched; a run that recorded no keys carried its own report only.\n */\nexport type FollowUpDispatchRecord = ReadonlyMap<string, ReadonlySet<string>>;\n\n/**\n * What decides which reports a follow-up absorbs (#3204). Both halves must be known; without either, nothing is absorbed\n * and every report keeps a follow-up of its own (the behaviour before absorption).\n */\nexport interface FollowUpAbsorptionInputs {\n readonly dispatched: FollowUpDispatchRecord;\n /**\n * Follow-ups a person decided on (closed, approved) or that a decision holds: FIXED, like a dispatched one, to their own\n * report and the gap keys the decision recorded (#3832: what the objective showed when the person decided). A decision\n * recorded before that field fixes the follow-up to its own report; what it had absorbed is carried again by the next\n * follow-up and shown again, never closed or released by a decision that may not have covered it.\n */\n readonly decided: FollowUpDispatchRecord;\n}\n\nexport interface FollowUpDerivation {\n readonly followUps: readonly DerivedFollowUp[];\n readonly notDerived: readonly FollowUpGapNotDerived[];\n /** The follow-up that carries one origin's reported requirement, when one does (the website claim delivery asks). */\n followUpTaskRefFor(originTaskRef: string, requirementRef: string): string | undefined;\n /** Whether one origin's reported requirement was dropped because a landed later run stated it met (#3227). */\n gapMetSince(originTaskRef: string, requirementRef: string): boolean;\n}\n\n/**\n * The follow-up ref of ONE origin's ONE reporting run: the origin, then a token of the run, so the same report derives the\n * same task on every read while a later run reporting again derives a NEW task (the old follow-up's completed run must not\n * land the new report at birth). Always a slug the graph schema accepts: an origin ref with no ASCII letter or digit is\n * named by a digest instead, so no agent-written string can make the plan unreadable.\n *\n * The requirement is not part of the ref (#3227): one run reporting two requirements is ONE follow-up. app-creation-test-007\n * ran `…job-config-…-building-customer-lifecycle-3d9049` and `…job-config-…-shared-office-field-customer-context-3d9049`,\n * the same task, from the same run, twice, both changing nothing.\n */\nexport function deriveFollowUpTaskRef(originTaskRef: string, reportingRunTaskId: string): string {\n const slug = (value: string) => value.toLowerCase().replace(/[^a-z0-9]+/gu, '-').replace(/^-+|-+$/gu, '');\n const digest = (value: string) => createHash('sha256').update(value).digest('hex');\n const origin = slug(originTaskRef.replace(/^build-task-/u, '')) || `t${digest(originTaskRef).slice(0, 8)}`;\n return `${HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX}${origin}-${digest(reportingRunTaskId).slice(0, 6)}`;\n}\n\n/**\n * A follow-up waiting on its first report's origin, on the planned task its gaps were reported as owned by (#3886, both in\n * `ownPrerequisiteTaskRefs`) and, when there is one, on the follow-up before it on its target. One function, so the\n * dispatch host can re-link a follow-up after one it could not append (a name collision, a schema refusal): a chain\n * naming a task the plan does not hold would make the plan unreadable.\n */\nexport function chainFollowUpAfter(followUp: Pick<DerivedFollowUp, 'task' | 'ownPrerequisiteTaskRefs'>, previousOnTarget: string | undefined): BuildPlanTask {\n const own = [...followUp.ownPrerequisiteTaskRefs];\n return { ...followUp.task, prerequisiteTaskRefs: previousOnTarget === undefined ? own : [...own, previousOnTarget] };\n}\n\n/** A target's identity: two tasks with equal targets write the same scope (#3227). */\nexport function targetKey(target: BuildPlanTask['target']): string {\n const entries = Object.entries(target as Record<string, unknown>).sort(([left], [right]) => left.localeCompare(right));\n return JSON.stringify(entries);\n}\n\n/**\n * The follow-up tasks the reported gaps derive (#2496, #3227). Pure: the dispatch host supplies the plan and each task's\n * latest completed run.\n *\n * ## One follow-up per target for what is not dispatched yet, chained per target\n *\n * - **Every requirement one run reported is folded into one follow-up** (#3227): one scope, one worker, one set of\n * checks, instead of the same task once per requirement.\n * - **A follow-up not dispatched yet absorbs every later report on its target** (#3204): one worker reads the scope once,\n * with every gap in front of it. The reference run of 2026-11-12 derived 225 follow-ups from website sections onto 24\n * modules (17 requirements, each re-reported by up to 7 sections and routed to every module serving it), and 173 changed\n * nothing. Absorption needs the dispatch record and the decisions (`absorption`); without them, one follow-up per report.\n * - **Its identity is its FIRST report's origin and run, and nothing else**, so it is STABLE: a later report joins it\n * rather than renaming it, and a follow-up the build is running, or has run, never leaves the plan because somebody\n * else reported (#2530). Once dispatched it is FIXED: it carries exactly the gaps recorded on its runs at dispatch,\n * which are the gaps its objective held, and a later report starts the next one. A follow-up a person closed or\n * approved is fixed too, to the gaps the decision recorded ({@link FollowUpAbsorptionInputs}, #3832).\n * - **Follow-ups on one target are chained IN THE ORDER THEIR REPORTS SETTLED** (then by origin ref), each waiting on the\n * one before it: they write one scope, and two of them at once would overwrite each other (the interference that made\n * the wave re-run each alone). Report order rather than plan order, so a new report always joins the TAIL: in plan\n * order, an origin earlier in the plan reporting later went to the head, made a running follow-up wait on it, and was\n * ready at once beside it (review of f077ae7db). A follow-up declares no product, so no interference check could see it.\n * - **It waits on its first report's origin only**: the chain already holds a target's later follow-ups behind the earlier\n * ones, so waiting on every absorbed origin would hold all their gaps behind any one of them that never lands.\n * - **It does not wait on the other tasks serving its requirements**, only names them: a task that never lands would hold\n * it for ever. Waiting was weighed again for #3204 and would not have helped: on the reference run the sections reported\n * their gaps after most of the product tasks serving them had run.\n *\n * ## A gap a later run STATED met is dropped; silence drops nothing\n *\n * Dropping on ABSENCE was tried and withdrawn (review of 5e3ab7d76): a missing block, a malformed one and a run that never\n * looked at the requirement all read the same, so it closed gaps nobody had closed. The worker contract now carries the\n * positive half, a `wildo-requirements-met` block, and a gap is dropped only when {@link collectFollowUpGapsMetSince} finds\n * a later run that states it and the host confirms that run LANDED and no follow-up carrying the gap was ever attempted\n * (`metSince`): neither its own report's nor one that absorbed it (#3204).\n * Every drop is in `notDerived`, with the run and its evidence, so the host logs it. The follow-up's own worker is still\n * told to read what was built since and change nothing when a gap is met.\n *\n * Unchanged: the chain is one step long (a follow-up's own report derives nothing), and an origin whose target lands by\n * its own probe or is a generation step derives nothing. A follow-up keeps its origin's target and skills, EXCEPT when the\n * origin only presents the product (#3701): its gaps go to the product scopes serving the requirement, see\n * {@link resolveFollowUpClosingScopes}.\n */\nexport function deriveBuildPlanFollowUpTasks(input: {\n readonly tasks: readonly BuildPlanTask[];\n readonly latestCompletedRuns: ReadonlyMap<string, FollowUpReportingRun>;\n /**\n * The gaps a host CONFIRMED met since (#3227), by {@link followUpGapKey}: candidates from\n * {@link collectFollowUpGapsMetSince} whose stating run landed and that no attempted follow-up carries (#3204). Absent drops\n * nothing, which is the reading when the host could not check.\n */\n readonly metSince?: ReadonlyMap<string, FollowUpGapMetSince>;\n /**\n * What the dispatched follow-ups carried and which are fixed by a decision (#3204): lets a follow-up not yet dispatched\n * absorb every later report on its target. Absent absorbs nothing, the reading when the host could not tell.\n */\n readonly absorption?: FollowUpAbsorptionInputs;\n}): FollowUpDerivation {\n const notDerived: FollowUpGapNotDerived[] = [];\n const reports: { readonly origin: BuildPlanTask; readonly run: FollowUpReportingRun; readonly gaps: readonly FollowUpGap[] }[] = [];\n const planTasks = input.tasks.filter((task) => !task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX));\n for (const origin of planTasks) {\n const run = input.latestCompletedRuns.get(origin.taskRef);\n const reported = run?.unmetRequirements ?? [];\n if (run === undefined || reported.length === 0) continue;\n const reportedGaps: FollowUpGap[] = reported.map((entry) => ({\n originTaskRef: origin.taskRef,\n reportingRunTaskId: run.runTaskId,\n requirementRef: entry.requirementRef,\n missing: entry.missing,\n ...(entry.ownedByTaskRef !== undefined ? { ownedByTaskRef: entry.ownedByTaskRef } : {}),\n ...(entry.needsDecision !== undefined ? { needsDecision: entry.needsDecision } : {}),\n }));\n if (origin.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n notDerived.push(...reportedGaps.map((gap) => ({ ...gap, reason: FollowUpGapNotDerivedReason.GENERATION_STEP })));\n continue;\n }\n if (resolveBuildTaskLandedProbes({ ...origin, produces: [] }).length > 0) {\n notDerived.push(...reportedGaps.map((gap) => ({ ...gap, reason: FollowUpGapNotDerivedReason.TARGET_LANDS_BY_ITS_OWN_PROBE })));\n continue;\n }\n // A gap a landed later run stated met, as the host confirmed (#3227): dropped, and named.\n const gaps = reportedGaps.filter((gap) => {\n const met = input.metSince?.get(followUpGapKey(gap));\n if (met === undefined) return true;\n notDerived.push({ ...gap, reason: FollowUpGapNotDerivedReason.MET_SINCE, metSince: { metByTaskRef: met.metByTaskRef, metByRunTaskId: met.metByRunTaskId, evidence: met.evidence } });\n return false;\n }).filter((gap) => {\n // A decision only a person can make (#3886): no coding task, and the gap stays open on ASKED.\n if (gap.needsDecision === undefined) return true;\n notDerived.push({ ...gap, reason: FollowUpGapNotDerivedReason.AWAITS_DECISION });\n return false;\n });\n if (gaps.length === 0) continue;\n reports.push({ origin, run, gaps });\n }\n // Report order: when the reporting run settled (its start when it recorded no settlement), then the origin's ref. A\n // timestamp that does not parse sorts last, never as 1970, so it cannot jump ahead of reports whose time is known.\n const reportedAt = (run: FollowUpReportingRun): number => {\n const at = Date.parse(run.settledAt ?? run.startedAt);\n return Number.isNaN(at) ? Number.POSITIVE_INFINITY : at;\n };\n const byReportedAt = (left: number, right: number): number => (left === right ? 0 : left < right ? -1 : 1);\n reports.sort((left, right) => byReportedAt(reportedAt(left.run), reportedAt(right.run)) || left.origin.taskRef.localeCompare(right.origin.taskRef));\n\n /*\n * Every report's gaps, per CLOSING SCOPE (#3701): the origin's own, unless the origin only presents the product, in\n * which case each product scope serving a reported requirement gets the gaps it can close. A routed group's ref adds its\n * scope to the run's token, so the same report keeps naming the same task.\n */\n interface ReportGroup {\n readonly origin: BuildPlanTask;\n readonly run: FollowUpReportingRun;\n readonly scope: FollowUpClosingScope;\n readonly gaps: FollowUpGap[];\n readonly taskRef: string;\n readonly settledAtMs: number;\n /** The planned task whose work its gaps are (#3886): the follow-up waits for it, and nothing else on the target waits on the follow-up. */\n readonly owner?: string;\n }\n /*\n * The owner a report named, when the plan can honour it (#3886): a planned task (never a follow-up), not the origin\n * itself, that serves the very requirement. Anything else is ignored and the gap is an ordinary one: a worker's free text\n * must never make a follow-up wait on a task that does not exist or does not do that work.\n */\n const honouredOwner = (gap: FollowUpGap, origin: BuildPlanTask): string | undefined => honouredFollowUpOwner(gap, origin, planTasks);\n const groupsByTarget = new Map<string, ReportGroup[]>();\n for (const { origin, run, gaps } of reports) {\n const byScope = new Map<string, ReportGroup>();\n for (const gap of gaps) {\n const owner = honouredOwner(gap, origin);\n for (const scope of resolveFollowUpClosingScopes(origin, gap.requirementRef, planTasks)) {\n const key = targetKey(scope.target);\n const routed = scope.servingTaskRefs.length > 0;\n // An owned gap is its own group, so waiting for its owner holds no other gap (#3886); unowned refs are unchanged.\n const groupKey = owner === undefined ? key : `${key}\\u0000owner:${owner}`;\n const group = byScope.get(groupKey) ?? {\n origin, run, scope, gaps: [],\n taskRef: owner !== undefined ? deriveFollowUpTaskRef(origin.taskRef, `${run.runTaskId}\\u0000${key}\\u0000owner:${owner}`)\n : routed ? deriveFollowUpTaskRef(origin.taskRef, `${run.runTaskId}\\u0000${key}`) : deriveFollowUpTaskRef(origin.taskRef, run.runTaskId),\n settledAtMs: reportedAt(run),\n ...(owner !== undefined ? { owner } : {}),\n };\n group.gaps.push(gap);\n byScope.set(groupKey, group);\n }\n }\n for (const group of byScope.values()) {\n const key = targetKey(group.scope.target);\n groupsByTarget.set(key, [...(groupsByTarget.get(key) ?? []), group]);\n }\n }\n\n /*\n * ONE follow-up per target for everything not yet dispatched (#3204). The reference run of 2026-11-12 derived 225\n * follow-ups from website sections on 24 module scopes: 17 requirements, each reported by up to 7 sections and routed\n * to every module serving it, all waiting at once, and 173 changed nothing.\n *\n * - A DISPATCHED follow-up carries its own report and exactly the gaps recorded on its runs (what its objective held).\n * - A DECIDED follow-up (a person closed or approved it, or a decision holds it) carries its own report and exactly the\n * gaps the decision recorded (#3832).\n * - Every other gap on the target goes to ONE pending follow-up: the first report not yet dispatched, under its own ref,\n * so it is never renamed (#2530). One worker reads the scope once, with every gap in front of it.\n *\n * Only the first report's origin is waited on: the chain already held every later follow-up on a target behind the\n * earlier ones, so waiting on each absorbed origin as well would hold the gaps of all of them behind any one.\n */\n const absorption = input.absorption;\n interface Member {\n readonly anchor: ReportGroup;\n /** The gaps it carries from other reports, by their report. */\n readonly carried: Map<ReportGroup, FollowUpGap[]>;\n }\n const followUpsByTarget: DerivedFollowUp[] = [];\n for (const [key, groups] of groupsByTarget) {\n const members: Member[] = [];\n const closedToAbsorption = (group: ReportGroup) => absorption === undefined || absorption.dispatched.has(group.taskRef) || absorption.decided.has(group.taskRef);\n const anchoredAlone = new Map<ReportGroup, Member>();\n for (const group of groups) {\n if (absorption === undefined || closedToAbsorption(group)) {\n const member: Member = { anchor: group, carried: new Map() };\n members.push(member);\n anchoredAlone.set(group, member);\n }\n }\n if (absorption !== undefined) {\n // What each dispatched or decided follow-up carried, from its records; never a gap whose own report is either.\n const claimedBy = new Map<string, Member>();\n for (const member of members) {\n const recorded = new Set([...(absorption.dispatched.get(member.anchor.taskRef) ?? []), ...(absorption.decided.get(member.anchor.taskRef) ?? [])]);\n for (const group of groups) {\n if (group === member.anchor || closedToAbsorption(group)) continue;\n for (const gap of group.gaps) {\n const gapKey = followUpGapKey(gap);\n if (!recorded.has(gapKey) || claimedBy.has(gapKey)) continue;\n claimedBy.set(gapKey, member);\n member.carried.set(group, [...(member.carried.get(group) ?? []), gap]);\n }\n }\n }\n // The decided anchors are already in the order their reports settled (pushed in report order above).\n // Everything else: the first pending report anchors, every later one joins it. Its follow-up goes LAST on its target,\n // after every dispatched or decided one, so a report that surfaced late never runs beside one already running.\n // One pending follow-up for the target's unowned gaps, and one per owner (#3886), so an owner holds only its own gaps.\n const pendingByOwner = new Map<string | undefined, Member>();\n for (const group of groups) {\n if (closedToAbsorption(group)) continue;\n const remaining = group.gaps.filter((gap) => !claimedBy.has(followUpGapKey(gap)));\n if (remaining.length === 0) continue;\n const pending = pendingByOwner.get(group.owner);\n if (pending === undefined) {\n const member: Member = { anchor: { ...group, gaps: remaining }, carried: new Map() };\n pendingByOwner.set(group.owner, member);\n members.push(member);\n } else {\n pending.carried.set(group, remaining);\n }\n }\n }\n /*\n * A follow-up waiting for its owner is on a CHAIN OF ITS OWN (#3886, review M1): it waits on the follow-up before it\n * for the same owner on this target, never on another owner's or on the target's unowned follow-ups, and none of them\n * waits on it. One chain per target would hold every gap behind any owner that never lands, #3204's objection one level\n * down. Two follow-ups on one scope still never RUN at once: the dispatch's selection takes one follow-up per scope at a\n * time (`followUpScopeBusy`), since they declare no product and nothing else could see them meet.\n */\n const build = (anchor: ReportGroup, contributions: readonly (readonly [ReportGroup, readonly FollowUpGap[]])[]): Omit<DerivedFollowUp, 'absorbed'> => {\n const all = contributions.map(([group]) => group);\n const gaps = contributions.flatMap(([, contributed]) => contributed);\n const requirementRefs = [...new Set(gaps.map((gap) => gap.requirementRef))];\n const originRefs = [...new Set(all.map((group) => group.origin.taskRef))];\n const servingTasks = [...new Set(planTasks\n .filter((task) => !originRefs.includes(task.taskRef) && requirementRefs.some((ref) => task.servesRefs.includes(ref)))\n .map((task) => task.taskRef))];\n const builtBy = [...new Set(all.flatMap((group) => group.scope.servingTaskRefs))];\n const describe = (groupGaps: readonly FollowUpGap[]) => {\n const byRequirement = new Map<string, Set<string>>();\n for (const gap of groupGaps) byRequirement.set(gap.requirementRef, (byRequirement.get(gap.requirementRef) ?? new Set()).add(gap.missing));\n return [...byRequirement].map(([ref, missing]) => `${ref}: ${[...missing].join(' / ')}`).join(' ');\n };\n const routed = contributions.filter(([group]) => group.scope.servingTaskRefs.length > 0);\n const own = contributions.filter(([group]) => group.scope.servingTaskRefs.length === 0);\n const presenters = [...new Set(routed.map(([group]) => group.origin.taskRef))];\n const reporters = [...new Set(own.map(([group]) => group.origin.taskRef))];\n const objective = (routed.length > 0\n ? `${presenters.join(', ')} ${presenters.length > 1 ? 'present' : 'presents'} the product and reported that the product does not yet deliver: `\n + describe(routed.flatMap(([, contributed]) => contributed))\n + ` Build what is missing in this scope, where ${builtBy.join(', ')} built the requirement; a page cannot. `\n + 'If what is missing lies outside this scope, change nothing and report it. '\n : '')\n + (own.length > 0 ? `Meet what ${reporters.join(', ')} reported still unmet: ${describe(own.flatMap(([, contributed]) => contributed))} ` : '')\n + (contributions.length > 1 ? 'These reports were gathered into this one task because they concern this one scope: answer each. ' : '')\n + 'Read what is already built first: if a task that ran since has met one, change nothing for it and say so. '\n + (anchor.owner !== undefined ? `It was reported as ${anchor.owner}'s own work, so it runs once that task has landed: read what it built, and change nothing for a gap it met. ` : '')\n + (servingTasks.length > 0 ? `Other tasks serving them: ${servingTasks.join(', ')}; their work is theirs. ` : '')\n + (contributions.length > 1 ? 'Derived by the dispatch host from those runs\\' closing reports.' : 'Derived by the dispatch host from that run\\'s closing report.');\n return {\n task: {\n taskRef: anchor.taskRef,\n objective,\n target: anchor.scope.target,\n produces: [],\n functionalTopic: anchor.scope.functionalTopic,\n skillRefs: [...new Set(all.flatMap((group) => group.scope.skillRefs))],\n // Its first report's origin (`followUpOf` reads it), and the owner its gaps were reported as (#3886); the follow-up\n // before it on the same target is added by the chain.\n prerequisiteTaskRefs: [anchor.origin.taskRef, ...(anchor.owner !== undefined ? [anchor.owner] : [])],\n // Only refs an origin serves: a free-text ref would be a dangling citation in the plan.\n servesRefs: requirementRefs.filter((ref) => all.some((group) => group.origin.servesRefs.includes(ref))),\n } as BuildPlanTask,\n gaps,\n // The CHAIN it belongs to (#3886): its target's, or its target's for one owner, so owners never wait on each other.\n targetKey: anchor.owner === undefined ? key : `${key}\\u0000owner:${anchor.owner}`,\n ownPrerequisiteTaskRefs: [anchor.origin.taskRef, ...(anchor.owner !== undefined ? [anchor.owner] : [])],\n };\n };\n const previousOnChain = new Map<string, string>();\n for (const { anchor, carried } of members) {\n const derived: DerivedFollowUp = {\n ...build(anchor, [[anchor, anchor.gaps], ...carried]),\n absorbed: [...carried].map(([group, contributed]) => build(group, [[group, contributed]])),\n };\n const task = chainFollowUpAfter(derived, previousOnChain.get(derived.targetKey));\n previousOnChain.set(derived.targetKey, task.taskRef);\n followUpsByTarget.push({ ...derived, task });\n }\n }\n return assembleFollowUpDerivation(followUpsByTarget, notDerived);\n}\n\n/**\n * The owner a report named for a gap, when the plan can honour it (#3886): a planned task (never a follow-up), not the\n * origin itself, that serves the very requirement. Anything else is ignored and the gap is an ordinary one.\n */\nexport function honouredFollowUpOwner(\n gap: Pick<FollowUpGap, 'requirementRef' | 'ownedByTaskRef'>,\n origin: BuildPlanTask,\n planTasks: readonly BuildPlanTask[],\n): string | undefined {\n if (gap.ownedByTaskRef === undefined) return undefined;\n const owner = planTasks.find((task) => task.taskRef === gap.ownedByTaskRef && !task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX));\n return owner !== undefined && owner.taskRef !== origin.taskRef && owner.servesRefs.includes(gap.requirementRef) ? owner.taskRef : undefined;\n}\n\n/**\n * A derivation's readers over a given set of follow-ups (#3204): what the plan holds, so a host that could not append one\n * (and appended the reports it absorbed instead) answers from what it appended, and no reader names a task the plan lacks.\n */\nexport function assembleFollowUpDerivation(followUps: readonly DerivedFollowUp[], notDerived: readonly FollowUpGapNotDerived[]): FollowUpDerivation {\n const refByOriginRequirement = new Map<string, string>();\n for (const followUp of followUps) {\n for (const gap of followUp.gaps) {\n const originRequirement = `${gap.originTaskRef}\\u0000${gap.requirementRef}`;\n if (!refByOriginRequirement.has(originRequirement)) refByOriginRequirement.set(originRequirement, followUp.task.taskRef);\n }\n }\n return {\n followUps,\n notDerived,\n followUpTaskRefFor: (originTaskRef, requirementRef) => refByOriginRequirement.get(`${originTaskRef}\\u0000${requirementRef}`),\n gapMetSince: (originTaskRef, requirementRef) => notDerived.some((gap) => gap.reason === FollowUpGapNotDerivedReason.MET_SINCE\n && gap.originTaskRef === originTaskRef && gap.requirementRef === requirementRef),\n };\n}\n\n/**\n * The reported gaps a LATER run states met (#3227), pure: the candidates a host may drop. For each gap an eligible origin\n * reported (one the derivation would turn into a follow-up), the first other task that\n *\n * - writes the SAME target (two tasks with equal targets write the same scope, so its statement is about the same surface),\n * - serves the same requirement,\n * - completed a run that STARTED after the reporting run settled (it read the tree the report described, or a later one),\n * - and whose run's `wildo-requirements-met` block names the requirement and its unmet block does not.\n *\n * EVERY such task is a candidate, in plan order, so a statement whose run has not landed does not hide one that has. A\n * gap's own follow-up is never its verifier: once it has run, it is attempted and keeps the gap anyway. The host must\n * still confirm that the stating run LANDED and that no follow-up carrying the gap (its own, or one that absorbed it,\n * #3204) was ever attempted before it passes a candidate on as\n * `metSince`; this function only finds who said so.\n */\nexport function collectFollowUpGapsMetSince(input: {\n readonly tasks: readonly BuildPlanTask[];\n readonly latestCompletedRuns: ReadonlyMap<string, FollowUpReportingRun>;\n}): readonly FollowUpGapMetSince[] {\n const candidates: FollowUpGapMetSince[] = [];\n const planTasks = input.tasks.filter((task) => !task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX));\n for (const origin of planTasks) {\n const run = input.latestCompletedRuns.get(origin.taskRef);\n if (run === undefined || (run.unmetRequirements ?? []).length === 0) continue;\n if (origin.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP || resolveBuildTaskLandedProbes({ ...origin, produces: [] }).length > 0) continue;\n const reportedAt = Date.parse(run.settledAt ?? run.startedAt);\n if (Number.isNaN(reportedAt)) continue;\n const followUpTaskRef = deriveFollowUpTaskRef(origin.taskRef, run.runTaskId);\n for (const entry of run.unmetRequirements ?? []) {\n /*\n * A statement counts from a task writing a scope that CLOSES the gap (#3701): the origin's own, or for a presenting\n * origin the product scopes its gap is routed to, where a task's target is read through the same lift.\n */\n const scopes = resolveFollowUpClosingScopes(origin, entry.requirementRef, planTasks);\n const closingKeys = new Set(scopes.map((scope) => targetKey(scope.target)));\n const routedRefs = new Set(scopes.filter((scope) => scope.servingTaskRefs.length > 0)\n .map((scope) => deriveFollowUpTaskRef(origin.taskRef, `${run.runTaskId}\\u0000${targetKey(scope.target)}`)));\n const routed = routedRefs.size > 0;\n // The follow-ups an owned gap derives (#3886, review LOW) are this report's own too: never a run that met it since.\n const owner = honouredFollowUpOwner(entry, origin, planTasks);\n const ownedRefs = new Set(owner === undefined ? [] : scopes.map((scope) => deriveFollowUpTaskRef(origin.taskRef, `${run.runTaskId}\\u0000${targetKey(scope.target)}\\u0000owner:${owner}`)));\n for (const task of input.tasks) {\n if (task.taskRef === origin.taskRef || task.taskRef === followUpTaskRef || routedRefs.has(task.taskRef) || ownedRefs.has(task.taskRef)) continue;\n const taskScope = routed ? productClosingTarget(task.target) : task.target;\n if (taskScope === undefined || !closingKeys.has(targetKey(taskScope)) || !task.servesRefs.includes(entry.requirementRef)) continue;\n const later = input.latestCompletedRuns.get(task.taskRef);\n if (later === undefined || !(Date.parse(later.startedAt) > reportedAt)) continue;\n if ((later.unmetRequirements ?? []).some((unmet) => unmet.requirementRef === entry.requirementRef)) continue;\n const met = (later.metRequirements ?? []).find((statement) => statement.requirementRef === entry.requirementRef);\n if (met === undefined) continue;\n candidates.push({\n gap: { originTaskRef: origin.taskRef, reportingRunTaskId: run.runTaskId, requirementRef: entry.requirementRef, missing: entry.missing },\n // A routed gap's first follow-up (#3701): the host keeps the gap when it was ever attempted.\n followUpTaskRef: routed ? [...routedRefs][0]! : followUpTaskRef,\n metByTaskRef: task.taskRef,\n metByRunTaskId: later.runTaskId,\n evidence: met.evidence,\n });\n }\n }\n }\n return candidates;\n}\n\n/** One reported gap still open, on one requirement (#2580): what the maturity reading caps the requirement for. */\nexport interface OpenReportedGap {\n readonly requirementRef: string;\n /** The task whose latest completed run reported it: an origin, or a follow-up still reporting it. */\n readonly originTaskRef: string;\n readonly missing: string;\n /** The follow-up derived to answer it, not landed yet. Absent when none was derived, or for a follow-up's own report. */\n readonly followUpTaskRef?: string;\n}\n\n/**\n * The reported gaps still OPEN (#2580), pure: a requirement carrying one is partly met, whatever probe found its file.\n *\n * - **A derived follow-up not landed yet**: every gap it carries is open, and names it.\n * - **A gap that derived no follow-up** because its target lands by its own probe or is a generation step: open, with no\n * follow-up, since nothing in the build will answer it. A gap a landed later run STATED met (`MET_SINCE`) is closed.\n * - **A LANDED follow-up whose own latest run still reports a requirement**: open, under the follow-up's ref. A follow-up's\n * report derives nothing further (the chain is one step long), so this is the only place it is still counted.\n *\n * A landed follow-up whose run reports nothing has closed its origin's gaps. Read from the same derivation that appends\n * the follow-ups to the plan, so the reading and the plan cannot disagree about which follow-up answers which gap.\n */\nexport function collectOpenReportedGaps(input: {\n readonly derivation: Pick<FollowUpDerivation, 'followUps' | 'notDerived'>;\n readonly tasks: readonly BuildPlanTask[];\n readonly latestCompletedRuns: ReadonlyMap<string, FollowUpReportingRun>;\n readonly landedTaskRefs: ReadonlySet<string>;\n}): readonly OpenReportedGap[] {\n const open: OpenReportedGap[] = [];\n for (const followUp of input.derivation.followUps) {\n if (input.landedTaskRefs.has(followUp.task.taskRef)) continue;\n for (const gap of followUp.gaps) {\n open.push({ requirementRef: gap.requirementRef, originTaskRef: gap.originTaskRef, missing: gap.missing, followUpTaskRef: followUp.task.taskRef });\n }\n }\n for (const gap of input.derivation.notDerived) {\n if (gap.reason === FollowUpGapNotDerivedReason.MET_SINCE) continue;\n open.push({ requirementRef: gap.requirementRef, originTaskRef: gap.originTaskRef, missing: gap.missing });\n }\n for (const task of input.tasks) {\n if (!task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX) || !input.landedTaskRefs.has(task.taskRef)) continue;\n for (const entry of input.latestCompletedRuns.get(task.taskRef)?.unmetRequirements ?? []) {\n open.push({ requirementRef: entry.requirementRef, originTaskRef: task.taskRef, missing: entry.missing });\n }\n }\n return open;\n}\n"]}
|
package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ import type { GitLandingSourceState } from '../../claude-cli/services/git-change
|
|
|
9
9
|
* `resolveBuildExecutionProgress`) and again in `prepareNextBuildTask` — and every `GET /build/tasks`,
|
|
10
10
|
* `/build/next`, board publication and creation-feed read asked it again. Measured on the 128-task plan of
|
|
11
11
|
* `app-creation-test-007` (wave `6ae445c316a9f33246138f32`): `artifact-state` 377 s, `prepareNextBuildTask`
|
|
12
|
-
* about 13 min, `GET /build/tasks` 384 s and 1 359 s. Because the wave's fill loop
|
|
13
|
-
* a selection that slow kept parallelism 5 at one task in flight all day,
|
|
14
|
-
* each other on one event loop.
|
|
12
|
+
* about 13 min, `GET /build/tasks` 384 s and 1 359 s. Because the wave's fill loop then selected one slot at a time
|
|
13
|
+
* (slots are prepared side by side since #3883), a selection that slow kept parallelism 5 at one task in flight all day,
|
|
14
|
+
* and the readers and the wave starved each other on one event loop.
|
|
15
15
|
*
|
|
16
16
|
* Nothing about that answer can move unless one of its inputs moves, and every input is either a FILE (git's
|
|
17
17
|
* view of the tree, and the build outputs the introspection witnesses read) or an in-process EVENT (a run
|
|
@@ -10,9 +10,9 @@ import { join } from 'node:path';
|
|
|
10
10
|
* `resolveBuildExecutionProgress`) and again in `prepareNextBuildTask` — and every `GET /build/tasks`,
|
|
11
11
|
* `/build/next`, board publication and creation-feed read asked it again. Measured on the 128-task plan of
|
|
12
12
|
* `app-creation-test-007` (wave `6ae445c316a9f33246138f32`): `artifact-state` 377 s, `prepareNextBuildTask`
|
|
13
|
-
* about 13 min, `GET /build/tasks` 384 s and 1 359 s. Because the wave's fill loop
|
|
14
|
-
* a selection that slow kept parallelism 5 at one task in flight all day,
|
|
15
|
-
* each other on one event loop.
|
|
13
|
+
* about 13 min, `GET /build/tasks` 384 s and 1 359 s. Because the wave's fill loop then selected one slot at a time
|
|
14
|
+
* (slots are prepared side by side since #3883), a selection that slow kept parallelism 5 at one task in flight all day,
|
|
15
|
+
* and the readers and the wave starved each other on one event loop.
|
|
16
16
|
*
|
|
17
17
|
* Nothing about that answer can move unless one of its inputs moves, and every input is either a FILE (git's
|
|
18
18
|
* view of the tree, and the build outputs the introspection witnesses read) or an in-process EVENT (a run
|
package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-build-landing-projection.companion.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-landing-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAgBnD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAgC;IAC5E,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAC9F,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACtD,OAAO,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,8GAA8G;YAC9G,OAAO,GAAG,IAAI,SAAS,CAAC;QAC1B,CAAC;IACH,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO;QACL,QAAQ,MAAM,CAAC,GAAG,CAAC,OAAO,IAAI,QAAQ,EAAE;QACxC,aAA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,QAAQ,CAAC,CAAC;QACjC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE;YAClB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,QAAQ;gBAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","sourcesContent":["import { stat } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport type { GitLandingSourceState } from '../../claude-cli/services/git-change-set.companion.service';\n\n/**\n * The build plan's LANDING, computed once per source state and shared by every reader (#3206, #3219).\n *\n * ## Why this exists\n *\n * \"Which of the plan's tasks have landed\" was re-derived from nothing on every ask. One build wave asked it at\n * least twice before each dispatch — once in the playbook's `artifact-state` phase (through\n * `resolveBuildExecutionProgress`) and again in `prepareNextBuildTask` — and every `GET /build/tasks`,\n * `/build/next`, board publication and creation-feed read asked it again. Measured on the 128-task plan of\n * `app-creation-test-007` (wave `6ae445c316a9f33246138f32`): `artifact-state` 377 s, `prepareNextBuildTask`\n * about 13 min, `GET /build/tasks` 384 s and 1 359 s. Because the wave's fill loop selects one slot at a time,\n * a selection that slow kept parallelism 5 at one task in flight all day, and the readers and the wave starved\n * each other on one event loop.\n *\n * Nothing about that answer can move unless one of its inputs moves, and every input is either a FILE (git's\n * view of the tree, and the build outputs the introspection witnesses read) or an in-process EVENT (a run\n * selected, admitted, settled, accepted, re-armed). So the answer is held against a key built from exactly\n * those, re-derived the first time the key differs, and shared — including while it is being computed — by\n * every caller asking at the same key.\n *\n * ## What the key is made of, and why each part\n *\n * - **git: HEAD and the porcelain difference list** (`GitLandingSourceState`). A probe asks \"is this path\n * committed\" — tracked, and HEAD, index and working tree in agreement — so HEAD plus the list of paths that\n * differ from it decides every such answer. Two spawns, whatever the plan's size. A commit (the accept, a\n * reconciliation, a person) moves HEAD, so a task its commit lands is landed at the very next read (#3219).\n * - **the size and mtime of every DIRTY path.** The porcelain line of a file edited twice is the same line,\n * while the introspection witnesses read the working tree, so a second edit must still move the key.\n * - **the build outputs the witnesses read**, signed by the callers that own them (each application package's\n * evaluated companion tree, and the schema-plan inputs). A source edit moves git BEFORE its emit; without\n * this part an answer computed against the old build would be cached under the new key and the emit would\n * change nothing the key sees. The creation-plane projection signs the same population for the same reason.\n * NOT signed, and stated rather than left to be found: the `@wildo-ai/*` packages injected into the FRONTEND (the\n * design-token CLI and the shell introspection read them). In framework development an engine change there respawns\n * the companion, which empties this cache; a published package never changes under a running process.\n * - **the plan itself**, as its tasks serialize: a task added, removed or redeclared is a different question.\n * - **a run-state generation** the owner bumps on every in-process event the files cannot show (a no-product\n * task lands on a COMPLETED run; a commit's result is announced before anyone re-reads git).\n *\n * No digest is taken of any of it (`application-creation-directive.md`): the parts are compared as text, and\n * nothing is persisted. Deleting the whole cache costs one re-derivation.\n *\n * ## The one answer that is NOT held: an UNKNOWN one\n *\n * A generation step whose landing check could not be answered, or a witness the companion could not read (an\n * introspection subprocess still warming, a CLI that timed out), is a fact about THIS PROCESS at THIS INSTANT,\n * not about any file — so no key moves when it heals. Such a resolution is PROVISIONAL: reused only for\n * {@link PROVISIONAL_LANDING_REUSE_MS} at an unchanged key, then derived again. Holding it would keep a step\n * \"landing unknown\" until an unrelated edit, which is #3223's restart race made permanent; not holding it at\n * all would re-derive the whole plan on every read for as long as one check stays unanswerable.\n */\n\n/** How long a resolution that contained an UNKNOWN answer may be reused at an unchanged key. */\nexport const PROVISIONAL_LANDING_REUSE_MS = 20_000;\n\n/** Everything a landing key is composed from, gathered by its owner. */\nexport interface LandingSourceStateInputs {\n /** `undefined` when git could not be asked: the key is then refused, so no cache hit can be authorized. */\n readonly git: GitLandingSourceState | undefined;\n /** The application root the porcelain paths are relative to. */\n readonly saasRoot: string;\n /** The plan, serialized by the caller (its task list). */\n readonly planIdentity: string;\n /** Build-output signatures (`label=signature` lines); a part that could not be read is still a part. */\n readonly buildSignatures: readonly string[];\n /** The owner's in-process run-state generation. */\n readonly runStateGeneration: number;\n}\n\n/**\n * The landing key, or `undefined` when git could not be read — which must never authorize a hit, since an\n * unreadable tree and an unchanged one are indistinguishable from their result\n * (`.claude/rules/negative-results-require-a-positive-probe.md`).\n */\nexport async function composeLandingSourceKey(inputs: LandingSourceStateInputs): Promise<string | undefined> {\n if (inputs.git === undefined) return undefined;\n const dirty = await Promise.all([...new Set(inputs.git.changedPaths)].sort().map(async (path) => {\n try {\n const stats = await stat(join(inputs.saasRoot, path));\n return `${path}:${stats.size}:${stats.mtimeMs}`;\n } catch {\n // Deleted (or a directory git still names): its absence is the state, and the porcelain line already says it.\n return `${path}:absent`;\n }\n }));\n return [\n `head:${inputs.git.headSha ?? 'unborn'}`,\n `run-state:${inputs.runStateGeneration}`,\n `status:${inputs.git.porcelain}`,\n `dirty:${dirty.join('|')}`,\n ...inputs.buildSignatures,\n `plan:${inputs.planIdentity}`,\n ].join('\\n');\n}\n\n/** A resolution held by {@link LandingProjectionCache}, with whatever its readers derived from it at the same key. */\ninterface LandingProjectionSlot<T> {\n readonly key: string;\n /** The order the key's reading STARTED in; an older reading never replaces a newer slot. */\n readonly sequence: number;\n readonly value: Promise<T>;\n /** Set once the value settled and turned out provisional: the instant after which it is no longer reused. */\n reuseUntilMs?: number;\n /** Answers derived FROM this value (the all-stuck reading, …), valid exactly as long as the value is. */\n readonly derived: Map<string, Promise<unknown>>;\n}\n\n/**\n * A single-slot, single-flight memo keyed by a landing source key.\n *\n * Single slot because one companion serves one application and one plan: the previous key is never asked for\n * again once the tree has moved past it. Single-flight because the readers arrive together — a wave's\n * selection, a board publication, a console poll — and each used to start its own derivation.\n */\nexport class LandingProjectionCache<T> {\n private slot: LandingProjectionSlot<T> | undefined;\n /** How many derivations this cache started — read by the benchmark and the pins, never by the product. */\n public derivations = 0;\n\n public constructor(\n /** Whether a settled value holds an UNKNOWN answer and may only be reused briefly. */\n private readonly isProvisional: (value: T) => boolean,\n private readonly now: () => number = () => Date.now(),\n ) {}\n\n /** Drop everything held. A key change does this on its own; this is for an owner that knows better. */\n public clear(): void {\n this.slot = undefined;\n }\n\n /**\n * Drop the held slot when it holds `value`, a derivation its owner has stopped trusting (#3204: one that ran past the\n * landing wait ceiling). The next caller at that key derives again instead of being handed the same pending promise.\n * A slot holding anything else is left alone.\n */\n public evict(value: Promise<T>): void {\n if (this.slot?.value === value) this.slot = undefined;\n }\n\n /**\n * The value at `key`: the held one when it is current, else a fresh derivation every caller at that key\n * shares. With no key (the state could not be read) the derivation runs and nothing is held. `sequence` is the order\n * the key's reading started in (omitted: newest).\n */\n public resolve(key: string | undefined, derive: () => Promise<T>, sequence = Number.MAX_SAFE_INTEGER): Promise<T> {\n if (key === undefined) {\n this.derivations += 1;\n return derive();\n }\n const held = this.slot;\n if (held !== undefined && held.key === key && (held.reuseUntilMs === undefined || this.now() <= held.reuseUntilMs)) {\n return held.value;\n }\n this.derivations += 1;\n const value = derive();\n /*\n * A reading that started BEFORE the held one describes an older state: answered, never held, so a late finisher\n * cannot evict the newer slot and make the next reader derive the newer state a second time.\n */\n if (held !== undefined && held.key !== key && held.sequence > sequence) return value;\n const slot: LandingProjectionSlot<T> = { key, sequence, value, derived: new Map() };\n this.slot = slot;\n value.then(\n (settled) => {\n if (this.isProvisional(settled)) slot.reuseUntilMs = this.now() + PROVISIONAL_LANDING_REUSE_MS;\n },\n () => {\n // A failed derivation is held by nobody: the next caller retries rather than inheriting the failure.\n if (this.slot === slot) this.slot = undefined;\n },\n );\n return value;\n }\n\n /**\n * An answer derived from the value at `key`, held beside it and dropped with it. Asked only after\n * {@link resolve} at the same key, so the two describe one state; a key that is no longer the held one\n * (or none) derives without holding.\n */\n public derive<D>(key: string | undefined, name: string, compute: () => Promise<D>): Promise<D> {\n const held = this.slot;\n if (key === undefined || held === undefined || held.key !== key) return compute();\n const existing = held.derived.get(name);\n if (existing !== undefined) return existing as Promise<D>;\n const computed = compute();\n held.derived.set(name, computed);\n computed.catch(() => {\n if (held.derived.get(name) === computed) held.derived.delete(name);\n });\n return computed;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"application-build-landing-projection.companion.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-landing-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAgBnD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAgC;IAC5E,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAC9F,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACtD,OAAO,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,8GAA8G;YAC9G,OAAO,GAAG,IAAI,SAAS,CAAC;QAC1B,CAAC;IACH,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO;QACL,QAAQ,MAAM,CAAC,GAAG,CAAC,OAAO,IAAI,QAAQ,EAAE;QACxC,aAAa,MAAM,CAAC,kBAAkB,EAAE;QACxC,UAAU,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE;QAChC,SAAS,KAAK,CAAC,I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AG,CAAC,IAAI,CAAC,KAAK,QAAQ;gBAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","sourcesContent":["import { stat } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport type { GitLandingSourceState } from '../../claude-cli/services/git-change-set.companion.service';\n\n/**\n * The build plan's LANDING, computed once per source state and shared by every reader (#3206, #3219).\n *\n * ## Why this exists\n *\n * \"Which of the plan's tasks have landed\" was re-derived from nothing on every ask. One build wave asked it at\n * least twice before each dispatch — once in the playbook's `artifact-state` phase (through\n * `resolveBuildExecutionProgress`) and again in `prepareNextBuildTask` — and every `GET /build/tasks`,\n * `/build/next`, board publication and creation-feed read asked it again. Measured on the 128-task plan of\n * `app-creation-test-007` (wave `6ae445c316a9f33246138f32`): `artifact-state` 377 s, `prepareNextBuildTask`\n * about 13 min, `GET /build/tasks` 384 s and 1 359 s. Because the wave's fill loop then selected one slot at a time\n * (slots are prepared side by side since #3883), a selection that slow kept parallelism 5 at one task in flight all day,\n * and the readers and the wave starved each other on one event loop.\n *\n * Nothing about that answer can move unless one of its inputs moves, and every input is either a FILE (git's\n * view of the tree, and the build outputs the introspection witnesses read) or an in-process EVENT (a run\n * selected, admitted, settled, accepted, re-armed). So the answer is held against a key built from exactly\n * those, re-derived the first time the key differs, and shared — including while it is being computed — by\n * every caller asking at the same key.\n *\n * ## What the key is made of, and why each part\n *\n * - **git: HEAD and the porcelain difference list** (`GitLandingSourceState`). A probe asks \"is this path\n * committed\" — tracked, and HEAD, index and working tree in agreement — so HEAD plus the list of paths that\n * differ from it decides every such answer. Two spawns, whatever the plan's size. A commit (the accept, a\n * reconciliation, a person) moves HEAD, so a task its commit lands is landed at the very next read (#3219).\n * - **the size and mtime of every DIRTY path.** The porcelain line of a file edited twice is the same line,\n * while the introspection witnesses read the working tree, so a second edit must still move the key.\n * - **the build outputs the witnesses read**, signed by the callers that own them (each application package's\n * evaluated companion tree, and the schema-plan inputs). A source edit moves git BEFORE its emit; without\n * this part an answer computed against the old build would be cached under the new key and the emit would\n * change nothing the key sees. The creation-plane projection signs the same population for the same reason.\n * NOT signed, and stated rather than left to be found: the `@wildo-ai/*` packages injected into the FRONTEND (the\n * design-token CLI and the shell introspection read them). In framework development an engine change there respawns\n * the companion, which empties this cache; a published package never changes under a running process.\n * - **the plan itself**, as its tasks serialize: a task added, removed or redeclared is a different question.\n * - **a run-state generation** the owner bumps on every in-process event the files cannot show (a no-product\n * task lands on a COMPLETED run; a commit's result is announced before anyone re-reads git).\n *\n * No digest is taken of any of it (`application-creation-directive.md`): the parts are compared as text, and\n * nothing is persisted. Deleting the whole cache costs one re-derivation.\n *\n * ## The one answer that is NOT held: an UNKNOWN one\n *\n * A generation step whose landing check could not be answered, or a witness the companion could not read (an\n * introspection subprocess still warming, a CLI that timed out), is a fact about THIS PROCESS at THIS INSTANT,\n * not about any file — so no key moves when it heals. Such a resolution is PROVISIONAL: reused only for\n * {@link PROVISIONAL_LANDING_REUSE_MS} at an unchanged key, then derived again. Holding it would keep a step\n * \"landing unknown\" until an unrelated edit, which is #3223's restart race made permanent; not holding it at\n * all would re-derive the whole plan on every read for as long as one check stays unanswerable.\n */\n\n/** How long a resolution that contained an UNKNOWN answer may be reused at an unchanged key. */\nexport const PROVISIONAL_LANDING_REUSE_MS = 20_000;\n\n/** Everything a landing key is composed from, gathered by its owner. */\nexport interface LandingSourceStateInputs {\n /** `undefined` when git could not be asked: the key is then refused, so no cache hit can be authorized. */\n readonly git: GitLandingSourceState | undefined;\n /** The application root the porcelain paths are relative to. */\n readonly saasRoot: string;\n /** The plan, serialized by the caller (its task list). */\n readonly planIdentity: string;\n /** Build-output signatures (`label=signature` lines); a part that could not be read is still a part. */\n readonly buildSignatures: readonly string[];\n /** The owner's in-process run-state generation. */\n readonly runStateGeneration: number;\n}\n\n/**\n * The landing key, or `undefined` when git could not be read — which must never authorize a hit, since an\n * unreadable tree and an unchanged one are indistinguishable from their result\n * (`.claude/rules/negative-results-require-a-positive-probe.md`).\n */\nexport async function composeLandingSourceKey(inputs: LandingSourceStateInputs): Promise<string | undefined> {\n if (inputs.git === undefined) return undefined;\n const dirty = await Promise.all([...new Set(inputs.git.changedPaths)].sort().map(async (path) => {\n try {\n const stats = await stat(join(inputs.saasRoot, path));\n return `${path}:${stats.size}:${stats.mtimeMs}`;\n } catch {\n // Deleted (or a directory git still names): its absence is the state, and the porcelain line already says it.\n return `${path}:absent`;\n }\n }));\n return [\n `head:${inputs.git.headSha ?? 'unborn'}`,\n `run-state:${inputs.runStateGeneration}`,\n `status:${inputs.git.porcelain}`,\n `dirty:${dirty.join('|')}`,\n ...inputs.buildSignatures,\n `plan:${inputs.planIdentity}`,\n ].join('\\n');\n}\n\n/** A resolution held by {@link LandingProjectionCache}, with whatever its readers derived from it at the same key. */\ninterface LandingProjectionSlot<T> {\n readonly key: string;\n /** The order the key's reading STARTED in; an older reading never replaces a newer slot. */\n readonly sequence: number;\n readonly value: Promise<T>;\n /** Set once the value settled and turned out provisional: the instant after which it is no longer reused. */\n reuseUntilMs?: number;\n /** Answers derived FROM this value (the all-stuck reading, …), valid exactly as long as the value is. */\n readonly derived: Map<string, Promise<unknown>>;\n}\n\n/**\n * A single-slot, single-flight memo keyed by a landing source key.\n *\n * Single slot because one companion serves one application and one plan: the previous key is never asked for\n * again once the tree has moved past it. Single-flight because the readers arrive together — a wave's\n * selection, a board publication, a console poll — and each used to start its own derivation.\n */\nexport class LandingProjectionCache<T> {\n private slot: LandingProjectionSlot<T> | undefined;\n /** How many derivations this cache started — read by the benchmark and the pins, never by the product. */\n public derivations = 0;\n\n public constructor(\n /** Whether a settled value holds an UNKNOWN answer and may only be reused briefly. */\n private readonly isProvisional: (value: T) => boolean,\n private readonly now: () => number = () => Date.now(),\n ) {}\n\n /** Drop everything held. A key change does this on its own; this is for an owner that knows better. */\n public clear(): void {\n this.slot = undefined;\n }\n\n /**\n * Drop the held slot when it holds `value`, a derivation its owner has stopped trusting (#3204: one that ran past the\n * landing wait ceiling). The next caller at that key derives again instead of being handed the same pending promise.\n * A slot holding anything else is left alone.\n */\n public evict(value: Promise<T>): void {\n if (this.slot?.value === value) this.slot = undefined;\n }\n\n /**\n * The value at `key`: the held one when it is current, else a fresh derivation every caller at that key\n * shares. With no key (the state could not be read) the derivation runs and nothing is held. `sequence` is the order\n * the key's reading started in (omitted: newest).\n */\n public resolve(key: string | undefined, derive: () => Promise<T>, sequence = Number.MAX_SAFE_INTEGER): Promise<T> {\n if (key === undefined) {\n this.derivations += 1;\n return derive();\n }\n const held = this.slot;\n if (held !== undefined && held.key === key && (held.reuseUntilMs === undefined || this.now() <= held.reuseUntilMs)) {\n return held.value;\n }\n this.derivations += 1;\n const value = derive();\n /*\n * A reading that started BEFORE the held one describes an older state: answered, never held, so a late finisher\n * cannot evict the newer slot and make the next reader derive the newer state a second time.\n */\n if (held !== undefined && held.key !== key && held.sequence > sequence) return value;\n const slot: LandingProjectionSlot<T> = { key, sequence, value, derived: new Map() };\n this.slot = slot;\n value.then(\n (settled) => {\n if (this.isProvisional(settled)) slot.reuseUntilMs = this.now() + PROVISIONAL_LANDING_REUSE_MS;\n },\n () => {\n // A failed derivation is held by nobody: the next caller retries rather than inheriting the failure.\n if (this.slot === slot) this.slot = undefined;\n },\n );\n return value;\n }\n\n /**\n * An answer derived from the value at `key`, held beside it and dropped with it. Asked only after\n * {@link resolve} at the same key, so the two describe one state; a key that is no longer the held one\n * (or none) derives without holding.\n */\n public derive<D>(key: string | undefined, name: string, compute: () => Promise<D>): Promise<D> {\n const held = this.slot;\n if (key === undefined || held === undefined || held.key !== key) return compute();\n const existing = held.derived.get(name);\n if (existing !== undefined) return existing as Promise<D>;\n const computed = compute();\n held.derived.set(name, computed);\n computed.catch(() => {\n if (held.derived.get(name) === computed) held.derived.delete(name);\n });\n return computed;\n }\n}\n"]}
|
|
@@ -144,6 +144,7 @@ export declare const BuildTaskClosureSchema: z.ZodObject<{
|
|
|
144
144
|
satisfiedBy: z.ZodOptional<z.ZodString>;
|
|
145
145
|
reason: z.ZodString;
|
|
146
146
|
closedAt: z.ZodISODateTime;
|
|
147
|
+
carriedFollowUpGapKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
147
148
|
}, z.core.$strict>;
|
|
148
149
|
export type BuildTaskClosure = z.infer<typeof BuildTaskClosureSchema>;
|
|
149
150
|
/**
|
|
@@ -154,8 +155,14 @@ export declare const BuildFollowUpApprovalSchema: z.ZodObject<{
|
|
|
154
155
|
taskRef: z.ZodString;
|
|
155
156
|
note: z.ZodOptional<z.ZodString>;
|
|
156
157
|
approvedAt: z.ZodISODateTime;
|
|
158
|
+
carriedFollowUpGapKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
159
|
}, z.core.$strict>;
|
|
158
160
|
export type BuildFollowUpApproval = z.infer<typeof BuildFollowUpApprovalSchema>;
|
|
161
|
+
/**
|
|
162
|
+
* The decisions file (strict). A field added to a record is unreadable to an OLDER companion, which then honours no
|
|
163
|
+
* decision at all until it is updated: deliver the current companion before relying on a new field (#3832 added
|
|
164
|
+
* `carriedFollowUpGapKeys`).
|
|
165
|
+
*/
|
|
159
166
|
export declare const BuildTaskDecisionsFileSchema: z.ZodObject<{
|
|
160
167
|
closures: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
161
168
|
taskRef: z.ZodString;
|
|
@@ -163,11 +170,13 @@ export declare const BuildTaskDecisionsFileSchema: z.ZodObject<{
|
|
|
163
170
|
satisfiedBy: z.ZodOptional<z.ZodString>;
|
|
164
171
|
reason: z.ZodString;
|
|
165
172
|
closedAt: z.ZodISODateTime;
|
|
173
|
+
carriedFollowUpGapKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
174
|
}, z.core.$strict>>>;
|
|
167
175
|
followUpApprovals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
168
176
|
taskRef: z.ZodString;
|
|
169
177
|
note: z.ZodOptional<z.ZodString>;
|
|
170
178
|
approvedAt: z.ZodISODateTime;
|
|
179
|
+
carriedFollowUpGapKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
180
|
}, z.core.$strict>>>;
|
|
172
181
|
}, z.core.$strict>;
|
|
173
182
|
/** What a committed decisions file holds, latest per task. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-build-task-closure.companion.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-task-closure.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAmE,KAAK,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAMlK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,YAAY,CAAC;AAE7D;;;GAGG;AACH,oBAAY,0BAA0B;IACpC,6GAA6G;IAC7G,QAAQ,aAAa;IACrB,iHAAiH;IACjH,YAAY,iBAAiB;IAC7B;;;;OAIG;IACH,OAAO,YAAY;CACpB;AAED,sFAAsF;AACtF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,wBAAwB,GAAG;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IACvF,0FAA0F;IAC1F,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,qBAAqB,EAAE,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CAC3E,GAAG;IACF,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC,QAAQ,GAAG,0BAA0B,CAAC,YAAY,CAAC;IACjG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,gBAAgB,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/E,CAyBA;AAED,6HAA6H;AAC7H,MAAM,WAAW,oBAAoB;IACnC,wHAAwH;IACxH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,wBAAwB,EAChC,OAAO,EAAE,SAAS,wBAAwB,EAAE,EAC5C,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAClD,OAAO,CAOT;AAYD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,wBAAwB,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAWnK;AAID,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"application-build-task-closure.companion.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-task-closure.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,O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QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAC/D,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC,GAAG,OAAO,CAKV"}
|
|
@@ -168,6 +168,13 @@ export const BuildTaskClosureSchema = z.strictObject({
|
|
|
168
168
|
/** Why, in the person's words. Required: a closure nobody can explain is a probe silenced, not a decision. */
|
|
169
169
|
reason: NonEmptyTextSchema,
|
|
170
170
|
closedAt: z.iso.datetime(),
|
|
171
|
+
/**
|
|
172
|
+
* For a derived follow-up: the reported gaps (their `followUpGapKey` values) its objective showed when the person decided
|
|
173
|
+
* (#3832). A follow-up absorbs every report on its target until it is decided or dispatched, so the decision covers
|
|
174
|
+
* exactly these and the follow-up carries them from then on. Absent on a decision recorded before the field: the
|
|
175
|
+
* follow-up then carries its own report only.
|
|
176
|
+
*/
|
|
177
|
+
carriedFollowUpGapKeys: z.array(NonEmptyTextSchema).optional(),
|
|
171
178
|
}).superRefine((closure, context) => {
|
|
172
179
|
const needsSatisfier = closure.kind !== BuildTaskClosureKind.DECLINED;
|
|
173
180
|
if (needsSatisfier !== (closure.satisfiedBy !== undefined)) {
|
|
@@ -183,7 +190,19 @@ export const BuildFollowUpApprovalSchema = z.strictObject({
|
|
|
183
190
|
/** What the person said, when they said anything; the commit records who and when either way. */
|
|
184
191
|
note: NonEmptyTextSchema.optional(),
|
|
185
192
|
approvedAt: z.iso.datetime(),
|
|
193
|
+
/**
|
|
194
|
+
* For a derived follow-up: the reported gaps (their `followUpGapKey` values) its objective showed when the person decided
|
|
195
|
+
* (#3832). A follow-up absorbs every report on its target until it is decided or dispatched, so the decision covers
|
|
196
|
+
* exactly these and the follow-up carries them from then on. Absent on a decision recorded before the field: the
|
|
197
|
+
* follow-up then carries its own report only.
|
|
198
|
+
*/
|
|
199
|
+
carriedFollowUpGapKeys: z.array(NonEmptyTextSchema).optional(),
|
|
186
200
|
});
|
|
201
|
+
/**
|
|
202
|
+
* The decisions file (strict). A field added to a record is unreadable to an OLDER companion, which then honours no
|
|
203
|
+
* decision at all until it is updated: deliver the current companion before relying on a new field (#3832 added
|
|
204
|
+
* `carriedFollowUpGapKeys`).
|
|
205
|
+
*/
|
|
187
206
|
export const BuildTaskDecisionsFileSchema = z.strictObject({
|
|
188
207
|
closures: z.array(BuildTaskClosureSchema).default([]),
|
|
189
208
|
followUpApprovals: z.array(BuildFollowUpApprovalSchema).default([]),
|