xai-org/x-algorithm · error · SemanticCheckFailure
Input Feature %s does not exist
Error message
Input Feature %s does not exist
What it means
In strict mode, every input feature referenced in an expression must exist in the declared inputFeatureTypes map; otherwise the CompilerBuilder cannot infer a type and fails. In non-strict mode the unknown feature is typed as OBJECT instead.
Source
Thrown at botmaker/src/java/com/twitter/botmaker/compiler/CompilerBuilder.java:233
public boolean containsFingerprint(Fingerprint fingerprint) {
return super.containsFingerprint(fingerprint)
|| compilerUnitsFingerprints.contains(fingerprint);
}
@Override
protected Type getInputFeatureType(
String namespace,
String featureName
) throws SemanticCheckFailure {
String fullFeatureName = namespace.isEmpty()
? featureName : String.format("%s.%s", namespace, featureName);
if (inputFeatureTypes.containsKey(fullFeatureName)) {
return inputFeatureTypes.get(fullFeatureName);
} else if (!strictMode) {
return Type.OBJECT;
} else {
throw new SemanticCheckFailure(
String.format("Input Feature %s does not exist", fullFeatureName));
}
}
@Override
protected boolean containsFunction(String name) {
return compilerUnits.containsKey(name);
}
@Override
protected ASTNode createFunctionASTNode(
CompilerContext<E> context,
String funcName,
ImmutableList<ASTNode> children) throws SemanticCheckFailure {
if (!compilerUnits.containsKey(funcName)) {
throw new SemanticCheckFailure(String.format("Function '%s' does not exist", funcName));
}
View on GitHub (pinned to 24c60942c5)
Solutions
- Fix the feature name to match a registered input feature
- Register the missing feature and its type in CompilerBuilder's input feature configuration
- If intentional (late-bound/dynamic features), disable strict mode so unknowns fall back to OBJECT
Example fix
// before
CompilerBuilder.withStrictMode(true) // and expression uses "usre.age"
// after
// fix expression to "user.age", or register the feature:
// builder.addInputFeature("user.age", Type.LONG) Defensive patterns
Strategy: validation
Validate before calling
if (strictMode && !inputFeatureTypes.containsKey(fullFeatureName))
throw new IllegalArgumentException("Unregistered input feature: " + fullFeatureName); Type guard
static boolean featureRegistered(Map<String,Type> types, String name, boolean strict) { return !strict || types.containsKey(name); } Try / catch
catch (SemanticCheckFailure e) { if (e.getMessage().contains("Input Feature")) registerOrFixName(e); else throw e; } Prevention
- Register all referenced input features and types with CompilerBuilder
- Keep feature schemas in sync with expressions; only disable strict mode for late-bound features
When it happens
Trigger: Referencing a feature name (including namespaced `pkg.feature` forms) that is not registered via CompilerBuilder's input feature declarations, while strictMode is enabled.
Common situations: Feature name typos or casing, feature removed/renamed upstream, the input-feature schema not passed to the builder, or new features used before the declaring schema version is loaded.
Related errors
- unrecognized function name:
- class to be imported has to be either a TBase or ThriftStruc
- cannot find class %s
- function passed to Foldl() returns %s but seed value is a %s
- Foldl1 is expected to return %s but passed function returns
AI-assisted analysis of xai-org/x-algorithm@24c60942c5 (2026-08-28).
Data as JSON: /api/errors/f3bd4d125648e6c3.
Report an issue: GitHub.