// Copyright 2020 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// This file's messages describe any failure(s) that occurred during Bazel's
// handling of a request. The intent is to provide more detail to a Bazel client
// than is conveyed with an exit code, to help those clients decide how to
// respond to, or classify, a failure.

syntax = "proto3";

package failure_details;

option java_package = "com.google.devtools.build.lib.server";

import "google/protobuf/descriptor.proto";

message FailureDetailMetadata {
  uint32 exit_code = 1;
}

  extend google.protobuf.EnumValueOptions {
  FailureDetailMetadata metadata = 1078;
}

// The FailureDetail message type is designed such that consumers can extract a
// basic classification of a FailureDetail message even if the consumer was
// built with a stale definition. This forward compatibility is implemented via
// conventions on FailureDetail and its submessage types, as follows.
//
// *** FailureDetail field numbers
//
// Field numbers 1 through 100 (inclusive) are reserved for generally applicable
// values. Any number of these fields may be set on a FailureDetail message.
//
// Field numbers 101 through 10,000 (inclusive) are reserved for use inside the
// "oneof" structure. Only one of these values should be set on a FailureDetail
// message.
//
// Additional fields numbers are unlikely to be needed, but, for extreme future-
// proofing purposes, field numbers 10,001 through 1,000,000 (inclusive;
// excluding protobuf's reserved range 19000 through 19999) are reserved for
// additional generally applicable values.
//
// *** FailureDetail's "oneof" submessages
//
// Each field in the "oneof" structure is a submessage corresponding to a
// category of failure.
//
// In each of these submessage types, field number 1 is an enum whose values
// correspond to a subcategory of the failure. Generally, the enum's constant
// which maps to 0 should be interpreted as "unspecified", though this is not
// required.
//
// *** Recommended forward compatibility strategy
//
// The recommended forward compatibility strategy is to reduce a FailureDetail
// message to a pair of integers.
//
// The first integer corresponds to the field number of the submessage set
// inside FailureDetail's "oneof", which corresponds with the failure's
// category.
//
// The second integer corresponds to the value of the enum at field number 1
// within that submessage, which corresponds with the failure's subcategory.
//
// WARNING: This functionality is experimental and should not be relied on at
// this time.
// TODO(mschaller): remove experimental warning
message FailureDetail {
  // A short human-readable message describing the failure, for debugging.
  //
  // This value is *not* intended to be used algorithmically.
  string message = 1;

  // Reserved for future generally applicable values. Any of these may be set.
  reserved 2 to 100;

  oneof category {
    Interrupted interrupted = 101;
    ExternalRepository external_repository = 103;
    BuildProgress build_progress = 104;
    RemoteOptions remote_options = 106;
    ClientEnvironment client_environment = 107;
    Crash crash = 108;
    SymlinkForest symlink_forest = 110;
    PackageOptions package_options = 114;
    RemoteExecution remote_execution = 115;
    Execution execution = 116;
    Workspaces workspaces = 117;
    CrashOptions crash_options = 118;
    Filesystem filesystem = 119;
    ExecutionOptions execution_options = 121;
    Command command = 122;
    Spawn spawn = 123;
    GrpcServer grpc_server = 124;
    CanonicalizeFlags canonicalize_flags = 125;
    BuildConfiguration build_configuration = 126;
    InfoCommand info_command = 127;
    MemoryOptions memory_options = 129;
    Query query = 130;
    LocalExecution local_execution = 132;
    ActionCache action_cache = 134;
    FetchCommand fetch_command = 135;
    SyncCommand sync_command = 136;
    Sandbox sandbox = 137;
    IncludeScanning include_scanning = 139;
    TestCommand test_command = 140;
    ActionQuery action_query = 141;
    TargetPatterns target_patterns = 142;
    CleanCommand clean_command = 144;
    ConfigCommand config_command = 145;
    ConfigurableQuery configurable_query = 146;
    DumpCommand dump_command = 147;
    HelpCommand help_command = 148;
    MobileInstall mobile_install = 150;
    ProfileCommand profile_command = 151;
    RunCommand run_command = 152;
    VersionCommand version_command = 153;
    PrintActionCommand print_action_command = 154;
  }

  reserved 102; // For internal use
  reserved 105; // For internal use
  reserved 109; // For internal use
  reserved 111 to 113; // For internal use
  reserved 120; // For internal use
  reserved 128; // For internal use
  reserved 131; // For internal use
  reserved 133; // For internal use
  reserved 138; // For internal use
  reserved 143; // For internal use
  reserved 149; // For internal use
  reserved 155 to 157; // For internal use
}

