{"record":{"id":"ccc879ae52530b96","repo":"astrid-runtime/astrid","slug":"shuttle-member-is-bytes-exceeding-th","errorCode":null,"errorMessage":"shuttle member '{}' is {} bytes ({}), exceeding the {MAX_MEMBER_BYTES}-byte per-member limit","messagePattern":"shuttle member '(.+?)' is (.+?) bytes \\((.+?)\\), exceeding the (.+?)-byte per-member limit","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/distro/shuttle.rs","lineNumber":129,"sourceCode":"            header.set_mtime(0);\n            header.set_uid(0);\n            header.set_gid(0);\n            header.set_mode(0o644);\n            header.set_entry_type(tar::EntryType::Regular);\n\n            match &entry.content {\n                ShuttleContent::Bytes(bytes) => {\n                    header.set_size(bytes.len() as u64);\n                    header.set_cksum();\n                    tar.append_data(&mut header, &entry.path, bytes.as_slice())\n                        .with_context(|| format!(\"failed to append {} to shuttle\", entry.path))?;\n                },\n                ShuttleContent::File(src) => {\n                    let metadata = std::fs::metadata(src).with_context(|| {\n                        format!(\"failed to stat staged capsule {}\", src.display())\n                    })?;\n                    if !within_member_limit(metadata.len()) {\n                        bail!(\n                            \"shuttle member '{}' is {} bytes ({}), exceeding the \\\n                             {MAX_MEMBER_BYTES}-byte per-member limit\",\n                            src.display(),\n                            metadata.len(),\n                            entry.path\n                        );\n                    }\n                    header.set_size(metadata.len());\n                    header.set_cksum();\n                    let mut file = std::fs::File::open(src).with_context(|| {\n                        format!(\"failed to open staged capsule {}\", src.display())\n                    })?;\n                    tar.append_data(&mut header, &entry.path, &mut file)\n                        .with_context(|| format!(\"failed to append {} to shuttle\", entry.path))?;\n                },\n            }\n        }\n","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/distro/shuttle.rs#L111-L147","documentation":"During `pack`, each staged file member of a `.shuttle` capsule is size-checked against `MAX_MEMBER_BYTES`. If a staged source file exceeds that per-member limit, packing aborts so no single oversized member can be embedded in the archive.","triggerScenarios":"Calling `pack` (directly or through `run` CLI) when a staged `ShuttleContent::File` source's `fs::metadata(src).len()` exceeds `MAX_MEMBER_BYTES`. Detected by tests like `pack_rejects_oversized_file_member`.","commonSituations":"Accidentally staging a build artifact, VM image, or large binary in the capsule staging directory; a generated file ballooning after a code change.","solutions":["Remove or exclude the oversized file from the staged capsule directory.","Compress or split the file so it fits under `MAX_MEMBER_BYTES`.","If the limit is legitimately too small for your content, raise `MAX_MEMBER_BYTES` (or `within_member_limit`) in the crate and repack."],"exampleFix":"// before\nShuttleContent::File(huge_artifact)  // 10 MB staged file\n// after\n// exclude or compress:\nShuttleContent::File(compressed_artifact) // under MAX_MEMBER_BYTES","handlingStrategy":"validation","validationCode":"let len = std::fs::metadata(src)?.len();\nif len > MAX_MEMBER_BYTES {\n    eprintln!(\"{} is {} bytes; limit is {}\", src.display(), len, MAX_MEMBER_BYTES);\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match pack(&staging, &out) {\n    Err(e) if e.to_string().contains(\"per-member limit\") => {\n        eprintln!(\"drop or compress the oversized member: {e:#}\")\n    }\n    other => other?,\n}","preventionTips":["Audit the staging directory for build artifacts before packing","Add a pre-pack script that lists files exceeding the limit","Compress large binaries before staging","Keep generated outputs out of the capsule directory"],"tags":["archive","size-limit","packing","validation"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}