affaan-m/ECC · error · Error
Invalid canonical install-state: required projection fields
Error message
Invalid canonical install-state: required projection fields are missing
What it means
buildInstallStateStoreRecord received a canonical install-state object missing one of the required projection fields: target, request, resolution, or source. The state-store projection flattens all four; an incomplete canonical state means the installer pipeline produced or loaded a truncated record.
Source
Thrown at scripts/lib/state-store/install-state-projection.js:21
const path = require('path');
const MANAGED_FILE_HEALTH_CODES = new Set([
'missing-target-root',
'unsafe-managed-destination',
'unsafe-repair-source',
'missing-managed-files',
'drifted-managed-files',
'missing-source-files',
'unverified-managed-operations',
]);
function cloneJsonValue(value) {
return value === undefined ? undefined : JSON.parse(JSON.stringify(value));
}
function buildInstallStateStoreRecord(state) {
if (!state || !state.target || !state.request || !state.resolution || !state.source) {
throw new Error('Invalid canonical install-state: required projection fields are missing');
}
return {
targetId: state.target.id,
targetRoot: state.target.root,
profile: state.request.profile ?? null,
modules: Array.isArray(state.resolution.selectedModules)
? [...state.resolution.selectedModules]
: [],
operations: Array.isArray(state.operations)
? state.operations.map(operation => cloneJsonValue(operation))
: [],
installedAt: state.installedAt,
sourceVersion: state.source.repoVersion ?? null,
};
}
function warningFor(record, code, message) {View on GitHub (pinned to 06c5e118c4)
Solutions
- Provide a value that satisfies the validation: Invalid canonical install-state: required projection fields are missing
- Check the calling command or configuration for the reported field and correct it, then retry.
- Run the command with --help to review the expected input shape and allowed values.
Example fix
Correct the invalid input so that the following holds: Invalid canonical install-state: required projection fields are missing
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at scripts/lib/state-store/install-state-projection.js:21 when the library encounters an invalid state.
Common situations: Raised when input validation fails because: Invalid canonical install-state: required projection fields are missing. Typically caused by a missing, malformed, or out-of-range argument or configuration value.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/0cf45429aab0002d.
Report an issue: GitHub.