message Interrupted {
  enum Code {
    // Interrupted at an unspecified time.
    INTERRUPTED_UNKNOWN = 0 [(metadata) = { exit_code: 8 }];
    BUILD = 4 [(metadata) = { exit_code: 8 }];
    BUILD_COMPLETION = 5 [(metadata) = { exit_code: 8 }];
    PACKAGE_LOADING_SYNC = 6 [(metadata) = { exit_code: 8 }];
    EXECUTOR_COMPLETION = 7 [(metadata) = { exit_code: 8 }];
    COMMAND_DISPATCH = 8 [(metadata) = { exit_code: 8 }];
    INFO_ITEM = 9 [(metadata) = { exit_code: 8 }];
    AFTER_QUERY = 10 [(metadata) = { exit_code: 8 }];
    FETCH_COMMAND = 17 [(metadata) = { exit_code: 8 }];
    SYNC_COMMAND = 18 [(metadata) = { exit_code: 8 }];
    CLEAN_COMMAND = 20 [(metadata) = { exit_code: 8 }];
    MOBILE_INSTALL_COMMAND = 21 [(metadata) = { exit_code: 8 }];
    QUERY = 22 [(metadata) = { exit_code: 8 }];
    RUN_COMMAND = 23 [(metadata) = { exit_code: 8 }];

    reserved 1 to 3; // For internal use
    reserved 11 to 16; // For internal use
    reserved 19; // For internal use
    reserved 24 to 26; // For internal use
  }

  Code code = 1;
}

message Spawn {
  enum Code {
    SPAWN_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    // See the SpawnResult.Status Java enum for definitions of the following
    // Spawn failure codes.
    NON_ZERO_EXIT = 1 [(metadata) = { exit_code: 1 }];
    TIMEOUT = 2 [(metadata) = { exit_code: 1 }];
    // Note: Spawn OUT_OF_MEMORY leads to a BUILD_FAILURE exit_code because the
    // build tool itself did not run out of memory.
    OUT_OF_MEMORY = 3 [(metadata) = { exit_code: 1 }];
    EXECUTION_FAILED = 4 [(metadata) = { exit_code: 1 }];
    EXECUTION_DENIED = 5 [(metadata) = { exit_code: 1 }];
    REMOTE_CACHE_FAILED = 6 [(metadata) = { exit_code: 34 }];
  }
  Code code = 1;

  // For Codes describing generic failure to spawn (eg. EXECUTION_FAILED and
  // EXECUTION_DENIED) the `catastrophic` field may be set to true indicating a
  // failure that immediately terminated the entire build tool.
  bool catastrophic = 2;

  // If Code is NON_ZERO_EXIT, the `spawn_exit_code` field may be set to the
  // non-zero exit code returned by the spawned process to the OS.
  //
  // NOTE: This field must not be confused with the build tool's overall
  // exit code.
  int32 spawn_exit_code = 3;
}

message ExternalRepository {
  enum Code {
    EXTERNAL_REPOSITORY_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    OVERRIDE_DISALLOWED_MANAGED_DIRECTORIES = 1 [(metadata) = { exit_code: 2 }];
  }
  Code code = 1;
  // Additional data could include external repository names.
}

