@yemi33/minions 0.1.2332 → 0.1.2333
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.
|
@@ -313,7 +313,18 @@ function dropScope(scope) {
|
|
|
313
313
|
try {
|
|
314
314
|
const { getDb } = require('./db');
|
|
315
315
|
const result = getDb().prepare('DELETE FROM pull_requests WHERE scope = ?').run(scope);
|
|
316
|
-
|
|
316
|
+
// Mirror the work-items-store.js fix (W-mr96m3hm000fd5d7): don't blindly
|
|
317
|
+
// forget the mirror-hash. _resyncScopeIfJsonDiverged treats "no recorded
|
|
318
|
+
// hash" + "zero SQL rows" as a first-install hydrate and rebuilds SQL from
|
|
319
|
+
// whatever JSON is on disk. removeProject with dataMode:'keep' leaves this
|
|
320
|
+
// scope's JSON file untouched, so forgetting the hash here would let the
|
|
321
|
+
// very next read/write resurrect the just-dropped project's stale PR rows.
|
|
322
|
+
// Adopt the file's current hash instead (or forget it only if the file is
|
|
323
|
+
// actually gone, e.g. dataMode: 'purge'/'archive').
|
|
324
|
+
const jsonPath = _filePathForScope(scope);
|
|
325
|
+
const currentHash = _fileContentHash(jsonPath);
|
|
326
|
+
if (currentHash == null) _lastMirrorHashByScope.delete(scope);
|
|
327
|
+
else _lastMirrorHashByScope.set(scope, currentHash);
|
|
317
328
|
if (result && result.changes > 0) {
|
|
318
329
|
try { require('./db-events').emitStateEvent('pull_requests'); } catch { /* optional */ }
|
|
319
330
|
}
|
|
@@ -390,7 +390,21 @@ function dropScope(scope) {
|
|
|
390
390
|
try {
|
|
391
391
|
const { getDb } = require('./db');
|
|
392
392
|
const result = getDb().prepare('DELETE FROM work_items WHERE scope = ?').run(scope);
|
|
393
|
-
|
|
393
|
+
// Do NOT simply forget the mirror-hash here. _resyncScopeIfJsonDiverged
|
|
394
|
+
// treats "no recorded hash" + "zero SQL rows for the scope" as a genuine
|
|
395
|
+
// first-install hydrate and rebuilds SQL from whatever JSON is on disk.
|
|
396
|
+
// When the caller is removeProject with dataMode:'keep', the JSON file for
|
|
397
|
+
// this scope is deliberately left untouched — so the very next read/write
|
|
398
|
+
// against this scope would silently resurrect the just-dropped project's
|
|
399
|
+
// stale rows straight back into SQL. Instead, adopt the JSON file's
|
|
400
|
+
// *current* hash (if it still exists) so the next resync correctly reads
|
|
401
|
+
// that as "unchanged" and skips the rehydrate. If the file is genuinely
|
|
402
|
+
// gone (dataMode: 'purge'/'archive'), forgetting the hash is safe since
|
|
403
|
+
// _resyncScopeIfJsonDiverged no-ops when the file can't be hashed.
|
|
404
|
+
const jsonPath = _filePathForScope(scope);
|
|
405
|
+
const currentHash = _fileContentHash(jsonPath);
|
|
406
|
+
if (currentHash == null) _lastMirrorHashByScope.delete(scope);
|
|
407
|
+
else _lastMirrorHashByScope.set(scope, currentHash);
|
|
394
408
|
if (result && result.changes > 0) {
|
|
395
409
|
try { require('./db-events').emitStateEvent('work_items'); } catch { /* optional */ }
|
|
396
410
|
try { require('./queries').invalidateWorkItemsCache(); } catch { /* queries not loaded */ }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2333",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|