58 ap = argparse.ArgumentParser()
59 ap.add_argument(
"config", help=
"config YAML to audit")
60 ap.add_argument(
"--baseline", default=str(ROOT /
"configs/default.yaml"))
61 ap.add_argument(
"--all", action=
"store_true", help=
"every inherited field, not just consequential ones")
64 cfg =
flatten(yaml.safe_load(open(a.config)))
65 base =
flatten(yaml.safe_load(open(a.baseline)))
67 inherited = [k
for k
in sorted(cfg)
68 if k
in base
and str(cfg[k]) == str(base[k])
and cfg[k]
is not None]
70 inherited = [k
for k
in inherited
if any(k.startswith(s)
for s
in CONSEQUENTIAL)]
72 traps = [k
for k
in inherited
if k
in KNOWN_TRAPS]
73 rest = [k
for k
in inherited
if k
not in KNOWN_TRAPS]
75 print(f
"config : {a.config}")
76 print(f
"baseline : {a.baseline}")
77 print(f
"\n{len(inherited)} consequential fields are bit-identical to the baseline "
78 f
"(inherited, not chosen).\n")
81 print(
" These have each cost a design point before:")
83 print(f
" {k:44s} = {str(cfg[k]):<14s} {KNOWN_TRAPS[k]}")
86 print(
" Also inherited:")
88 print(f
" {k:44s} = {cfg[k]}")
90 print(
" (none -- every consequential field differs from the baseline)")