acuvo-code 0.6.5 → 0.6.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.
- package/ENTERPRISE.md +1 -1
- package/lib/self-update.mjs +32 -3
- package/package.json +1 -1
package/ENTERPRISE.md
CHANGED
|
@@ -892,7 +892,7 @@ For completeness, the properties none of them offers:
|
|
|
892
892
|
(`lib/media.mjs`), and generates imagery with no configuration and no account
|
|
893
893
|
(`lib/imagegen.mjs`) — critiqued before it is accepted, and reported as unreviewed when
|
|
894
894
|
no critic is available.
|
|
895
|
-
- ⭐ **Zero dependencies.** The entire auditable surface is 122 files and
|
|
895
|
+
- ⭐ **Zero dependencies.** The entire auditable surface is 122 files and 79582 lines,
|
|
896
896
|
and there is no `node_modules` behind it. (Counted 2026-08-22 from
|
|
897
897
|
`lib/*.mjs` + `bin/*.mjs`; `test/docs-truth.test.mjs` fails the build if this number
|
|
898
898
|
drifts, which is why it went 18 → 41 → 46 → 52 → 53 → 57 → 60 → 61 → 62 → 65 → 66 → 69 → 70 → 71 → 72 → 73 → 80 → 84 → 90 → 100 → 101 → 102 → 103 → 107 → 108 → 111 as modules landed (111 = the three that were WRITTEN and imported by nothing — `python.mjs`, `cache-floor.mjs`, `plan-coherence.mjs`; 108 = `warm-provider.mjs`, which keeps a session on the upstream that holds its prompt cache; 107 = `login.mjs`, the command that stores an Acuvo credential — until it existed, `writeAccount` was called by nothing and every user fell through to BYOK). ⚠️ Two of those three landed on this count while remaining UNREACHABLE, which is the sharpest illustration this document has that a file count is a claim about bytes, never about capability. ⭐ A
|
package/lib/self-update.mjs
CHANGED
|
@@ -28,8 +28,22 @@ import { accountDir } from './account.mjs';
|
|
|
28
28
|
|
|
29
29
|
export const PACKAGE_NAME = 'acuvo-code';
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* How long between registry checks.
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ WAS 24 HOURS, AND THAT NUMBER COST US FIVE ROUNDS OF A BUG REPORT.
|
|
35
|
+
* Measured on Roman's machine 2026-08-22: the cache read
|
|
36
|
+
* `{"at":13:47,"latest":"0.2.1"}`. It was correct when written. Four hours
|
|
37
|
+
* later 0.6.5 was out, and his install would not look again until the
|
|
38
|
+
* following afternoon — so three consecutive fixes to the opening screen were
|
|
39
|
+
* invisible to him and he kept reporting a defect that had already been fixed
|
|
40
|
+
* twice. "Users get updates as soon as we ship" was false by up to a day.
|
|
41
|
+
*
|
|
42
|
+
* ⭐ Six hours, so a fix shipped in the morning lands the same working day.
|
|
43
|
+
* The registry call is one HTTP request with a 3s timeout, at EXIT — four a
|
|
44
|
+
* day is not rude, and being a day stale on a young product is expensive.
|
|
45
|
+
*/
|
|
46
|
+
export const CHECK_INTERVAL_MS = 6 * 60 * 60 * 1000;
|
|
33
47
|
|
|
34
48
|
/**
|
|
35
49
|
* Compare two semver-ish strings.
|
|
@@ -96,7 +110,22 @@ export async function checkForUpdate({
|
|
|
96
110
|
force = false,
|
|
97
111
|
} = {}) {
|
|
98
112
|
const cached = readCache(cachePath);
|
|
99
|
-
|
|
113
|
+
/**
|
|
114
|
+
* ── ⭐⭐⭐ A CACHE THAT CLAIMS AN OLDER VERSION IS "LATEST" IS PROVABLY WRONG
|
|
115
|
+
*
|
|
116
|
+
* If we are RUNNING 0.6.2 and the cache says the newest published version is
|
|
117
|
+
* 0.2.1, then the cache is stale — no reasoning about clocks required, it is
|
|
118
|
+
* contradicted by the file we are executing from. This is exactly the state
|
|
119
|
+
* Roman's machine was in: he had manually installed a newer build, which left
|
|
120
|
+
* a throttle entry insisting on a version four minors behind it, and that
|
|
121
|
+
* entry then suppressed every check for the rest of the day.
|
|
122
|
+
*
|
|
123
|
+
* ⭐ It costs one comparison and it converts the worst failure mode of a
|
|
124
|
+
* throttle — silently pinning somebody to an answer that is already known to
|
|
125
|
+
* be wrong — into a single extra HTTP request.
|
|
126
|
+
*/
|
|
127
|
+
const cacheIsStale = cached && compareVersions(current, cached.latest) > 0;
|
|
128
|
+
if (!force && !cacheIsStale && cached && now() - (cached.at ?? 0) < intervalMs) {
|
|
100
129
|
return { latest: cached.latest ?? current, isNewer: compareVersions(cached.latest, current) > 0, checked: false };
|
|
101
130
|
}
|
|
102
131
|
|