fix floors measuring single lib instead all libs
This commit is contained in:
parent
22ab973f0c
commit
a9665e55f9
2 changed files with 58 additions and 14 deletions
|
|
@ -2124,17 +2124,30 @@ fn validate_live_cmd(
|
|||
fn verify_live_cmd(prof: &GameProfile, pid: u32, dir: &Path, lib: &str) -> Result<OracleCounts> {
|
||||
let img = load_lib(dir, lib)?;
|
||||
let classes = schema::enumerate_schema(&img);
|
||||
// The SAME floor `produce` applies, not merely non-empty: this half compares an offline read against a
|
||||
// live one through the same `CI_*` constants on the same bytes, so a reshape's survivors agree with
|
||||
// themselves at ~1.0 and a handful of classes looks like a clean run. See
|
||||
// `GameProfile::min_schema_classes`.
|
||||
ensure!(
|
||||
classes.len() >= prof.min_schema_classes,
|
||||
"offline schema derivation found {} classes in {lib} (floor {}) — refusing to verify a schema \
|
||||
whose class table collapsed",
|
||||
classes.len(),
|
||||
prof.min_schema_classes
|
||||
);
|
||||
// A floor, not merely non-empty: this half compares an offline read against a live one through the same
|
||||
// `CI_*` constants on the same bytes, so a reshape's survivors agree with themselves at ~1.0 and a
|
||||
// handful of classes looks like a clean run.
|
||||
//
|
||||
// It is `min_schema_classes_LIB`, because this enumerates ONE library while `produce`'s floor counts the
|
||||
// union across all of them — see `GameProfile::min_schema_classes_lib`. Only `server_lib` has a
|
||||
// calibrated count, so any other library is enumerated and reported rather than judged against a number
|
||||
// that does not describe it.
|
||||
if lib == prof.server_lib {
|
||||
ensure!(
|
||||
classes.len() >= prof.min_schema_classes_lib,
|
||||
"offline schema derivation found {} classes in {lib} (floor {}) — refusing to verify a schema \
|
||||
whose class table collapsed",
|
||||
classes.len(),
|
||||
prof.min_schema_classes_lib
|
||||
);
|
||||
} else {
|
||||
eprintln!(
|
||||
"NOTE: {lib} is not {}, which is the only library with a calibrated class floor — \
|
||||
enumerated {} classes, collapse check SKIPPED",
|
||||
prof.server_lib,
|
||||
classes.len()
|
||||
);
|
||||
}
|
||||
|
||||
let live = live::LiveProcess::attach(pid)?;
|
||||
let base = live
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue