@ttt-productions/ttt-core 0.79.56 → 0.79.57

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.
@@ -36,4 +36,14 @@ export declare const HALL_MEDIA_REAPER_BACKOFF_MAX_MS: number;
36
36
  * signal to stop and report, not to keep growing the list.
37
37
  */
38
38
  export declare const HALL_MEDIA_REAPER_MAX_DEFERRED = 50;
39
+ /**
40
+ * How long the copy-intent sweep holds a claim on an intent. Claiming moves the intent to
41
+ * `reaping` and stamps `reapClaimedAt`, and that stamp is the claim's fencing token. Once the claim
42
+ * is this old it has expired: a later sweep may take the intent over and re-stamp it, and the copy
43
+ * path may take the `reaping` intent back to `copying`. It must far exceed the timeout of the
44
+ * reaper function `reapOrphanedHallMediaCopies` (300 s), so a live pass never loses its claim, and
45
+ * stay far below the retry budget of the publish trigger `onThresholdItemReviewed` (about a day),
46
+ * so a publish stranded behind an abandoned claim always recovers inside it.
47
+ */
48
+ export declare const HALL_MEDIA_REAPER_CLAIM_LEASE_MS: number;
39
49
  //# sourceMappingURL=scheduled-jobs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled-jobs.d.ts","sourceRoot":"","sources":["../../src/constants/scheduled-jobs.ts"],"names":[],"mappings":"AAIA,oEAAoE;AACpE,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,uEAAuE;AACvE,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAIpD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,QAA2B,CAAC;AAEnE;6BAC6B;AAC7B,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,QAAsB,CAAC;AACrE,eAAO,MAAM,gCAAgC,QAA2B,CAAC;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC"}
1
+ {"version":3,"file":"scheduled-jobs.d.ts","sourceRoot":"","sources":["../../src/constants/scheduled-jobs.ts"],"names":[],"mappings":"AAIA,oEAAoE;AACpE,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,uEAAuE;AACvE,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAIpD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,QAA2B,CAAC;AAEnE;6BAC6B;AAC7B,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,QAAsB,CAAC;AACrE,eAAO,MAAM,gCAAgC,QAA2B,CAAC;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,QAAiB,CAAC"}
@@ -39,4 +39,14 @@ export const HALL_MEDIA_REAPER_BACKOFF_MAX_MS = 14 * 24 * 60 * 60 * 1000;
39
39
  * signal to stop and report, not to keep growing the list.
40
40
  */
41
41
  export const HALL_MEDIA_REAPER_MAX_DEFERRED = 50;
42
+ /**
43
+ * How long the copy-intent sweep holds a claim on an intent. Claiming moves the intent to
44
+ * `reaping` and stamps `reapClaimedAt`, and that stamp is the claim's fencing token. Once the claim
45
+ * is this old it has expired: a later sweep may take the intent over and re-stamp it, and the copy
46
+ * path may take the `reaping` intent back to `copying`. It must far exceed the timeout of the
47
+ * reaper function `reapOrphanedHallMediaCopies` (300 s), so a live pass never loses its claim, and
48
+ * stay far below the retry budget of the publish trigger `onThresholdItemReviewed` (about a day),
49
+ * so a publish stranded behind an abandoned claim always recovers inside it.
50
+ */
51
+ export const HALL_MEDIA_REAPER_CLAIM_LEASE_MS = 60 * 60 * 1000;
42
52
  //# sourceMappingURL=scheduled-jobs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled-jobs.js","sourceRoot":"","sources":["../../src/constants/scheduled-jobs.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,6BAA6B;AAE7B,oEAAoE;AACpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAE9C,wEAAwE;AACxE,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,uEAAuE;AACvE,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAEpD,mCAAmC;AAEnC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnE;6BAC6B;AAC7B,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACrE,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC","sourcesContent":["// Scheduled-job intervals, batch sizes, and source URLs.\n\n// --- Admin task cleanup ---\n\n/** Interval in minutes for the admin-task cleanup scheduled job. */\nexport const ADMIN_TASK_CLEANUP_INTERVAL = 15;\n\n/** Batch size of expired task checkouts processed per scheduled run. */\nexport const ADMIN_TASK_EXPIRED_BATCH_SIZE = 500;\n\n/** Safety cap on iterations within a single admin-task cleanup run. */\nexport const ADMIN_TASK_CLEANUP_MAX_ITERATIONS = 10;\n\n// --- Hall-media orphan reaper ---\n\n/**\n * How long Hall-media copies are left alone before the orphan reaper may reclaim them — both a\n * Hall-owned asset (asset phase, measured from its `createdAt`) and the objects a copy intent\n * names (copy-intent phase: recording sets the intent's `reapAfter` this far out). It must exceed\n * the longest retry window of the publish trigger `onThresholdItemReviewed` (about a day), since\n * a pending retry re-derives the same deterministic copy and attaches its bytes. It also leaves a\n * publish that parked partway time to be unwound, resubmitted, and re-driven onto the same\n * destination while its earlier objects are still there to reuse.\n */\nexport const HALL_MEDIA_ORPHAN_GRACE_MS = 14 * 24 * 60 * 60 * 1000;\n\n/** Most candidates each reaper phase takes up per pass: assets in the asset phase, due intents in\n * the copy-intent phase. */\nexport const HALL_MEDIA_REAPER_PAGE_SIZE = 100;\n\n/**\n * Deferral backoff for both reaper phases — a copy intent the sweep cannot finish yet\n * (`reapAttemptCount`) and an asset-phase candidate it cannot positively clear (a cursor\n * `deferred` entry's `attemptCount`). With `n` the count after the deferral that is being\n * scheduled, the item is next due `min(BASE × 2^(n−1), MAX)` from now: 1, 2, 4, 8, then 14 days\n * from there on. The base is the reaper's daily cadence, since any shorter delay is simply the\n * next pass; the cap bounds how long a released hold or a recovered read waits to be noticed.\n */\nexport const HALL_MEDIA_REAPER_BACKOFF_BASE_MS = 24 * 60 * 60 * 1000;\nexport const HALL_MEDIA_REAPER_BACKOFF_MAX_MS = 14 * 24 * 60 * 60 * 1000;\n\n/**\n * Most asset-phase candidates the Hall-media orphan reaper holds in its cursor's `deferred`\n * set. Every pass retries the entries that are due, each retry re-reading the candidate and its\n * owning Hall item, so the bound keeps that work to half of a HALL_MEDIA_REAPER_PAGE_SIZE page on\n * top of the pass's own page, and keeps the singleton cursor doc a few kilobytes. A candidate the\n * reaper cannot positively clear is rare, so a full set means something systemic is failing — the\n * signal to stop and report, not to keep growing the list.\n */\nexport const HALL_MEDIA_REAPER_MAX_DEFERRED = 50;\n"]}
