The runtime names its artifact before anything is switched on
Step 35 asks the deployed process to prove WHICH frozen curve it resolves — artifact id, procedure, era, source digest, knot digest, curve digest, support, servable, stage — with the shadow still OFF. The probe could not answer, so the same shadowState() evaluator now resolves the promoted artifact and reports its identity. Identity only: the curve is committed and addressable by artifact_id, and repeating it on a status page would put a second copy of the truth there. null means nothing is promoted, which is also the honest answer when the file is missing or fails its policy at load. Suite 404/404. Shadow OFF. Live OFF. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CQJeAG8vcDoL5zkiaJyVb8
This commit is contained in:
@@ -172,3 +172,29 @@ describe('model-era transition law', () => {
|
||||
expect(check.servable).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('the runtime can name its artifact with the shadow OFF', () => {
|
||||
it('reports the full identity without enabling anything', () => {
|
||||
const st = pc.shadowState({});
|
||||
expect(st.shadow).toBe('OFF');
|
||||
expect(st.live_serving).toBe('OFF');
|
||||
const a = st.artifact;
|
||||
for (const k of ['artifact_id', 'procedure_version', 'model_version', 'fit_as_of',
|
||||
'training_cutoff', 'fit_n', 'source_digest', 'knot_digest', 'served_curve_digest',
|
||||
'certified_bands', 'stage']) expect(a[k]).toBeTruthy();
|
||||
expect(a.servable).toBe(true);
|
||||
expect(a.approved_for_shadow).toBe(true);
|
||||
expect(a.approved_for_live).toBe(false);
|
||||
expect(a.wrong_era_rows).toBe(0);
|
||||
expect(a.withheld_from_fit).toBe(0);
|
||||
});
|
||||
|
||||
it('does not put a second copy of the curve on a status surface', () => {
|
||||
expect(pc.shadowState({}).artifact.served_curve).toBeUndefined();
|
||||
});
|
||||
|
||||
it('two resolutions return the same artifact — no refit between calls', () => {
|
||||
expect(JSON.stringify(pc.shadowState({}).artifact))
|
||||
.toBe(JSON.stringify(pc.shadowState({}).artifact));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user