@wildo-ai/dev-companion 1.1.14 → 1.1.15
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 +68 -1
- 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 +77 -5
- 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 +46 -1
- 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 +39 -2
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
- 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/services/accepted-change-commit.companion.service.d.ts +16 -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 +44 -4
- 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 +79 -6
- 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 +291 -40
- 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/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/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/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 +2 -2
- package/dist/esm/i18n/system_enums/workbench-build.en.js +2 -2
- 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/creation-journey-timeline.models.d.ts +9 -0
- 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 +18 -2
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +33 -6
- 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 +97 -19
- 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 +65 -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-task-coding-policy.companion.service.d.ts +1 -1
- 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 +48 -26
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.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 +12 -1
- 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 +7 -0
- 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 +81 -4
- 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/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/package.json +17 -17
|
@@ -101,7 +101,7 @@ import { AcceptOrigin, ApplicationSpecificationFamily } from '@wildo-ai/saas-spe
|
|
|
101
101
|
import { describeSpecificationDefinitionFault, SpecificationModuleFaultReading, specificationModuleFaultsAreAVerdict } from '@wildo-ai/saas-specifications';
|
|
102
102
|
import { AgentAnswerAttemptDecision, decideAgentAnswerAttempt, ParkedQuestionAnswerOutputSchema, ParkedQuestionAnswerVerdict, readParkedQuestionAnswers, renderParkedQuestionAnswerPrompt, withParkedQuestionAnswer, } from '../models/parked-question-answer.models.js';
|
|
103
103
|
import { PARKED_QUESTION_ANSWERER_AGENT_REF } from '../models/parked-question-answerer.actors-system.definitions.js';
|
|
104
|
-
import { applicationCodingExclusiveSubject, CODING_RUN_WINDOW_RETENTION_MS, CodingRunConcurrency, deriveInterferenceSuspected, describeRunConcurrency, failedVerificationBesideSiblings, isConcurrentRunSubject, selectBudgetCountingFailures, collectRunClaimedPaths, writtenLocationsOfSessionEvent, } from '../models/concurrent-coding-runs.models.js';
|
|
104
|
+
import { applicationCodingExclusiveSubject, CODING_RUN_WINDOW_RETENTION_MS, CodingRunConcurrency, deriveInterferenceSuspected, describeRunConcurrency, failedVerificationBesideSiblings, isConcurrentRunSubject, deriveUnansweredVerificationWithholding, selectBudgetCountingFailures, collectRunClaimedPaths, writtenLocationsOfSessionEvent, } from '../models/concurrent-coding-runs.models.js';
|
|
105
105
|
import { inject, injectable, optional } from 'inversify';
|
|
106
106
|
import { ActorsSystemBackendService, AgentsBackendService, ErrorBuilderBackendService, LoggerService, SAAS_SERVICE_TYPES, WorkerShutdownManagerBackendService, executeBoundedSubprocess, describeCaughtError, actorExecutionSuspensionRef, isActorExecutionNotSuspendedError, isActorExecutionSubjectBusyError, } from '@wildo-ai/saas-backend-lib';
|
|
107
107
|
import { Actor_Task_Topics, ErrorCustomMessageReference, ErrorType, FlowsActors_IO_PartKind, FlowsActors_Status, isWildoBackendError, HumanDecision_FieldKind, HumanDecision_ResponseIntent, describeModelProviderAccountRefusal, } from '@wildo-ai/saas-models';
|
|
@@ -126,24 +126,27 @@ import { listInFlightCodingRuns } from './in-flight-coding-runs.companion.js';
|
|
|
126
126
|
import { APPLICATION_CODING_AGENT_BINDINGS, APPLICATION_CODING_TURN_CLASSIFIER_AGENT_REF, CodingTurnEndClassificationOutputSchema, APPLICATION_CODING_AGENT_REFS, APPLICATION_CODING_SYSTEM_REF, APPLICATION_CODING_WORKTREE_SUBJECT, isApplicationCodingAgentRef, resolveSelectedApplicationCodingAgentBinding, } from '../../meta-workflows/models/application-coding-agent.actors-system.definitions.js';
|
|
127
127
|
import { humanDecisionSettler } from '../../meta-workflows/models/human-decision-settler.models.js';
|
|
128
128
|
import { BRIEF_PROVENANCE_UNAVAILABLE_SOURCE_REF } from '../../meta-workflows/models/build-brief-content-trust.models.js';
|
|
129
|
-
import { RESOURCES_REGISTRY_COULD_NOT_ASK_MARKER, DESIGN_SYSTEM_BRAND_ADVISORY_MARKER, DESIGN_SYSTEM_BRAND_COULD_NOT_ASK_MARKER, ApplicationCodingTaskDisposition, codingRunChangedNoFileOfItsOwn, deriveApplicationCodingTaskDisposition, CodingRunStart, deriveCodingRunFailureAttribution, verificationFailureIsCarried, deriveCodingRunStart, isAttributedToAnotherWriter, APPLICATION_CODING_CONTRACT_REFUSAL_MARKER, INTERRUPTED_AT_STARTUP_OUTPUT_FIELD, DISPATCH_DEFAULT_MAX_CAPTURED_BYTES, DISPATCH_DEFAULT_TIMEOUT_MS, DISPATCH_HARD_MAX_CAPTURED_BYTES, DISPATCH_HARD_MAX_TIMEOUT_MS, VerificationKind, renderApplicationCodingTaskAgentPrompt, resolveApplicationCodingTaskVerificationPlans, isClosingReport, parseClosingReportUnmetRequirements, parseClosingReportMetRequirements, SETTLED_HEAD_OUTPUT_FIELD, } from '../models/coding-agent-dispatch.models.js';
|
|
129
|
+
import { RESOURCES_REGISTRY_COULD_NOT_ASK_MARKER, failedOnlyForUnansweredVerification, readStaleCompiledModelPackage, STALE_COMPILED_MODEL_POLL_INTERVAL_MS, STALE_COMPILED_MODEL_WAIT_MS, DESIGN_SYSTEM_BRAND_ADVISORY_MARKER, DESIGN_SYSTEM_BRAND_COULD_NOT_ASK_MARKER, ApplicationCodingTaskDisposition, codingRunChangedNoFileOfItsOwn, deriveApplicationCodingTaskDisposition, CodingRunStart, deriveCodingRunFailureAttribution, verificationFailureIsCarried, deriveCodingRunStart, isAttributedToAnotherWriter, APPLICATION_CODING_CONTRACT_REFUSAL_MARKER, INTERRUPTED_AT_STARTUP_OUTPUT_FIELD, DISPATCH_DEFAULT_MAX_CAPTURED_BYTES, DISPATCH_DEFAULT_TIMEOUT_MS, DISPATCH_HARD_MAX_CAPTURED_BYTES, DISPATCH_HARD_MAX_TIMEOUT_MS, VerificationKind, renderApplicationCodingTaskAgentPrompt, resolveApplicationCodingTaskVerificationPlans, isClosingReport, parseClosingReportUnmetRequirements, parseClosingReportMetRequirements, SETTLED_HEAD_OUTPUT_FIELD, } from '../models/coding-agent-dispatch.models.js';
|
|
130
130
|
import { CodingSessionFrameRetention } from '../models/coding-session-frame-retention.js';
|
|
131
|
-
import { isInfrastructureShapedAgentFailure, isProviderAccountAgentFailure, waitForApplicationPackagesPublished } from '../../core/runtime/dev-compile-quiet.companion.js';
|
|
131
|
+
import { ApplicationPackageCompileCurrency, isInfrastructureShapedAgentFailure, isProviderAccountAgentFailure, readApplicationPackageCompileCurrency, waitForApplicationPackageCompileCurrent, waitForApplicationPackagesPublished, } from '../../core/runtime/dev-compile-quiet.companion.js';
|
|
132
132
|
import { readCodingAgentUsageLimit, readRecordedCodingAgentUsageLimit } from '../models/coding-agent-usage-limit.models.js';
|
|
133
133
|
import { describeVerificationToolUnavailableRefusal, normalizeHostCheckFailureMessage, refuseWhenVerificationToolIsAbsent, resolveExecutableOnPath, verbProbeKnowsTheVerb, VERIFICATION_HOST_FAILURE_REASK_MS, VerificationHostCause, VerificationToolUnavailableError, } from '../models/verification-tool-availability.models.js';
|
|
134
134
|
import { CODING_AGENT_CONNECTIVITY_WAIT_LIMIT_MS, nextCodingAgentConnectivityProbeDelayMs, deriveCodingRunNetworkFailure, readAgentPassageTexts, readCodingRunNetworkReport, isCodingAgentWorkFrame, networkFailureKindOfFailedProbe, readRecordedNetworkFailureKind, } from '../models/coding-agent-connectivity.models.js';
|
|
135
135
|
import { composeCodingAgentRouteEnvironment, describeCodingAgentProbeRoute, probeCodingAgentRoute, readClaudeCodeSettingSources, readClaudeCodeSettingsEnvironments, resolveCodingAgentProbeRoute, } from '../models/coding-agent-route.models.js';
|
|
136
136
|
import { diagnoseCarriedVerificationFailure } from '../../meta-workflows/models/carried-verification-failure.models.js';
|
|
137
137
|
import { assemblyRepairRunInputField } from '../../meta-workflows/services/application-assembly-repair.companion.utils.js';
|
|
138
|
+
import { skillsDescribedBySkillIndexSource } from '../../meta-workflows/services/build-task-brief-application-facts.companion.js';
|
|
138
139
|
import { NothingToRearmError, readBuildTaskInterference, readBuildTaskRearm, readGivenLandedOverride, withBuildTaskInterference, withBuildTaskRearm, } from '../../meta-workflows/models/build-task-rearm.models.js';
|
|
139
140
|
import { withWebsiteCopyReview } from '../../meta-workflows/models/website-copy-review.models.js';
|
|
140
141
|
import { withWebsiteVisualReview } from '../../meta-workflows/models/website-visual-review.models.js';
|
|
141
142
|
import { checkWebsiteDemoScenarios } from '../../meta-workflows/services/website-demo-facts.models.js';
|
|
142
143
|
import { describeWorkspaceFreshness, readWorkspaceElements } from '../../core/introspection/workspace-elements.companion.js';
|
|
143
144
|
import { collectWebsiteDemoScenarios, WebsiteDemoScenarioCollectionFault } from '../../core/website/website-source-module.companion.js';
|
|
145
|
+
import { inspectModuleLayout } from '../../module-layout/module-layout-inspection.companion.js';
|
|
144
146
|
import { APPLICATION_CODING_RUN_CHECKPOINT_KIND, ApplicationCodingRunCheckpointSchema, isParkedCodingRunAnswerable, mergeResumedLegUsage, } from '../models/application-coding-run-checkpoint.models.js';
|
|
145
147
|
import { findApplicationDocumentationChapterFileFaults } from '../../technical-doc/services/technical-documentation-chapter-files.companion.js';
|
|
146
148
|
import { ACTOR_TASK_OUTPUT_FIELDS_HELD_ON_THE_TASK_ROW_ONLY } from '../../executions/models/execution-task-snapshot.models.js';
|
|
149
|
+
import { readUnrecordedProviderDirectories } from './unrecorded-provider-directories.companion.js';
|
|
147
150
|
/** The longest one read of the completed coding runs is shared, whatever else happens (#3204). */
|
|
148
151
|
const COMPLETED_CODING_TASKS_HOLD_MS = 5_000;
|
|
149
152
|
/** How many completed coding runs the shared read holds: the most recently updated (see {@link CodingAgentDispatchCompanionService}). */
|
|
@@ -162,6 +165,19 @@ export const BUILD_CHECKPOINT_MIN_INTERVAL_MS = 60_000;
|
|
|
162
165
|
const VERIFICATION_TIMEOUT_MS = 10 * 60_000;
|
|
163
166
|
/** How often a READ of a hold whose command lacks the verb asks the command again, in the background (#3432); an admission always asks. */
|
|
164
167
|
const VERIFICATION_VERB_PROBE_INTERVAL_MS = 30_000;
|
|
168
|
+
/**
|
|
169
|
+
* The checks a verification pass could not ASK (they threw), each with its message and, when the message says a compiled
|
|
170
|
+
* model is behind its sources, the package it names (run 43961156770). What the host-check-failure ledger records, from a
|
|
171
|
+
* run's settlement and from a wave's isolated re-check alike.
|
|
172
|
+
*/
|
|
173
|
+
function describeUnansweredChecks(verification, unrunCheckRefs) {
|
|
174
|
+
return verification
|
|
175
|
+
.filter(({ checkRef }) => unrunCheckRefs.includes(checkRef))
|
|
176
|
+
.map(({ checkRef, outcome }) => {
|
|
177
|
+
const stalePackage = readStaleCompiledModelPackage(`${outcome.message}\n${outcome.stdoutTail}\n${outcome.stderrTail}`);
|
|
178
|
+
return { checkRef, message: outcome.message, ...(stalePackage !== undefined ? { stalePackage } : {}) };
|
|
179
|
+
});
|
|
180
|
+
}
|
|
165
181
|
/** How long the running backend has to answer `/health/ready` (#2228). Readiness is a cheap probe; a backend slower than this is not serving. */
|
|
166
182
|
const BACKEND_READY_TIMEOUT_MS = 10_000;
|
|
167
183
|
/** How much of the agent's final message a not-repaired verdict carries (#2409): enough for its reason, not its transcript. */
|
|
@@ -700,12 +716,12 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
700
716
|
*
|
|
701
717
|
* An absent command and a command lacking the verb open on the FIRST run: their probes are free, so a hold opened
|
|
702
718
|
* wrongly costs one probe, while each turn admitted into them costs a whole coding turn that its check then cannot
|
|
703
|
-
* judge. Any other host cause opens once it repeats on two distinct tasks
|
|
719
|
+
* judge. Any other host cause opens once it repeats on two distinct tasks, alone or beside siblings ({@link hostCheckFailureLedger}).
|
|
704
720
|
* In-process, like the other holds: a restart loses it and the next run meets it again.
|
|
705
721
|
*/
|
|
706
722
|
verificationToolUnavailableHold;
|
|
707
723
|
/**
|
|
708
|
-
* Host-attributed check failures seen on runs
|
|
724
|
+
* Host-attributed check failures seen on runs and isolated re-checks (#3432; beside siblings too since run 43961156770), keyed by check and normalized message, with the
|
|
709
725
|
* tasks each was met on: two distinct tasks open a {@link VerificationHostCause.REPEATED_HOST_FAILURE} hold. A run that
|
|
710
726
|
* ASKS the check clears its entries, since the cause is then gone. Kept across a re-ask, so the same failure on the run
|
|
711
727
|
* a re-ask admits holds again at once rather than after two more tasks.
|
|
@@ -715,6 +731,19 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
715
731
|
hostCheckFailures() {
|
|
716
732
|
return (this.hostCheckFailureLedger ??= new Map());
|
|
717
733
|
}
|
|
734
|
+
/**
|
|
735
|
+
* The bound and cadence of the wait a check makes for a compiled model behind its sources before it is reported unrun
|
|
736
|
+
* (run 43961156770): {@link STALE_COMPILED_MODEL_WAIT_MS} and {@link STALE_COMPILED_MODEL_POLL_INTERVAL_MS} when unset.
|
|
737
|
+
* A field so a test can shorten it.
|
|
738
|
+
*/
|
|
739
|
+
staleCompiledModelWait;
|
|
740
|
+
/**
|
|
741
|
+
* When a wait for each package's compiled model last ran out with the package still behind. A check asked within one
|
|
742
|
+
* bound of that does not wait again, only reads whether it caught up: a wave's isolated re-checks run one after another
|
|
743
|
+
* under the workspace lock, and ten of them each waiting the whole bound for a watcher that is not coming would hold the
|
|
744
|
+
* lock for half an hour.
|
|
745
|
+
*/
|
|
746
|
+
staleCompiledModelWaitGaveUpAtMs;
|
|
718
747
|
/** The verb probe of a {@link VerificationHostCause.COMMAND_LACKS_VERB} hold in flight, and when the last one started. */
|
|
719
748
|
verbProbeInFlight;
|
|
720
749
|
verbProbeStartedAtMs = 0;
|
|
@@ -1884,13 +1913,17 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
1884
1913
|
}
|
|
1885
1914
|
/**
|
|
1886
1915
|
* Record the checks a run could not ask for the host's reasons (#3432), and hold when one repeats with the same message on
|
|
1887
|
-
* a second distinct task.
|
|
1888
|
-
*
|
|
1916
|
+
* a second distinct task. Every run counts, alone or beside siblings, and every isolated re-check (run 43961156770):
|
|
1917
|
+
* counting only runs alone kept the hold shut at any parallelism above one, while a dead compile watcher failed 89 runs.
|
|
1918
|
+
* A sibling's transient cause (a half-written file) is cheap to hold on: the hold ends as soon as a run or the wave's
|
|
1919
|
+
* re-check ASKS the check ({@link releaseVerificationToolHoldIfAsked}), or the stale package compiles.
|
|
1889
1920
|
*/
|
|
1890
1921
|
observeHostCheckFailures(failures, taskRef, runTaskId) {
|
|
1891
1922
|
for (const failure of failures) {
|
|
1892
1923
|
const key = `${failure.checkRef}\u0000${normalizeHostCheckFailureMessage(failure.message)}`;
|
|
1893
|
-
const seen = this.hostCheckFailures().get(key) ?? {
|
|
1924
|
+
const seen = this.hostCheckFailures().get(key) ?? {
|
|
1925
|
+
checkRef: failure.checkRef, message: failure.message, taskRefs: new Set(), ...(failure.stalePackage !== undefined ? { stalePackage: failure.stalePackage } : {}),
|
|
1926
|
+
};
|
|
1894
1927
|
seen.taskRefs.add(taskRef);
|
|
1895
1928
|
this.hostCheckFailures().set(key, seen);
|
|
1896
1929
|
if (seen.taskRefs.size < 2 || this.verificationToolUnavailableHold)
|
|
@@ -1905,6 +1938,7 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
1905
1938
|
observedAt: observedAt.toISOString(),
|
|
1906
1939
|
metOnTaskRefs: [...seen.taskRefs],
|
|
1907
1940
|
reaskAfter: new Date(observedAt.getTime() + VERIFICATION_HOST_FAILURE_REASK_MS).toISOString(),
|
|
1941
|
+
...(seen.stalePackage !== undefined ? { stalePackage: seen.stalePackage } : {}),
|
|
1908
1942
|
};
|
|
1909
1943
|
this.logger.warn('A verification check could not be asked the same way on two tasks; no coding turn is admitted until the host is asked again', {
|
|
1910
1944
|
checkRef: failure.checkRef, taskRefs: [...seen.taskRefs], message: failure.message, reaskAfter: this.verificationToolUnavailableHold.reaskAfter,
|
|
@@ -1918,12 +1952,47 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
1918
1952
|
this.verificationToolUnavailableHold = undefined;
|
|
1919
1953
|
this.logger.info('The verification tool hold ended; coding admissions resume', { command: held.command, checkRef: held.checkRef, why });
|
|
1920
1954
|
}
|
|
1955
|
+
/**
|
|
1956
|
+
* Whether a hold on a compiled model behind its sources may end now (run 43961156770): the package reads CURRENT, and
|
|
1957
|
+
* that reading rests on a successful compile this probe has not already released a hold on. Once per compile, so a
|
|
1958
|
+
* reading the CLI would still refuse (its rule and the companion's disagree on some tree) releases one admission, whose
|
|
1959
|
+
* check is refused again and holds again at once, and then waits for the next compile or `reaskAfter`; it never
|
|
1960
|
+
* re-releases on every read. Throttled to one tree walk per {@link STALE_COMPILED_MODEL_POLL_INTERVAL_MS}: every reader
|
|
1961
|
+
* of the hold (Home, the selector, each admission) asks.
|
|
1962
|
+
*/
|
|
1963
|
+
staleCompiledModelHoldMayRelease(stalePackage) {
|
|
1964
|
+
const now = Date.now();
|
|
1965
|
+
const probed = (this.staleCompiledModelHoldProbes ??= new Map()).get(stalePackage);
|
|
1966
|
+
let reading = probed?.reading;
|
|
1967
|
+
if (probed === undefined || now - probed.atMs >= (this.staleCompiledModelWait?.pollIntervalMs ?? STALE_COMPILED_MODEL_POLL_INTERVAL_MS)) {
|
|
1968
|
+
reading = readApplicationPackageCompileCurrency(this.companionContext.saasRoot, stalePackage, now);
|
|
1969
|
+
this.staleCompiledModelHoldProbes.set(stalePackage, { atMs: now, reading, releasedOnCompileMs: probed?.releasedOnCompileMs });
|
|
1970
|
+
}
|
|
1971
|
+
if (reading?.currency !== ApplicationPackageCompileCurrency.CURRENT)
|
|
1972
|
+
return false;
|
|
1973
|
+
const releasedOnCompileMs = this.staleCompiledModelHoldProbes.get(stalePackage)?.releasedOnCompileMs;
|
|
1974
|
+
if (releasedOnCompileMs !== undefined && reading.lastSuccessfulCompileMs === releasedOnCompileMs)
|
|
1975
|
+
return false;
|
|
1976
|
+
this.staleCompiledModelHoldProbes.set(stalePackage, { atMs: now, reading, releasedOnCompileMs: reading.lastSuccessfulCompileMs });
|
|
1977
|
+
return true;
|
|
1978
|
+
}
|
|
1979
|
+
/** The last currency reading of each held stale package, and the compile a hold was last released on. See the method above. */
|
|
1980
|
+
staleCompiledModelHoldProbes;
|
|
1981
|
+
/**
|
|
1982
|
+
* When each verification check last ANSWERED (ran to a verdict), at a run's settlement or a wave's isolated re-check
|
|
1983
|
+
* (run 43961156770). A task withheld for repeatedly unanswered checks is offered again once one of them answered after
|
|
1984
|
+
* its latest such run ({@link readRepeatedlyUnansweredVerification}). In-process, like the holds.
|
|
1985
|
+
*/
|
|
1986
|
+
verificationCheckAnsweredAtMs;
|
|
1921
1987
|
/**
|
|
1922
1988
|
* A run that ASKED the held check proves its command runs again (#3423). Approximate for a check that can answer without
|
|
1923
1989
|
* spawning its command (schema-plan drift says "not owed" when the application declares no PostgreSQL): such an answer
|
|
1924
1990
|
* releases the hold too, and the next run that needs the command meets it again, which costs one run, never a lockout.
|
|
1925
1991
|
*/
|
|
1926
1992
|
releaseVerificationToolHoldIfAsked(askedCheckRefs, taskRef) {
|
|
1993
|
+
const answeredAtMs = Date.now();
|
|
1994
|
+
for (const checkRef of askedCheckRefs)
|
|
1995
|
+
(this.verificationCheckAnsweredAtMs ??= new Map()).set(checkRef, answeredAtMs);
|
|
1927
1996
|
const held = this.verificationToolUnavailableHold;
|
|
1928
1997
|
if (held && askedCheckRefs.includes(held.checkRef))
|
|
1929
1998
|
this.releaseVerificationToolUnavailableHold(`${taskRef} ran ${held.checkRef}`);
|
|
@@ -1999,7 +2068,16 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
1999
2068
|
void this.probeVerificationVerb(false);
|
|
2000
2069
|
return held;
|
|
2001
2070
|
case VerificationHostCause.REPEATED_HOST_FAILURE:
|
|
2002
|
-
|
|
2071
|
+
/*
|
|
2072
|
+
* A compiled model behind its sources has a free probe (run 43961156770): the package's compile record. Compiled
|
|
2073
|
+
* current, the hold ends and the next run asks again; a run that still cannot ask holds again at once (the ledger
|
|
2074
|
+
* keeps its tasks).
|
|
2075
|
+
*/
|
|
2076
|
+
if (held.stalePackage !== undefined && this.staleCompiledModelHoldMayRelease(held.stalePackage)) {
|
|
2077
|
+
this.releaseVerificationToolUnavailableHold(`${held.stalePackage} is compiled current with its sources`);
|
|
2078
|
+
return undefined;
|
|
2079
|
+
}
|
|
2080
|
+
// Otherwise no free probe: once due, the hold ends and the next run re-asks the host; the same failure holds again at once.
|
|
2003
2081
|
if (held.reaskAfter !== undefined && Date.now() >= Date.parse(held.reaskAfter)) {
|
|
2004
2082
|
this.releaseVerificationToolUnavailableHold(`its re-ask was due at ${held.reaskAfter}`);
|
|
2005
2083
|
return undefined;
|
|
@@ -2341,9 +2419,11 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
2341
2419
|
.map((entry) => entry.checkRef))];
|
|
2342
2420
|
if (checkRefs.length === 0)
|
|
2343
2421
|
continue;
|
|
2344
|
-
const { verification, unrunCheckRefs } = await this.executeVerificationPlans(resolveApplicationCodingTaskVerificationPlans(checkRefs));
|
|
2422
|
+
const { verification, unrunCheckRefs, unavailableVerificationTools } = await this.executeVerificationPlans(resolveApplicationCodingTaskVerificationPlans(checkRefs));
|
|
2345
2423
|
const unrun = new Set(unrunCheckRefs);
|
|
2346
|
-
const results = verification.map(({ checkRef, outcome }) => ({
|
|
2424
|
+
const results = verification.map(({ checkRef, outcome }) => ({
|
|
2425
|
+
checkRef, success: outcome.success && !unrun.has(checkRef), message: outcome.message, ...(unrun.has(checkRef) ? { unanswered: true } : {}),
|
|
2426
|
+
}));
|
|
2347
2427
|
const recheck = {
|
|
2348
2428
|
checkRefs,
|
|
2349
2429
|
passed: results.length === checkRefs.length && results.every((result) => result.success),
|
|
@@ -2356,6 +2436,21 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
2356
2436
|
await this.executionsService.updateActorTask(taskId, { memory: withIsolatedVerificationRecheck(current.memory, recheck) });
|
|
2357
2437
|
});
|
|
2358
2438
|
this.announceRunStateChanged();
|
|
2439
|
+
/*
|
|
2440
|
+
* A re-check runs ALONE by construction, so what it could not ask is the host's, and what it asked proves the host
|
|
2441
|
+
* answers again (run 43961156770): both feed the holds exactly as a run's settlement does. After the record, so the
|
|
2442
|
+
* re-check's standing never depends on them.
|
|
2443
|
+
*/
|
|
2444
|
+
// The ledger counts BUILD tasks: a run with no task ref is never counted, or one task could pass for two.
|
|
2445
|
+
const recheckTaskRef = typeof row.input?.taskRef === 'string' ? row.input.taskRef : undefined;
|
|
2446
|
+
const unavailableTool = unavailableVerificationTools[0];
|
|
2447
|
+
if (unavailableTool !== undefined)
|
|
2448
|
+
this.holdForUnavailableVerificationTool(unavailableTool, recheckTaskRef ?? taskId, taskId);
|
|
2449
|
+
else {
|
|
2450
|
+
this.releaseVerificationToolHoldIfAsked(checkRefs.filter((checkRef) => !unrun.has(checkRef)), recheckTaskRef ?? taskId);
|
|
2451
|
+
if (recheckTaskRef !== undefined)
|
|
2452
|
+
this.observeHostCheckFailures(describeUnansweredChecks(verification, unrunCheckRefs), recheckTaskRef, taskId);
|
|
2453
|
+
}
|
|
2359
2454
|
this.logger.warn(recheck.passed
|
|
2360
2455
|
? 'A run that failed verification beside its siblings passed its checks alone; its task lands'
|
|
2361
2456
|
: 'A run that failed verification beside its siblings failed its checks again alone; its task is run again', {
|
|
@@ -3013,6 +3108,8 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
3013
3108
|
};
|
|
3014
3109
|
const response = await this.agentsService.invokeAgent(invocation, traceContext, {
|
|
3015
3110
|
workspaceRootPath: this.companionContext.saasRoot,
|
|
3111
|
+
// One description per skill (#3892): the skills the brief's index slice describes are listed by name only.
|
|
3112
|
+
skillsDescribedByHost: skillsDescribedBySkillIndexSource(task.contextSelection.selectedSources),
|
|
3016
3113
|
// Hold the agent to the task's declared scope WHILE it runs, not only
|
|
3017
3114
|
// in the change set afterwards. The post-hoc assessment stays — it is
|
|
3018
3115
|
// the authoritative record, because an agent can write a file it never
|
|
@@ -3158,6 +3255,26 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
3158
3255
|
const scopeAssessment = changeSet
|
|
3159
3256
|
? assessApplicationCodingTaskMutationScope(changeSet, task.mutationScope.allowedPathPrefixes, task.mutationScope.prohibitedPathPrefixes)
|
|
3160
3257
|
: null;
|
|
3258
|
+
/*
|
|
3259
|
+
* A provider package the run AUTHORED that nothing decided to author (#3995 item 2): recorded beside the scope
|
|
3260
|
+
* assessment, as an ADVISORY for the run's reviewer and judge, never a reason to fail it. Best-effort, like the record
|
|
3261
|
+
* of the run's writes: an advisory that cannot be computed is omitted, never a failed run.
|
|
3262
|
+
*/
|
|
3263
|
+
let unrecordedProviderDirectories = undefined;
|
|
3264
|
+
if (changeSet) {
|
|
3265
|
+
try {
|
|
3266
|
+
unrecordedProviderDirectories = await readUnrecordedProviderDirectories(this.companionContext, changeSet);
|
|
3267
|
+
}
|
|
3268
|
+
catch (error) {
|
|
3269
|
+
this.logDebug('Could not check the run for an unrecorded provider package', { taskId, error: describeCaughtError(error) });
|
|
3270
|
+
}
|
|
3271
|
+
if (unrecordedProviderDirectories !== undefined && unrecordedProviderDirectories.length > 0) {
|
|
3272
|
+
this.logger.warn?.(`Coding run created ${unrecordedProviderDirectories.length} provider package(s) nothing decided to author`, {
|
|
3273
|
+
taskRef: task.taskRef,
|
|
3274
|
+
directories: unrecordedProviderDirectories.map((entry) => entry.directory),
|
|
3275
|
+
});
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3161
3278
|
/*
|
|
3162
3279
|
* Did Wildo's IN-FLIGHT guards actually run for this agent?
|
|
3163
3280
|
*
|
|
@@ -3407,13 +3524,11 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
3407
3524
|
// Which runs shared the tree with this one, and where they both wrote (#1528). Absent for a run alone.
|
|
3408
3525
|
const concurrency = this.closeCodingRunWindow(taskId, (changeSet?.files ?? []).map((entry) => entry.path));
|
|
3409
3526
|
/*
|
|
3410
|
-
* A check this run could not ask for the host's reasons, other than its command (#3432):
|
|
3411
|
-
*
|
|
3527
|
+
* A check this run could not ask for the host's reasons, other than its command (#3432): the same cause on a second task
|
|
3528
|
+
* holds admissions. Counted alone or beside siblings (run 43961156770); see {@link observeHostCheckFailures}.
|
|
3412
3529
|
*/
|
|
3413
|
-
if (
|
|
3414
|
-
this.observeHostCheckFailures(verification
|
|
3415
|
-
.filter(({ checkRef }) => unrunCheckRefs.includes(checkRef))
|
|
3416
|
-
.map(({ checkRef, outcome }) => ({ checkRef, message: outcome.message })), task.taskRef, taskId);
|
|
3530
|
+
if (unavailableVerificationTool === undefined) {
|
|
3531
|
+
this.observeHostCheckFailures(describeUnansweredChecks(verification, unrunCheckRefs), task.taskRef, taskId);
|
|
3417
3532
|
}
|
|
3418
3533
|
// No change set (the executor threw, the capture failed): stamp HEAD now, so the run's window is bounded (#3224 F2).
|
|
3419
3534
|
const settledHead = changeSet ? undefined : await this.readSettledHeadStamp();
|
|
@@ -3494,7 +3609,11 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
3494
3609
|
...(captureError ? { changeSetCaptureError: buildOutputErrorPayload(captureError) } : {}),
|
|
3495
3610
|
...(verificationInfrastructureError ? { verificationInfrastructureError: buildOutputErrorPayload(verificationInfrastructureError) } : {}),
|
|
3496
3611
|
...(traceabilityErrors.length > 0 ? { traceabilityErrors: traceabilityErrors.map(buildOutputErrorPayload) } : {}),
|
|
3497
|
-
...(scopeAssessment ? {
|
|
3612
|
+
...(scopeAssessment ? {
|
|
3613
|
+
scopeAssessment: unrecordedProviderDirectories !== undefined && unrecordedProviderDirectories.length > 0
|
|
3614
|
+
? { ...scopeAssessment, unrecordedProviderDirectories }
|
|
3615
|
+
: scopeAssessment,
|
|
3616
|
+
} : {}),
|
|
3498
3617
|
verification,
|
|
3499
3618
|
...(changeSet ? {
|
|
3500
3619
|
changeSetSummary: {
|
|
@@ -3897,7 +4016,9 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
3897
4016
|
* forgiven runs too (`rearmBuildTask`). A row older than the field counts. A run the coding agent's usage
|
|
3898
4017
|
* limit took (`codingAgentUsageLimit`, #2388) is excluded outright and spends no forgiveness: the build
|
|
3899
4018
|
* pauses until the limit's reset rather than re-dispatching into it. So is one the network took
|
|
3900
|
-
* (`networkFailureKind`, #3236): the connectivity hold keeps the next admission waiting on a probe.
|
|
4019
|
+
* (`networkFailureKind`, #3236): the connectivity hold keeps the next admission waiting on a probe. So, always, is one
|
|
4020
|
+
* that failed only because its checks could not be ASKED (`failedOnlyForUnansweredVerification`, run 43961156770): a
|
|
4021
|
+
* repeated cause holds admissions instead.
|
|
3901
4022
|
*/
|
|
3902
4023
|
async listAttributableFailedRunsForBuildTask(buildTaskRef, sessionContext, options = {}) {
|
|
3903
4024
|
const failed = await this.readFailedCodingTasks(sessionContext);
|
|
@@ -3936,6 +4057,8 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
3936
4057
|
usageLimited: readRecordedCodingAgentUsageLimit(output) !== undefined,
|
|
3937
4058
|
// The network took the turn: no attempt either, the connectivity hold keeps the next one waiting (#3236).
|
|
3938
4059
|
networkTaken: output.failureAttribution === CodingRunFailureAttribution.HOST && readRecordedNetworkFailureKind(output) !== undefined,
|
|
4060
|
+
// Its checks could not be asked, and no re-check asked them since: never the task's failure (run 43961156770).
|
|
4061
|
+
verificationUnanswered: failedOnlyForUnansweredVerification({ output, isolatedRecheck: readIsolatedVerificationRecheck(row.memory) }),
|
|
3939
4062
|
});
|
|
3940
4063
|
}
|
|
3941
4064
|
/*
|
|
@@ -3944,7 +4067,61 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
3944
4067
|
* task, and a task that genuinely cannot pass still does. A retry READING its history sees them all.
|
|
3945
4068
|
*/
|
|
3946
4069
|
return (options.includeRearmed === true ? counting : selectBudgetCountingFailures(counting))
|
|
3947
|
-
.map(({ interferenceSuspected: _suspected, hostAttributed: _host, usageLimited: _limited, networkTaken: _network, ...run }) => run);
|
|
4070
|
+
.map(({ interferenceSuspected: _suspected, hostAttributed: _host, usageLimited: _limited, networkTaken: _network, verificationUnanswered: _unanswered, ...run }) => run);
|
|
4071
|
+
}
|
|
4072
|
+
/**
|
|
4073
|
+
* Whether this build task is WITHHELD because its latest runs could not have their checks asked (run 43961156770), with
|
|
4074
|
+
* the run and the check that say why; `undefined` when it may be dispatched. Such runs never count against the attempt
|
|
4075
|
+
* budget, and a cause two tasks meet holds every admission; this bounds the cause only ONE task meets
|
|
4076
|
+
* ({@link deriveUnansweredVerificationWithholding}). The build reports it as `landing_unknown`, naming the check, its
|
|
4077
|
+
* message and when it is asked again.
|
|
4078
|
+
*
|
|
4079
|
+
* The host has answered since the latest such run when one of its checks ran to a verdict for any run after it
|
|
4080
|
+
* ({@link verificationCheckAnsweredAtMs}), or when the compiled model it named has compiled since.
|
|
4081
|
+
*/
|
|
4082
|
+
async readRepeatedlyUnansweredVerification(buildTaskRef) {
|
|
4083
|
+
const runs = (await this.listAttributableFailedRunsForBuildTask(buildTaskRef, undefined, { includeRearmed: true }))
|
|
4084
|
+
// Re-armed runs no longer hold the task; a run that never started (no disposition) is no reading of the host either.
|
|
4085
|
+
.filter((run) => readBuildTaskRearm(run.memory) === undefined && run.output.disposition !== undefined)
|
|
4086
|
+
.map((run) => {
|
|
4087
|
+
const carried = new Set(Array.isArray(run.output.carriedVerificationFailures) ? run.output.carriedVerificationFailures.map(String) : []);
|
|
4088
|
+
const failedChecks = (Array.isArray(run.output.verification) ? run.output.verification : [])
|
|
4089
|
+
.filter((entry) => isRecordValue(entry) && typeof entry.checkRef === 'string' && isRecordValue(entry.outcome))
|
|
4090
|
+
.filter((entry) => entry.outcome.success === false && !carried.has(entry.checkRef))
|
|
4091
|
+
.map((entry) => ({ checkRef: entry.checkRef, message: typeof entry.outcome.message === 'string' ? entry.outcome.message : '' }));
|
|
4092
|
+
return {
|
|
4093
|
+
taskId: run.taskId,
|
|
4094
|
+
settledAt: run.settledAt ?? run.startedAt ?? '',
|
|
4095
|
+
settledAtMs: Date.parse(run.settledAt ?? run.startedAt ?? '') || 0,
|
|
4096
|
+
verificationUnanswered: failedOnlyForUnansweredVerification({ output: run.output, isolatedRecheck: readIsolatedVerificationRecheck(run.memory) }),
|
|
4097
|
+
failedChecks,
|
|
4098
|
+
};
|
|
4099
|
+
})
|
|
4100
|
+
.sort((left, right) => right.settledAtMs - left.settledAtMs);
|
|
4101
|
+
const withheld = deriveUnansweredVerificationWithholding(runs, {
|
|
4102
|
+
nowMs: Date.now(),
|
|
4103
|
+
reaskAfterMs: VERIFICATION_HOST_FAILURE_REASK_MS,
|
|
4104
|
+
hostAnsweredSince: (latest) => latest.failedChecks.some(({ checkRef, message }) => {
|
|
4105
|
+
if ((this.verificationCheckAnsweredAtMs?.get(checkRef) ?? 0) > latest.settledAtMs)
|
|
4106
|
+
return true;
|
|
4107
|
+
const stalePackage = readStaleCompiledModelPackage(message);
|
|
4108
|
+
if (stalePackage === undefined)
|
|
4109
|
+
return false;
|
|
4110
|
+
const reading = readApplicationPackageCompileCurrency(this.companionContext.saasRoot, stalePackage);
|
|
4111
|
+
return reading.currency === ApplicationPackageCompileCurrency.CURRENT && (reading.lastSuccessfulCompileMs ?? 0) > latest.settledAtMs;
|
|
4112
|
+
}),
|
|
4113
|
+
});
|
|
4114
|
+
if (withheld === undefined)
|
|
4115
|
+
return undefined;
|
|
4116
|
+
const check = withheld.latest.failedChecks[0];
|
|
4117
|
+
return {
|
|
4118
|
+
priorTaskId: withheld.latest.taskId,
|
|
4119
|
+
settledAt: withheld.latest.settledAt,
|
|
4120
|
+
consecutive: withheld.consecutive,
|
|
4121
|
+
checkRef: check?.checkRef ?? '',
|
|
4122
|
+
message: check?.message ?? '',
|
|
4123
|
+
asksAgainAt: new Date(withheld.latest.settledAtMs + VERIFICATION_HOST_FAILURE_REASK_MS).toISOString(),
|
|
4124
|
+
};
|
|
3948
4125
|
}
|
|
3949
4126
|
/**
|
|
3950
4127
|
* The completed coding runs of one build task that the anti-loop guard still counts — newest first,
|
|
@@ -4983,13 +5160,13 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
4983
5160
|
+ "the compiled backend registry, and this build never emitted one (`tsc --noEmit` does not). Build backend-api, "
|
|
4984
5161
|
+ 'or run this check under `wildo local dev`, whose watcher maintains that dist.');
|
|
4985
5162
|
}
|
|
4986
|
-
const outcome = await this.
|
|
5163
|
+
const outcome = await this.runVerificationAwaitingCompiledModel({
|
|
4987
5164
|
kind: VerificationKind.SCHEMA_PLAN_DRIFT,
|
|
4988
5165
|
path: null,
|
|
4989
5166
|
command: 'wildo',
|
|
4990
5167
|
args: ['db', 'diff', '--check'],
|
|
4991
5168
|
cwd: saasRoot,
|
|
4992
|
-
});
|
|
5169
|
+
}, (answer) => /Cannot compute the current schema plan/i.test(`${answer.stdoutTail}\n${answer.stderrTail}`));
|
|
4993
5170
|
// The CLI is a GLOBAL install (`platform/factory/scripts/install.sh`) and is not linked
|
|
4994
5171
|
// into an application's `node_modules/.bin` — verified on both dogfood applications. So
|
|
4995
5172
|
// "wildo is not on PATH" is an absent tool, never a drifted schema.
|
|
@@ -5015,6 +5192,33 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
5015
5192
|
}
|
|
5016
5193
|
return outcome;
|
|
5017
5194
|
}
|
|
5195
|
+
/**
|
|
5196
|
+
* Every business module's conventional files, read from the working tree, held to the folders the framework reads them
|
|
5197
|
+
* from (#3904, `inspectModuleLayout`). Each misplaced file is one finding (its identity in `failureFindings`, so a
|
|
5198
|
+
* misplacement already in the tree before the run is carried, not charged to it) and one correction in the message:
|
|
5199
|
+
* the `mv` and the imports to update. The run's retry receives that message. A verdict always: nothing here can
|
|
5200
|
+
* fail to ask, so a failure is the task's, never the host's.
|
|
5201
|
+
*/
|
|
5202
|
+
runModuleLayoutVerification() {
|
|
5203
|
+
const inspection = inspectModuleLayout(this.companionContext.saasRoot);
|
|
5204
|
+
const success = inspection.findings.length === 0;
|
|
5205
|
+
return {
|
|
5206
|
+
kind: VerificationKind.MODULE_LAYOUT,
|
|
5207
|
+
path: null,
|
|
5208
|
+
success,
|
|
5209
|
+
message: success
|
|
5210
|
+
? `${inspection.conventionalFilesSeen} conventional file(s) across ${inspection.modulesInspected} module folder(s) are in their conventional folders`
|
|
5211
|
+
/*
|
|
5212
|
+
* Application-wide, so the list can name a misplacement that was in the tree before this run (#3904 review F6).
|
|
5213
|
+
* That one is carried, not charged (`failureFindings`), and the run is told to move only what it placed.
|
|
5214
|
+
*/
|
|
5215
|
+
: `${inspection.findings.length} module file(s) outside their conventional folder. Move the ones your task wrote or `
|
|
5216
|
+
+ `moved; one that was already there before your run is not charged to it: ${inspection.findings.map((finding) => finding.correction).join(' | ')}`,
|
|
5217
|
+
...(success ? {} : { failureFindings: inspection.findings.map((finding) => finding.identity) }),
|
|
5218
|
+
stdoutTail: '',
|
|
5219
|
+
stderrTail: '',
|
|
5220
|
+
};
|
|
5221
|
+
}
|
|
5018
5222
|
/**
|
|
5019
5223
|
* The specifications package EVALUATED, as the companion evaluates it (#3210, #3211). Each specification whose
|
|
5020
5224
|
* factory refuses its definition fails the check with the validator's own message, which names the field and the
|
|
@@ -5072,6 +5276,51 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
5072
5276
|
stderrTail: '',
|
|
5073
5277
|
};
|
|
5074
5278
|
}
|
|
5279
|
+
/**
|
|
5280
|
+
* Run a CLI check, and when it could not be asked because an application package's compiled model is behind its sources,
|
|
5281
|
+
* wait (bounded, {@link STALE_COMPILED_MODEL_WAIT_MS}) for that package's compiler to catch up and ask ONCE more (run
|
|
5282
|
+
* 43961156770). The package is the one the CLI names (`readStaleCompiledModelPackage`); its currency is read from the
|
|
5283
|
+
* compile record the observer publishes (`waitForApplicationPackageCompileCurrent`). Only an answer still unasked after the
|
|
5284
|
+
* wait reaches the caller, which reports the check unrun.
|
|
5285
|
+
*
|
|
5286
|
+
* Returns at once, with the first answer, when it asked, when it could not ask for another reason, when no compiler
|
|
5287
|
+
* records the package (nothing will publish it), or when its compiler already failed on the current sources (no wait
|
|
5288
|
+
* clears that). Each check runs at most twice.
|
|
5289
|
+
*/
|
|
5290
|
+
async runVerificationAwaitingCompiledModel(request, couldNotAsk) {
|
|
5291
|
+
const first = await this.runVerification(request);
|
|
5292
|
+
if (first.success || !couldNotAsk(first))
|
|
5293
|
+
return first;
|
|
5294
|
+
const stalePackage = readStaleCompiledModelPackage(`${first.stdoutTail}\n${first.stderrTail}`);
|
|
5295
|
+
if (stalePackage === undefined)
|
|
5296
|
+
return first;
|
|
5297
|
+
const bound = this.staleCompiledModelWait ?? { maximumWaitMs: STALE_COMPILED_MODEL_WAIT_MS, pollIntervalMs: STALE_COMPILED_MODEL_POLL_INTERVAL_MS };
|
|
5298
|
+
const gaveUp = (this.staleCompiledModelWaitGaveUpAtMs ??= new Map());
|
|
5299
|
+
const gaveUpAtMs = gaveUp.get(stalePackage);
|
|
5300
|
+
const waitedInVainLately = gaveUpAtMs !== undefined && Date.now() - gaveUpAtMs < bound.maximumWaitMs;
|
|
5301
|
+
const waited = await waitForApplicationPackageCompileCurrent({
|
|
5302
|
+
saasRoot: this.companionContext.saasRoot,
|
|
5303
|
+
packageDirectory: stalePackage,
|
|
5304
|
+
...bound,
|
|
5305
|
+
// Read once, without polling, when a wait for this package just ran out (see the field).
|
|
5306
|
+
...(waitedInVainLately ? { maximumWaitMs: 0 } : {}),
|
|
5307
|
+
...(waitedInVainLately ? {} : {
|
|
5308
|
+
onWait: () => this.logger.info('A check could not be asked because a compiled model is behind its sources; waiting for it to compile', {
|
|
5309
|
+
kind: request.kind, stalePackage, maximumWaitMs: bound.maximumWaitMs,
|
|
5310
|
+
}),
|
|
5311
|
+
}),
|
|
5312
|
+
});
|
|
5313
|
+
if (waited.currency !== ApplicationPackageCompileCurrency.CURRENT) {
|
|
5314
|
+
if (!waitedInVainLately && waited.waitedMs > 0) {
|
|
5315
|
+
gaveUp.set(stalePackage, Date.now());
|
|
5316
|
+
this.logger.warn('A compiled model is still behind its sources after waiting; the check is reported unrun', { kind: request.kind, stalePackage, waitedMs: waited.waitedMs, currency: waited.currency });
|
|
5317
|
+
}
|
|
5318
|
+
return first;
|
|
5319
|
+
}
|
|
5320
|
+
gaveUp.delete(stalePackage);
|
|
5321
|
+
this.logDebug('The compiled model caught up; asking the check again', { kind: request.kind, stalePackage, waitedMs: waited.waitedMs });
|
|
5322
|
+
return this.runVerification(request);
|
|
5323
|
+
}
|
|
5075
5324
|
/**
|
|
5076
5325
|
* `wildo config check-resources` at the application root (#2404): the resources registry built offline, as the
|
|
5077
5326
|
* backend's startup builds it. A refusal fails the check with the factory's own message, which names the resource.
|
|
@@ -5081,13 +5330,13 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
5081
5330
|
* configuration the backend refuses. The CLI marks it with {@link RESOURCES_REGISTRY_COULD_NOT_ASK_MARKER}.
|
|
5082
5331
|
*/
|
|
5083
5332
|
async runResourcesRegistryInitVerification() {
|
|
5084
|
-
const outcome = await this.
|
|
5333
|
+
const outcome = await this.runVerificationAwaitingCompiledModel({
|
|
5085
5334
|
kind: VerificationKind.RESOURCES_REGISTRY_INIT,
|
|
5086
5335
|
path: null,
|
|
5087
5336
|
command: 'wildo',
|
|
5088
5337
|
args: ['config', 'check-resources'],
|
|
5089
5338
|
cwd: this.companionContext.saasRoot,
|
|
5090
|
-
});
|
|
5339
|
+
}, (answer) => `${answer.stdoutTail}\n${answer.stderrTail}`.includes(RESOURCES_REGISTRY_COULD_NOT_ASK_MARKER));
|
|
5091
5340
|
refuseWhenVerificationToolIsAbsent(outcome, { command: 'wildo', checking: 'check the resources registry' });
|
|
5092
5341
|
/*
|
|
5093
5342
|
* A `wildo` older than this companion does not know the verb and answers "Unknown command" (#2404 review F9): an
|
|
@@ -5285,22 +5534,24 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
|
|
|
5285
5534
|
? await this.runResourcesRegistryInitVerification()
|
|
5286
5535
|
: plan.kind === VerificationKind.SPECIFICATION_EXPORTS
|
|
5287
5536
|
? await this.runSpecificationExportsVerification()
|
|
5288
|
-
: plan.kind === VerificationKind.
|
|
5289
|
-
?
|
|
5290
|
-
: plan.kind === VerificationKind.
|
|
5291
|
-
? await this.
|
|
5292
|
-
: plan.kind === VerificationKind.
|
|
5293
|
-
? await this.
|
|
5294
|
-
: plan.kind === VerificationKind.
|
|
5295
|
-
? await this.
|
|
5296
|
-
: plan.kind === VerificationKind.
|
|
5297
|
-
? await this.
|
|
5298
|
-
: plan.kind === VerificationKind.
|
|
5299
|
-
? await this.
|
|
5300
|
-
: plan.kind === VerificationKind.
|
|
5301
|
-
? await this.
|
|
5302
|
-
:
|
|
5303
|
-
|
|
5537
|
+
: plan.kind === VerificationKind.MODULE_LAYOUT
|
|
5538
|
+
? this.runModuleLayoutVerification()
|
|
5539
|
+
: plan.kind === VerificationKind.CONFIG_VALIDATE
|
|
5540
|
+
? await this.runConfigValidateVerification()
|
|
5541
|
+
: plan.kind === VerificationKind.DESIGN_SYSTEM_CONTRAST
|
|
5542
|
+
? await this.runDesignSystemContrastVerification(plan.path ?? 'frontend')
|
|
5543
|
+
: plan.kind === VerificationKind.DESIGN_SYSTEM_CONTRACT
|
|
5544
|
+
? await this.runDesignSystemContractVerification(plan.path ?? 'frontend')
|
|
5545
|
+
: plan.kind === VerificationKind.DESIGN_SYSTEM_BRAND
|
|
5546
|
+
? await this.runDesignSystemBrandVerification(plan.path ?? 'frontend')
|
|
5547
|
+
: plan.kind === VerificationKind.BACKEND_READY
|
|
5548
|
+
? await this.runBackendReadyVerification()
|
|
5549
|
+
: plan.kind === VerificationKind.BROWSER_SMOKE
|
|
5550
|
+
? await this.runBrowserSmokeVerification()
|
|
5551
|
+
: plan.kind === VerificationKind.WEBSITE_DEMO_FACTS
|
|
5552
|
+
? await this.runWebsiteDemoFactsVerification(plan.path ?? 'website')
|
|
5553
|
+
: this.absentWorkspacePackageOutcome(plan)
|
|
5554
|
+
?? await this.runArgvVerification(plan.kind, plan.path ?? undefined),
|
|
5304
5555
|
});
|
|
5305
5556
|
}
|
|
5306
5557
|
catch (error) {
|