@blockrun/franklin 3.15.39 → 3.15.40
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/dist/session/storage.js +13 -3
- package/package.json +1 -1
package/dist/session/storage.js
CHANGED
|
@@ -21,7 +21,17 @@ export function setSessionPersistenceDisabled(disabled) {
|
|
|
21
21
|
persistenceDisabled = disabled;
|
|
22
22
|
}
|
|
23
23
|
export function isSessionPersistenceDisabled() {
|
|
24
|
-
|
|
24
|
+
// Also honor FRANKLIN_NO_PERSIST — a separate env var, deliberately
|
|
25
|
+
// NOT piggybacking on FRANKLIN_NO_AUDIT. test/local.mjs sets
|
|
26
|
+
// FRANKLIN_NO_AUDIT=1 at file level expecting session writes to
|
|
27
|
+
// keep working so resume tests can verify state on disk; that
|
|
28
|
+
// contract has to stay intact. FRANKLIN_NO_PERSIST is used by
|
|
29
|
+
// test/e2e.mjs to block home-dir writes from spawned franklin
|
|
30
|
+
// children. Verified 2026-05-04: prior e2e runs left 3 ghost
|
|
31
|
+
// session metas in the user's ~/.blockrun/sessions/ because real
|
|
32
|
+
// model names (zai/glm-5.1, nvidia/qwen3-coder-480b) escaped
|
|
33
|
+
// isTestFixtureModel()'s name-prefix gate.
|
|
34
|
+
return persistenceDisabled || process.env.FRANKLIN_NO_PERSIST === '1';
|
|
25
35
|
}
|
|
26
36
|
function getSessionsDir() {
|
|
27
37
|
if (resolvedSessionsDir)
|
|
@@ -83,7 +93,7 @@ export function createSessionId() {
|
|
|
83
93
|
* Save a message to the session transcript (append-only JSONL).
|
|
84
94
|
*/
|
|
85
95
|
export function appendToSession(sessionId, message) {
|
|
86
|
-
if (
|
|
96
|
+
if (isSessionPersistenceDisabled())
|
|
87
97
|
return;
|
|
88
98
|
const line = JSON.stringify(message) + '\n';
|
|
89
99
|
withWritableSessionDir(() => {
|
|
@@ -94,7 +104,7 @@ export function appendToSession(sessionId, message) {
|
|
|
94
104
|
* Update session metadata.
|
|
95
105
|
*/
|
|
96
106
|
export function updateSessionMeta(sessionId, meta) {
|
|
97
|
-
if (
|
|
107
|
+
if (isSessionPersistenceDisabled())
|
|
98
108
|
return;
|
|
99
109
|
withWritableSessionDir(() => {
|
|
100
110
|
const existing = loadSessionMeta(sessionId);
|
package/package.json
CHANGED