message BuildProgress {
  enum Code {
    BUILD_PROGRESS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    OUTPUT_INITIALIZATION = 3 [(metadata) = { exit_code: 36 }];
    BES_RUNS_PER_TEST_LIMIT_UNSUPPORTED = 4 [(metadata) = { exit_code: 2 }];
    BES_LOCAL_WRITE_ERROR = 5 [(metadata) = { exit_code: 36 }];
    BES_INITIALIZATION_ERROR = 6 [(metadata) = { exit_code: 36 }];
    BES_UPLOAD_TIMEOUT_ERROR = 7 [(metadata) = { exit_code: 38 }];
    BES_FILE_WRITE_TIMEOUT = 8 [(metadata) = { exit_code: 38 }];
    BES_FILE_WRITE_IO_ERROR = 9 [(metadata) = { exit_code: 38 }];
    BES_FILE_WRITE_INTERRUPTED = 10 [(metadata) = { exit_code: 38 }];
    BES_FILE_WRITE_CANCELED = 11 [(metadata) = { exit_code: 38 }];
    BES_FILE_WRITE_UNKNOWN_ERROR = 12 [(metadata) = { exit_code: 38 }];
    BES_UPLOAD_LOCAL_FILE_ERROR = 13 [(metadata) = { exit_code: 38 }];
    BES_STREAM_NOT_RETRYING_FAILURE = 14 [(metadata) = { exit_code: 45 }];
    BES_STREAM_COMPLETED_WITH_UNACK_EVENTS_ERROR = 15
        [(metadata) = { exit_code: 45 }];
    BES_STREAM_COMPLETED_WITH_UNSENT_EVENTS_ERROR = 16
        [(metadata) = { exit_code: 45 }];
    BES_UPLOAD_RETRY_LIMIT_EXCEEDED_FAILURE = 17
        [(metadata) = { exit_code: 38 }];
    reserved 1, 2; // For internal use
  }
  Code code = 1;
  // Additional data could include the build progress upload endpoint.
}

