@riddledc/riddle-proof 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/package.json +1 -1
- package/runtime/lib/setup.py +12 -6
package/README.md
CHANGED
|
@@ -78,6 +78,19 @@ way to a ready PR after proof and CI; `leave_draft: true` is only an explicit
|
|
|
78
78
|
debug or user-request escape hatch. The notification adapter is where a host
|
|
79
79
|
updates Discord, OpenClaw, GitHub, or another integration.
|
|
80
80
|
|
|
81
|
+
## Runtime Scratch Space
|
|
82
|
+
|
|
83
|
+
The packaged proof-run setup uses isolated git worktrees for before and after
|
|
84
|
+
states. By default those worktrees now live under
|
|
85
|
+
`/tmp/.riddle-proof-worktrees`, with dependency caches under the matching local
|
|
86
|
+
temp root. This keeps repeated `node_modules` cache materialization on local
|
|
87
|
+
scratch storage instead of walking large dependency trees on EFS or other shared
|
|
88
|
+
workspace filesystems.
|
|
89
|
+
|
|
90
|
+
Set `RIDDLE_PROOF_WORKTREE_ROOT` to choose an explicit location. Set
|
|
91
|
+
`RIDDLE_PROOF_USE_WORKSPACE_WORKTREE_ROOT=1` to keep the previous behavior of
|
|
92
|
+
placing proof worktrees next to the active repository.
|
|
93
|
+
|
|
81
94
|
## Capture Diagnostics
|
|
82
95
|
|
|
83
96
|
`@riddledc/riddle-proof/diagnostics` standardizes the evidence contract around
|
package/package.json
CHANGED
package/runtime/lib/setup.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""Setup: create worktrees, install deps, validate args, write state.
|
|
2
2
|
|
|
3
3
|
Idempotent — safe to re-run. Creates per-run worktrees under the active
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
local temp storage by default:
|
|
5
|
+
/tmp/.riddle-proof-worktrees/riddle-proof-<run_id>-before
|
|
6
|
+
/tmp/.riddle-proof-worktrees/riddle-proof-<run_id>-after
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
import json, subprocess as sp, os, sys, shutil, time
|
|
9
|
+
import json, subprocess as sp, os, sys, shutil, time, tempfile
|
|
10
10
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
11
11
|
from util import load_state, save_state, git, shell_quote
|
|
12
12
|
|
|
@@ -160,8 +160,14 @@ def resolve_worktree_root(repo_dir):
|
|
|
160
160
|
configured = (s.get('worktree_root') or os.environ.get('RIDDLE_PROOF_WORKTREE_ROOT') or '').strip()
|
|
161
161
|
if configured:
|
|
162
162
|
return os.path.abspath(os.path.expanduser(configured))
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
if os.environ.get('RIDDLE_PROOF_USE_WORKSPACE_WORKTREE_ROOT', '').strip().lower() in ('1', 'true', 'yes'):
|
|
164
|
+
repo_parent = os.path.dirname(os.path.abspath(repo_dir))
|
|
165
|
+
return os.path.join(repo_parent, '.riddle-proof-worktrees')
|
|
166
|
+
|
|
167
|
+
# Proof worktrees are scratch data. Keep them on local temp storage by
|
|
168
|
+
# default so dependency cache materialization does not crawl across EFS or
|
|
169
|
+
# other shared workspace filesystems.
|
|
170
|
+
return os.path.join(tempfile.gettempdir(), '.riddle-proof-worktrees')
|
|
165
171
|
|
|
166
172
|
|
|
167
173
|
def cleanup_legacy_branch_worktrees(repo_dir, branch_name):
|