{"record":{"id":"700a501aac910e56","repo":"BoundaryML/baml","slug":"pack-fixture-not-found-at","errorCode":null,"errorMessage":"pack fixture not found at {}","messagePattern":"pack fixture not found at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/tools_size_gate/src/measure.rs","lineNumber":127,"sourceCode":"        );\n    }\n\n    run_baml_pack(workspace_root, name, pack)\n}\n\n/// Run the freshly built CLI's `baml pack` on the fixture, writing the\n/// output to a deterministic path under `target/size-gate/`.\nfn run_baml_pack(workspace_root: &Path, name: &str, pack: &PackConfig) -> Result<PathBuf> {\n    let cli_path = workspace_root\n        .join(\"target/release\")\n        .join(exe_filename(&pack.cli_bin));\n    if !cli_path.exists() {\n        bail!(\"pack CLI not found at {}\", cli_path.display());\n    }\n\n    let fixture = workspace_root.join(&pack.fixture);\n    if !fixture.exists() {\n        bail!(\"pack fixture not found at {}\", fixture.display());\n    }\n\n    let output = pack_output_path(workspace_root, name);\n    if let Some(parent) = output.parent() {\n        std::fs::create_dir_all(parent)\n            .with_context(|| format!(\"failed to create {}\", parent.display()))?;\n    }\n\n    eprintln!(\"  packing {} -> {}\", pack.function, output.display());\n    let status = Command::new(&cli_path)\n        .arg(\"pack\")\n        .arg(\"--file\")\n        .arg(&fixture)\n        .arg(&pack.function)\n        .arg(\"-o\")\n        .arg(&output)\n        .current_dir(workspace_root)\n        .status()","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/tools_size_gate/src/measure.rs#L109-L145","documentation":"Before running `baml pack`, run_baml_pack checks that the configured fixture (pack.fixture, resolved relative to the workspace root) exists on disk. If not, it bails with the full path. The fixture is the sample input that gets packed to produce a measurable artifact.","triggerScenarios":"The path in PackConfig.fixture does not exist relative to the workspace root: typo in config, fixture file moved/deleted, or running from a different checkout lacking the fixture.","commonSituations":"Renaming or relocating test fixtures without updating the size-gate pack config; cloning a partial repo (submodules not initialized); misconfigured relative path (e.g. leading / or wrong depth).","solutions":["Check the file exists at the path printed in the error","Fix the `fixture` path in the pack config to match the repo layout","Restore the missing fixture file or initialize submodules if applicable","Ensure the path is relative to the workspace root, not your cwd"],"exampleFix":"// before: fixture moved\nfixture = \"fixtures/old-sample.baml\"\n// after\nfixture = \"fixtures/sample.baml\"","handlingStrategy":"validation","validationCode":"let fixture = workspace.join(&pack.fixture);\nif !fixture.exists() {\n    eprintln!(\"fixture missing: {}\", fixture.display());\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep fixture paths in the size-gate config relative to the workspace root","Update pack config whenever fixtures move or are renamed","Use a CI preflight check that all configured fixtures exist","If fixtures live in submodules, ensure submodules are initialized in CI"],"tags":["file-not-found","fixture","config","size-gate"],"backgroundTag":"file-not-found","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}