Documentation Index
Fetch the complete documentation index at: https://docs.manthan.systems/llms.txt
Use this file to discover all available pages before exploring further.
Signal validation (VAL)
Thrown when signals don’t match the policy’s signalsSchema.
| Code | Meaning | Fix |
|---|
VAL-003 | Signal not declared in signalsSchema | Remove the unknown signal or add it to the policy’s schema |
VAL-004 | Required signal missing from input | Add the missing signal to your request |
VAL-005 | number signal has non-numeric value | Pass a number |
VAL-006 | boolean signal has non-boolean value | Pass true or false, not 1 or "true" |
VAL-007 | integer signal has non-integer value | Pass a whole number, not a float or string |
VAL-008 | string signal has non-string value | Pass a string |
VAL-009 | enum value not in declared values array | Check the values array in signalsSchema |
VAL-011 | enum signal missing values array in schema | Add "values": [...] to the signal definition |
VAL-012 | Unsupported signal type in schema | Use: integer, number, boolean, string, enum |
Policy compilation (POL)
Thrown by compilePolicy or generateBundle. Errors block signing; the policy must be fixed before a bundle can be produced.
| Code | Meaning | Fix |
|---|
POL-001 | policy.json not found at the given path | Check the path passed to compile |
POL-002 | Invalid JSON in policy.json | Fix the syntax error |
POL-003 | Missing policyId field | Add "policyId": "your-policy-id" |
POL-004 | Missing policyVersion field | Add "policyVersion": "1.0.0" |
POL-005 | Missing schemaVersion field | Add "schemaVersion": "1.0.0" |
POL-006 | Missing signalsSchema field | Add a signalsSchema object |
POL-007 | Missing rules field | Add a rules array |
POL-008 | policyId doesn’t match directory name | Name the directory {policyId} |
POL-009 | Unsupported schemaVersion | Only "1.0.0" is currently supported |
POL-010 | Signal missing type field | Add "type": "..." to the signal definition |
POL-011 | Signal has invalid type | Use: integer, number, boolean, string, enum |
POL-012 | enum signal missing values array | Add "values": [...] to the enum signal |
POL-013 | Rule missing id field | Add a unique id string to the rule |
POL-014 | Rule missing condition field | Add a condition object to the rule |
POL-015 | Rule missing outcome field | Add an outcome object to the rule |
POL-016 | Rule outcome.action is not a valid action | Use a supported action string |
POL-017 | Rule outcome.requires_override must be boolean | Pass true or false |
POL-018 | Rule outcome.reason must be a string | Pass a string value |
POL-019 | Rule condition references unknown signal | Add the signal to signalsSchema |
POL-020 | Duplicate rule id | Each rule id must be unique within the policy |
POL-021 | No catch-all rule found | Add a rule with "condition": { "all": [] } as the last rule |
POL-022 | policyVersion not semver | Use 1.0.0 format - the v1 prefix is not supported |
System (SYS)
| Code | Meaning | Fix |
|---|
SYS-006 | No rule matched - default reject applied | Add a catch-all rule ("condition": { "all": [] }) as the last rule |
Invariants (INV)
| Code | Meaning | Fix |
|---|
INV-013 | Replay detected - execution_fingerprint already consumed | This signal set has already been executed. Use different signals or a fresh replay store for testing. |
Using error codes in code
All codes are available as constants in @parmanasystems/execution:
import { ErrorCodes } from "@parmanasystems/execution";
try {
await executeFromSignals(...);
} catch (error: any) {
if (error.message.includes(ErrorCodes.INV_013)) {
// Replay violation - signal set already executed
metrics.increment("governance.replay_violation");
}
if (error.message.includes(ErrorCodes.VAL_004)) {
// Missing required signal
res.status(400).json({ error: "Missing required signal", code: "VAL-004" });
}
}
See also