From 271bb3251267fec68f5c9cec63314b22cfaefe75 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Fri, 2 Oct 2026 12:41:52 -0400 Subject: debug: risc-v-gsp-rm-debugger final pass - remove in-development notices, complete rename, adversarial-review fixes Remove the '# TOOL IN DEVELOPMENT - NOT READY YET!' notices from the tool docs/README/scripts and the project docs; record the removal (2026-10-02) against the tool audit (debug/risc-v-gsp-rm-vm/docs/27-TOOL-AUDIT.md), the 194-test suite and the value-validation demos (docs/25-VALUE-VALIDATION.md). Complete the cosmetic rename to risc-v-gsp-rm-debugger in user-facing prose and commands (launcher, roadmap, docs); internal greeneye package and code identifiers unchanged. Adversarial-review fixes: deterministic control-discovery sweep (flaky test root-caused), UUID session dirs + atomic JSON writes for concurrent runs, Ghidra bridge loopback enforcement and clean shutdown, fp register restore in Session.call, version_diff --dry-run, 30 s interrupt budget, dry-run non-destructiveness verified. Docs: flag-removal records, link fixes, command/flag corrections (fdematch arity, port_new_device --out, trace filename), F2 orchestration note in future-eng-ops; STATE-CURRENT status refreshed. --- debug/risc-v-gsp-rm-vm/harness/value_demos/_common.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'debug/risc-v-gsp-rm-vm/harness/value_demos/_common.py') diff --git a/debug/risc-v-gsp-rm-vm/harness/value_demos/_common.py b/debug/risc-v-gsp-rm-vm/harness/value_demos/_common.py index 0733c48..ebbc390 100644 --- a/debug/risc-v-gsp-rm-vm/harness/value_demos/_common.py +++ b/debug/risc-v-gsp-rm-vm/harness/value_demos/_common.py @@ -17,6 +17,7 @@ import json import os import shutil import sys +import tempfile import time HERE = os.path.dirname(os.path.abspath(__file__)) @@ -95,11 +96,24 @@ def artifact_dir(name: str) -> str: return path +def session_dir(root: str, label: str = "session") -> str: + """A unique recording dir under ``root``. + + Demos share a fixed artifact root so their reports are discoverable, but + two concurrent demo runs (tests, agents) must never share one + ``events.jsonl`` or a reader can see a half-written recording. + """ + os.makedirs(root, exist_ok=True) + return tempfile.mkdtemp(prefix=f"{label}-", dir=root) + + def write_json(path: str, payload) -> str: os.makedirs(os.path.dirname(path), exist_ok=True) - with open(path, "w", encoding="utf-8") as fh: + tmp = f"{path}.tmp-{os.getpid()}" + with open(tmp, "w", encoding="utf-8") as fh: json.dump(payload, fh, indent=2, sort_keys=True) fh.write("\n") + os.replace(tmp, path) return path -- cgit v1.2.3