grepmax 0.26.78 → 0.26.80
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.
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "grepmax",
|
|
11
11
|
"source": "./plugins/grepmax",
|
|
12
12
|
"description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
|
|
13
|
-
"version": "0.26.
|
|
13
|
+
"version": "0.26.80",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Robert Owens",
|
|
16
16
|
"email": "robowens@me.com"
|
package/README.md
CHANGED
|
@@ -528,11 +528,11 @@ The package includes a separate prune-only helper with pinned Lance 12 dependenc
|
|
|
528
528
|
|
|
529
529
|
`gmax recover --table /path/to/lancedb/chunks.lance --json` reads the durable recovery receipt without starting a daemon or preparing Python. `--check` samples admission without pruning. `--prune --version <current-version> --cutoff <absolute-ISO-timestamp>` explicitly requests one offline prune. A prior uncertain attempt requires `--acknowledge-uncertain <attempt-id>` after inspection. Recovery never creates/clears quarantine, stops other owners, retries automatically or enables rewriting.
|
|
530
530
|
|
|
531
|
-
Production recovery currently requires macOS, a persistent `autostart-disabled` file in the selected store home, and closed store owners. Recovery uses the shared aggregate resource budget and requires measured OS pressure and healthy kernel pressure. The configured `critical-only` policy permits a known OS memory warning while retaining aggregate accounting; the default `strict` policy pauses on warnings. Immediately free RAM is measured for diagnostics but has no fixed minimum: macOS can reclaim cached memory, so a low free-page count alone must not prevent cleanup. The helper reserves 512 MiB of admission capacity; this is not an OS-enforced footprint cap. Recovery samples have an eight-second total ceiling, including
|
|
531
|
+
Production recovery currently requires macOS, a persistent `autostart-disabled` file in the selected store home, and closed store owners. Recovery uses the shared aggregate resource budget and requires measured OS pressure and healthy kernel pressure. The configured `critical-only` policy permits a known OS memory warning while retaining aggregate accounting; the default `strict` policy pauses on warnings. Immediately free RAM is measured for diagnostics but has no fixed minimum: macOS can reclaim cached memory, so a low free-page count alone must not prevent cleanup. The helper reserves 512 MiB of admission capacity; this is not an OS-enforced footprint cap. Recovery samples have an eight-second total ceiling, including a five-second kernel probe allowance, three-second command allowance and three-second footprint allowance, with fresh sampling at deletion admission and five-second heartbeat scheduling. Unknown, stale, critical, kernel-warning or over-budget measurements refuse/interrupt recovery. A prune has a ten-minute wall-time ceiling so rate-limited deletion of thousands of manifests can finish; the 90-second CPU limit and guarded heartbeat remain. Pruning needs at least 1 MiB of measured metadata disk headroom, not full-table rewrite space. Initial wheel setup requires 512 MiB; an existing environment is checked against the lock offline without that download-space requirement.
|
|
532
532
|
|
|
533
533
|
The child waits for launch and deletion admission tokens, with verified helper PID/start identity recorded as the primary exclusive owner. Existing readers retain exclusion if the parent dies while the helper is alive. Current/tagged/post-cutoff metadata is verified after pruning; recovery refuses more than 256 protected versions before deletion to bound verification. Interrupted attempts require verification and explicit acknowledgement before retry. Linux/APFS fixtures exercise native retention and interruption; supported production host admission is tested separately and still runs freshly for each operation.
|
|
534
534
|
|
|
535
|
-
If a short-lived client child exits during memory sampling, confirmed dead processes can leave the sample while all surviving processes retain measured footprints. An uncertain exit, new process or changed identity requires a complete fresh measurement; a
|
|
535
|
+
If a short-lived client child exits during memory sampling, confirmed dead processes can leave the sample while all surviving processes retain measured footprints. An uncertain exit, new process or changed identity requires a complete fresh measurement; a recovery sample may do that once within the original deadline while retaining any observed OS warning for the final policy check. Normal service requires normal pressure for this retry. It never accepts an unmeasured live process. Continued changes, unavailable measurements and critical pressure still refuse admission; warning admission follows the recovery policy above.
|
|
536
536
|
|
|
537
537
|
For an operator-coordinated recovery window:
|
|
538
538
|
|
|
@@ -56,6 +56,9 @@ const store_lease_1 = require("./store-lease");
|
|
|
56
56
|
const project = path.resolve(__dirname, "../../../lance-maintenance");
|
|
57
57
|
const MAX_OUTPUT_BYTES = 128 * 1024;
|
|
58
58
|
const MAX_HELPER_MS = 120000;
|
|
59
|
+
// Pruning deletes at 32 files/second. Thousands of retained manifests and
|
|
60
|
+
// transactions cannot fit a two-minute window even with an idle host.
|
|
61
|
+
const MAX_PRUNE_MS = 600000;
|
|
59
62
|
/** No shell, inherited service credentials, Python path hooks or source builds.
|
|
60
63
|
* Thread settings apply before Arrow/Lance imports in the child. */
|
|
61
64
|
function helperEnvironment() {
|
|
@@ -104,7 +107,7 @@ function runCleanupProcess(executable, args, options = {}) {
|
|
|
104
107
|
forceKill !== null && forceKill !== void 0 ? forceKill : (forceKill = setTimeout(() => child.kill("SIGKILL"), 1000));
|
|
105
108
|
};
|
|
106
109
|
const abort = () => stop("Cleanup cancelled");
|
|
107
|
-
const timeout = setTimeout(() => stop("Cleanup timed out"), Math.min((_d = options.timeoutMs) !== null && _d !== void 0 ? _d : MAX_HELPER_MS,
|
|
110
|
+
const timeout = setTimeout(() => stop("Cleanup timed out"), Math.min((_d = options.timeoutMs) !== null && _d !== void 0 ? _d : MAX_HELPER_MS, MAX_PRUNE_MS));
|
|
108
111
|
(_a = options.signal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abort, { once: true });
|
|
109
112
|
// stderr is deliberately not returned: child diagnostics may contain paths,
|
|
110
113
|
// tokens or registry URLs. Retain a concrete bounded exit/signal/error code.
|
|
@@ -360,6 +363,7 @@ function pruneVersions(runtime, store, version, cutoff, options) {
|
|
|
360
363
|
"--require-admission",
|
|
361
364
|
], {
|
|
362
365
|
signal: options.signal,
|
|
366
|
+
timeoutMs: MAX_PRUNE_MS,
|
|
363
367
|
admission: {
|
|
364
368
|
nonce: options.lease.owner.nonce,
|
|
365
369
|
start: (pid) => {
|
|
@@ -55,7 +55,15 @@ function createRecoveryBudget() {
|
|
|
55
55
|
allowMemoryWarning: () => (0, host_guard_policy_1.hostGuardPolicy)() === "critical-only",
|
|
56
56
|
quarantine: safety_latch_1.safetyStopReason,
|
|
57
57
|
requireClientRegistration: false,
|
|
58
|
-
samplerOverrides: {
|
|
58
|
+
samplerOverrides: {
|
|
59
|
+
sampleTimeoutMs: 8000,
|
|
60
|
+
kernelProbeTimeoutMs: 5000,
|
|
61
|
+
commandProbeTimeoutMs: 3000,
|
|
62
|
+
footprintProbeTimeoutMs: 3000,
|
|
63
|
+
// Re-measure a changing cohort while retaining warning severity. The
|
|
64
|
+
// fresh policy check above still decides whether that warning is allowed.
|
|
65
|
+
retryWarningPressure: true,
|
|
66
|
+
},
|
|
59
67
|
sampleMaxAgeMs: 10000,
|
|
60
68
|
});
|
|
61
69
|
}
|
|
@@ -134,13 +134,20 @@ function sampleHostResources(extraPids = [], overrides = {}, extraGroups = []) {
|
|
|
134
134
|
const monotonic = (_a = overrides.monotonic) !== null && _a !== void 0 ? _a : (() => performance.now());
|
|
135
135
|
const deadline = monotonic() + ((_b = overrides.sampleTimeoutMs) !== null && _b !== void 0 ? _b : exports.HOST_SAMPLE_TIMEOUT_MS);
|
|
136
136
|
let snapshot;
|
|
137
|
+
let observedWarning = false;
|
|
137
138
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
138
139
|
snapshot = sampleHostResourcesOnce(extraPids, Object.assign(Object.assign({}, overrides), { monotonic, sampleTimeoutMs: Math.max(0, deadline - monotonic()) }), extraGroups);
|
|
140
|
+
observedWarning || (observedWarning = snapshot.memoryPressure === "warn");
|
|
141
|
+
// A fresh complete cohort may retain an observed warning; retrying must
|
|
142
|
+
// never downgrade it to normal or weaken the caller's final policy check.
|
|
143
|
+
if (observedWarning && snapshot.memoryPressure === "normal")
|
|
144
|
+
snapshot.memoryPressure = "warn";
|
|
139
145
|
// Short-lived client children routinely exit during footprint sampling.
|
|
140
146
|
// Re-measure the entire cohort once, within the original deadline. Never
|
|
141
|
-
// accept a partial total or
|
|
147
|
+
// accept a partial total or downgrade observed warning/critical pressure.
|
|
142
148
|
if (attempt === 1 ||
|
|
143
|
-
snapshot.memoryPressure !== "normal"
|
|
149
|
+
(snapshot.memoryPressure !== "normal" &&
|
|
150
|
+
!(overrides.retryWarningPressure && snapshot.memoryPressure === "warn")) ||
|
|
144
151
|
snapshot.kernelPressure !== "ok" ||
|
|
145
152
|
snapshot.incompleteReasons.length !== 1 ||
|
|
146
153
|
snapshot.incompleteReasons[0] !==
|
|
@@ -163,7 +170,7 @@ function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
|
|
|
163
170
|
return false;
|
|
164
171
|
throw new Error("process liveness unavailable");
|
|
165
172
|
}
|
|
166
|
-
}, sampleTimeoutMs: exports.HOST_SAMPLE_TIMEOUT_MS, kernelProbeTimeoutMs: 500, run: (command, args, timeoutMs) => (0, node_child_process_1.execFileSync)(command, args, {
|
|
173
|
+
}, sampleTimeoutMs: exports.HOST_SAMPLE_TIMEOUT_MS, kernelProbeTimeoutMs: 500, commandProbeTimeoutMs: 500, footprintProbeTimeoutMs: 1500, retryWarningPressure: false, run: (command, args, timeoutMs) => (0, node_child_process_1.execFileSync)(command, args, {
|
|
167
174
|
encoding: "utf8",
|
|
168
175
|
timeout: timeoutMs,
|
|
169
176
|
maxBuffer: 512 * 1024,
|
|
@@ -185,7 +192,7 @@ function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
|
|
|
185
192
|
if (deps.platform !== "darwin")
|
|
186
193
|
return snapshot;
|
|
187
194
|
const deadline = deps.monotonic() + deps.sampleTimeoutMs;
|
|
188
|
-
const run = (command, args, maximumMs =
|
|
195
|
+
const run = (command, args, maximumMs = deps.commandProbeTimeoutMs) => {
|
|
189
196
|
const remaining = Math.floor(deadline - deps.monotonic());
|
|
190
197
|
if (remaining <= 0)
|
|
191
198
|
throw new Error("resource sample deadline exceeded");
|
|
@@ -222,7 +229,7 @@ function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
|
|
|
222
229
|
const footprints = parseBatchFootprints(run("footprint", [
|
|
223
230
|
"--noCategories",
|
|
224
231
|
...snapshot.processes.flatMap((p) => ["-p", String(p.pid)]),
|
|
225
|
-
],
|
|
232
|
+
], deps.footprintProbeTimeoutMs));
|
|
226
233
|
for (const p of snapshot.processes)
|
|
227
234
|
p.footprintMb = (_c = footprints.get(p.pid)) !== null && _c !== void 0 ? _c : null;
|
|
228
235
|
const after = parseResourceProcesses(run("ps", PS_ARGS), deps.uid, deps.pid, extraPids, extraGroups);
|
package/package.json
CHANGED