{"record":{"id":"dc13b84acad07f4e","repo":"rust-lang/rust","slug":"pr-job-differs-from-corresponding-auto-job","errorCode":null,"errorMessage":"PR job `{}` differs from corresponding Auto job `{}` in configuration other than `continue_on_error` and `env`","messagePattern":"PR job `(.+?)` differs from corresponding Auto job `(.+?)` in configuration other than `continue_on_error` and `env`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/ci/citool/src/jobs.rs","lineNumber":186,"sourceCode":"            free_disk,\n            doc_url,\n            codebuild,\n\n            // Carve-out configs allowed to be different.\n            env: _,\n            continue_on_error: _,\n        } = pr_job;\n\n        if *name == auto_job.name\n            && *os == auto_job.os\n            && *only_on_channel == auto_job.only_on_channel\n            && *free_disk == auto_job.free_disk\n            && *doc_url == auto_job.doc_url\n            && *codebuild == auto_job.codebuild\n        {\n            Ok(())\n        } else {\n            Err(anyhow!(\n                \"PR job `{}` differs from corresponding Auto job `{}` in configuration other than `continue_on_error` and `env`\",\n                pr_job.name,\n                auto_job.name\n            ))\n        }\n    }\n\n    for pr_job in &db.pr_jobs {\n        // At this point, any PR job must also be an Auto job, auto-registered or overridden.\n        let auto_job = db\n            .find_auto_job_by_name(&pr_job.name)\n            .expect(\"PR job must either be auto-registered as Auto job or overridden\");\n\n        equivalent_modulo_carve_out(pr_job, auto_job)?;\n    }\n\n    // Auto CI should \"fail-fast\" to avoid wasting Auto CI resources.\n    // However, some experimental auto jobs can be made optional, for example if we are unsure about","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/ci/citool/src/jobs.rs#L168-L204","documentation":"citool requires that every PR job also exists as an Auto job with identical configuration except for the two carve-out fields env and continue_on_error (jobs.rs:163-188, equivalent_modulo_carve_out). If any other field differs (name, os, only_on_channel, free_disk, doc_url, codebuild, ...) the validation returns the error naming both jobs.","triggerScenarios":"Defining a job in the pr section and another with the same name in the auto section but with a different os, only_on_channel, free_disk, doc_url, or codebuild value.","commonSituations":"Changing a job to run on a different OS in PR vs Auto, enabling free_disk only on one side, or mismatched doc_url/codebuild after a refactor.","solutions":["Make the PR and Auto entries for that job identical in os, only_on_channel, free_disk, doc_url, and codebuild.","Keep differences to env and continue_on_error only, which are explicitly allowed.","If the two really must differ, rename one of them so they are treated as separate jobs.","Diff the two YAML blocks side by side and align every non-carve-out field."],"exampleFix":"# before\npr_jobs:\n  - name: x86_64-gnu\n    os: linux\nauto_jobs:\n  - name: x86_64-gnu\n    os: macos   # mismatch -> error\n\n# after\nauto_jobs:\n  - name: x86_64-gnu\n    os: linux","handlingStrategy":"validation","validationCode":"fn equivalent_modulo_carve_out(pr: &Job, auto: &Job) -> bool {\n    pr.name == auto.name\n        && pr.os == auto.os\n        && pr.only_on_channel == auto.only_on_channel\n        && pr.free_disk == auto.free_disk\n        && pr.doc_url == auto.doc_url\n        && pr.codebuild == auto.codebuild\n}\n// For each pr job with a matching auto job, assert equivalent_modulo_carve_out before submitting.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep PR and Auto entries for the same job identical except env/continue_on_error.","Diff the two YAML blocks before pushing.","Rename a job if it genuinely needs different os/channel/free_disk."],"tags":["citool","ci","config","jobs","validation"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}