deepline 0.3.220 → 0.3.221
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/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +15 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +61 -4
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
|
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
|
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
202
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
203
|
-
version: '0.3.
|
|
203
|
+
version: '0.3.221',
|
|
204
204
|
updateSummary:
|
|
205
205
|
'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
|
|
206
206
|
packageCapabilities: {
|
|
@@ -96,7 +96,8 @@ export function runtimeImageManifestExists(
|
|
|
96
96
|
throw new Error('Fly registry manifest probe exhausted without a result.');
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
// Registry reachability outages can outlast three bounded auth requests.
|
|
100
|
+
export const FLY_REGISTRY_AUTH_ATTEMPTS = 5;
|
|
100
101
|
const FLY_REGISTRY_AUTH_RETRY_DELAY_MS = 1_500;
|
|
101
102
|
|
|
102
103
|
/**
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts
CHANGED
|
@@ -351,12 +351,14 @@ const HEARTBEAT_CLAIM_TIMEOUT_SECONDS = RUNTIME_CLAIM_LEASE_SECONDS;
|
|
|
351
351
|
*/
|
|
352
352
|
export const ABSURD_IDLE_POLL_INTERVAL_SECONDS = 30;
|
|
353
353
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* may add latency but must not invent a terminal result outside that policy.
|
|
354
|
+
* Worker modes that intentionally have no wake hook keep a fast durable poll.
|
|
355
|
+
* Active lanes with an election hook use the slower standby cadence below
|
|
356
|
+
* when they are not the elected listener.
|
|
358
357
|
*/
|
|
359
358
|
export const ABSURD_WAKE_UNAVAILABLE_POLL_INTERVAL_MS = 1_000;
|
|
359
|
+
/** A standby lane still discovers new work durably if its elected listener is unavailable. */
|
|
360
|
+
export const ABSURD_ACTIVE_STANDBY_POLL_INTERVAL_MS =
|
|
361
|
+
ABSURD_IDLE_POLL_INTERVAL_SECONDS * 1000;
|
|
360
362
|
/**
|
|
361
363
|
* An adopted (retired) lane is served by durable polling only. Its parked
|
|
362
364
|
* sleeps and event waits already tolerate the adoption rotation (minutes), so
|
|
@@ -5681,8 +5683,8 @@ export function selectAbsurdAdoptionQueues(input: {
|
|
|
5681
5683
|
*
|
|
5682
5684
|
* - No `onWake`: an adopted queue never opens a direct LISTEN session (see
|
|
5683
5685
|
* `ABSURD_ADOPTED_LANE_POLL_INTERVAL_MS`).
|
|
5684
|
-
* - `idlePollFallbackMs` is the 30-second durable bound
|
|
5685
|
-
*
|
|
5686
|
+
* - `idlePollFallbackMs` is the same 30-second durable bound used by active
|
|
5687
|
+
* lanes waiting for their elected listener.
|
|
5686
5688
|
* - `nextPollDelayMs` still shortens the wait to the lane's next indexed due
|
|
5687
5689
|
* transition, so an already-due parked wake is claimed on the next pass.
|
|
5688
5690
|
*/
|
|
@@ -7066,8 +7068,9 @@ export type AbsurdWorkerWakeHook = ((
|
|
|
7066
7068
|
export function resolveAbsurdIdlePollFallbackMs(
|
|
7067
7069
|
onWake: AbsurdWorkerWakeHook | undefined,
|
|
7068
7070
|
): number | null {
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
+
if (onWake?.isListening() === true) return null;
|
|
7072
|
+
return onWake
|
|
7073
|
+
? ABSURD_ACTIVE_STANDBY_POLL_INTERVAL_MS
|
|
7071
7074
|
: ABSURD_WAKE_UNAVAILABLE_POLL_INTERVAL_MS;
|
|
7072
7075
|
}
|
|
7073
7076
|
|
|
@@ -7301,9 +7304,10 @@ export async function startRuntimeWorkerHost(
|
|
|
7301
7304
|
if (!nextDue.dueAt) return null;
|
|
7302
7305
|
return nextDue.dueAt.getTime() - Date.now();
|
|
7303
7306
|
}),
|
|
7304
|
-
// Once this lane is the elected healthy listener,
|
|
7305
|
-
//
|
|
7306
|
-
//
|
|
7307
|
+
// Once this lane is the elected healthy listener, a transactional NOTIFY
|
|
7308
|
+
// wakes it. Standby/down lanes use a 30-second safety poll to avoid
|
|
7309
|
+
// repeating empty claims on every worker; the indexed next-due read still
|
|
7310
|
+
// shortens the wait for known deadlines.
|
|
7307
7311
|
idlePollFallbackMs: () => resolveAbsurdIdlePollFallbackMs(onWake),
|
|
7308
7312
|
onWake,
|
|
7309
7313
|
fatalOnLeaseTimeout: false,
|
|
@@ -327,6 +327,7 @@ type PoolAdmissionWaiter = {
|
|
|
327
327
|
* burst of executor-token lookups into starvation for new durable launches.
|
|
328
328
|
*/
|
|
329
329
|
const MAX_CONSECUTIVE_CRITICAL_ADMISSIONS = 1;
|
|
330
|
+
const ADMISSION_REJECTION_LOG_INTERVAL_MS = 10_000;
|
|
330
331
|
|
|
331
332
|
/**
|
|
332
333
|
* Keep priority outside `pg.Pool`: once pg-pool owns a checkout request it is
|
|
@@ -393,6 +394,10 @@ export class RuntimeSchedulerPoolAdmission {
|
|
|
393
394
|
return this.#waiting.ordinary.length + this.#waiting.critical.length;
|
|
394
395
|
}
|
|
395
396
|
|
|
397
|
+
get activeCount(): number {
|
|
398
|
+
return this.#active;
|
|
399
|
+
}
|
|
400
|
+
|
|
396
401
|
#grant(): () => void {
|
|
397
402
|
this.#active += 1;
|
|
398
403
|
let released = false;
|
|
@@ -429,6 +434,10 @@ type PoolEntry = {
|
|
|
429
434
|
maxClients: number;
|
|
430
435
|
maxAcquireQueueDepth: number;
|
|
431
436
|
admission: RuntimeSchedulerPoolAdmission;
|
|
437
|
+
admissionRejectionLog?: {
|
|
438
|
+
lastLoggedAt: number | null;
|
|
439
|
+
suppressedRejections: number;
|
|
440
|
+
};
|
|
432
441
|
breaker: BreakerState;
|
|
433
442
|
stats: {
|
|
434
443
|
acquires: number;
|
|
@@ -585,6 +594,39 @@ function recordCapacityRejection(entry: PoolEntry, error: unknown): void {
|
|
|
585
594
|
});
|
|
586
595
|
}
|
|
587
596
|
|
|
597
|
+
function recordAdmissionSaturation(
|
|
598
|
+
entry: PoolEntry,
|
|
599
|
+
priority: RuntimeSchedulerPoolPriority,
|
|
600
|
+
waitMs: number,
|
|
601
|
+
): void {
|
|
602
|
+
entry.stats.saturationRejections += 1;
|
|
603
|
+
const now = Date.now();
|
|
604
|
+
const logState = (entry.admissionRejectionLog ??= {
|
|
605
|
+
lastLoggedAt: null,
|
|
606
|
+
suppressedRejections: 0,
|
|
607
|
+
});
|
|
608
|
+
if (
|
|
609
|
+
logState.lastLoggedAt !== null &&
|
|
610
|
+
now - logState.lastLoggedAt < ADMISSION_REJECTION_LOG_INTERVAL_MS
|
|
611
|
+
) {
|
|
612
|
+
logState.suppressedRejections += 1;
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
console.warn('[runtime-scheduler-pool.admission_rejected]', {
|
|
617
|
+
stage: 'admission',
|
|
618
|
+
priority,
|
|
619
|
+
waitMs: Math.max(0, waitMs),
|
|
620
|
+
maxClients: entry.maxClients,
|
|
621
|
+
activeOperations: entry.admission.activeCount,
|
|
622
|
+
remainingWaiters: entry.admission.waitingCount,
|
|
623
|
+
maxWaitingClients: entry.maxAcquireQueueDepth,
|
|
624
|
+
suppressedRejectionsSinceLastLog: logState.suppressedRejections,
|
|
625
|
+
});
|
|
626
|
+
logState.lastLoggedAt = now;
|
|
627
|
+
logState.suppressedRejections = 0;
|
|
628
|
+
}
|
|
629
|
+
|
|
588
630
|
function getPoolEntry(options: RuntimeSchedulerPoolOptions): PoolEntry {
|
|
589
631
|
assertRuntimeSchedulerHotPathUrl(options.url);
|
|
590
632
|
const maxClients =
|
|
@@ -799,10 +841,25 @@ export async function withRuntimeSchedulerClient<T>(
|
|
|
799
841
|
);
|
|
800
842
|
const operationStartedAt = performance.now();
|
|
801
843
|
const admissionStartedAt = performance.now();
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
844
|
+
let releaseAdmission: () => void;
|
|
845
|
+
try {
|
|
846
|
+
releaseAdmission = await entry.admission.acquire(
|
|
847
|
+
trace?.priority ?? 'ordinary',
|
|
848
|
+
signal,
|
|
849
|
+
);
|
|
850
|
+
} catch (error) {
|
|
851
|
+
if (
|
|
852
|
+
error instanceof RuntimeSchedulerSaturatedError &&
|
|
853
|
+
!(signal?.aborted && signal.reason === error)
|
|
854
|
+
) {
|
|
855
|
+
recordAdmissionSaturation(
|
|
856
|
+
entry,
|
|
857
|
+
trace?.priority ?? 'ordinary',
|
|
858
|
+
performance.now() - admissionStartedAt,
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
throw error;
|
|
862
|
+
}
|
|
806
863
|
const admissionWaitMs = performance.now() - admissionStartedAt;
|
|
807
864
|
let lastError: unknown = null;
|
|
808
865
|
try {
|
package/dist/cli/index.js
CHANGED
|
@@ -3051,7 +3051,7 @@ var SDK_RELEASE = {
|
|
|
3051
3051
|
// getters keep their established compatibility behavior.
|
|
3052
3052
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3053
3053
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3054
|
-
version: "0.3.
|
|
3054
|
+
version: "0.3.221",
|
|
3055
3055
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
3056
3056
|
packageCapabilities: {
|
|
3057
3057
|
updatePreferences: 1
|
package/dist/cli/index.mjs
CHANGED
|
@@ -3046,7 +3046,7 @@ var SDK_RELEASE = {
|
|
|
3046
3046
|
// getters keep their established compatibility behavior.
|
|
3047
3047
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3048
3048
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3049
|
-
version: "0.3.
|
|
3049
|
+
version: "0.3.221",
|
|
3050
3050
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
3051
3051
|
packageCapabilities: {
|
|
3052
3052
|
updatePreferences: 1
|
package/dist/index.js
CHANGED
|
@@ -864,7 +864,7 @@ var SDK_RELEASE = {
|
|
|
864
864
|
// getters keep their established compatibility behavior.
|
|
865
865
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
866
866
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
867
|
-
version: "0.3.
|
|
867
|
+
version: "0.3.221",
|
|
868
868
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
869
869
|
packageCapabilities: {
|
|
870
870
|
updatePreferences: 1
|
package/dist/index.mjs
CHANGED
|
@@ -768,7 +768,7 @@ var SDK_RELEASE = {
|
|
|
768
768
|
// getters keep their established compatibility behavior.
|
|
769
769
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
770
770
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
771
|
-
version: "0.3.
|
|
771
|
+
version: "0.3.221",
|
|
772
772
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
773
773
|
packageCapabilities: {
|
|
774
774
|
updatePreferences: 1
|
package/dist/release.d.mts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.221";
|
|
153
153
|
readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.221";
|
|
153
153
|
readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.js
CHANGED
|
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
|
|
|
74
74
|
// getters keep their established compatibility behavior.
|
|
75
75
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
76
76
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
77
|
-
version: "0.3.
|
|
77
|
+
version: "0.3.221",
|
|
78
78
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
79
79
|
packageCapabilities: {
|
|
80
80
|
updatePreferences: 1
|
package/dist/release.mjs
CHANGED
|
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
|
|
|
48
48
|
// getters keep their established compatibility behavior.
|
|
49
49
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
50
50
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
51
|
-
version: "0.3.
|
|
51
|
+
version: "0.3.221",
|
|
52
52
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
53
53
|
packageCapabilities: {
|
|
54
54
|
updatePreferences: 1
|