feat: D12 Steam-launch wrapper for auto crash-capture + doc status fixes — 0.16.0
D12 "build first" wrapper: `rigdoctor wrap %command%` (Steam launch option / Lutris/Heroic wrapper field) auto-brackets a focused diagnostic around a game — start a game-tagged capture on launch, clean stop on exit; a hard freeze leaves it unterminated → flagged as a crash next launch. - core/wrap.py: game name from SteamAppId, PATH-proof launch_option(), run() that doesn't disturb an existing capture and returns the game's exit code. - diagnostic.start() preserves an unanalyzed crash to diagnostic-crash.jsonl before clearing, so auto-relaunch can't wipe an unseen crash; pending_crash/ analyze_crash check the archive first. - GUI: "Auto-capture…" helper dialog (copyable launch-option string). - Tests for wrap (name resolution, exit-code passthrough, no-double-start). - docs: fix stale MODULES.md status column (M1/M3/M4/M5/M8/M10/M13 → done), update ROADMAP/MODULES for the wrapper + crash detection. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,7 @@ class CrashDetectionTests(unittest.TestCase):
|
||||
log = self._diag_log(d)
|
||||
_write_log(str(log), "Tarkov") # has session-start + game, no session-stop
|
||||
with mock.patch.object(diagnostic.config, "DIAG_LOG", log), \
|
||||
mock.patch.object(diagnostic.config, "DIAG_CRASH", log.with_suffix(".crash")), \
|
||||
mock.patch.object(diagnostic.reccontrol, "running_pid", return_value=None):
|
||||
info = diagnostic.pending_crash()
|
||||
self.assertIsNotNone(info)
|
||||
@@ -81,6 +82,7 @@ class CrashDetectionTests(unittest.TestCase):
|
||||
w.write_event("session-stop", "samples=1")
|
||||
w.close()
|
||||
with mock.patch.object(diagnostic.config, "DIAG_LOG", log), \
|
||||
mock.patch.object(diagnostic.config, "DIAG_CRASH", log.with_suffix(".crash")), \
|
||||
mock.patch.object(diagnostic.reccontrol, "running_pid", return_value=None):
|
||||
self.assertIsNone(diagnostic.pending_crash())
|
||||
|
||||
@@ -89,6 +91,7 @@ class CrashDetectionTests(unittest.TestCase):
|
||||
log = self._diag_log(d)
|
||||
_write_log(str(log), "Tarkov")
|
||||
with mock.patch.object(diagnostic.config, "DIAG_LOG", log), \
|
||||
mock.patch.object(diagnostic.config, "DIAG_CRASH", log.with_suffix(".crash")), \
|
||||
mock.patch.object(diagnostic.reccontrol, "running_pid", return_value=None):
|
||||
self.assertIsNotNone(diagnostic.pending_crash())
|
||||
diagnostic.acknowledge_crash()
|
||||
@@ -99,6 +102,7 @@ class CrashDetectionTests(unittest.TestCase):
|
||||
log = self._diag_log(d)
|
||||
_write_log(str(log), "Tarkov")
|
||||
with mock.patch.object(diagnostic.config, "DIAG_LOG", log), \
|
||||
mock.patch.object(diagnostic.config, "DIAG_CRASH", log.with_suffix(".crash")), \
|
||||
mock.patch.object(diagnostic.reccontrol, "running_pid", return_value=4321):
|
||||
self.assertIsNone(diagnostic.pending_crash()) # it's in-progress, not crashed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user