shraga 0.1.86 → 0.1.87
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/package.json +1 -1
- package/src/server/data-sync.ts +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shraga",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.87",
|
|
4
4
|
"description": "The teammate you delegate coding to — a self-hostable, multi-user AI coding agent web UI (Claude Code, with a pluggable engine seam).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
package/src/server/data-sync.ts
CHANGED
|
@@ -66,6 +66,15 @@ export function extractCommitSubject(raw: string): string {
|
|
|
66
66
|
return '';
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/** Paths that are REWRITTEN or discarded by design: per-run worker logs, per-run task files, and
|
|
70
|
+
* `.bak-*` copies. The shrink guard exists to catch a shared file being gutted (contacts.json
|
|
71
|
+
* 111 -> 5 lines); a task file losing 58 lines because the next run rewrote it is not that. And the
|
|
72
|
+
* guard aborts the WHOLE commit, so one churn file stalls every other file's sync indefinitely —
|
|
73
|
+
* measured 2026-09-07: repeated BLOCKED alerts and a 27-commit push backlog behind two task files. */
|
|
74
|
+
export function isChurnPath(file: string): boolean {
|
|
75
|
+
return /(^|\/)workspace\/[^/]+\/workers\/(logs|tasks)\//.test(file) || /\.bak(-|\.|$)/.test(file);
|
|
76
|
+
}
|
|
77
|
+
|
|
69
78
|
export class DataSyncOptions {
|
|
70
79
|
repoUrl = process.env.DATA_SYNC_REPO || '';
|
|
71
80
|
branch = process.env.DATA_SYNC_BRANCH || 'main';
|
|
@@ -236,7 +245,7 @@ export class DataSync {
|
|
|
236
245
|
const [addRaw, delRaw, file] = line.split('\t');
|
|
237
246
|
if (addRaw === '-' || delRaw === '-' || !file) continue; // binary
|
|
238
247
|
const net = (parseInt(delRaw, 10) || 0) - (parseInt(addRaw, 10) || 0);
|
|
239
|
-
if (net > shrinkThreshold) shrunk.push(`• ${file} (−${net} net lines)`);
|
|
248
|
+
if (net > shrinkThreshold && !isChurnPath(file)) shrunk.push(`• ${file} (−${net} net lines)`);
|
|
240
249
|
}
|
|
241
250
|
if (shrunk.length) {
|
|
242
251
|
console.error(`${TAG} 🚫 BLOCKED large content shrink (${context}): ${shrunk.length} file(s) — net-removal threshold is ${shrinkThreshold}`);
|