@wildo-ai/dev-companion 1.1.14 → 1.1.16
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 +233 -6
- 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 +316 -13
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +48 -2
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +41 -3
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts +68 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js +198 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js.map +1 -0
- package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts +6 -0
- package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.js.map +1 -1
- package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts +19 -5
- package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/verification-tool-availability.models.js +17 -5
- package/dist/esm/claude-cli/models/verification-tool-availability.models.js.map +1 -1
- package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts +138 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.js +204 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.js.map +1 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +36 -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 +71 -16
- 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 +234 -9
- 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 +1073 -182
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +14 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js +35 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts +36 -0
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js +134 -0
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js.map +1 -0
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +7 -1
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
- package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts +3 -2
- package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/translation-placement.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +13 -0
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +98 -16
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +24 -14
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +42 -0
- package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/workspace-element-index.companion.js +42 -0
- package/dist/esm/core/introspection/workspace-element-index.companion.js.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +53 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js +119 -2
- package/dist/esm/core/runtime/dev-compile-quiet.companion.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 +13 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +2 -2
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +6 -6
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.d.ts +5 -0
- package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.js +44 -11
- package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
- package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts +26 -2
- package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
- package/dist/esm/email/utils/email-template-fs-discovery.utils.js +41 -2
- package/dist/esm/email/utils/email-template-fs-discovery.utils.js.map +1 -1
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts +19 -0
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts.map +1 -0
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js +171 -0
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js.map +1 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.d.ts +75 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.d.ts.map +1 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.js +162 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.js.map +1 -0
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +21 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js +35 -3
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchAspects.en.js +4 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +35 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +12 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +536 -531
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +536 -531
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +3 -3
- package/dist/esm/i18n/system_enums/workbench-build.en.js +3 -3
- package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +7 -3
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +23 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +14 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +21 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +117 -3
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +5 -0
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +22 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +98 -24
- 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 +439 -93
- 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 +21 -8
- 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 +74 -12
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +47 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +98 -9
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +39 -3
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +224 -48
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +45 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +74 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts +12 -0
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js +30 -1
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +21 -2
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +71 -5
- 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 +219 -17
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts +55 -1
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js +157 -10
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js.map +1 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts +19 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.js +7 -5
- package/dist/esm/meta-workflows/services/website-demo-facts.models.js.map +1 -1
- package/dist/esm/module-layout/module-layout-convention.companion.d.ts +158 -0
- package/dist/esm/module-layout/module-layout-convention.companion.d.ts.map +1 -0
- package/dist/esm/module-layout/module-layout-convention.companion.js +272 -0
- package/dist/esm/module-layout/module-layout-convention.companion.js.map +1 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.d.ts +42 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.d.ts.map +1 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.js +290 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.js.map +1 -0
- package/dist/esm/module-layout/module-source-files.companion.d.ts +3 -0
- package/dist/esm/module-layout/module-source-files.companion.d.ts.map +1 -0
- package/dist/esm/module-layout/module-source-files.companion.js +45 -0
- package/dist/esm/module-layout/module-source-files.companion.js.map +1 -0
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -0
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +3 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
- package/package.json +17 -17
|
@@ -7,8 +7,12 @@
|
|
|
7
7
|
* TS `enum`, UPPER_SNAKE members, snake_case string values.
|
|
8
8
|
*/
|
|
9
9
|
import { describeCaughtError, ErrorType, FlowsActors_Status, isWildoBackendError } from '@wildo-ai/saas-models';
|
|
10
|
+
import { BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';
|
|
10
11
|
import { CodingRunFailureAttribution } from '@wildo-ai/platform-core-shared';
|
|
12
|
+
import { ProviderModuleFacet } from '@wildo-ai/platform-config-lib';
|
|
11
13
|
import { z } from 'zod';
|
|
14
|
+
import { CarriedVerificationReason } from '../../meta-workflows/models/carried-verification-failure.models.js';
|
|
15
|
+
import { MODULE_PACKAGES, MODULES_SOURCE_DIRECTORY } from '../../module-layout/module-layout-convention.companion.js';
|
|
12
16
|
/**
|
|
13
17
|
* Run limits (P-18): defaults 30 min / 10 MiB, request-overridable up to
|
|
14
18
|
* hard caps 60 min / 32 MiB. The byte cap REJECTS (SIGTERMs the run), it
|
|
@@ -97,6 +101,16 @@ export var VerificationKind;
|
|
|
97
101
|
* first broke the build lane for the whole application until a person edited the file.
|
|
98
102
|
*/
|
|
99
103
|
VerificationKind["SPECIFICATION_EXPORTS"] = "specification_exports";
|
|
104
|
+
/**
|
|
105
|
+
* Every business module's conventional files held to the folders the framework reads them from (#3904), by
|
|
106
|
+
* `inspectModuleLayout` (`module-layout/module-layout-inspection.companion.ts`) over the working tree, in the companion
|
|
107
|
+
* process, no command. A module's email definitions outside `emails/`, a custom operation outside `resources/`, a
|
|
108
|
+
* resource's schema, configuration, UI behaviour or specification outside its conventional folder: each compiles green
|
|
109
|
+
* and is then silently not read (the generated email lands where nothing registers it, the operation is never
|
|
110
|
+
* registered, the landed probe never finds the file). Each finding is the `mv` that corrects it and the imports to
|
|
111
|
+
* update, so the run's retry moves the file. Never could-not-ask: an absent package or module has nothing to hold.
|
|
112
|
+
*/
|
|
113
|
+
VerificationKind["MODULE_LAYOUT"] = "module_layout";
|
|
100
114
|
/**
|
|
101
115
|
* `pnpm run build`, cwd = `<saasRoot>/<path>` — the package's OWN build script, so the template that wrote the
|
|
102
116
|
* package stays the authority on how it builds (`astro build` for the website, `docusaurus build` for the
|
|
@@ -257,9 +271,13 @@ export function codingRunChangedNoFileOfItsOwn(files, isAttributedToAnotherWrite
|
|
|
257
271
|
* here, and an unbounded exclusion would re-dispatch it, and pay for it, forever. A row written before this field
|
|
258
272
|
* existed carries none and counts, as it always did.
|
|
259
273
|
*
|
|
260
|
-
*
|
|
261
|
-
* excluded outright, spending no forgiveness, because the build pauses until the
|
|
262
|
-
* re-dispatching
|
|
274
|
+
* Exceptions, each excluded by its own mechanism rather than the generic bound: the account's USAGE LIMIT (#2388) — the
|
|
275
|
+
* run records `codingAgentUsageLimit` and is excluded outright, spending no forgiveness, because the build pauses until the
|
|
276
|
+
* stated reset instead of re-dispatching, so the unbounded re-dispatch the bound guards against cannot happen while
|
|
277
|
+
* nothing starts; the NETWORK (#3236), on a bound of its own behind a connectivity hold; and a run whose checks could not
|
|
278
|
+
* be ASKED (run 43961156770, {@link failedOnlyForUnansweredVerification}), never counted, because a cause two tasks meet
|
|
279
|
+
* holds every admission and one task meeting it twice in a row is withheld
|
|
280
|
+
* (`MAXIMUM_CONSECUTIVE_UNANSWERED_VERIFICATION_RUNS`), which is what bounds its re-dispatch instead.
|
|
263
281
|
*/
|
|
264
282
|
/**
|
|
265
283
|
* The one derivation of {@link CodingRunFailureAttribution} from what a concluded run recorded.
|
|
@@ -271,7 +289,8 @@ export function codingRunChangedNoFileOfItsOwn(files, isAttributedToAnotherWrite
|
|
|
271
289
|
* and the one that would otherwise re-dispatch without end (#1581, second review A1).
|
|
272
290
|
*
|
|
273
291
|
* `verificationCouldNotAsk` is true when every check this run failed on threw instead of answering: no check judged the
|
|
274
|
-
* work, so a VERIFICATION_FAILED of that kind is the host's
|
|
292
|
+
* work, so a VERIFICATION_FAILED of that kind is the host's (#3258). It is never counted against the attempt budget
|
|
293
|
+
* (run 43961156770, {@link failedOnlyForUnansweredVerification}); holds bound it instead.
|
|
275
294
|
*
|
|
276
295
|
* `null` for a run that did not fail — a success, or a park waiting on an answer.
|
|
277
296
|
*/
|
|
@@ -292,6 +311,29 @@ export function deriveCodingRunFailureAttribution(input) {
|
|
|
292
311
|
return input.agentTurnTakenByHost ? CodingRunFailureAttribution.HOST : CodingRunFailureAttribution.TASK;
|
|
293
312
|
}
|
|
294
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* Did this FAILED coding run fail only because its checks could not be ASKED, with nothing since showing that a check
|
|
316
|
+
* judged the work (run 43961156770)? Such a run is never the task's failure, so the attempt budget never counts it
|
|
317
|
+
* (`selectBudgetCountingFailures`) and spends no forgiveness on it. Two holds bound it instead: a cause met on two
|
|
318
|
+
* distinct tasks holds every admission (`VerificationHostCause.REPEATED_HOST_FAILURE`), and a task meeting it on
|
|
319
|
+
* `MAXIMUM_CONSECUTIVE_UNANSWERED_VERIFICATION_RUNS` runs in a row is withheld on its own
|
|
320
|
+
* (`deriveUnansweredVerificationWithholding`), so a cause only one task meets is bounded too.
|
|
321
|
+
*
|
|
322
|
+
* Derived from what every such row already records, so a run settled before this rule is read the same way: a
|
|
323
|
+
* VERIFICATION_FAILED is HOST-attributed exactly when every check it failed on threw instead of answering
|
|
324
|
+
* ({@link deriveCodingRunFailureAttribution}, `verificationCouldNotAsk`).
|
|
325
|
+
*
|
|
326
|
+
* One exception: an isolated re-check (#3220) that ASKED a check and saw it fail. That run's failure is then proven its
|
|
327
|
+
* own, and it counts as before. A re-check recorded before `unanswered` existed cannot tell an unasked check from a
|
|
328
|
+
* failing one, so its failure counts too, the conservative reading.
|
|
329
|
+
*/
|
|
330
|
+
export function failedOnlyForUnansweredVerification(run) {
|
|
331
|
+
if (run.output.disposition !== ApplicationCodingTaskDisposition.VERIFICATION_FAILED)
|
|
332
|
+
return false;
|
|
333
|
+
if (run.output.failureAttribution !== CodingRunFailureAttribution.HOST)
|
|
334
|
+
return false;
|
|
335
|
+
return !(run.isolatedRecheck?.results ?? []).some((result) => !result.success && result.unanswered !== true);
|
|
336
|
+
}
|
|
295
337
|
/**
|
|
296
338
|
* Whether a check failing now was already failing before the run, so it is reported and not charged to the run.
|
|
297
339
|
*
|
|
@@ -303,7 +345,226 @@ export function verificationFailureIsCarried(baseline, checkRef, failureFindings
|
|
|
303
345
|
if (!baseline.has(checkRef))
|
|
304
346
|
return false;
|
|
305
347
|
const atBaseline = baseline.get(checkRef);
|
|
306
|
-
|
|
348
|
+
if (atBaseline === undefined)
|
|
349
|
+
return true;
|
|
350
|
+
/*
|
|
351
|
+
* A red that names NO finding while the baseline named some (#3881 review F4) is a different red: the check failed for a
|
|
352
|
+
* reason it could not name (a website whose sections no longer import), and an empty list must not read as "nothing new".
|
|
353
|
+
*/
|
|
354
|
+
const findings = failureFindings ?? [];
|
|
355
|
+
if (findings.length === 0)
|
|
356
|
+
return atBaseline.length === 0;
|
|
357
|
+
return findings.every((finding) => atBaseline.includes(finding));
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Whether a check's findings can be tied to the elements they are about, so a finding about an element the run did not
|
|
361
|
+
* touch can be reported to the application instead of charged to the run (#3881). Total over the catalog
|
|
362
|
+
* ({@link APPLICATION_CODING_TASK_FINDING_ATTRIBUTION}), so a check added tomorrow says which it is or fails its test.
|
|
363
|
+
*/
|
|
364
|
+
export var VerificationFindingAttribution;
|
|
365
|
+
(function (VerificationFindingAttribution) {
|
|
366
|
+
/**
|
|
367
|
+
* Each finding names its identity (`failureFindings`) and the files or business modules it is about
|
|
368
|
+
* (`findingElements`): a finding new since the run's baseline is the application's when another writer wrote those
|
|
369
|
+
* elements during the run and the run did not ({@link attributeVerificationFailure}).
|
|
370
|
+
*/
|
|
371
|
+
VerificationFindingAttribution["PER_FINDING_ELEMENTS"] = "per_finding_elements";
|
|
372
|
+
/**
|
|
373
|
+
* The check's verdict cannot be tied to elements (a compiler's whole program, a CLI's single answer, findings that are
|
|
374
|
+
* all about one file): red at baseline it is carried as before, and a new red is the run's. Unknown attribution is
|
|
375
|
+
* never forgiven.
|
|
376
|
+
*/
|
|
377
|
+
VerificationFindingAttribution["WHOLE_CHECK"] = "whole_check";
|
|
378
|
+
})(VerificationFindingAttribution || (VerificationFindingAttribution = {}));
|
|
379
|
+
const TYPECHECK_ATTRIBUTION_WHY = 'a typecheck: an error in a file the run did not write is still the run\'s when its edit caused it, and the compiler does not say which edit did';
|
|
380
|
+
/**
|
|
381
|
+
* Each catalog check's {@link VerificationFindingAttribution}, and why (#3881). Keyed like
|
|
382
|
+
* {@link APPLICATION_CODING_TASK_VERIFICATION_CATALOG}, and pinned to it by a test. The parametric package typecheck
|
|
383
|
+
* (`check:package-typecheck:<dir>`) is {@link VerificationFindingAttribution.WHOLE_CHECK}, like every typecheck.
|
|
384
|
+
*
|
|
385
|
+
* Measured on reference run 43691253927: `check:website-demo-facts` failed 13 coding runs and `check:specification-exports`
|
|
386
|
+
* 4 on findings about the application rather than the task. Both are application-wide (they read every section, every
|
|
387
|
+
* specification module) and both can name the file each finding is about, so they attribute per finding. So does
|
|
388
|
+
* `check:module-layout`, whose finding is one misplaced file.
|
|
389
|
+
*/
|
|
390
|
+
export const APPLICATION_CODING_TASK_FINDING_ATTRIBUTION = {
|
|
391
|
+
'check:requirements-schema': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
|
|
392
|
+
'check:shared-lib-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
|
|
393
|
+
'check:backend-api-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
|
|
394
|
+
'check:app-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
|
|
395
|
+
'check:specifications-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
|
|
396
|
+
'check:website-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
|
|
397
|
+
'check:technical-doc-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
|
|
398
|
+
'check:frontend-fk-resolution': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one verdict over the resources registry, with no identity per finding' },
|
|
399
|
+
'check:settings-placement-content': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one verdict over the settings rail, the app shell and the frontend registry, with no identity per finding' },
|
|
400
|
+
'check:schema-plan-in-sync': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one CLI answer over the whole resource model; it does not name who changed the model' },
|
|
401
|
+
'check:resources-registry-init': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one CLI answer over the compiled registry, with no identity per finding' },
|
|
402
|
+
'check:specification-exports': {
|
|
403
|
+
attribution: VerificationFindingAttribution.PER_FINDING_ELEMENTS,
|
|
404
|
+
why: 'a root-cause module fault names its module file, a refused specification its authored file; a package that does not load, a refusal with no authored frame and a chapter-file fault name nothing and stay the run\'s',
|
|
405
|
+
},
|
|
406
|
+
'check:module-layout': { attribution: VerificationFindingAttribution.PER_FINDING_ELEMENTS, why: 'each finding is one misplaced file' },
|
|
407
|
+
'check:website-demo-facts': {
|
|
408
|
+
attribution: VerificationFindingAttribution.PER_FINDING_ELEMENTS,
|
|
409
|
+
why: 'each untrue demo names the file it is defined in and the resource it draws, so that resource\'s module; a resource the application lacks, or an unknown definition site, names nothing and stays the run\'s',
|
|
410
|
+
},
|
|
411
|
+
'check:website-build': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'an end-of-build site build: one verdict, asked of no build task' },
|
|
412
|
+
'check:technical-doc-build': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'an end-of-build site build: one verdict, asked of no build task' },
|
|
413
|
+
'check:config-validate': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one CLI answer over the application configuration, asked of no build task' },
|
|
414
|
+
'check:design-system-contrast': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'every finding is about the one design-system file' },
|
|
415
|
+
'check:design-system-contract': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'every finding is about the one design-system file' },
|
|
416
|
+
'check:design-system-brand': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'every finding is about the one design-system file (the website advice never fails the check)' },
|
|
417
|
+
'check:backend-ready': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'the running backend: one verdict, asked of no build task' },
|
|
418
|
+
'check:browser-smoke': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'the running frontend: one verdict, asked of no build task' },
|
|
419
|
+
};
|
|
420
|
+
const BUSINESS_MODULE_PATH_PATTERN = new RegExp(`^(?:${MODULE_PACKAGES.join('|')})/${MODULES_SOURCE_DIRECTORY}/([^/]+)/`, 'u');
|
|
421
|
+
const MODULE_PACKAGE_SOURCE_PATTERN = new RegExp(`^(?:${MODULE_PACKAGES.join('|')})/src/`, 'u');
|
|
422
|
+
/**
|
|
423
|
+
* The business module an application-relative path belongs to (`<package>/src/modules/<module>/…`, the folders `add-module`
|
|
424
|
+
* writes in every `MODULE_PACKAGES` package), or `undefined` for a path in no module.
|
|
425
|
+
*/
|
|
426
|
+
export function businessModuleOfPath(path) {
|
|
427
|
+
return BUSINESS_MODULE_PATH_PATTERN.exec(path)?.[1];
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* The elements of the files a writer wrote, plus the modules it was built for; the modules of the files are added.
|
|
431
|
+
* `sharedCodeTouchesEveryModule` marks a writer that changed a module package's shared source as touching every module
|
|
432
|
+
* ({@link CodingRunWrittenElements.touchesEveryModule}); pass it for the run being judged only.
|
|
433
|
+
*/
|
|
434
|
+
export function deriveCodingRunWrittenElements(input) {
|
|
435
|
+
const moduleRefs = new Set(input.moduleRefs ?? []);
|
|
436
|
+
let touchesEveryModule = false;
|
|
437
|
+
for (const path of input.paths) {
|
|
438
|
+
const moduleRef = businessModuleOfPath(path);
|
|
439
|
+
if (moduleRef !== undefined)
|
|
440
|
+
moduleRefs.add(moduleRef);
|
|
441
|
+
else if (input.sharedCodeTouchesEveryModule === true && MODULE_PACKAGE_SOURCE_PATTERN.test(path))
|
|
442
|
+
touchesEveryModule = true;
|
|
443
|
+
}
|
|
444
|
+
return { paths: [...new Set(input.paths)].sort(), moduleRefs: [...moduleRefs].sort(), ...(touchesEveryModule ? { touchesEveryModule: true } : {}) };
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Whether a writer touched what a finding is about: a file it names (or a file under a folder it names), or the business
|
|
448
|
+
* module of either. Module-level on purpose: a module task owns its module's files in every package, so a finding in its
|
|
449
|
+
* module's specification is its own even when it changed only the module's schema.
|
|
450
|
+
*/
|
|
451
|
+
export function verificationFindingTouchedBy(elements, written) {
|
|
452
|
+
const modules = new Set(written.moduleRefs);
|
|
453
|
+
if (elements.moduleRefs.some((moduleRef) => modules.has(moduleRef)))
|
|
454
|
+
return true;
|
|
455
|
+
if (written.touchesEveryModule === true && elements.moduleRefs.length > 0)
|
|
456
|
+
return true;
|
|
457
|
+
return elements.paths.some((path) => {
|
|
458
|
+
const moduleRef = businessModuleOfPath(path);
|
|
459
|
+
if (moduleRef !== undefined && (modules.has(moduleRef) || written.touchesEveryModule === true))
|
|
460
|
+
return true;
|
|
461
|
+
const folder = path.endsWith('/') ? path : `${path}/`;
|
|
462
|
+
return written.paths.some((writtenPath) => writtenPath === path || writtenPath.startsWith(folder));
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Whose failure a FAILED check is (#3881): the run's, or the application's. Generalizes {@link verificationFailureIsCarried},
|
|
467
|
+
* which stays the first rule.
|
|
468
|
+
*
|
|
469
|
+
* 1. Red at baseline with no finding the baseline did not name: carried, as before
|
|
470
|
+
* ({@link CarriedVerificationReason.RED_AT_BASELINE}).
|
|
471
|
+
* 2. Each finding new since the baseline is judged alone. It is the RUN's when it names nothing (no `findingElements`
|
|
472
|
+
* entry: unknown attribution is never forgiven), when the run touched what it names ({@link verificationFindingTouchedBy}),
|
|
473
|
+
* or when no other writer of the run's window did. It is the APPLICATION's only when another writer touched what it
|
|
474
|
+
* names and the run did not: evidence that somebody else caused it. A run alone in the tree is the only possible cause
|
|
475
|
+
* of a new finding, so it is charged with every one, which is the #3258 rule the first rule states.
|
|
476
|
+
* 3. The check fails the run when one finding is the run's. When none is, it is carried
|
|
477
|
+
* ({@link CarriedVerificationReason.FINDINGS_ANOTHER_WRITER_CAUSED}), and its application findings are recorded.
|
|
478
|
+
*/
|
|
479
|
+
export function attributeVerificationFailure(input) {
|
|
480
|
+
if (verificationFailureIsCarried(input.baseline, input.checkRef, input.failureFindings)) {
|
|
481
|
+
return { chargedToRun: false, carriedBecause: CarriedVerificationReason.RED_AT_BASELINE, applicationFindings: [] };
|
|
482
|
+
}
|
|
483
|
+
const findings = input.failureFindings ?? [];
|
|
484
|
+
if (findings.length === 0)
|
|
485
|
+
return { chargedToRun: true, applicationFindings: [] };
|
|
486
|
+
const atBaseline = input.baseline.get(input.checkRef) ?? [];
|
|
487
|
+
let runOwnsOne = false;
|
|
488
|
+
const applicationFindings = [];
|
|
489
|
+
for (const finding of findings) {
|
|
490
|
+
if (atBaseline.includes(finding))
|
|
491
|
+
continue;
|
|
492
|
+
const elements = input.findingElements?.[finding];
|
|
493
|
+
const named = elements !== undefined && (elements.paths.length > 0 || elements.moduleRefs.length > 0);
|
|
494
|
+
if (!named || verificationFindingTouchedBy(elements, input.run)) {
|
|
495
|
+
runOwnsOne = true;
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
498
|
+
const writers = input.otherWriters.filter((writer) => verificationFindingTouchedBy(elements, writer.written));
|
|
499
|
+
if (writers.length === 0) {
|
|
500
|
+
runOwnsOne = true;
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
applicationFindings.push({
|
|
504
|
+
checkRef: input.checkRef,
|
|
505
|
+
finding,
|
|
506
|
+
writtenByTaskRefs: [...new Set(writers.flatMap((writer) => (writer.taskRef === undefined ? [] : [writer.taskRef])))].sort(),
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
return runOwnsOne
|
|
510
|
+
? { chargedToRun: true, applicationFindings }
|
|
511
|
+
: { chargedToRun: false, carriedBecause: CarriedVerificationReason.FINDINGS_ANOTHER_WRITER_CAUSED, applicationFindings };
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* The `sourceRef` of the build task's self-description in a coding contract (`buildTaskSelfDescriptionContextSource`):
|
|
515
|
+
* its content carries the task's `target`. Pinned to that producer by a test.
|
|
516
|
+
*/
|
|
517
|
+
export const BUILD_TASK_SELF_DESCRIPTION_SOURCE_REF = 'application-creation:context/build-task';
|
|
518
|
+
/**
|
|
519
|
+
* The business module a coding task was BUILT for (#3881): its build task's target `moduleRef`, read from the contract's
|
|
520
|
+
* self-description. Empty for a task whose target names no module (a website, an application-wide config) and for a
|
|
521
|
+
* contract that is no build task's. A finding in that module is the run's even when the run wrote nothing there yet.
|
|
522
|
+
*/
|
|
523
|
+
export function readCodingTaskTargetModuleRefs(task) {
|
|
524
|
+
const source = task.contextSelection.selectedSources.find((candidate) => candidate.sourceRef === BUILD_TASK_SELF_DESCRIPTION_SOURCE_REF);
|
|
525
|
+
const target = source?.content?.target;
|
|
526
|
+
return typeof target?.moduleRef === 'string' && target.moduleRef.length > 0 ? [target.moduleRef] : [];
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* The checks of the packages a coding task is the AUTHOR of, whose red at the baseline is never carried (#4018): the
|
|
530
|
+
* package typecheck of each facet of a `PROVIDER_BINDING` task's own provider (`providers/<ref>/backend|frontend`), read
|
|
531
|
+
* from the contract's self-description like {@link readCodingTaskTargetModuleRefs}. Empty for any other task.
|
|
532
|
+
*
|
|
533
|
+
* The baseline rule forgives a red the run found in the tree (#1273), and for a provider's own package that red is the
|
|
534
|
+
* TASK's: an earlier attempt installed or wrote the package and left it uncompilable, and the attempt's files stay in the
|
|
535
|
+
* tree. Forgiven, the retry lands a provider the application cannot compile, and the backend waits on it for the rest of
|
|
536
|
+
* the run, as Mailgun's did on reference run 44052185141. Not forgiven, the retry fails until the package compiles, and
|
|
537
|
+
* each retry receives the compiler's output as its previous attempt.
|
|
538
|
+
*/
|
|
539
|
+
export function codingTaskOwnPackageCheckRefs(task) {
|
|
540
|
+
const source = task.contextSelection.selectedSources.find((candidate) => candidate.sourceRef === BUILD_TASK_SELF_DESCRIPTION_SOURCE_REF);
|
|
541
|
+
const target = source?.content?.target;
|
|
542
|
+
if (target?.kind !== BuildPlanTaskTargetKind.PROVIDER_BINDING || typeof target.providerRef !== 'string')
|
|
543
|
+
return [];
|
|
544
|
+
const providerRef = target.providerRef;
|
|
545
|
+
// Each facet a provider module installs is its own workspace package, `providers/<ref>/<facet>` (#2014).
|
|
546
|
+
return Object.values(ProviderModuleFacet).flatMap((facet) => {
|
|
547
|
+
try {
|
|
548
|
+
return [packageTypecheckCheckRef(`providers/${providerRef}/${facet}`)];
|
|
549
|
+
}
|
|
550
|
+
catch {
|
|
551
|
+
// A ref no package directory can carry names no package: nothing of it is the task's to check.
|
|
552
|
+
return [];
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* The application-relative file a stack location names (`/abs/app/specifications/src/x.ts:12:3`), or `undefined` when it
|
|
558
|
+
* is outside the application. `roots` are the application root's spellings (`applicationRootSpellings`).
|
|
559
|
+
*/
|
|
560
|
+
export function applicationRelativeFileOfLocation(location, roots) {
|
|
561
|
+
const file = location.replace(/^file:\/\//u, '').replace(/(?::\d+){1,2}$/u, '');
|
|
562
|
+
for (const root of roots) {
|
|
563
|
+
const prefix = root.endsWith('/') ? root : `${root}/`;
|
|
564
|
+
if (file.startsWith(prefix))
|
|
565
|
+
return file.slice(prefix.length);
|
|
566
|
+
}
|
|
567
|
+
return undefined;
|
|
307
568
|
}
|
|
308
569
|
/**
|
|
309
570
|
* The context key that marks an admission refusal of the task's OWN contract (#1581, review A8).
|
|
@@ -399,6 +660,37 @@ export function readSettledRunFailureMessage(output) {
|
|
|
399
660
|
* source-parity test: the companion ships into applications and cannot import the CLI.
|
|
400
661
|
*/
|
|
401
662
|
export const RESOURCES_REGISTRY_COULD_NOT_ASK_MARKER = 'Cannot check the resources registry';
|
|
663
|
+
/**
|
|
664
|
+
* What the CLI says when a check cannot be asked because an application package's COMPILED model is behind its sources:
|
|
665
|
+
* `shared-lib/dist is older than its sources (…)`. `wildo config check-resources` and `wildo db diff --check` both say it
|
|
666
|
+
* (`describeStaleCompiledModel` in the CLI's `db-schema-plan.utils.ts`, pinned to this text by a source-parity test). The
|
|
667
|
+
* package before `/dist` is the one the verifier waits on ({@link readStaleCompiledModelPackage}).
|
|
668
|
+
*/
|
|
669
|
+
export const STALE_COMPILED_MODEL_PHRASE = 'dist is older than its sources';
|
|
670
|
+
const STALE_COMPILED_MODEL_PACKAGE_PATTERN = new RegExp(String.raw `(?:^|[\s(:'"])([A-Za-z0-9._@-]+(?:/[A-Za-z0-9._@-]+)*)/` + STALE_COMPILED_MODEL_PHRASE, 'u');
|
|
671
|
+
/**
|
|
672
|
+
* The application package a could-not-ask output names as compiled behind its sources, or `undefined` when the output
|
|
673
|
+
* names none. Read from the CLI's sentence ({@link STALE_COMPILED_MODEL_PHRASE}), a relative directory like `shared-lib`.
|
|
674
|
+
*/
|
|
675
|
+
export function readStaleCompiledModelPackage(text) {
|
|
676
|
+
return STALE_COMPILED_MODEL_PACKAGE_PATTERN.exec(text)?.[1];
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* How long a verification check that could not be asked because a compiled model is behind its sources waits for that
|
|
680
|
+
* package's compiler to catch up before it is asked once more (run 43961156770). Only past this bound, still behind, is
|
|
681
|
+
* the check reported unrun.
|
|
682
|
+
*
|
|
683
|
+
* Measured on reference run 43961156770: the application's compile watchers had died, every coding run's
|
|
684
|
+
* `check:resources-registry-init` answered "shared-lib/dist is older than its sources", 89 of 91 failed attempts were
|
|
685
|
+
* that ($80), and ten tasks retired `attempts_exhausted` for a failure that was the host's. A live watcher recompiles a
|
|
686
|
+
* package in seconds and a respawned one (ff6192443) in well under a minute, so three minutes covers a watcher that is
|
|
687
|
+
* catching up or restarting and stays far below a coding turn. A dead one that is never respawned is not waited on for
|
|
688
|
+
* longer: the run is then reported unrun, spends no attempt, and holds admissions instead
|
|
689
|
+
* (`VerificationHostCause.REPEATED_HOST_FAILURE`).
|
|
690
|
+
*/
|
|
691
|
+
export const STALE_COMPILED_MODEL_WAIT_MS = 3 * 60 * 1000;
|
|
692
|
+
/** How often the wait above reads the package's compile record. A file read; the record is rewritten every few seconds. */
|
|
693
|
+
export const STALE_COMPILED_MODEL_POLL_INTERVAL_MS = 2_000;
|
|
402
694
|
/**
|
|
403
695
|
* The prefix of each ADVISORY line `wildo design-tokens brand` prints (#2818): the website's theme sets an axis it shares
|
|
404
696
|
* with the application away from the brand. The check still passes, so the companion lifts these lines onto the
|
|
@@ -468,6 +760,9 @@ export const APPLICATION_CODING_TASK_VERIFICATION_CATALOG = {
|
|
|
468
760
|
// The specifications package evaluated as the companion evaluates it (#3210, #3211). Application-wide: one
|
|
469
761
|
// package, one import graph.
|
|
470
762
|
'check:specification-exports': { checkRef: 'check:specification-exports', kind: VerificationKind.SPECIFICATION_EXPORTS, path: null },
|
|
763
|
+
// Every module's conventional files in their conventional folders (#3904). Application-wide: a move breaks imports
|
|
764
|
+
// anywhere in the package, and a red the tree already had is carried per finding.
|
|
765
|
+
'check:module-layout': { checkRef: 'check:module-layout', kind: VerificationKind.MODULE_LAYOUT, path: null },
|
|
471
766
|
// The two optional frontend packages a composition scenario adds (#1490). Each is a fixed
|
|
472
767
|
// workspace directory, so each is a fixed ref like the four layers above.
|
|
473
768
|
'check:website-typecheck': { checkRef: 'check:website-typecheck', kind: VerificationKind.TYPECHECK, path: 'website' },
|
|
@@ -488,19 +783,27 @@ export const APPLICATION_CODING_TASK_VERIFICATION_CATALOG = {
|
|
|
488
783
|
};
|
|
489
784
|
/**
|
|
490
785
|
* The one PARAMETRIC check ref, for the package families whose directory is chosen at composition
|
|
491
|
-
* time: `check:package-typecheck:workers/<ref>` and `check:package-typecheck:minions/<ref>` (#1490)
|
|
786
|
+
* time: `check:package-typecheck:workers/<ref>` and `check:package-typecheck:minions/<ref>` (#1490),
|
|
787
|
+
* and an installed provider module's facet packages, `check:package-typecheck:providers/<ref>/backend`
|
|
788
|
+
* and `…/frontend` (#4018).
|
|
492
789
|
*
|
|
493
790
|
* A worker or a minion is a workspace package under a directory the `add-worker-*` / `add-minion`
|
|
494
|
-
* scenario named,
|
|
495
|
-
* policy composes it from a typed `WORKER` / `MINION`
|
|
496
|
-
*
|
|
497
|
-
* execute: a typecheck, in a directory of
|
|
791
|
+
* scenario named, and a provider facet one `wildo registry add` installed, so no fixed catalog row can
|
|
792
|
+
* name it. The ref stays HOST-DERIVED — the coding policy composes it from a typed `WORKER` / `MINION` /
|
|
793
|
+
* `PROVIDER_BINDING` target, never from model text — and the resolver below admits only those
|
|
794
|
+
* families, so the catalog is still closed over what a run may execute: a typecheck, in a directory of
|
|
795
|
+
* one of three shapes.
|
|
796
|
+
*
|
|
797
|
+
* A provider facet is checked because nothing else compiles it before its task lands: the backend
|
|
798
|
+
* typecheck reaches the facet only through its built `dist`, and the dev loop compiles it only once
|
|
799
|
+
* it is running. On reference run 44052185141 the Mailgun task landed, its facet did not compile in
|
|
800
|
+
* the application (#4009), and the backend sat paused on it for the rest of the run.
|
|
498
801
|
*/
|
|
499
802
|
export const PACKAGE_TYPECHECK_CHECK_REF_PREFIX = 'check:package-typecheck:';
|
|
500
|
-
const PACKAGE_TYPECHECK_DIRECTORY_PATTERN = /^(?:workers|minions)\/[a-z0-9]+(?:-[a-z0-9]+)
|
|
803
|
+
const PACKAGE_TYPECHECK_DIRECTORY_PATTERN = /^(?:(?:workers|minions)\/[a-z0-9]+(?:-[a-z0-9]+)*|providers\/[a-z0-9]+(?:-[a-z0-9]+)*\/(?:backend|frontend))$/u;
|
|
501
804
|
export function packageTypecheckCheckRef(packageDirectory) {
|
|
502
805
|
if (!PACKAGE_TYPECHECK_DIRECTORY_PATTERN.test(packageDirectory)) {
|
|
503
|
-
throw new Error(`A package typecheck names a workers/ or minions/ package directory; got '${packageDirectory}'.`);
|
|
806
|
+
throw new Error(`A package typecheck names a workers/ or minions/ package directory, or a providers/<ref>/backend|frontend facet; got '${packageDirectory}'.`);
|
|
504
807
|
}
|
|
505
808
|
return `${PACKAGE_TYPECHECK_CHECK_REF_PREFIX}${packageDirectory}`;
|
|
506
809
|
}
|
|
@@ -705,7 +1008,7 @@ export const APPLICATION_CODING_WORKER_CONTRACT = Object.freeze([
|
|
|
705
1008
|
'Your FILE EDITS are confined by the host: it answers every permission request against mutationScope and refuses any path outside it, whatever you ask for. Agreeing to a wider scope does not widen it.',
|
|
706
1009
|
'A SHELL COMMAND IS NOT CONFINED. A command declares no paths, so the host cannot check what it writes; keep every command inside mutationScope by your own judgement. A stray write is detected after the run, not prevented.',
|
|
707
1010
|
'WRITE FILES WITH YOUR FILE-EDITING TOOLS, never through the shell (`cat >`, `tee`, `sed -i`, `cp`, a script that writes). Several tasks may write this tree at once, and only an edit that names its file can be credited to your task: a file written through the shell lands only after every concurrent run has finished, holding up the tasks that wait on yours. Use the shell to read, search and run checks — and to run the framework\'s own `wildo` commands a skill tells you to (`wildo db generate`, `wildo compose`): run those, whatever they write.',
|
|
708
|
-
'Everything you write is an uncommitted working edit, reviewed and committed after you finish by the person or process that accepts it. Do not commit, push, publish, deploy, alter credentials,
|
|
1011
|
+
'Everything you write is an uncommitted working edit, reviewed and committed after you finish by the person or process that accepts it. Do not commit, push, publish, deploy, alter credentials, or claim acceptance. Install or bind a provider only for the surface your task builds: a provider binding task binds into its own scope, and a worker or minion task declares its own surface\'s providers. Any other task that finds a provider missing reports it, and never runs `wildo registry add` itself. Never write a NEW vendor implementation (a provider package or module that neither the engine nor the registry supplies) unless your objective says the integration plan records that provider as an unprovided need; the app-side module, contribution and scope entry that wire an existing provider are wiring, not a new implementation.',
|
|
709
1012
|
'mutationScope paths are relative to the application root (`shared-lib/src/modules/<module>/` means `<application root>/shared-lib/src/modules/<module>/`). If the task cannot be completed inside that scope, stop and say what is missing — that is a finding, not a failure.',
|
|
710
1013
|
`If a requirement this task serves (its \`servesRefs\`) is still not fully met by what you built, end your report with a fenced block tagged \`${UNMET_REQUIREMENTS_BLOCK_TAG}\` holding a JSON array of \`{ "requirementRef": "<one of servesRefs>", "missing": "<what is still missing, in one sentence>" }\`. It does not fail your run: the build plan gets a follow-up task for each entry (or, when this task is itself a follow-up, the gap stays on its record for a person to read). Leave the block out when nothing is unmet, and never use it for work outside the requirement.`,
|
|
711
1014
|
`When what is missing is ANOTHER planned task's own work (one your brief lists under \`otherTasksServing\` for that requirement), add \`"ownedByTaskRef": "<that task's ref>"\` to the entry: the follow-up then waits for that task instead of running beside it. When it needs a decision only a person can make (a retention period, a price, a policy), add \`"needsDecision": "<the decision, in one sentence>"\` instead: it goes to the creator, not to a coding task. Never both on one entry, and neither when you are not sure.`,
|