1
+ {"version":3,"file":"scheduled-jobs.js","sourceRoot":"","sources":["../../src/constants/scheduled-jobs.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,6BAA6B;AAE7B,oEAAoE;AACpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAE9C,wEAAwE;AACxE,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,uEAAuE;AACvE,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAEpD,mCAAmC;AAEnC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnE;6BAC6B;AAC7B,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACrE,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC","sourcesContent":["// Scheduled-job intervals, batch sizes, and source URLs.\n\n// --- Admin task cleanup ---\n\n/** Interval in minutes for the admin-task cleanup scheduled job. */\nexport const ADMIN_TASK_CLEANUP_INTERVAL = 15;\n\n/** Batch size of expired task checkouts processed per scheduled run. */\nexport const ADMIN_TASK_EXPIRED_BATCH_SIZE = 500;\n\n/** Safety cap on iterations within a single admin-task cleanup run. */\nexport const ADMIN_TASK_CLEANUP_MAX_ITERATIONS = 10;\n\n// --- Hall-media orphan reaper ---\n\n/**\n * How long Hall-media copies are left alone before the orphan reaper may reclaim them — both a\n * Hall-owned asset (asset phase, measured from its `createdAt`) and the objects a copy intent\n * names (copy-intent phase: recording sets the intent's `reapAfter` this far out). It must exceed\n * the longest retry window of the publish trigger `onThresholdItemReviewed` (about a day), since\n * a pending retry re-derives the same deterministic copy and attaches its bytes. It also leaves a\n * publish that parked partway time to be unwound, resubmitted, and re-driven onto the same\n * destination while its earlier objects are still there to reuse.\n */\nexport const HALL_MEDIA_ORPHAN_GRACE_MS = 14 * 24 * 60 * 60 * 1000;\n\n/** Most candidates each reaper phase takes up per pass: assets in the asset phase, due intents in\n * the copy-intent phase. */\nexport const HALL_MEDIA_REAPER_PAGE_SIZE = 100;\n\n/**\n * Deferral backoff for both reaper phases — a copy intent the sweep cannot finish yet\n * (`reapAttemptCount`) and an asset-phase candidate it cannot positively clear (a cursor\n * `deferred` entry's `attemptCount`). With `n` the count after the deferral that is being\n * scheduled, the item is next due `min(BASE × 2^(n−1), MAX)` from now: 1, 2, 4, 8, then 14 days\n * from there on. The base is the reaper's daily cadence, since any shorter delay is simply the\n * next pass; the cap bounds how long a released hold or a recovered read waits to be noticed.\n */\nexport const HALL_MEDIA_REAPER_BACKOFF_BASE_MS = 24 * 60 * 60 * 1000;\nexport const HALL_MEDIA_REAPER_BACKOFF_MAX_MS = 14 * 24 * 60 * 60 * 1000;\n\n/**\n * Most asset-phase candidates the Hall-media orphan reaper holds in its cursor's `deferred`\n * set. Every pass retries the entries that are due, each retry re-reading the candidate and its\n * owning Hall item, so the bound keeps that work to half of a HALL_MEDIA_REAPER_PAGE_SIZE page on\n * top of the pass's own page, and keeps the singleton cursor doc a few kilobytes. A candidate the\n * reaper cannot positively clear is rare, so a full set means something systemic is failing — the\n * signal to stop and report, not to keep growing the list.\n */\nexport const HALL_MEDIA_REAPER_MAX_DEFERRED = 50;\n\n/**\n * How long the copy-intent sweep holds a claim on an intent. Claiming moves the intent to\n * `reaping` and stamps `reapClaimedAt`, and that stamp is the claim's fencing token. Once the claim\n * is this old it has expired: a later sweep may take the intent over and re-stamp it, and the copy\n * path may take the `reaping` intent back to `copying`. It must far exceed the timeout of the\n * reaper function `reapOrphanedHallMediaCopies` (300 s), so a live pass never loses its claim, and\n * stay far below the retry budget of the publish trigger `onThresholdItemReviewed` (about a day),\n * so a publish stranded behind an abandoned claim always recovers inside it.\n */\nexport const HALL_MEDIA_REAPER_CLAIM_LEASE_MS = 60 * 60 * 1000;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ttt-core",
3
- "version": "0.79.56",
3
+ "version": "0.79.57",
4
4
  "description": "Core types, Firestore path constants, and shared constants for TTT Productions",
5
5
  "repository": {
6
6
  "type": "git",