@ouro.bot/cli 0.1.0-alpha.731 → 0.1.0-alpha.732

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/changelog.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.732",
6
+ "changes": [
7
+ "Doctor distinguishes a completed partial hosted-mail cache sync from stale divergence, preserving repair guidance only for actionable cache faults."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.731",
6
12
  "changes": [
@@ -1144,12 +1144,17 @@ async function hostedMailCacheAuthorityCheck(deps, agentDir, store) {
1144
1144
  }
1145
1145
  documentsById.set(document.messageId, document);
1146
1146
  }
1147
- let mismatched = 0;
1147
+ let missing = 0;
1148
+ let stale = 0;
1148
1149
  let invalidKeyProvenance = 0;
1149
1150
  for (const record of observation.records) {
1150
1151
  const document = documentsById.get(record.id);
1151
- if (!document || !(0, hosted_cache_sync_1.mailSearchCacheDocumentMatchesRecord)(document, record, true)) {
1152
- mismatched += 1;
1152
+ if (!document) {
1153
+ missing += 1;
1154
+ continue;
1155
+ }
1156
+ if (!(0, hosted_cache_sync_1.mailSearchCacheDocumentMatchesRecord)(document, record, true)) {
1157
+ stale += 1;
1153
1158
  continue;
1154
1159
  }
1155
1160
  if (!document.decryptionKeyId || !store.privateKeyIds.has(document.decryptionKeyId)) {
@@ -1168,11 +1173,23 @@ async function hostedMailCacheAuthorityCheck(deps, agentDir, store) {
1168
1173
  && coverage.cachedMessageCount === expectedCachedCount
1169
1174
  && coverage.decryptableMessageCount === expectedCachedCount
1170
1175
  && coverage.skippedMessageCount === observation.snapshot.visibleMessageCount - expectedCachedCount;
1171
- if (malformedOrNoncanonical > 0 || mismatched > 0 || invalidKeyProvenance > 0 || !coverageMatches) {
1176
+ if (coverageMatches
1177
+ && coverage.skippedMessageCount > 0
1178
+ && missing === coverage.skippedMessageCount
1179
+ && stale === 0
1180
+ && malformedOrNoncanonical === 0
1181
+ && invalidKeyProvenance === 0) {
1182
+ return {
1183
+ ...base,
1184
+ status: "warn",
1185
+ detail: `hosted authority is sound; the last completed sync skipped ${missing} hosted message(s), so local search remains incomplete; retry only if conditions have changed since that sync`,
1186
+ };
1187
+ }
1188
+ if (malformedOrNoncanonical > 0 || missing > 0 || stale > 0 || invalidKeyProvenance > 0 || !coverageMatches) {
1172
1189
  return {
1173
1190
  ...base,
1174
1191
  status: "warn",
1175
- detail: `hosted authority is sound but cache diverges: ${mismatched} missing/stale canonical document(s), ${malformedOrNoncanonical} malformed/orphan/noncanonical/duplicate file(s), ${invalidKeyProvenance} invalid key provenance document(s), all-scope coverage ${coverageMatches ? "matches" : "missing/malformed/stale"}; run \`ouro mail sync-cache --agent ${agentName}\``,
1192
+ detail: `hosted authority is sound but cache diverges: ${missing + stale} missing/stale canonical document(s), ${malformedOrNoncanonical} malformed/orphan/noncanonical/duplicate file(s), ${invalidKeyProvenance} invalid key provenance document(s), all-scope coverage ${coverageMatches ? "matches" : "missing/malformed/stale"}; run \`ouro mail sync-cache --agent ${agentName}\``,
1176
1193
  };
1177
1194
  }
1178
1195
  const count = observation.records.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.731",
3
+ "version": "0.1.0-alpha.732",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },