@cleocode/core 2026.8.5 → 2026.8.6

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.
@@ -50,7 +50,9 @@ export interface SupersededStoreEntry {
50
50
  readonly modifiedAt: string;
51
51
  /**
52
52
  * Rows found in the superseded file's own task table, if it has one.
53
- * `null` when the file has no such table or could not be read.
53
+ * `null` when the file has no such table or could not be read. A 0-byte
54
+ * file yields `0`, never `null` — an empty file holds zero rows by
55
+ * definition (T12099).
54
56
  */
55
57
  readonly rowsInSuperseded: number | null;
56
58
  /** Rows found in the LIVE store's prefixed table. */
@@ -1 +1 @@
1
- {"version":3,"file":"superseded-store.d.ts","sourceRoot":"","sources":["../../src/doctor/superseded-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAMH;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,wCAAwC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,qDAAqD;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,8CAA8C;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,aAAa,EAAE,MAAM,C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OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACnD;AAgBD,+CAA+C;AAC/C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAiC7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,yBAAyB,CAuEnF"}
@@ -120,7 +120,11 @@ export function scanSupersededStores(projectRoot) {
120
120
  // risk advising removal of something still being written.
121
121
  if (stat.mtimeMs >= liveMtimeMs)
122
122
  continue;
123
- const rowsInSuperseded = countRows(path, bareTable);
123
+ // A 0-byte file holds zero rows BY DEFINITION — bypass countRows, which
124
+ // would return null (nothing to open) and manufacture the "unknown number
125
+ // of rows" corruption signal this check exists to kill (T12099). `null`
126
+ // remains reserved for a NONZERO file that could not be read.
127
+ const rowsInSuperseded = stat.size === 0 ? 0 : countRows(path, bareTable);
124
128
  const rowsInLive = countRows(liveStorePath, liveTable);
125
129
  // `rowsInSuperseded === 0` must be EXPLICIT, never `?? 0`. `null` means the
126
130
  // file could not be read — corrupt, locked, truncated, or not SQLite — and
@@ -128,17 +132,29 @@ export function scanSupersededStores(projectRoot) {
128
132
  // recommend archiving precisely the file whose contents are unknown, which
129
133
  // is the one case where being wrong loses data.
130
134
  const safeToArchive = (rowsInLive ?? 0) > 0 && rowsInSuperseded === 0;
131
- const reason = safeToArchive
132
- ? `superseded by ${LIVE_STORE_FILENAME}: ${rowsInSuperseded ?? 0} rows in ${file}#${bareTable} ` +
133
- `vs ${rowsInLive} in ${LIVE_STORE_FILENAME}#${liveTable}. Last written ` +
134
- `${stat.mtime.toISOString().slice(0, 10)}, while ${LIVE_STORE_FILENAME} was written ` +
135
- `${new Date(liveMtimeMs).toISOString().slice(0, 10)}. Its name is the one the docs and ` +
136
- `\`cleo restore backup --file tasks.db\` still say, and snapshots are named ` +
137
- `\`tasks-<ts>.db\` even though they snapshot ${LIVE_STORE_FILENAME} — so this file reads ` +
138
- `as a truncated live DB when it is simply the pre-migration one.`
139
- : `predates ${LIVE_STORE_FILENAME} but still holds ${rowsInSuperseded ?? 'an unknown number of'} ` +
140
- `rows in ${bareTable} (live ${liveTable}: ${rowsInLive ?? 'unreadable'}). NOT recommended for ` +
141
- `removal — reconcile the contents first.`;
135
+ let reason;
136
+ if (stat.size === 0 && safeToArchive) {
137
+ reason =
138
+ `${file} is 0 bytes — an empty file holds zero rows by definition, so there is ` +
139
+ `nothing to reconcile. The live store ${LIVE_STORE_FILENAME}#${liveTable} holds ` +
140
+ `${rowsInLive} rows. Safe to archive.`;
141
+ }
142
+ else if (safeToArchive) {
143
+ reason =
144
+ `superseded by ${LIVE_STORE_FILENAME}: ${rowsInSuperseded ?? 0} rows in ${file}#${bareTable} ` +
145
+ `vs ${rowsInLive} in ${LIVE_STORE_FILENAME}#${liveTable}. Last written ` +
146
+ `${stat.mtime.toISOString().slice(0, 10)}, while ${LIVE_STORE_FILENAME} was written ` +
147
+ `${new Date(liveMtimeMs).toISOString().slice(0, 10)}. Its name is the one the docs and ` +
148
+ `\`cleo restore backup --file tasks.db\` still say, and snapshots are named ` +
149
+ `\`tasks-<ts>.db\` even though they snapshot ${LIVE_STORE_FILENAME} — so this file reads ` +
150
+ `as a truncated live DB when it is simply the pre-migration one.`;
151
+ }
152
+ else {
153
+ reason =
154
+ `predates ${LIVE_STORE_FILENAME} but still holds ${rowsInSuperseded ?? 'an unknown number of'} ` +
155
+ `rows in ${bareTable} (live ${liveTable}: ${rowsInLive ?? 'unreadable'}). NOT recommended for ` +
156
+ `removal — reconcile the contents first.`;
157
+ }
142
158
  entries.push({
143
159
  path,
144
160
  name: file,
@@ -1 +1 @@
1
- {"version":3,"file":"superseded-store.js","sourceRoot":"","sources":["../../src/doctor/superseded-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,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AG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACxE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/core",
3
- "version": "2026.8.5",
3
+ "version": "2026.8.6",
4
4
  "description": "CLEO core business logic kernel — tasks, sessions, memory, orchestration, lifecycle, with bundled SQLite store",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -456,16 +456,16 @@
456
456
  "write-file-atomic": "^7.0.1",
457
457
  "yaml": "^2.8.3",
458
458
  "zod": "^4.3.6",
459
- "@cleocode/adapters": "2026.8.5",
460
- "@cleocode/contracts": "2026.8.5",
461
- "@cleocode/agents": "2026.8.5",
462
- "@cleocode/caamp": "2026.8.5",
463
- "@cleocode/git-shim": "2026.8.5",
464
- "@cleocode/nexus": "2026.8.5",
465
- "@cleocode/paths": "2026.8.5",
466
- "@cleocode/worktree": "2026.8.5",
467
- "@cleocode/skills": "2026.8.5",
468
- "@cleocode/lafs": "2026.8.5"
459
+ "@cleocode/adapters": "2026.8.6",
460
+ "@cleocode/contracts": "2026.8.6",
461
+ "@cleocode/caamp": "2026.8.6",
462
+ "@cleocode/git-shim": "2026.8.6",
463
+ "@cleocode/agents": "2026.8.6",
464
+ "@cleocode/lafs": "2026.8.6",
465
+ "@cleocode/skills": "2026.8.6",
466
+ "@cleocode/nexus": "2026.8.6",
467
+ "@cleocode/paths": "2026.8.6",
468
+ "@cleocode/worktree": "2026.8.6"
469
469
  },
470
470
  "engines": {
471
471
  "node": ">=24.16.0"
@@ -491,7 +491,7 @@
491
491
  "@types/proper-lockfile": "^4.1.4",
492
492
  "@types/tar": "^6.1.13",
493
493
  "@types/write-file-atomic": "^4.0.3",
494
- "@cleocode/utils": "2026.8.5"
494
+ "@cleocode/utils": "2026.8.6"
495
495
  },
496
496
  "repository": {
497
497
  "type": "git",
@@ -500,7 +500,7 @@
500
500
  },
501
501
  "optionalDependencies": {
502
502
  "llmtxt": "^2026.5.15",
503
- "@cleocode/studio": "^2026.8.5"
503
+ "@cleocode/studio": "^2026.8.6"
504
504
  },
505
505
  "scripts": {
506
506
  "build": "tsc && node scripts/copy-selfimprove-fixtures.mjs",
@@ -67,6 +67,13 @@ permissions:
67
67
  contents: write
68
68
  pull-requests: write
69
69
  id-token: write
70
+ # T12094: `actions: write` is required to CREATE a workflow_dispatch event.
71
+ # Without it the "Trigger CI for the bump-PR" step gets
72
+ # HTTP 403: Resource not accessible by integration
73
+ # and the bump-PR opens with no checks — the exact failure this step exists to
74
+ # prevent. Measured on the v2026.8.5 dispatch, which is why the step warns
75
+ # instead of failing: the release still completed and told us precisely why.
76
+ actions: write
70
77
 
71
78
  # R-207: concurrent prepare runs against the same version queue rather than
72
79
  # collide. cancel-in-progress=false preserves in-flight work.
@@ -445,6 +452,17 @@ jobs:
445
452
  - name: Trigger CI for the bump-PR
446
453
  run: |
447
454
  BRANCH="${{ steps.branch.outputs.name }}"
455
+ # The worktree-napi prebuild must be dispatched too. CI's "Worktree NAPI
456
+ # Prebuild Gate" looks for a prebuild run on this branch's SHA, and a
457
+ # run created by the GITHUB_TOKEN pull_request event comes back with
458
+ # conclusion `action_required` — queued pending human approval — which
459
+ # the gate reads as a failure. An explicit dispatch is not gated on
460
+ # approval, so it produces a real result.
461
+ if gh workflow run worktree-napi-prebuild.yml --ref "$BRANCH" 2>/dev/null; then
462
+ echo "Dispatched worktree-napi prebuild for $BRANCH."
463
+ else
464
+ echo "::warning::Could not dispatch worktree-napi-prebuild.yml for $BRANCH; the NAPI gate may block the bump-PR pending approval."
465
+ fi
448
466
  if gh workflow run ci.yml --ref "$BRANCH"; then
449
467
  echo "Dispatched CI for $BRANCH."
450
468
  else