grepmax 0.26.78 → 0.26.79

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.78",
13
+ "version": "0.26.79",
14
14
  "author": {
15
15
  "name": "Robert Owens",
16
16
  "email": "robowens@me.com"
package/README.md CHANGED
@@ -528,7 +528,7 @@ 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 the established five-second kernel probe allowance, with fresh sampling at deletion admission and five-second heartbeat scheduling. Unknown, stale, critical, kernel-warning or over-budget measurements refuse/interrupt recovery. 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.
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
 
@@ -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, 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,12 @@ 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: { sampleTimeoutMs: 8000, kernelProbeTimeoutMs: 5000 },
58
+ samplerOverrides: {
59
+ sampleTimeoutMs: 8000,
60
+ kernelProbeTimeoutMs: 5000,
61
+ commandProbeTimeoutMs: 3000,
62
+ footprintProbeTimeoutMs: 3000,
63
+ },
59
64
  sampleMaxAgeMs: 10000,
60
65
  });
61
66
  }
@@ -163,7 +163,7 @@ function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
163
163
  return false;
164
164
  throw new Error("process liveness unavailable");
165
165
  }
166
- }, sampleTimeoutMs: exports.HOST_SAMPLE_TIMEOUT_MS, kernelProbeTimeoutMs: 500, run: (command, args, timeoutMs) => (0, node_child_process_1.execFileSync)(command, args, {
166
+ }, sampleTimeoutMs: exports.HOST_SAMPLE_TIMEOUT_MS, kernelProbeTimeoutMs: 500, commandProbeTimeoutMs: 500, footprintProbeTimeoutMs: 1500, run: (command, args, timeoutMs) => (0, node_child_process_1.execFileSync)(command, args, {
167
167
  encoding: "utf8",
168
168
  timeout: timeoutMs,
169
169
  maxBuffer: 512 * 1024,
@@ -185,7 +185,7 @@ function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
185
185
  if (deps.platform !== "darwin")
186
186
  return snapshot;
187
187
  const deadline = deps.monotonic() + deps.sampleTimeoutMs;
188
- const run = (command, args, maximumMs = 500) => {
188
+ const run = (command, args, maximumMs = deps.commandProbeTimeoutMs) => {
189
189
  const remaining = Math.floor(deadline - deps.monotonic());
190
190
  if (remaining <= 0)
191
191
  throw new Error("resource sample deadline exceeded");
@@ -222,7 +222,7 @@ function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
222
222
  const footprints = parseBatchFootprints(run("footprint", [
223
223
  "--noCategories",
224
224
  ...snapshot.processes.flatMap((p) => ["-p", String(p.pid)]),
225
- ], 1500));
225
+ ], deps.footprintProbeTimeoutMs));
226
226
  for (const p of snapshot.processes)
227
227
  p.footprintMb = (_c = footprints.get(p.pid)) !== null && _c !== void 0 ? _c : null;
228
228
  const after = parseResourceProcesses(run("ps", PS_ARGS), deps.uid, deps.pid, extraPids, extraGroups);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.26.78",
3
+ "version": "0.26.79",
4
4
  "author": "Robert Owens <78518764+reowens@users.noreply.github.com>",
5
5
  "homepage": "https://github.com/reowens/grepmax",
6
6
  "bugs": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.26.78",
3
+ "version": "0.26.79",
4
4
  "description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
5
5
  "author": {
6
6
  "name": "Robert Owens",