// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (C) 2026 Ignalina ApS and Vetra Automation AB
//! Stable refusal codes ([`crate::Verdict::Refused`]`::code`). Heimdall is a
//! defensive sandbox; a code names which of its own checks refused a job.
//! Codes are only ever added, never renamed.
/// `output_dir` holds something that is not a listable output: a file the
/// runner did not expect, a directory, a symlink, a device, a bad name, or
/// more files than `max_output_files`.
pub const OUT_EXTRA: &str = "heimdall-out-1";
/// An output is larger than `max_output_file_bytes`, or all outputs together
/// exceed `max_output_total_bytes`.
pub const OUT_TOO_LARGE: &str = "heimdall-out-2";
/// An output the guest emitted was refused when written (name or cap).
pub const OUT_REFUSED: &str = "heimdall-out-3";
/// The written outputs failed the audit after the run.
pub const OUT_AUDIT: &str = "heimdall-out-4";
/// The wall-clock limit was reached; the job was killed.
pub const LIMIT_WALL: &str = "heimdall-limit-wall";
/// The memory limit was reached; the job was killed.
pub const LIMIT_MEMORY: &str = "heimdall-limit-memory";
/// The process limit was reached.
pub const LIMIT_PIDS: &str = "heimdall-limit-pids";
/// The job's process exited with a non-zero code.
pub const EXIT_NONZERO: &str = "heimdall-exit-1";
/// The job's process was ended by a signal (not a Heimdall limit kill).
pub const EXIT_SIGNAL: &str = "heimdall-exit-2";
/// A wasm guest trapped or hit a wasm limit.
pub const GUEST_TRAP: &str = "heimdall-wasm-1";
/// A wasm guest itself refused the input (its reason follows).
pub const GUEST_REFUSED: &str = "guest-refused";