mirror of
https://github.com/morluto/rea.git
synced 2026-11-24 05:08:44 +00:00
* fix(errors): refuse malformed target bytes as a target, not invalid input parseFailureAnalysisError is the shared owner that turns a byte-format parser's ParseFailure into a public refusal. It mapped malformed and truncated bytes to an AnalysisInputError on the path field. The envelope then reported invalid_request, with inspect_input_contract recovery and "correct the listed fields". The arguments were valid; the target bytes were the problem. Readers that wrap the ParseFailureError in an ArtifactReaderFailure, and ArtifactOperationError reason=malformed, were classified the same way. Add AnalysisMalformedTargetError. It keeps the parser's kind, format, detail, offset and field, and projects as unsupported_target with details.format_failure. Its recovery is to choose another operation or a well-formed copy of the target. Route both parser entry points through it and reclassify ArtifactOperationError reason=malformed. Argument and selection errors (missing files, directories, symlinks, JSON arguments) stay invalid_request. Fixes #14170 * docs(maven): describe duplicate variant names as malformed metadata Duplicate Gradle variant names go through malformedInput, which now reports unsupported_target with details.format_failure: malformed. Point the earlier statement at that section instead of the old invalid_format code. * test(errors): expect malformed-target refusals from CLI byte-format readers Truncated IPS, ELF, PE and shortcut bytes now project as unsupported_target with format_failure=malformed. Update the CLI acceptance cases that still expected invalid_request. * fix(errors): keep a cancelled read a cancellation whatever its abort reason projectOwnedArtifactInputFailure read the reader failure's cause without checking the reader's own reason. A cancelled read carries the caller's opaque abort reason as that cause, so aborting with a ParseFailureError turned the cancellation into a non-retryable malformed-target refusal before the shared cancellation projection ran. Only a reader whose own reason is malformed or truncated now yields a malformed target. The ELF dependency checkpoint cancellation test now also aborts with a parser failure as the reason, through the public provider read. * test(pe): expect malformed-target refusals from the PE filesystem boundaries Short non-PE bytes now refuse the target rather than the request field. The missing-file, directory, symlink and child-path controls keep their caller-input expectations. * fix(elf): refuse malformed ELF note bytes as a target, not invalid input inspect_elf_notes shared this PR's root cause: its parser reported structural violations as a reader "format" failure, which the shared stable-artifact projection treats as a request-field error, so truncated or non-ELF bytes still returned invalid_request. The parser now raises malformed or truncated ParseFailureErrors, which the shared projection reports as a malformed target with format_failure and format facts. Consumers that interpreted the old reader reason now use the parser's facts: debug-link build-id observation keys on ParseFailureError kinds, and binary hardening drops its rewrap of note-parser format failures into BinaryFormatFailure, which the parser's own failure supersedes. * test(errors): own the byte readers' malformed-target projection in one CLI table The PR repeated the same malformed -> unsupported_target mapping in a dedicated CLI test per command and again in each provider's filesystem boundary test. The stable-artifact parser-failure CLI table now owns it: every byte reader it covers (now including ELF dependencies, debug link, unwind ranges and native initializers) refuses a truncated ELF header as a malformed target with operation, path, format_failure, retained file identity and no argument recovery. Removed as redundant with that table: the truncated or non-ELF/non-PE CLI tests for ELF debug link, dependencies, unwind ranges and notes, native initializers, and PE imports and certificates; and the malformed-file blocks in thirteen filesystem boundary tests, which keep their directory, symlink, missing-file and child-path controls. Format specific refusals (a truncated IPS body, a wrong shortcut CLSID, DWARF units) keep their own tests, as do the owner tests in parseFailureAnalysisError and ArtifactOperationFailure. * test(errors): expect malformed target bytes as unsupported_target in acceptance tests The first full acceptance run of this PR found five expectations still asserting invalid_request for target-byte failures: the timing test's truncated ELF, a truncated DTB, duplicate Rust dependency JSON, and PE32 and PE64 load-config images without an MZ header. Assert the unsupported_target code, with format_failure malformed where the non-MZ PE path matches the already-updated PE imports test.
8.7 KiB
8.7 KiB
| 1 | tag | discriminant | code | category | retryable_by_default |
|---|---|---|---|---|---|
| 2 | AnalysisProtocolError | unreadable_output | execution_failure | false | |
| 3 | AnalysisOutputError | unreadable_output | execution_failure | false | |
| 4 | AnalysisInputError | invalid_request | invalid_input | false | |
| 5 | AnalysisAccessDeniedError | access_denied | unavailable | false | |
| 6 | AnalysisArtifactChangedError | artifact_changed | integrity_mismatch | true | |
| 7 | AnalysisCapabilityUnavailableError | capability_unavailable | unsupported_provider | false | |
| 8 | AnalysisUnsupportedTargetError | unsupported_target | unsupported_target | false | |
| 9 | AnalysisMalformedTargetError | unsupported_target | unsupported_target | false | |
| 10 | AnalysisCancelledError | cancelled | cancelled | true | |
| 11 | AnalysisTimeoutError | provider_timeout | timeout | true | |
| 12 | AnalysisResourceConstraintError | resource_constraint | resource_constraint | false | |
| 13 | ConfigurationError | configuration_invalid | invalid_input | false | |
| 14 | NoBinaryOpenError | target_unavailable | unavailable | false | |
| 15 | EvidenceIntegrityError | evidence_integrity_mismatch | integrity_mismatch | false | |
| 16 | ProviderAdapterError | execution_failure | execution_failure | false | |
| 17 | AnalysisCapabilityUnavailableError | retryable=true | capability_unavailable | unavailable | true |
| 18 | ArtifactOperationError | reason=cancelled | cancelled | cancelled | true |
| 19 | ArtifactOperationError | reason=malformed | unsupported_target | unsupported_target | false |
| 20 | ArtifactOperationError | reason=truncated | truncated | truncated | false |
| 21 | ArtifactOperationError | reason=unsupported | unsupported_target | unsupported_target | false |
| 22 | ArtifactOperationError | reason=format | artifact_operation_failed | execution_failure | false |
| 23 | ArtifactOperationError | reason=integrity | artifact_operation_failed | integrity_mismatch | false |
| 24 | ArtifactOperationError | reason=limit | truncated | truncated | false |
| 25 | ArtifactOperationError | reason=path | artifact_operation_failed | execution_failure | false |
| 26 | ArtifactOperationError | reason=unavailable | artifact_operation_failed | unavailable | false |
| 27 | ArtifactOperationError | reason=io | artifact_operation_failed | execution_failure | false |
| 28 | ArtifactOperationError | reason=integrity; artifact identity reported | artifact_integrity_mismatch | integrity_mismatch | false |
| 29 | BinaryTargetError | constraint=unconstrained | target_unavailable | unavailable | false |
| 30 | BinaryTargetError | constraint=unconstrained; read permission denied | access_denied | unavailable | false |
| 31 | BinaryTargetError | constraint=directory_requires_file | target_unavailable | unavailable | false |
| 32 | BinaryTargetError | constraint=directory_requires_file; read permission denied | access_denied | unavailable | false |
| 33 | BinaryTargetError | constraint=wasm_requires_static_inspection | target_unavailable | unsupported_target | false |
| 34 | BinaryTargetError | constraint=wasm_requires_static_inspection; read permission denied | access_denied | unsupported_target | false |
| 35 | BinaryTargetError | constraint=file_format_rejected | target_unavailable | unsupported_target | false |
| 36 | BinaryTargetError | constraint=file_format_rejected; read permission denied | access_denied | unsupported_target | false |
| 37 | BinaryTargetError | constraint=load_selection_rejected | invalid_request | invalid_input | false |
| 38 | BinaryTargetError | constraint=bundle_type_unsupported | target_unavailable | unsupported_target | false |
| 39 | BinaryTargetError | constraint=bundle_type_unsupported; read permission denied | access_denied | unsupported_target | false |
| 40 | BinaryTargetError | constraint=bundle_info_plist_decode_budget_exceeded | target_unavailable | unavailable | false |
| 41 | BinaryTargetError | constraint=bundle_info_plist_decode_budget_exceeded; read permission denied | access_denied | unavailable | false |
| 42 | BinaryTargetError | constraint=bundle_info_plist_missing | target_unavailable | unavailable | false |
| 43 | BinaryTargetError | constraint=bundle_info_plist_missing; read permission denied | access_denied | unavailable | false |
| 44 | BinaryTargetError | constraint=bundle_layout_ambiguous | target_unavailable | unavailable | false |
| 45 | BinaryTargetError | constraint=bundle_layout_ambiguous; read permission denied | access_denied | unavailable | false |
| 46 | BinaryTargetError | constraint=bundle_executable_undeclared | target_unavailable | unavailable | false |
| 47 | BinaryTargetError | constraint=bundle_executable_undeclared; read permission denied | access_denied | unavailable | false |
| 48 | BinaryTargetError | constraint=bundle_program_missing | target_unavailable | unavailable | false |
| 49 | BinaryTargetError | constraint=bundle_program_missing; read permission denied | access_denied | unavailable | false |
| 50 | BinaryTargetError | constraint=bundle_current_version_missing | target_unavailable | unavailable | false |
| 51 | BinaryTargetError | constraint=bundle_current_version_missing; read permission denied | access_denied | unavailable | false |
| 52 | BinaryTargetError | constraint=bundle_path_escapes | target_unavailable | unavailable | false |
| 53 | BinaryTargetError | constraint=bundle_path_escapes; read permission denied | access_denied | unavailable | false |
| 54 | BrowserObservationError | reason=endpoint_unreachable | provider_unavailable | unavailable | true |
| 55 | BrowserObservationError | reason=invalid_endpoint_response | unreadable_output | execution_failure | false |
| 56 | BrowserObservationError | reason=target_not_found | target_unavailable | unavailable | false |
| 57 | BrowserObservationError | reason=target_not_allowed | target_unavailable | unavailable | false |
| 58 | BrowserObservationError | reason=application_already_running | target_unavailable | unavailable | false |
| 59 | BrowserObservationError | reason=service_worker_blocked | target_unavailable | unavailable | false |
| 60 | BrowserObservationError | reason=target_changed | target_unavailable | unavailable | false |
| 61 | BrowserObservationError | reason=target_session_detached | target_unavailable | unavailable | false |
| 62 | BrowserObservationError | reason=protocol_error | unreadable_output | execution_failure | false |
| 63 | BrowserObservationError | reason=disconnected | provider_unavailable | unavailable | true |
| 64 | BrowserObservationError | reason=payload_limit | truncated | truncated | false |
| 65 | BrowserObservationError | reason=window_not_found | unreadable_output | execution_failure | false |
| 66 | BrowserObservationError | reason=window_metadata_missing | unreadable_output | execution_failure | false |
| 67 | BrowserObservationError | reason=process_ownership_unavailable | unreadable_output | execution_failure | false |
| 68 | BrowserObservationError | reason=cleanup_failed | execution_failure | execution_failure | false |
| 69 | BrowserObservationError | reason=cancelled | cancelled | cancelled | true |
| 70 | BrowserObservationError | reason=timeout | provider_timeout | timeout | true |
| 71 | BrowserObservationError | caused by cancellation | cancelled | cancelled | true |
| 72 | EvidenceFileError | reason=not-file | invalid_request | invalid_input | false |
| 73 | EvidenceFileError | reason=exists | invalid_request | invalid_input | false |
| 74 | EvidenceFileError | reason=wrong-kind | invalid_request | invalid_input | false |
| 75 | EvidenceFileError | reason=missing | invalid_request | invalid_input | false |
| 76 | EvidenceFileError | reason=symlink-traversal | invalid_request | invalid_input | false |
| 77 | EvidenceFileError | reason=invalid-json | evidence_integrity_mismatch | execution_failure | false |
| 78 | EvidenceFileError | reason=path-limit | resource_constraint | resource_constraint | false |
| 79 | EvidenceFileError | reason=storage-limit | resource_constraint | resource_constraint | false |
| 80 | EvidenceFileError | reason=io | execution_failure | execution_failure | false |
| 81 | ProcessCaptureError | process_capture_failed | execution_failure | false | |
| 82 | ProcessCaptureError | caused by cancellation | cancelled | cancelled | true |
| 83 | ProviderSelectionError | reason=unknown_provider | capability_unavailable | unsupported_provider | false |
| 84 | ProviderSelectionError | reason=provider_unavailable | provider_unavailable | unavailable | true |
| 85 | ProviderSelectionError | reason=target_unsupported | capability_unavailable | unsupported_provider | false |
| 86 | ProviderSelectionError | reason=ambiguous | capability_unavailable | unsupported_provider | false |
| 87 | ProviderSelectionError | reason=invalid_options | capability_unavailable | unsupported_provider | false |
| 88 | UnknownRegistryError | reason=not-found | execution_failure | execution_failure | false |
| 89 | UnknownRegistryError | reason=already-exists | invalid_request | invalid_input | false |
| 90 | UnknownRegistryError | reason=revision-conflict | revision_conflict | execution_failure | true |
| 91 | UnknownRegistryError | reason=invalid-transition | execution_failure | execution_failure | false |
| 92 | UnknownRegistryError | reason=integrity | evidence_integrity_mismatch | execution_failure | false |
| 93 | UnknownRegistryError | reason=limit | truncated | execution_failure | false |
| 94 | UnknownRegistryError | reason=constraint | invalid_request | invalid_input | false |
| 95 | HopperTimeoutError | provider_timeout | timeout | true | |
| 96 | HopperCancelledError | cancelled | cancelled | true | |
| 97 | HopperProtocolError | unreadable_output | execution_failure | false | |
| 98 | HopperRemoteError | diagnostic_type=remote | execution_failure | execution_failure | false |
| 99 | HopperRemoteError | diagnostic_type=authorization | execution_failure | unavailable | false |
| 100 | HopperRemoteError | diagnostic_type=invalid_request | invalid_request | invalid_input | false |
| 101 | HopperRemoteError | diagnostic_type=selector_not_found | invalid_request | invalid_input | false |
| 102 | HopperRemoteError | diagnostic_type=capability_unavailable | execution_failure | execution_failure | false |
| 103 | HopperRemoteError | diagnostic_type=bridge_exception | execution_failure | execution_failure | false |
| 104 | HopperProcessError | provider_unavailable | unavailable | true | |
| 105 | HopperStartError | provider_unavailable | unavailable | true | |
| 106 | HopperStartError | Apple Events authorization denied | provider_unavailable | unavailable | false |