fix(cron): skip model/provider snapshot for inherit-mode jobs (#89242) - #89855
fix(cron): skip model/provider snapshot for inherit-mode jobs (#89242)#89855RelaxJonh wants to merge 1 commit into
Conversation
…search#89242) _compute_provider_model_snapshots() unconditionally recorded a model_snapshot and provider_snapshot for every agent cron job, including inherit-mode jobs where both model and provider are None. When the user later changed the global default model, the drift guard compared the stale snapshot against the new global, saw a mismatch, and failed closed — skipping the run — even though the job was always intended to inherit. Skip snapshotting entirely when both axes are unpinned (pure inherit mode). The drift guard still applies to partially-pinned jobs where one axis is explicit and the other inherits. Fixes NousResearch#89242
|
|
Not a change request — a cross-link, because this PR and #89292 make one policy This PR stops recording I mention it because #89292 (mine, currently open) changes the remediation No conflict between the branches: this one touches One thing the description could say out loud, which I checked rather than So after this lands the two populations diverge permanently and invisibly: a |
Summary
_compute_provider_model_snapshots()unconditionally records amodel_snapshotandprovider_snapshotfor every agent cron job, including inherit-mode jobs where bothmodelandproviderareNone. When the user later changes the global default model, the drift guard compares the stale snapshot against the new global, sees a mismatch, and fails closed — skipping the run — even though the job was always intended to inherit.Fix
Skip snapshotting entirely when both axes are unpinned (pure inherit mode). The drift guard still applies to partially-pinned jobs where one axis is explicit and the other inherits.
Changes
cron/jobs.py: Early return(None, None)when bothnormalized_providerandnormalized_modelareNonetests/cron/test_cron_provider_pin.py: Updatedtest_unpinned_job_skips_snapshotto verify inherit-mode jobs get no snapshot and the resolver is not calledTesting
Fixes #89242