fix(artifacts): name only host-available workflows for non-archive plists

inspect_keyed_archive runs on every host, but its remediation for an
ordinary property list pointed to inspect_plist, which only macOS
supports. On Linux that sent callers to a workflow the capability layer
rejects.

The domain error now names what the file is. The artifact reader picks
the remediation from the provider's host: inspect_plist on macOS, and
elsewhere the selection of an NSKeyedArchiver archive, with a note that
inspect_plist requires macOS. decode_interface_builder, which is
portable, stays the NIBArchive remediation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-09 08:40:45 +00:00
co-authored by Claude Opus 5.5
parent fef38e4d22
commit 22958558ea
4 changed files with 67 additions and 7 deletions
+3 -3
View File
@@ -11,8 +11,8 @@ export class KeyedArchiveKindError extends TypeError {
constructor(
message: string,
/** The workflow that reads this kind of file. */
readonly remediationAction: string,
/** What the selected file is instead. */
readonly kind: "nib-archive" | "property-list",
) {
super(message);
}
@@ -103,7 +103,7 @@ export const projectKeyedArchive = (
if (archive?.$archiver !== "NSKeyedArchiver")
throw new KeyedArchiveKindError(
`Selected property list is not an NSKeyedArchiver archive: ${archiverMismatch(archive)}`,
"Inspect an ordinary property list with inspect_plist; inspect_keyed_archive decodes NSKeyedArchiver archives only.",
"property-list",
);
if (!Array.isArray(archive.$objects))
throw new TypeError("Expected NSKeyedArchiver with an $objects array");