{
"schemaVersion": 1,
"description": "Language-neutral semantic cases shared by the Node, Python and Rust Scrollcase consumers.",
"errorPatterns": {
"invalid-signature": "no valid signature",
"altered-payload": "Signed payload SHA-256 mismatch",
"archive-hash": "Archive SHA-256 mismatch",
"archive-size": "Archive size mismatch",
"manifest-disagreement": "box.json mismatch: modelId",
"execution-disagreement": "box.json mismatch: execution",
"environment-disagreement": "box.json mismatch: environment",
"missing-interpreter": "Archive is missing venv/",
"missing-script": "Execution script is missing",
"missing-module": "Execution module is not discoverable",
"unsafe-path": "Unsafe relative path|invalid relative path|absolute path",
"link-entry": "link does not resolve to a file inside the payload|would be written through a link|link target is too long",
"special-entry": "special entries",
"encrypted-entry": "Encrypted ZIP entries",
"entry-collision": "Archive entry collides with another entry",
"existing-destination": "Destination already exists",
"asset-missing": "asset is missing",
"asset-size": "asset size mismatch",
"asset-hash": "asset SHA-256 mismatch",
"spawn-failure": "failed to start|fixture spawn failed",
"attach-root": "is not an extracted box directory",
"attach-missing-interpreter": "Attached box is missing venv/",
"foreign-target": "cannot run on",
"payload-list-missing": "missing its payload digest list",
"payload-list-mismatch": "Payload digest list does not match the signed release",
"payload-digest-absent": "does not commit to a payload digest",
"payload-mismatch": "^Payload does not match the signed release:",
"unsupported-schema-version": "Unsupported schemaVersion 1"
},
"cases": [
{
"id": "valid-local-signer",
"action": "prepare",
"fixture": {
"signer": "local"
},
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "valid-external-signer",
"action": "prepare",
"fixture": {
"signer": "external"
},
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "unknown-compatibility-constraint",
"action": "prepare",
"mutation": "add-unknown-compatibility-constraint",
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "declared-environment-in-prepare-report",
"action": "prepare",
"fixture": {
"environment": {
"SCROLLCASE_DECLARED_MODEL_ROOT": "model-cache/consumer-fixture"
}
},
"runtime": {
"reportVariables": [
"SCROLLCASE_DECLARED_MODEL_ROOT"
]
},
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET",
"environmentReport": {
"mode": "summary",
"hostValuesRevealed": false,
"releaseVariableCount": 1,
"conflictCount": 0,
"variables": [
{
"name": "SCROLLCASE_DECLARED_MODEL_ROOT",
"source": "release",
"value": "model-cache/consumer-fixture",
"executionAffecting": false,
"conflict": false,
"sources": [
{
"source": "release",
"name": "SCROLLCASE_DECLARED_MODEL_ROOT",
"value": "model-cache/consumer-fixture"
}
]
}
]
}
}
}
},
{
"id": "masked-environment-conflict-in-attach-report",
"action": "attach",
"fixture": {
"environment": {
"SCROLLCASE_ENV_CONFLICT": "release-value"
}
},
"runtime": {
"hostEnvironment": {
"SCROLLCASE_ENV_CONFLICT": "host-secret"
},
"envReport": true,
"reportVariables": [
"SCROLLCASE_ENV_CONFLICT"
]
},
"expected": {
"outcome": "attached",
"receipt": {
"status": "attached",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET",
"environmentReport": {
"mode": "full",
"hostValuesRevealed": false,
"releaseVariableCount": 1,
"conflictCount": 1,
"variables": [
{
"name": "SCROLLCASE_ENV_CONFLICT",
"source": "release",
"value": "release-value",
"executionAffecting": false,
"conflict": true,
"sources": [
{
"source": "host",
"name": "SCROLLCASE_ENV_CONFLICT",
"value": "<masked>"
},
{
"source": "release",
"name": "SCROLLCASE_ENV_CONFLICT",
"value": "release-value"
}
]
}
]
}
}
}
},
{
"id": "revealed-environment-conflict-in-payload-verify-report",
"action": "verify-payload",
"fixture": {
"environment": {
"SCROLLCASE_VERIFY_ENV": "release-value"
}
},
"runtime": {
"hostEnvironment": {
"SCROLLCASE_VERIFY_ENV": "host-secret"
},
"envReportValues": true,
"reportVariables": [
"SCROLLCASE_VERIFY_ENV"
]
},
"expected": {
"outcome": "verified",
"result": {
"status": "verified",
"boxId": "consumer-fixture",
"targetId": "$NATIVE_TARGET",
"entryCount": 3,
"environmentReport": {
"mode": "full",
"hostValuesRevealed": true,
"releaseVariableCount": 1,
"conflictCount": 1,
"variables": [
{
"name": "SCROLLCASE_VERIFY_ENV",
"source": "release",
"value": "release-value",
"executionAffecting": false,
"conflict": true,
"sources": [
{
"source": "host",
"name": "SCROLLCASE_VERIFY_ENV",
"value": "host-secret"
},
{
"source": "release",
"name": "SCROLLCASE_VERIFY_ENV",
"value": "release-value"
}
]
}
]
}
}
}
},
{
"id": "release-environment-wins-host-and-caller",
"action": "run-prepared",
"fixture": {
"environment": {
"SCROLLCASE_ENV_PRECEDENCE": "release-value"
}
},
"runtime": {
"hostEnvironment": {
"SCROLLCASE_ENV_PRECEDENCE": "host-secret"
},
"env": {
"SCROLLCASE_ENV_PRECEDENCE": "caller-value"
},
"reportVariables": [
"SCROLLCASE_ENV_PRECEDENCE"
]
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null,
"environmentReport": {
"mode": "summary",
"hostValuesRevealed": false,
"releaseVariableCount": 1,
"conflictCount": 1,
"variables": [
{
"name": "SCROLLCASE_ENV_PRECEDENCE",
"source": "release",
"value": "release-value",
"executionAffecting": false,
"conflict": true,
"sources": [
{
"source": "host",
"name": "SCROLLCASE_ENV_PRECEDENCE",
"value": "<masked>"
},
{
"source": "caller",
"name": "SCROLLCASE_ENV_PRECEDENCE",
"value": "caller-value"
},
{
"source": "release",
"name": "SCROLLCASE_ENV_PRECEDENCE",
"value": "release-value"
}
]
}
]
}
},
"effectiveEnvironment": {
"SCROLLCASE_ENV_PRECEDENCE": "release-value"
}
}
},
{
"id": "execution-affecting-host-value-requires-explicit-reveal",
"action": "run-prepared",
"runtime": {
"hostEnvironment": {
"PYTHONPATH": "/host/code"
},
"envReportValues": true,
"reportVariables": [
"PYTHONPATH"
]
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null,
"environmentReport": {
"mode": "full",
"hostValuesRevealed": true,
"releaseVariableCount": 0,
"conflictCount": 0,
"variables": [
{
"name": "PYTHONPATH",
"source": "host",
"value": "/host/code",
"executionAffecting": true,
"conflict": false,
"sources": [
{
"source": "host",
"name": "PYTHONPATH",
"value": "/host/code"
}
]
}
]
}
},
"effectiveEnvironment": {
"PYTHONPATH": "/host/code"
}
}
},
{
"id": "altered-environment-metadata",
"action": "prepare",
"mutation": "alter-release-environment",
"expected": {
"outcome": "rejected",
"error": "environment-disagreement",
"destinationExists": false
}
},
{
"id": "unsupported-schema-version",
"action": "prepare",
"mutation": "downgrade-envelope-version",
"expected": {
"outcome": "rejected",
"error": "unsupported-schema-version",
"destinationExists": false
}
},
{
"id": "altered-signature",
"action": "prepare",
"mutation": "alter-signature",
"expected": {
"outcome": "rejected",
"error": "invalid-signature",
"destinationExists": false
}
},
{
"id": "altered-payload",
"action": "prepare",
"mutation": "alter-payload",
"expected": {
"outcome": "rejected",
"error": "altered-payload",
"destinationExists": false
}
},
{
"id": "altered-archive-hash",
"action": "prepare",
"mutation": "alter-archive-bytes",
"expected": {
"outcome": "rejected",
"error": "archive-hash",
"destinationExists": false
}
},
{
"id": "altered-archive-size",
"action": "prepare",
"mutation": "alter-archive-size",
"expected": {
"outcome": "rejected",
"error": "archive-size",
"destinationExists": false
}
},
{
"id": "release-box-disagreement",
"action": "prepare",
"mutation": "alter-release-model",
"expected": {
"outcome": "rejected",
"error": "manifest-disagreement",
"destinationExists": false
}
},
{
"id": "altered-execution-metadata",
"action": "prepare",
"mutation": "alter-release-execution",
"expected": {
"outcome": "rejected",
"error": "execution-disagreement",
"destinationExists": false
}
},
{
"id": "missing-interpreter",
"action": "prepare",
"mutation": "remove-interpreter",
"expected": {
"outcome": "rejected",
"error": "missing-interpreter",
"destinationExists": false
}
},
{
"id": "missing-script",
"action": "prepare",
"mutation": "remove-script",
"expected": {
"outcome": "rejected",
"error": "missing-script",
"destinationExists": false
}
},
{
"id": "missing-module",
"action": "prepare",
"fixture": {
"execution": "module"
},
"mutation": "remove-module",
"expected": {
"outcome": "rejected",
"error": "missing-module",
"destinationExists": false
}
},
{
"id": "traversal-entry",
"action": "prepare",
"mutation": "add-traversal-entry",
"expected": {
"outcome": "rejected",
"error": "unsafe-path",
"destinationExists": false
}
},
{
"id": "absolute-entry",
"action": "prepare",
"mutation": "add-absolute-entry",
"expected": {
"outcome": "rejected",
"error": "unsafe-path",
"destinationExists": false
}
},
{
"id": "link-entry",
"action": "prepare",
"mutation": "add-link-entry",
"expected": {
"outcome": "rejected",
"error": "link-entry",
"destinationExists": false
}
},
{
"id": "linked-interpreter",
"action": "prepare",
"mutation": "link-interpreter",
"requiresSymlinks": true,
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "special-entry",
"action": "prepare",
"mutation": "add-special-entry",
"expected": {
"outcome": "rejected",
"error": "special-entry",
"destinationExists": false
}
},
{
"id": "encrypted-entry",
"action": "prepare",
"mutation": "encrypt-entry",
"expected": {
"outcome": "rejected",
"error": "encrypted-entry",
"destinationExists": false
}
},
{
"id": "extraction-collision",
"action": "prepare",
"mutation": "duplicate-entry",
"expected": {
"outcome": "rejected",
"error": "entry-collision",
"destinationExists": false
}
},
{
"id": "file-directory-collision",
"action": "prepare",
"mutation": "file-directory-collision",
"expected": {
"outcome": "rejected",
"error": "entry-collision",
"destinationExists": false
}
},
{
"id": "existing-destination",
"action": "prepare",
"mutation": "create-destination",
"expected": {
"outcome": "rejected",
"error": "existing-destination",
"destinationExists": true
}
},
{
"id": "macos-entry-point",
"action": "prepare",
"fixture": {
"target": "macos-aarch64-cpu"
},
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "venv/bin/python",
"targetId": "macos-aarch64-cpu"
}
}
},
{
"id": "linux-entry-point",
"action": "prepare",
"fixture": {
"target": "linux-x86_64-cpu"
},
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "venv/bin/python",
"targetId": "linux-x86_64-cpu"
}
}
},
{
"id": "windows-entry-point",
"action": "prepare",
"fixture": {
"target": "windows-x86_64-cpu"
},
"expected": {
"outcome": "prepared",
"receipt": {
"status": "prepared",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "venv/python.exe",
"targetId": "windows-x86_64-cpu"
}
}
},
{
"id": "persistent-prepared-execution",
"action": "run-prepared",
"runtime": {
"exitCode": 0
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null
},
"persistentRootExists": true,
"spawned": true
}
},
{
"id": "default-user-argument-ordering",
"action": "run-prepared",
"runtime": {
"args": [
"--caller",
"caller value"
],
"exitCode": 0,
"inspectInvocation": true
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null
},
"argv": [
"$BOX/$NATIVE_PYTHON",
"$BOX/app/main.py",
"--default",
"value with spaces",
"--caller",
"caller value"
],
"cwd": "$BOX",
"shell": false
}
},
{
"id": "shell-metacharacter-preservation",
"action": "run-prepared",
"runtime": {
"args": [
"$(touch never)",
"semi;colon",
"quote'\"value"
],
"exitCode": 0,
"inspectInvocation": true
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null
},
"argv": [
"$BOX/$NATIVE_PYTHON",
"$BOX/app/main.py",
"--default",
"value with spaces",
"$(touch never)",
"semi;colon",
"quote'\"value"
],
"cwd": "$BOX",
"shell": false
}
},
{
"id": "standard-stream-forwarding",
"action": "run-prepared",
"runtime": {
"exitCode": 0,
"streams": true
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null
},
"streamsPreserved": true
}
},
{
"id": "child-non-zero-exit",
"action": "run-prepared",
"runtime": {
"exitCode": 23
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 23,
"signal": null
},
"spawned": true
}
},
{
"id": "signal-forwarding",
"action": "run-prepared",
"runtime": {
"signal": "SIGTERM"
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": null,
"signal": "SIGTERM"
},
"forwardedSignal": "SIGTERM"
}
},
{
"id": "temporary-cleanup-success",
"action": "run-box",
"runtime": {
"exitCode": 0
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null
},
"temporaryDirectoryEmpty": true
}
},
{
"id": "temporary-cleanup-failure",
"action": "run-box",
"runtime": {
"spawnError": true
},
"expected": {
"outcome": "rejected",
"error": "spawn-failure",
"temporaryDirectoryEmpty": true
}
},
{
"id": "temporary-cleanup-signal",
"action": "run-box",
"runtime": {
"signal": "SIGTERM"
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": null,
"signal": "SIGTERM"
},
"temporaryDirectoryEmpty": true
}
},
{
"id": "on-demand-asset-missing",
"action": "run-prepared",
"fixture": {
"requiredAsset": true
},
"runtime": {
"assetState": "missing"
},
"expected": {
"outcome": "rejected",
"error": "asset-missing",
"spawned": false
}
},
{
"id": "on-demand-asset-size-mismatch",
"action": "run-prepared",
"fixture": {
"requiredAsset": true
},
"runtime": {
"assetState": "wrong-size"
},
"expected": {
"outcome": "rejected",
"error": "asset-size",
"spawned": false
}
},
{
"id": "on-demand-asset-hash-mismatch",
"action": "run-prepared",
"fixture": {
"requiredAsset": true
},
"runtime": {
"assetState": "wrong-hash"
},
"expected": {
"outcome": "rejected",
"error": "asset-hash",
"spawned": false
}
},
{
"id": "attach-existing-root",
"action": "attach",
"expected": {
"outcome": "attached",
"receipt": {
"status": "attached",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "attached-execution",
"action": "run-prepared",
"runtime": {
"attach": true,
"args": [
"--caller",
"caller value"
],
"exitCode": 0
},
"expected": {
"outcome": "completed",
"result": {
"exitCode": 0,
"signal": null
},
"argv": [
"$BOX/$NATIVE_PYTHON",
"$BOX/app/main.py",
"--default",
"value with spaces",
"--caller",
"caller value"
],
"cwd": "$BOX",
"shell": false
}
},
{
"id": "attach-linked-interpreter",
"action": "attach",
"mutation": "link-interpreter",
"requiresSymlinks": true,
"expected": {
"outcome": "attached",
"receipt": {
"status": "attached",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "attach-on-demand-assets-present",
"action": "attach",
"fixture": {
"requiredAsset": true
},
"runtime": {
"assetState": "present"
},
"expected": {
"outcome": "attached",
"receipt": {
"status": "attached",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 1,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "attach-ignores-extra-files",
"action": "attach",
"mutation": "add-root-files",
"expected": {
"outcome": "attached",
"receipt": {
"status": "attached",
"boxId": "consumer-fixture",
"executionKind": "python-script",
"requiredAssetCount": 0,
"pythonEntryPoint": "$NATIVE_PYTHON",
"targetId": "$NATIVE_TARGET"
}
}
},
{
"id": "attach-missing-root",
"action": "attach",
"mutation": "attach-missing-root",
"expected": {
"outcome": "rejected",
"error": "attach-root"
}
},
{
"id": "attach-file-root",
"action": "attach",
"mutation": "attach-file-root",
"expected": {
"outcome": "rejected",
"error": "attach-root"
}
},
{
"id": "attach-symlink-root",
"action": "attach",
"mutation": "attach-symlink-root",
"requiresSymlinks": true,
"expected": {
"outcome": "rejected",
"error": "attach-root"
}
},
{
"id": "attach-missing-interpreter",
"action": "attach",
"mutation": "remove-interpreter",
"expected": {
"outcome": "rejected",
"error": "attach-missing-interpreter"
}
},
{
"id": "attach-missing-script",
"action": "attach",
"mutation": "remove-script",
"expected": {
"outcome": "rejected",
"error": "missing-script"
}
},
{
"id": "attach-foreign-target",
"action": "attach",
"fixture": {
"target": "foreign"
},
"expected": {
"outcome": "rejected",
"error": "foreign-target"
}
},
{
"id": "attach-on-demand-asset-missing",
"action": "attach",
"fixture": {
"requiredAsset": true
},
"runtime": {
"assetState": "missing"
},
"expected": {
"outcome": "rejected",
"error": "asset-missing"
}
},
{
"id": "attach-on-demand-asset-hash-mismatch",
"action": "attach",
"fixture": {
"requiredAsset": true
},
"runtime": {
"assetState": "wrong-hash"
},
"expected": {
"outcome": "rejected",
"error": "asset-hash"
}
},
{
"id": "payload-verification-matches",
"action": "verify-payload",
"expected": {
"outcome": "verified",
"result": {
"status": "verified",
"boxId": "consumer-fixture",
"targetId": "$NATIVE_TARGET",
"entryCount": 3
}
}
},
{
"id": "payload-verification-ignores-extra-files",
"action": "verify-payload",
"mutation": "add-root-files",
"expected": {
"outcome": "verified",
"result": {
"status": "verified",
"boxId": "consumer-fixture",
"targetId": "$NATIVE_TARGET",
"entryCount": 3
}
}
},
{
"id": "payload-verification-ignores-chmod",
"action": "verify-payload",
"mutation": "chmod-script",
"expected": {
"outcome": "verified",
"result": {
"status": "verified",
"boxId": "consumer-fixture",
"targetId": "$NATIVE_TARGET",
"entryCount": 3
}
}
},
{
"id": "payload-verification-ignores-touch",
"action": "verify-payload",
"mutation": "touch-script",
"expected": {
"outcome": "verified",
"result": {
"status": "verified",
"boxId": "consumer-fixture",
"targetId": "$NATIVE_TARGET",
"entryCount": 3
}
}
},
{
"id": "payload-verification-tampered-file",
"action": "verify-payload",
"mutation": "tamper-script",
"expected": {
"outcome": "rejected",
"error": "payload-mismatch"
}
},
{
"id": "payload-verification-deleted-file",
"action": "verify-payload",
"mutation": "remove-script",
"expected": {
"outcome": "rejected",
"error": "payload-mismatch"
}
},
{
"id": "payload-verification-retargeted-symlink",
"action": "verify-payload",
"fixture": {
"linkedInterpreter": true
},
"mutation": "retarget-interpreter-link",
"requiresSymlinks": true,
"expected": {
"outcome": "rejected",
"error": "payload-mismatch"
}
},
{
"id": "payload-verification-ignores-on-demand-assets",
"action": "verify-payload",
"fixture": {
"requiredAsset": true
},
"runtime": {
"assetState": "present"
},
"expected": {
"outcome": "verified",
"result": {
"status": "verified",
"boxId": "consumer-fixture",
"targetId": "$NATIVE_TARGET",
"entryCount": 3
}
}
},
{
"id": "payload-verification-release-without-digest",
"action": "verify-payload",
"fixture": {
"payloadDigest": false
},
"expected": {
"outcome": "rejected",
"error": "payload-digest-absent"
}
},
{
"id": "payload-verification-missing-list",
"action": "verify-payload",
"mutation": "remove-payload-digest-list",
"expected": {
"outcome": "rejected",
"error": "payload-list-missing"
}
},
{
"id": "payload-verification-tampered-list",
"action": "verify-payload",
"mutation": "tamper-payload-digest-list",
"expected": {
"outcome": "rejected",
"error": "payload-list-mismatch"
}
}
]
}