Validation error reference Stable
The pack validator emits stable, namespaced diagnostic codes. The code is the
contract — tooling switches on it, never on the message string. The table below is
normative reference derived from the ValidationDiagnosticCode registry in
@tenkacloud/problem-sdk. Every code has a user-facing explanation here, and the
drift check fails the build if a code is added without one.
Codes
| Code | What it means / how to fix it |
|---|---|
PACK_ARTIFACT_MISSING | A problem declares an artifact (template / entry) that does not exist. |
PACK_ARTIFACT_TRAVERSAL | A problem references a deploy artifact outside its own directory. |
PACK_DIR_MISSING | The pack directory does not exist. Check the path passed to the validator. |
PACK_DUPLICATE_PROBLEM_ID | Two problems in the pack declare the same id; ids must be unique. |
PACK_MANIFEST_INVALID | tenkacloud-pack.json failed schema validation. The accompanying path points at the offending field. |
PACK_MANIFEST_MISSING | No tenkacloud-pack.json was found at the pack root. |
PACK_MANIFEST_UNREADABLE | tenkacloud-pack.json exists but could not be read or parsed as JSON. |
PACK_PROBLEMS_ROOT_MISSING | The directory named by problemsRoot does not exist inside the pack. |
PACK_PROBLEMS_ROOT_TRAVERSAL | problemsRoot escapes the pack root (absolute path or '..' traversal). |
PROBLEM_METADATA_INVALID | A problem's metadata.json is not a valid object or a required field is missing / malformed. |
RUNTIME_MISMATCH | A declared runtime '(provider/engine)' is not a supported runtime capability (a typo or an unsupported pair). |
Codes are namespaced PACK_* / PROBLEM_* / RUNTIME_*. Adding a code is an
additive (minor) change; removing or repurposing one is a major change.
Reading a diagnostic
Each diagnostic carries the stable code, a path locating the offending value
(tenkacloud-pack.json:id or metadata.json:scoring), and a remediation
message. Run tenkacloud pack validate <dir> --json to get machine-readable
output.
Related: CLI reference and the pack manifest reference.