message RemoteOptions {
  enum Code {
    REMOTE_OPTIONS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    REMOTE_DEFAULT_EXEC_PROPERTIES_LOGIC_ERROR = 1
        [(metadata) = { exit_code: 2 }];
    // Credentials could not be read from the requested file/socket/process/etc.
    CREDENTIALS_READ_FAILURE = 2 [(metadata) = { exit_code: 36 }];
    // Credentials could not be written to a shared, temporary file.
    CREDENTIALS_WRITE_FAILURE = 3 [(metadata) = { exit_code: 36 }];
    DOWNLOADER_WITHOUT_GRPC_CACHE = 4 [(metadata) = { exit_code: 2 }];
    EXECUTION_WITH_INVALID_CACHE = 5 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message ClientEnvironment {
  enum Code {
    CLIENT_ENVIRONMENT_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    CLIENT_CWD_MALFORMED = 1 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message Crash {
  enum Code {
    CRASH_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    CRASH_OOM = 1 [(metadata) = { exit_code: 33 }];
  }

  Code code = 1;

  // The cause chain of the crash, with the outermost throwable first. Limited
  // to the outermost exception and at most 4 nested causes (so, max size of 5).
  repeated Throwable causes = 2;
}

message Throwable {
  // The class name of the java.lang.Throwable.
  string throwable_class = 1;
  // The throwable's message.
  string message = 2;
  // The result of calling toString on the deepest (i.e. closest to the
  // throwable's construction site) 1000 (or fewer) StackTraceElements.
  // Unstructured to simplify string matching.
  repeated string stack_trace = 3;
}

message SymlinkForest {
  enum Code {
    SYMLINK_FOREST_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    TOPLEVEL_OUTDIR_PACKAGE_PATH_CONFLICT = 1 [(metadata) = { exit_code: 2 }];
    TOPLEVEL_OUTDIR_USED_AS_SOURCE = 2 [(metadata) = { exit_code: 2 }];
    CREATION_FAILED = 3 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message PackageOptions {
  enum Code {
    PACKAGE_OPTIONS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    PACKAGE_PATH_INVALID = 1 [(metadata) = { exit_code: 2 }];
    reserved 2; // For internal use
  }

  Code code = 1;
}

message RemoteExecution {
  // The association of some of these options with exit code 2, "command line
  // error", seems sketchy. Especially worth reconsidering are the channel init
  // failure modes, which can correspond to failures occurring in gRPC setup.
  // These all correspond with current Bazel behavior.
  enum Code {
    REMOTE_EXECUTION_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    CAPABILITIES_QUERY_FAILURE = 1 [(metadata) = { exit_code: 34 }];
    CREDENTIALS_INIT_FAILURE = 2 [(metadata) = { exit_code: 2 }];
    CACHE_INIT_FAILURE = 3 [(metadata) = { exit_code: 2 }];
    RPC_LOG_FAILURE = 4 [(metadata) = { exit_code: 2 }];
    EXEC_CHANNEL_INIT_FAILURE = 5 [(metadata) = { exit_code: 2 }];
    CACHE_CHANNEL_INIT_FAILURE = 6 [(metadata) = { exit_code: 2 }];
    DOWNLOADER_CHANNEL_INIT_FAILURE = 7 [(metadata) = { exit_code: 2 }];
    LOG_DIR_CLEANUP_FAILURE = 8 [(metadata) = { exit_code: 36 }];
    CLIENT_SERVER_INCOMPATIBLE = 9 [(metadata) = { exit_code: 34 }];
    DOWNLOADED_INPUTS_DELETION_FAILURE = 10 [(metadata) = { exit_code: 34 }];
    REMOTE_DOWNLOAD_OUTPUTS_MINIMAL_WITHOUT_INMEMORY_DOTD = 11
        [(metadata) = { exit_code: 2 }];
    REMOTE_DOWNLOAD_OUTPUTS_MINIMAL_WITHOUT_INMEMORY_JDEPS = 12
        [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message Execution {
  enum Code {
    EXECUTION_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    EXECUTION_LOG_INITIALIZATION_FAILURE = 1 [(metadata) = { exit_code: 2 }];
    EXECUTION_LOG_WRITE_FAILURE = 2 [(metadata) = { exit_code: 36 }];
    EXECROOT_CREATION_FAILURE = 3 [(metadata) = { exit_code: 36 }];
    ACTION_OUTPUT_DIRECTORY_DELETION_FAILURE = 4
        [(metadata) = { exit_code: 36 }];
    ACTION_OUTPUT_DIRECTORY_CREATION_FAILURE = 5
        [(metadata) = { exit_code: 36 }];
    PERSISTENT_ACTION_OUTPUT_DIRECTORY_CREATION_FAILURE = 6
        [(metadata) = { exit_code: 36 }];
    LOCAL_OUTPUT_DIRECTORY_SYMLINK_FAILURE = 7 [(metadata) = { exit_code: 36 }];
  }

  Code code = 1;
}

// Failure details about Bazel's WORKSPACE features.
message Workspaces {
  enum Code {
    WORKSPACES_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    WORKSPACES_LOG_INITIALIZATION_FAILURE = 1 [(metadata) = { exit_code: 2 }];
    WORKSPACES_LOG_WRITE_FAILURE = 2 [(metadata) = { exit_code: 36 }];

    // See `managed_directories` in
    // https://docs.bazel.build/versions/master/skylark/lib/globals.html#workspace.
    ILLEGAL_WORKSPACE_FILE_SYMLINK_WITH_MANAGED_DIRECTORIES = 3
        [(metadata) = { exit_code: 1 }];
    WORKSPACE_FILE_READ_FAILURE_WITH_MANAGED_DIRECTORIES = 4
        [(metadata) = { exit_code: 1 }];
  }

  Code code = 1;
}

message CrashOptions {
  enum Code {
    CRASH_OPTIONS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    reserved 1; // For internal use
  }

  Code code = 1;
}

message Filesystem {
  enum Code {
    FILESYSTEM_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    DEFAULT_DIGEST_HASH_FUNCTION_CHANGED = 1 [(metadata) = { exit_code: 37 }];
    DEFAULT_DIGEST_HASH_FUNCTION_NOT_SET = 2 [(metadata) = { exit_code: 37 }];
    EMBEDDED_BINARIES_ENUMERATION_FAILURE = 3 [(metadata) = { exit_code: 36 }];
    SERVER_PID_TXT_FILE_READ_FAILURE = 4 [(metadata) = { exit_code: 1 }];
    SERVER_FILE_WRITE_FAILURE = 5 [(metadata) = { exit_code: 1 }];
    DEFAULT_DIGEST_HASH_FUNCTION_INVALID_VALUE = 6
        [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message ExecutionOptions {
  // All numerical exit code associations correspond to pre-existing Bazel
  // behavior. These associations are suspicious:
  // - REQUESTED_STRATEGY_INCOMPATIBLE_WITH_SANDBOXING (instead: 2?)
  // - DEPRECATED_LOCAL_RESOURCES_USED (instead: 2?)
  // TODO(b/138456686): Revise these after the (intentionally non-breaking)
  //  initial rollout of FailureDetail-based encoding.
  enum Code {
    EXECUTION_OPTIONS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    INVALID_STRATEGY = 3 [(metadata) = { exit_code: 2 }];
    REQUESTED_STRATEGY_INCOMPATIBLE_WITH_SANDBOXING = 4
        [(metadata) = { exit_code: 36 }];
    DEPRECATED_LOCAL_RESOURCES_USED = 5 [(metadata) = { exit_code: 36 }];
    INVALID_CYCLIC_DYNAMIC_STRATEGY = 6 [(metadata) = { exit_code: 36 }];
    RESTRICTION_UNMATCHED_TO_ACTION_CONTEXT = 7 [(metadata) = { exit_code: 2 }];
    REMOTE_FALLBACK_STRATEGY_NOT_ABSTRACT_SPAWN = 8
        [(metadata) = { exit_code: 2 }];
    STRATEGY_NOT_FOUND = 9 [(metadata) = { exit_code: 2 }];
    DYNAMIC_STRATEGY_NOT_SANDBOXED = 10 [(metadata) = { exit_code: 2 }];

    reserved 1, 2; // For internal use
  }

  Code code = 1;
}

message Command {
  enum Code {
    // The name "COMMAND_UNKNOWN" might reasonably be interpreted as "command
    // not found". The enum's default value should represent a lack of knowledge
    // about the failure instead.
    COMMAND_FAILURE_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    COMMAND_NOT_FOUND = 1 [(metadata) = { exit_code: 2 }];
    ANOTHER_COMMAND_RUNNING = 2 [(metadata) = { exit_code: 9 }];
    PREVIOUSLY_SHUTDOWN = 3 [(metadata) = { exit_code: 36 }];
    STARLARK_CPU_PROFILE_FILE_INITIALIZATION_FAILURE = 4
        [(metadata) = { exit_code: 36 }];
    STARLARK_CPU_PROFILING_INITIALIZATION_FAILURE = 5
        [(metadata) = { exit_code: 36 }];
    STARLARK_CPU_PROFILE_FILE_WRITE_FAILURE = 6
        [(metadata) = { exit_code: 36 }];
    INVOCATION_POLICY_PARSE_FAILURE = 7 [(metadata) = { exit_code: 2 }];
    INVOCATION_POLICY_INVALID = 8 [(metadata) = { exit_code: 2 }];
    OPTIONS_PARSE_FAILURE = 9 [(metadata) = { exit_code: 2 }];
    STARLARK_OPTIONS_PARSE_FAILURE = 10 [(metadata) = { exit_code: 2 }];
    ARGUMENTS_NOT_RECOGNIZED = 11 [(metadata) = { exit_code: 2 }];
    NOT_IN_WORKSPACE = 12 [(metadata) = { exit_code: 2 }];
    SPACES_IN_WORKSPACE_PATH = 13 [(metadata) = { exit_code: 36 }];
    IN_OUTPUT_DIRECTORY = 14 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message GrpcServer {
  enum Code {
    GRPC_SERVER_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    GRPC_SERVER_NOT_COMPILED_IN = 1 [(metadata) = { exit_code: 37 }];
    SERVER_BIND_FAILURE = 2 [(metadata) = { exit_code: 1 }];
    BAD_COOKIE = 3 [(metadata) = { exit_code: 36 }];
    NO_CLIENT_DESCRIPTION = 4 [(metadata) = { exit_code: 36 }];
    reserved 5; // For internal use
  }

  Code code = 1;
}

message CanonicalizeFlags {
  enum Code {
    CANONICALIZE_FLAGS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    FOR_COMMAND_INVALID = 1 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

// Failure modes described by this category pertain to the Bazel invocation
// configuration consumed by Bazel's analysis phase. This category is not
// intended as a grab-bag for all Bazel flag value constraint violations, which
// instead generally belong in the category for the subsystem whose flag values
// participate in the constraint.
message BuildConfiguration {
  // TODO(mschaller): many more codes should be added to represent different
  // configuration-related failure modes. See InvalidConfigurationException.
  enum Code {
    BUILD_CONFIGURATION_UNKNOWN = 0 [(metadata) = { exit_code: 2 }];
    PLATFORM_MAPPING_EVALUATION_FAILURE = 1 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message InfoCommand {
  // The distinction between a failure to write a single info item and a failure
  // to write them all seems sketchy. Why do they have different exit codes?
  // This reflects current Bazel behavior, but deserves more thought.
  enum Code {
    INFO_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    TOO_MANY_KEYS = 1 [(metadata) = { exit_code: 2 }];
    KEY_NOT_RECOGNIZED = 2 [(metadata) = { exit_code: 2 }];
    INFO_BLOCK_WRITE_FAILURE = 3 [(metadata) = { exit_code: 7 }];
    ALL_INFO_WRITE_FAILURE = 4 [(metadata) = { exit_code: 36 }];
  }

  Code code = 1;
}

message MemoryOptions {
  enum Code {
    MEMORY_OPTIONS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    EXPERIMENTAL_OOM_MORE_EAGERLY_THRESHOLD_INVALID_VALUE = 1
        [(metadata) = { exit_code: 2 }];
    EXPERIMENTAL_OOM_MORE_EAGERLY_NO_TENURED_COLLECTORS_FOUND = 2
        [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message Query {
  enum Code {
    QUERY_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    QUERY_FILE_WITH_COMMAND_LINE_EXPRESSION = 1 [(metadata) = { exit_code: 2 }];
    QUERY_FILE_READ_FAILURE = 2 [(metadata) = { exit_code: 2 }];
    COMMAND_LINE_EXPRESSION_MISSING = 3 [(metadata) = { exit_code: 2 }];
    OUTPUT_FORMAT_INVALID = 4 [(metadata) = { exit_code: 2 }];
    GRAPHLESS_PREREQ_UNMET = 5 [(metadata) = { exit_code: 2 }];
    QUERY_OUTPUT_WRITE_FAILURE = 6 [(metadata) = { exit_code: 36 }];
    QUERY_STDOUT_FLUSH_FAILURE = 13 [(metadata) = { exit_code: 36 }];
    ANALYSIS_QUERY_PREREQ_UNMET = 14 [(metadata) = { exit_code: 2 }];
    QUERY_RESULTS_FLUSH_FAILURE = 15 [(metadata) = { exit_code: 36 }];

    reserved 7 to 12; // For internal use
  }

  Code code = 1;
}

message LocalExecution {
  enum Code {
    LOCAL_EXECUTION_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    LOCKFREE_OUTPUT_PREREQ_UNMET = 1 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message ActionCache {
  enum Code {
    ACTION_CACHE_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    INITIALIZATION_FAILURE = 1 [(metadata) = { exit_code: 36 }];
  }

  Code code = 1;
}

message FetchCommand {
  enum Code {
    FETCH_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    EXPRESSION_MISSING = 1 [(metadata) = { exit_code: 2 }];
    OPTIONS_INVALID = 2 [(metadata) = { exit_code: 2 }];
    QUERY_PARSE_ERROR = 3 [(metadata) = { exit_code: 2 }];
    QUERY_EVALUATION_ERROR = 4 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message SyncCommand {
  enum Code {
    SYNC_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    PACKAGE_LOOKUP_ERROR = 1 [(metadata) = { exit_code: 7 }];
    WORKSPACE_EVALUATION_ERROR = 2 [(metadata) = { exit_code: 7 }];
    REPOSITORY_FETCH_ERRORS = 3 [(metadata) = { exit_code: 7 }];
    REPOSITORY_NAME_INVALID = 4 [(metadata) = { exit_code: 7 }];
  }

  Code code = 1;
}

message Sandbox {
  enum Code {
    SANDBOX_FAILURE_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    INITIALIZATION_FAILURE = 1 [(metadata) = { exit_code: 36 }];
  }

  Code code = 1;
}

message IncludeScanning {
  enum Code {
    INCLUDE_SCANNING_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    INITIALIZE_INCLUDE_HINTS_ERROR = 1 [(metadata) = { exit_code: 36 }];
  }

  Code code = 1;
}

message TestCommand {
  enum Code {
    TEST_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    NO_TEST_TARGETS = 1 [(metadata) = { exit_code: 4 }];
    TEST_WITH_NOANALYZE = 2 [(metadata) = { exit_code: 1 }];
    TESTS_FAILED = 3 [(metadata) = { exit_code: 3 }];
  }

  Code code = 1;
}

message ActionQuery {
  // All numerical exit code associations correspond to pre-existing Bazel
  // behavior. These associations are suspicious:
  // - COMMAND_LINE_EXPANSION_FAILURE: this is associated with 2, the numerical
  //     exit code for "bad Bazel command line", but is generated when an
  //     action's command line fails to expand, which sounds similar but is
  //     completely different.
  // - OUTPUT_FAILURE: this is associated with 6, an undocumented exit code.
  // - INVALID_AQUERY_EXPRESSION: this is associate with 1, which is not
  //    documented for (a)query.
  // TODO(b/138456686): Revise these after the (intentionally non-breaking)
  //  initial rollout of FailureDetail-based encoding.
  enum Code {
    ACTION_QUERY_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    COMMAND_LINE_EXPANSION_FAILURE = 1 [(metadata) = { exit_code: 2 }];
    OUTPUT_FAILURE = 2 [(metadata) = { exit_code: 6 }];
    COMMAND_LINE_EXPRESSION_MISSING = 3 [(metadata) = { exit_code: 2 }];
    EXPRESSION_PARSE_FAILURE = 4 [(metadata) = { exit_code: 2 }];
    SKYFRAME_STATE_WITH_COMMAND_LINE_EXPRESSION = 5
        [(metadata) = { exit_code: 2 }];
    INVALID_AQUERY_EXPRESSION = 6 [(metadata) = { exit_code: 1 }];
    SKYFRAME_STATE_PREREQ_UNMET = 7 [(metadata) = { exit_code: 2 }];
    AQUERY_OUTPUT_TOO_BIG = 8 [(metadata) = { exit_code: 7 }];
  }

  Code code = 1;
}

message TargetPatterns {
  enum Code {
    TARGET_PATTERNS_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    TARGET_PATTERN_FILE_WITH_COMMAND_LINE_PATTERN = 1
        [(metadata) = { exit_code: 2 }];
    TARGET_PATTERN_FILE_READ_FAILURE = 2 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message CleanCommand {
  enum Code {
    CLEAN_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    OUTPUT_SERVICE_CLEAN_FAILURE = 1 [(metadata) = { exit_code: 6 }];
    ACTION_CACHE_CLEAN_FAILURE = 2 [(metadata) = { exit_code: 36 }];
    OUT_ERR_CLOSE_FAILURE = 3 [(metadata) = { exit_code: 36 }];
    OUTPUT_BASE_DELETE_FAILURE = 4 [(metadata) = { exit_code: 36 }];
    OUTPUT_BASE_TEMP_MOVE_FAILURE = 5 [(metadata) = { exit_code: 36 }];
    ASYNC_OUTPUT_BASE_DELETE_FAILURE = 6 [(metadata) = { exit_code: 6 }];
    EXECROOT_DELETE_FAILURE = 7 [(metadata) = { exit_code: 36 }];
    EXECROOT_TEMP_MOVE_FAILURE = 8 [(metadata) = { exit_code: 36 }];
    ASYNC_EXECROOT_DELETE_FAILURE = 9 [(metadata) = { exit_code: 6 }];
  }

  Code code = 1;
}

message ConfigCommand {
  enum Code {
    CONFIG_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    TOO_MANY_CONFIG_IDS = 1 [(metadata) = { exit_code: 2 }];
    CONFIGURATION_NOT_FOUND = 2 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message ConfigurableQuery {
  enum Code {
    CONFIGURABLE_QUERY_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    COMMAND_LINE_EXPRESSION_MISSING = 1 [(metadata) = { exit_code: 2 }];
    EXPRESSION_PARSE_FAILURE = 2 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message DumpCommand {
  enum Code {
    DUMP_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    NO_OUTPUT_SPECIFIED = 1 [(metadata) = { exit_code: 7 }];
    ACTION_CACHE_DUMP_FAILED = 2 [(metadata) = { exit_code: 7 }];
    COMMAND_LINE_EXPANSION_FAILURE = 3 [(metadata) = { exit_code: 7 }];
    ACTION_GRAPH_DUMP_FAILED = 4 [(metadata) = { exit_code: 7 }];
    STARLARK_HEAP_DUMP_FAILED = 5 [(metadata) = { exit_code: 8 }];
  }

  Code code = 1;
}

message HelpCommand {
  enum Code {
    HELP_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    MISSING_ARGUMENT = 1 [(metadata) = { exit_code: 2 }];
    COMMAND_NOT_FOUND = 2 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message MobileInstall {
  enum Code {
    MOBILE_INSTALL_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    CLASSIC_UNSUPPORTED = 1 [(metadata) = { exit_code: 2 }];
    NO_TARGET_SPECIFIED = 2 [(metadata) = { exit_code: 2 }];
    MULTIPLE_TARGETS_SPECIFIED = 3 [(metadata) = { exit_code: 2 }];
    TARGET_TYPE_INVALID = 4 [(metadata) = { exit_code: 6 }];
    NON_ZERO_EXIT = 5 [(metadata) = { exit_code: 6 }];
    ERROR_RUNNING_PROGRAM = 6 [(metadata) = { exit_code: 6 }];
  }

  Code code = 1;
}

message ProfileCommand {
  enum Code {
    PROFILE_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    OLD_BINARY_FORMAT_UNSUPPORTED = 1 [(metadata) = { exit_code: 1 }];
    FILE_READ_FAILURE = 2 [(metadata) = { exit_code: 1 }];
  }

  Code code = 1;
}

message RunCommand {
  enum Code {
    RUN_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    NO_TARGET_SPECIFIED = 1 [(metadata) = { exit_code: 2 }];
    TOO_MANY_TARGETS_SPECIFIED = 2 [(metadata) = { exit_code: 2 }];
    TARGET_NOT_EXECUTABLE = 3 [(metadata) = { exit_code: 2 }];
    TARGET_BUILT_BUT_PATH_NOT_EXECUTABLE = 4 [(metadata) = { exit_code: 37 }];
    TARGET_BUILT_BUT_PATH_VALIDATION_FAILED = 5
        [(metadata) = { exit_code: 36 }];
    RUN_UNDER_TARGET_NOT_BUILT = 6 [(metadata) = { exit_code: 2 }];
    RUN_PREREQ_UNMET = 7 [(metadata) = { exit_code: 2 }];
    TOO_MANY_TEST_SHARDS_OR_RUNS = 8 [(metadata) = { exit_code: 2 }];
    TEST_ENVIRONMENT_SETUP_FAILURE = 9 [(metadata) = { exit_code: 36 }];
    COMMAND_LINE_EXPANSION_FAILURE = 10 [(metadata) = { exit_code: 36 }];
    NO_SHELL_SPECIFIED = 11 [(metadata) = { exit_code: 2 }];
    SCRIPT_WRITE_FAILURE = 12 [(metadata) = { exit_code: 6 }];
    RUNFILES_DIRECTORIES_CREATION_FAILURE = 13 [(metadata) = { exit_code: 36 }];
    RUNFILES_SYMLINKS_CREATION_FAILURE = 14 [(metadata) = { exit_code: 36 }];
  }

  Code code = 1;
}

message VersionCommand {
  enum Code {
    VERSION_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    NOT_AVAILABLE = 1 [(metadata) = { exit_code: 2 }];
  }

  Code code = 1;
}

message PrintActionCommand {
  enum Code {
    PRINT_ACTION_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
    TARGET_NOT_FOUND = 1 [(metadata) = { exit_code: 1 }];
    COMMAND_LINE_EXPANSION_FAILURE = 2 [(metadata) = { exit_code: 1 }];
    TARGET_KIND_UNSUPPORTED = 3 [(metadata) = { exit_code: 1 }];
    ACTIONS_NOT_FOUND = 4 [(metadata) = { exit_code: 1 }];
  }

  Code code = 1;
}
