Merge nucleic/sleek-thistle-egret-fyej into dev

This commit is contained in:
2026-07-18 12:45:36 -07:00
parent 917c24e165
commit 3a214430e7
7 changed files with 937 additions and 10 deletions
+16 -2
View File
@@ -7,7 +7,12 @@ separately and does NOT count against parity (error-message wording legitimately
differs between shells); a stderr-only difference is reported for review.
Usage: replay.py [--nash PATH] [--bash PATH] [--corpus PATH] [--json PATH]
[--observe-spool DIR]
Parity target (M0/M3 gate): >= 99%.
--observe-spool DIR turns nash observation ON during the replay (spool
transport; the env is set identically for bash, where it is inert), proving
the gate hooks don't perturb command semantics (docs/NASH.md §10.1).
"""
import argparse
@@ -115,8 +120,17 @@ def main():
default=os.path.join(os.path.dirname(os.path.abspath(__file__)), "corpus.jsonl"),
)
ap.add_argument("--json", help="also write the full report to this path")
ap.add_argument("--observe-spool", help="enable nash observation, spooling to this dir")
args = ap.parse_args()
observe_env = None
if args.observe_spool:
os.makedirs(args.observe_spool, exist_ok=True)
observe_env = {
"NUCLEIC_SHELL_SPOOL": args.observe_spool,
"NUCLEIC_SESSION_ID": "corpus-replay",
}
entries = []
with open(args.corpus) as f:
for line in f:
@@ -126,8 +140,8 @@ def main():
results = []
for entry in entries:
b = run_one(args.bash, entry["cmd"])
n = run_one(args.nash, entry["cmd"])
b = run_one(args.bash, entry["cmd"], extra_env=observe_env)
n = run_one(args.nash, entry["cmd"], extra_env=observe_env)
verdict = classify(b, n)
results.append({"id": entry["id"], "cmd": entry["cmd"], "verdict": verdict,
"bash": b, "nash": n})