test(case): isolate P10 timing with per-mode baseline per mos-1350

This commit is contained in:
jason.woltje committed 2026-10-22 16:59:44 -05:00
1 parent cf228eabc9
commit 135bb8fae2
3 files changed
+36 -3

No files matched your search

@@ -5,5 +5,20 @@
], ],
"authority": "mos-1326", "authority": "mos-1326",
"all_other_original_assertion_lines_preserved": true, "all_other_original_assertion_lines_preserved": true,
"command_level_talk_and_precheck_checks_unchanged": true "command_level_talk_and_precheck_checks_unchanged": true,
"mos_1350": {
"authority": "mos-1350",
"file": "packages/cli/tests/case1-accept.test.mjs",
"shape": "b: same fixture host and mode healthy baseline before fault",
"old_timing_assertions": [
" if(fault==='inner')assert.ok(seconds<4,`${mode}: ${seconds}s includes functional checks`);",
" assert.ok(seconds>=4&&seconds<6,`${mode}: ${seconds}s; 2s functional-check slack`);"
],
"new_timing_assertions": [
" if(fault==='inner')assert.ok(probeSeconds>=1.25&&probeSeconds<2.75,`${mode}: probe ${probeSeconds}s after baseline ${baselineSeconds}s`);",
" assert.ok(probeSeconds>=3.25&&probeSeconds<4.75,`${mode}: probe ${probeSeconds}s after baseline ${baselineSeconds}s`);"
],
"reason_residual_cleanup_assertions_unchanged": true,
"mutant_timing_dependencies": "No M1-M17 definition or killer names these two P10 timing assertions. M11 uses overflow, which takes no baseline; row253 M17/M18 named P10 inner/outer need fresh proof if carried into any future row253 gate; none is claimed here."
}
} }
+9
View File
@@ -122,3 +122,12 @@ Estimate12-18minutes. Any unexpected result follows sage-3004/mos-1272.
## Run4 old-test red and mos-1349 measurement ## Run4 old-test red and mos-1349 measurement
Whole case1:49/1/0,247.951s. Only old P10 inner timing fails exec4.19657134 against4s. All own new tests, wiring, exact bytes and outer<3 regression pass. Driver stops before case2/M1-M17/shells; no timeout. gander-0151 reports unplaced. Sage3007/Mos1349 measurements: five alternating804a/f3a scratch runs, no code edits,900s limits/freshTMPDIR, before3/2 after0/5. Test durations and only actually printed exec timers in run4/timing/NOTE.md. Passing per-mode numbers unavailable without editing; not invented. gander-0153 sends table to Mos/Sage/Duckworth for ruling before more work. Sweeps0 test leftovers; no push. Whole case1:49/1/0,247.951s. Only old P10 inner timing fails exec4.19657134 against4s. All own new tests, wiring, exact bytes and outer<3 regression pass. Driver stops before case2/M1-M17/shells; no timeout. gander-0151 reports unplaced. Sage3007/Mos1349 measurements: five alternating804a/f3a scratch runs, no code edits,900s limits/freshTMPDIR, before3/2 after0/5. Test durations and only actually printed exec timers in run4/timing/NOTE.md. Passing per-mode numbers unavailable without editing; not invented. gander-0153 sends table to Mos/Sage/Duckworth for ruling before more work. Sweeps0 test leftovers; no push.
## mos-1350 old P10 timing correction, test-only
Choose shape(b): each inner/outer mode runs the same host once with no fault and checks baseline status0, before installing the fault or starting its cleanup guard. Subtract that fresh per-mode duration from the fault run. No constant functional cost is assumed. Overflow behavior is unchanged. Exact reason, no-observed, hop-residual and cleanup assertions remain byte-identical. Diagnostics print baseline/fault/net for each mode so the ten repeated runs can be checked.
Probe's configured timers are2s inner and4s outer. Use net windows[1.25,2.75) and[3.25,4.75), a0.75s margin around those timer costs and0.5s separation between inner top and outer floor. The baseline includes the healthy probe startup itself, so net values may sit slightly below the configured timer. Run4's failing whole costs4.0057..4.3695 and its healthy functional checks around2s show why the old whole-run heuristic is unsuitable; actual net values must be proved by10 isolated runs per test before run5. No timing proof is claimed yet. Bound widening on the whole run is not used.
ASSERTION-PRESERVATION.json records the two Mos-authorized old timing replacements. M1-M17 have no target or killer dependent on those lines; M11's old P10 overflow killer is unchanged. Historical row253 inner/outer mutants require fresh proof if used again, and none is carried or claimed in row276. Test-only commit changes no product script. No runtime or timing run until Sage returns the slot after271r3 and Duckworth approves.
+11 -2
View File
@@ -368,6 +368,13 @@ test('row253 C4 acceptance query overflow is output-limit in both models',async
for(const fault of ['inner','outer','overflow'])test(`row253 C4 P10 ${fault} reason holds under both sudo models`,async t=>{ for(const fault of ['inner','outer','overflow'])test(`row253 C4 P10 ${fault} reason holds under both sudo models`,async t=>{
for(const mode of ['exec','hop']){ for(const mode of ['exec','hop']){
const h=host(t),files=[join(h.hc,'session-pids'),join(h.hc,'query-pids')];put(join(h.hc,'session-mode'),mode); const h=host(t),files=[join(h.hc,'session-pids'),join(h.hc,'query-pids')];put(join(h.hc,'session-mode'),mode);
// mos-1350(b): measure this host/mode's functional cost before adding a fault.
let baselineSeconds=0;
if(fault==='inner'||fault==='outer'){
const baselineStart=performance.now(),baseline=run(h);
baselineSeconds=(performance.now()-baselineStart)/1000;
assert.equal(baseline.status,0,baseline.out+baseline.err);
}
const capture=cleanupFixture(t,files);const stop=fixtureGuard(t,files,7000); const capture=cleanupFixture(t,files);const stop=fixtureGuard(t,files,7000);
if(fault==='inner')put(join(h.hc,'peer-hang'),''); if(fault==='inner')put(join(h.hc,'peer-hang'),'');
if(fault==='outer'){put(join(h.hc,'stall-probe'),'');put(join(h.hc,'stall-output'),'200 997 997\n');} if(fault==='outer'){put(join(h.hc,'stall-probe'),'');put(join(h.hc,'stall-output'),'200 997 997\n');}
@@ -377,9 +384,11 @@ for(const fault of ['inner','outer','overflow'])test(`row253 C4 P10 ${fault} rea
const reason=fault==='inner'?'inner-timeout':fault==='outer'?'outer-timeout':'output-limit'; const reason=fault==='inner'?'inner-timeout':fault==='outer'?'outer-timeout':'output-limit';
assert.match(r.out,new RegExp('P10 tester-socket-squat unnamed boundary=failed reason=probe-'+reason+' ')); assert.match(r.out,new RegExp('P10 tester-socket-squat unnamed boundary=failed reason=probe-'+reason+' '));
assert.doesNotMatch(r.out,/boundary=observed/); assert.doesNotMatch(r.out,/boundary=observed/);
if(fault==='inner')assert.ok(seconds<4,`${mode}: ${seconds}s includes functional checks`); const probeSeconds=seconds-baselineSeconds;
if(fault==='inner'||fault==='outer')t.diagnostic(JSON.stringify({fault,mode,baselineSeconds,faultSeconds:seconds,probeSeconds}));
if(fault==='inner')assert.ok(probeSeconds>=1.25&&probeSeconds<2.75,`${mode}: probe ${probeSeconds}s after baseline ${baselineSeconds}s`);
if(fault==='outer'){ if(fault==='outer'){
assert.ok(seconds>=4&&seconds<6,`${mode}: ${seconds}s; 2s functional-check slack`); assert.ok(probeSeconds>=3.25&&probeSeconds<4.75,`${mode}: probe ${probeSeconds}s after baseline ${baselineSeconds}s`);
if(mode==='hop')assert.ok(recordedLivePids(files[0]).length>0,'stalled supervisor is R3 residual'); if(mode==='hop')assert.ok(recordedLivePids(files[0]).length>0,'stalled supervisor is R3 residual');
for(const file of files)killRecordedPids(file); for(const file of files)killRecordedPids(file);
} }