@greatwait/contracts 0.1.0-alpha.4 → 0.1.0-alpha.5

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.
Files changed (84) hide show
  1. package/README.md +1 -1
  2. package/dist/billing.d.ts +231 -1
  3. package/dist/billing.js +150 -1
  4. package/dist/callback-safety.js +13 -3
  5. package/dist/configuration-bounds.d.ts +13 -0
  6. package/dist/configuration-bounds.js +13 -0
  7. package/dist/effective-limits.d.ts +40 -0
  8. package/dist/effective-limits.js +42 -0
  9. package/dist/endpoints.d.ts +5 -5
  10. package/dist/endpoints.js +5 -5
  11. package/dist/first-value-journey.d.ts +1 -1
  12. package/dist/first-value-journey.js +11 -7
  13. package/dist/forecast.d.ts +111 -21
  14. package/dist/forecast.js +87 -24
  15. package/dist/index.d.ts +5 -4
  16. package/dist/index.js +5 -4
  17. package/dist/mcp.js +1 -1
  18. package/dist/operational-config.d.ts +101 -0
  19. package/dist/operational-config.js +341 -0
  20. package/dist/operations.d.ts +597 -16
  21. package/dist/operations.js +384 -23
  22. package/dist/partition.d.ts +17 -9
  23. package/dist/partition.js +3 -3
  24. package/dist/problems.d.ts +25 -2
  25. package/dist/problems.js +49 -1
  26. package/dist/protocol.d.ts +5 -5
  27. package/dist/protocol.js +2 -1
  28. package/dist/scheduling-records.d.ts +6 -0
  29. package/dist/scheduling.d.ts +37 -1
  30. package/dist/scheduling.js +60 -4
  31. package/dist/usage.js +6 -21
  32. package/generated/v1/examples/attempts.list.response.json +2 -0
  33. package/generated/v1/examples/attempts.read.response.json +2 -0
  34. package/generated/v1/examples/billing.fundingconfirm.response.json +120 -0
  35. package/generated/v1/examples/billing.invoicehistory.response.json +6 -0
  36. package/generated/v1/examples/billing.invoices.response.json +15 -0
  37. package/generated/v1/examples/billing.paymenthistory.response.json +6 -0
  38. package/generated/v1/examples/billing.paymentmethod.response.json +16 -0
  39. package/generated/v1/examples/billing.paymentmethodconfirm.request.json +3 -0
  40. package/generated/v1/examples/billing.paymentmethodconfirm.response.json +16 -0
  41. package/generated/v1/examples/billing.paymentmethodremove.request.json +3 -0
  42. package/generated/v1/examples/billing.paymentmethodremove.response.json +4 -0
  43. package/generated/v1/examples/billing.paymentmethodsetup.request.json +1 -0
  44. package/generated/v1/examples/billing.paymentmethodsetup.response.json +3 -0
  45. package/generated/v1/examples/limits.read.response.json +16 -0
  46. package/generated/v1/examples/occurrences.redeliver.response.json +2 -0
  47. package/generated/v1/first-value-journey.json +24 -8
  48. package/generated/v1/manifest.json +342 -10
  49. package/generated/v1/openapi.json +12395 -6543
  50. package/generated/v1/policy-matrix.json +65 -2
  51. package/generated/v1/schemas/attempts.list.response.json +15 -0
  52. package/generated/v1/schemas/attempts.read.response.json +15 -0
  53. package/generated/v1/schemas/billing.fundingconfirm.response.json +552 -0
  54. package/generated/v1/schemas/billing.invoicehistory.query.json +16 -0
  55. package/generated/v1/schemas/billing.invoicehistory.response.json +88 -0
  56. package/generated/v1/schemas/billing.invoices.response.json +51 -0
  57. package/generated/v1/schemas/billing.ledger.response.json +5 -0
  58. package/generated/v1/schemas/billing.notificationsettingsupdate.request.json +24 -17
  59. package/generated/v1/schemas/billing.paymenthistory.query.json +16 -0
  60. package/generated/v1/schemas/billing.paymenthistory.response.json +182 -0
  61. package/generated/v1/schemas/billing.paymentmethod.response.json +137 -0
  62. package/generated/v1/schemas/billing.paymentmethodconfirm.request.json +14 -0
  63. package/generated/v1/schemas/billing.paymentmethodconfirm.response.json +137 -0
  64. package/generated/v1/schemas/billing.paymentmethodremove.request.json +12 -0
  65. package/generated/v1/schemas/billing.paymentmethodremove.response.json +137 -0
  66. package/generated/v1/schemas/billing.paymentmethodsetup.request.json +12 -0
  67. package/generated/v1/schemas/billing.paymentmethodsetup.response.json +11 -0
  68. package/generated/v1/schemas/billing.purchase.request.json +4 -0
  69. package/generated/v1/schemas/forecast.read.request-headers.json +10 -0
  70. package/generated/v1/schemas/forecast.read.response.json +148 -0
  71. package/generated/v1/schemas/limits.read.response.json +79 -0
  72. package/generated/v1/schemas/occurrences.redeliver.response.json +15 -0
  73. package/generated/v1/snippets/billing.fundingconfirm.json +6 -0
  74. package/generated/v1/snippets/billing.invoicehistory.json +6 -0
  75. package/generated/v1/snippets/billing.invoices.json +6 -0
  76. package/generated/v1/snippets/billing.notificationsettingsupdate.json +1 -1
  77. package/generated/v1/snippets/billing.paymenthistory.json +6 -0
  78. package/generated/v1/snippets/billing.paymentmethod.json +6 -0
  79. package/generated/v1/snippets/billing.paymentmethodconfirm.json +6 -0
  80. package/generated/v1/snippets/billing.paymentmethodremove.json +6 -0
  81. package/generated/v1/snippets/billing.paymentmethodsetup.json +6 -0
  82. package/generated/v1/snippets/forecast.windows.json +1 -1
  83. package/generated/v1/snippets/limits.read.json +6 -0
  84. package/package.json +7 -2
@@ -0,0 +1,101 @@
1
+ /**
2
+ * The single numeric owner for deployment-governed timer, timeout and retry
3
+ * configuration. Values preserve the accepted policy and measured W9 timing
4
+ * budgets; this leaf imports no schemas, application code or database runtime.
5
+ * Change through a reviewed deployment. Retrying a callback, funding operation
6
+ * or idempotency receipt is a public correctness promise, so organizations may
7
+ * not override these values. Original owner modules keep compatible exports.
8
+ */
9
+ export declare const OPERATIONAL_TIMING: Readonly<{
10
+ projectBillingConflictRetryCount: 4;
11
+ projectBillingConflictRetryBaseMs: 250;
12
+ billingNoticeBackoffBaseMs: 60000;
13
+ automaticFundingBackoffBaseMs: 60000;
14
+ controlPlaneBackoffBaseMs: 10;
15
+ postgresConnectionAcquisitionMs: 2900;
16
+ postgresLockMs: 2000;
17
+ postgresStatementMs: 2900;
18
+ postgresTransactionBudgetMs: 2900;
19
+ postgresTransactionMaximumMs: 2999;
20
+ apiMutationStatementMs: 5000;
21
+ apiMutationBudgetMs: 5000;
22
+ apiMutationMaximumMs: 5000;
23
+ controlPlaneWriteStatementMs: 5000;
24
+ controlPlaneWriteBudgetMs: 5000;
25
+ dispatchHedgeAfterMs: 400;
26
+ dispatchHedgeThirdLegMs: 1200;
27
+ apiHedgeAfterMs: 300;
28
+ authorizationReplayDelaysMs: readonly [500, 1500, 4000];
29
+ claimProbeCount: 3;
30
+ claimReclaimCount: 3;
31
+ claimReclaimWindowMs: 1200;
32
+ controlPlaneBackoffCeilingMs: 200;
33
+ controlPlaneConnectMs: 5000;
34
+ conclusionReplayDelaysMs: readonly [250, 1000, 2000, 4000];
35
+ hostFullRetryMs: 1000;
36
+ deliveryRetryBaseMs: readonly [2000, 5000, 15000, 60000];
37
+ deliveryRetryAfterMaximumMs: 3600000;
38
+ wakeReceiptRetryMs: 5000;
39
+ wakeReceiptRecoveryLifetimeMs: number;
40
+ repairOverdueGraceSeconds: 10;
41
+ admissionWindowMs: 1000;
42
+ admissionLookaheadMs: 60000;
43
+ admissionHedgeAfterMs: 250;
44
+ admissionRpcBudgetMs: 2999;
45
+ unreachableRetryMs: 5000;
46
+ heldResponseStepMarginMs: 20000;
47
+ sendLeaseMarginSeconds: 12;
48
+ sendSettlementReserveMs: 7000;
49
+ exhaustedClaimRetryMs: 250;
50
+ retentionCadenceMs: number;
51
+ retentionBacklogCadenceMs: number;
52
+ retentionRetryHandoffCount: 5;
53
+ timerSignalRetryDelaysMs: readonly number[];
54
+ dispatchWarmHorizonMs: 10000;
55
+ sdkAutoRetryCount: 3;
56
+ sdkAutoRetryBaseMs: 250;
57
+ sdkAutoRetryMaximumWaitMs: 30000;
58
+ callbackMiddlewareLeaseMs: 30000;
59
+ automaticFundingSuccessCooldownMs: number;
60
+ automaticFundingClaimLeaseMs: number;
61
+ automaticFundingBackoffMaximumMs: number;
62
+ providerCreateFenceMs: number;
63
+ fundingUnresolvedAfterMs: number;
64
+ fundingRepairMs: number;
65
+ fundingActionRequiredRepairMs: number;
66
+ fundingDisputeRepairMs: number;
67
+ billingNoticeBackoffMaximumMs: 86400000;
68
+ billingNoticeClaimMaximumMs: number;
69
+ billingNoticeRetryMaximumMs: number;
70
+ billingNoticeCatchUpRetryCount: 5;
71
+ billingNoticeClaimSeconds: number;
72
+ fundingDiscoveryClaimMs: number;
73
+ fundingDiscoveryRetryMaximumMs: number;
74
+ fundingDiscoveryClaimMaximumMs: number;
75
+ fundingAbandonedAfterMs: number;
76
+ checkoutDiscoverySkewSeconds: 60;
77
+ checkoutDiscoveryWindowSeconds: number;
78
+ fundingQuoteLifetimeMs: number;
79
+ automaticFundingPreviewLifetimeMs: number;
80
+ testSinkRefreshMs: 3000;
81
+ payloadLintDelayMs: 250;
82
+ payloadParseBudgetMs: 50;
83
+ dashboardQueryStaleMs: 30000;
84
+ forecastRefreshFloorMs: 30000;
85
+ forecastRefreshMaximumMs: 300000;
86
+ forecastCoverageSlackMs: 120000;
87
+ }>;
88
+ export type OperationalTimingKey = keyof typeof OPERATIONAL_TIMING;
89
+ export declare const OPERATIONAL_TIMING_ENFORCEMENT: Readonly<Record<OperationalTimingKey, readonly string[]>>;
90
+ /** Catalog metadata derives its defaults from the numeric owner above. */
91
+ export declare const OPERATIONAL_TIMING_CATALOG: readonly Readonly<{
92
+ key: "operational.projectBillingConflictRetryCount" | "operational.projectBillingConflictRetryBaseMs" | "operational.billingNoticeBackoffBaseMs" | "operational.automaticFundingBackoffBaseMs" | "operational.controlPlaneBackoffBaseMs" | "operational.postgresConnectionAcquisitionMs" | "operational.postgresLockMs" | "operational.postgresStatementMs" | "operational.postgresTransactionBudgetMs" | "operational.postgresTransactionMaximumMs" | "operational.apiMutationStatementMs" | "operational.apiMutationBudgetMs" | "operational.apiMutationMaximumMs" | "operational.controlPlaneWriteStatementMs" | "operational.controlPlaneWriteBudgetMs" | "operational.dispatchHedgeAfterMs" | "operational.dispatchHedgeThirdLegMs" | "operational.apiHedgeAfterMs" | "operational.authorizationReplayDelaysMs" | "operational.claimProbeCount" | "operational.claimReclaimCount" | "operational.claimReclaimWindowMs" | "operational.controlPlaneBackoffCeilingMs" | "operational.controlPlaneConnectMs" | "operational.conclusionReplayDelaysMs" | "operational.hostFullRetryMs" | "operational.deliveryRetryBaseMs" | "operational.deliveryRetryAfterMaximumMs" | "operational.wakeReceiptRetryMs" | "operational.wakeReceiptRecoveryLifetimeMs" | "operational.repairOverdueGraceSeconds" | "operational.admissionWindowMs" | "operational.admissionLookaheadMs" | "operational.admissionHedgeAfterMs" | "operational.admissionRpcBudgetMs" | "operational.unreachableRetryMs" | "operational.heldResponseStepMarginMs" | "operational.sendLeaseMarginSeconds" | "operational.sendSettlementReserveMs" | "operational.exhaustedClaimRetryMs" | "operational.retentionCadenceMs" | "operational.retentionBacklogCadenceMs" | "operational.retentionRetryHandoffCount" | "operational.timerSignalRetryDelaysMs" | "operational.dispatchWarmHorizonMs" | "operational.sdkAutoRetryCount" | "operational.sdkAutoRetryBaseMs" | "operational.sdkAutoRetryMaximumWaitMs" | "operational.callbackMiddlewareLeaseMs" | "operational.automaticFundingSuccessCooldownMs" | "operational.automaticFundingClaimLeaseMs" | "operational.automaticFundingBackoffMaximumMs" | "operational.providerCreateFenceMs" | "operational.fundingUnresolvedAfterMs" | "operational.fundingRepairMs" | "operational.fundingActionRequiredRepairMs" | "operational.fundingDisputeRepairMs" | "operational.billingNoticeBackoffMaximumMs" | "operational.billingNoticeClaimMaximumMs" | "operational.billingNoticeRetryMaximumMs" | "operational.billingNoticeCatchUpRetryCount" | "operational.billingNoticeClaimSeconds" | "operational.fundingDiscoveryClaimMs" | "operational.fundingDiscoveryRetryMaximumMs" | "operational.fundingDiscoveryClaimMaximumMs" | "operational.fundingAbandonedAfterMs" | "operational.checkoutDiscoverySkewSeconds" | "operational.checkoutDiscoveryWindowSeconds" | "operational.fundingQuoteLifetimeMs" | "operational.automaticFundingPreviewLifetimeMs" | "operational.testSinkRefreshMs" | "operational.payloadLintDelayMs" | "operational.payloadParseBudgetMs" | "operational.dashboardQueryStaleMs" | "operational.forecastRefreshFloorMs" | "operational.forecastRefreshMaximumMs" | "operational.forecastCoverageSlackMs";
93
+ default: number | readonly number[] | readonly [500, 1500, 4000] | readonly [250, 1000, 2000, 4000] | readonly [2000, 5000, 15000, 60000];
94
+ unit: "count" | "seconds" | "milliseconds";
95
+ scope: "deployment";
96
+ permittedLayers: readonly ["deployment"];
97
+ visibility: "operator";
98
+ changeProcedure: "Reviewed deployment; preserve callback, retry, funding and receipt compatibility";
99
+ rationale: "Retain the existing measured or copied operating policy; the enforcement owner documents its evidence";
100
+ enforcement: readonly string[];
101
+ }>[];
@@ -0,0 +1,341 @@
1
+ /**
2
+ * The single numeric owner for deployment-governed timer, timeout and retry
3
+ * configuration. Values preserve the accepted policy and measured W9 timing
4
+ * budgets; this leaf imports no schemas, application code or database runtime.
5
+ * Change through a reviewed deployment. Retrying a callback, funding operation
6
+ * or idempotency receipt is a public correctness promise, so organizations may
7
+ * not override these values. Original owner modules keep compatible exports.
8
+ */
9
+ export const OPERATIONAL_TIMING = Object.freeze({
10
+ projectBillingConflictRetryCount: 4,
11
+ projectBillingConflictRetryBaseMs: 250,
12
+ billingNoticeBackoffBaseMs: 60_000,
13
+ automaticFundingBackoffBaseMs: 60_000,
14
+ controlPlaneBackoffBaseMs: 10,
15
+ postgresConnectionAcquisitionMs: 2_900,
16
+ postgresLockMs: 2_000,
17
+ postgresStatementMs: 2_900,
18
+ postgresTransactionBudgetMs: 2_900,
19
+ postgresTransactionMaximumMs: 2_999,
20
+ apiMutationStatementMs: 5_000,
21
+ apiMutationBudgetMs: 5_000,
22
+ apiMutationMaximumMs: 5_000,
23
+ controlPlaneWriteStatementMs: 5_000,
24
+ controlPlaneWriteBudgetMs: 5_000,
25
+ dispatchHedgeAfterMs: 400,
26
+ dispatchHedgeThirdLegMs: 1_200,
27
+ apiHedgeAfterMs: 300,
28
+ authorizationReplayDelaysMs: Object.freeze([500, 1_500, 4_000]),
29
+ claimProbeCount: 3,
30
+ claimReclaimCount: 3,
31
+ claimReclaimWindowMs: 1_200,
32
+ controlPlaneBackoffCeilingMs: 200,
33
+ controlPlaneConnectMs: 5_000,
34
+ conclusionReplayDelaysMs: Object.freeze([250, 1_000, 2_000, 4_000]),
35
+ hostFullRetryMs: 1_000,
36
+ deliveryRetryBaseMs: Object.freeze([2_000, 5_000, 15_000, 60_000]),
37
+ deliveryRetryAfterMaximumMs: 3_600_000,
38
+ wakeReceiptRetryMs: 5_000,
39
+ wakeReceiptRecoveryLifetimeMs: 9 * 60_000,
40
+ repairOverdueGraceSeconds: 10,
41
+ admissionWindowMs: 1_000,
42
+ admissionLookaheadMs: 60_000,
43
+ admissionHedgeAfterMs: 250,
44
+ admissionRpcBudgetMs: 2_999,
45
+ unreachableRetryMs: 5_000,
46
+ heldResponseStepMarginMs: 20_000,
47
+ sendLeaseMarginSeconds: 12,
48
+ sendSettlementReserveMs: 7_000,
49
+ exhaustedClaimRetryMs: 250,
50
+ retentionCadenceMs: 60 * 60 * 1_000,
51
+ retentionBacklogCadenceMs: 60 * 1_000,
52
+ retentionRetryHandoffCount: 5,
53
+ timerSignalRetryDelaysMs: Object.freeze([250, 1_000]),
54
+ dispatchWarmHorizonMs: 10_000,
55
+ sdkAutoRetryCount: 3,
56
+ sdkAutoRetryBaseMs: 250,
57
+ sdkAutoRetryMaximumWaitMs: 30_000,
58
+ callbackMiddlewareLeaseMs: 30_000,
59
+ automaticFundingSuccessCooldownMs: 15 * 60 * 1_000,
60
+ automaticFundingClaimLeaseMs: 60 * 1_000,
61
+ automaticFundingBackoffMaximumMs: 60 * 60 * 1_000,
62
+ providerCreateFenceMs: 23 * 60 * 60 * 1_000,
63
+ fundingUnresolvedAfterMs: 15 * 60 * 1_000,
64
+ fundingRepairMs: 60 * 1_000,
65
+ fundingActionRequiredRepairMs: 5 * 60 * 1_000,
66
+ fundingDisputeRepairMs: 5 * 60 * 1_000,
67
+ billingNoticeBackoffMaximumMs: 86_400_000,
68
+ billingNoticeClaimMaximumMs: 5 * 60_000,
69
+ billingNoticeRetryMaximumMs: 60 * 60_000,
70
+ billingNoticeCatchUpRetryCount: 5,
71
+ billingNoticeClaimSeconds: 2 * 60,
72
+ fundingDiscoveryClaimMs: 2 * 60 * 1_000,
73
+ fundingDiscoveryRetryMaximumMs: 24 * 60 * 60 * 1_000,
74
+ fundingDiscoveryClaimMaximumMs: 5 * 60 * 1_000,
75
+ fundingAbandonedAfterMs: 60 * 60 * 1000,
76
+ checkoutDiscoverySkewSeconds: 60,
77
+ checkoutDiscoveryWindowSeconds: 23 * 60 * 60,
78
+ fundingQuoteLifetimeMs: 5 * 60_000,
79
+ automaticFundingPreviewLifetimeMs: 5 * 60_000,
80
+ testSinkRefreshMs: 3_000,
81
+ payloadLintDelayMs: 250,
82
+ payloadParseBudgetMs: 50,
83
+ dashboardQueryStaleMs: 30_000,
84
+ forecastRefreshFloorMs: 30_000,
85
+ forecastRefreshMaximumMs: 300_000,
86
+ forecastCoverageSlackMs: 120_000,
87
+ });
88
+ export const OPERATIONAL_TIMING_ENFORCEMENT = Object.freeze({
89
+ forecastRefreshFloorMs: [
90
+ "packages/contracts/src/forecast.ts#OPERATIONAL_TIMING.forecastRefreshFloorMs",
91
+ "packages/scheduling/src/partition-forecast.ts#OPERATIONAL_TIMING.forecastRefreshFloorMs",
92
+ ],
93
+ forecastRefreshMaximumMs: [
94
+ "packages/contracts/src/forecast.ts#OPERATIONAL_TIMING.forecastRefreshMaximumMs",
95
+ "packages/scheduling/src/partition-forecast.ts#OPERATIONAL_TIMING.forecastRefreshMaximumMs",
96
+ ],
97
+ forecastCoverageSlackMs: [
98
+ "packages/contracts/src/forecast.ts#OPERATIONAL_TIMING.forecastCoverageSlackMs",
99
+ "packages/scheduling/src/partition-forecast.ts#OPERATIONAL_TIMING.forecastCoverageSlackMs",
100
+ ],
101
+ postgresConnectionAcquisitionMs: [
102
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DEFAULT_CONNECTION_ACQUISITION_TIMEOUT_MS",
103
+ ],
104
+ postgresLockMs: [
105
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DEFAULT_LOCK_TIMEOUT_MS",
106
+ ],
107
+ postgresStatementMs: [
108
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DEFAULT_STATEMENT_TIMEOUT_MS",
109
+ ],
110
+ postgresTransactionBudgetMs: [
111
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DEFAULT_TRANSACTION_BUDGET_MS",
112
+ ],
113
+ postgresTransactionMaximumMs: [
114
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#MAX_TRANSACTION_BUDGET_MS",
115
+ ],
116
+ apiMutationStatementMs: [
117
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DEFAULT_MUTATION_STATEMENT_TIMEOUT_MS",
118
+ ],
119
+ apiMutationBudgetMs: [
120
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DEFAULT_MUTATION_TRANSACTION_BUDGET_MS",
121
+ ],
122
+ apiMutationMaximumMs: [
123
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#MAX_MUTATION_TRANSACTION_BUDGET_MS",
124
+ ],
125
+ controlPlaneWriteStatementMs: [
126
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#CONTROL_PLANE_WRITE_STATEMENT_TIMEOUT_MS",
127
+ ],
128
+ controlPlaneWriteBudgetMs: [
129
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#CONTROL_PLANE_WRITE_BUDGET_MS",
130
+ ],
131
+ dispatchHedgeAfterMs: [
132
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DISPATCH_HEDGE_AFTER_MS",
133
+ ],
134
+ dispatchHedgeThirdLegMs: [
135
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#DISPATCH_HEDGE_THIRD_LEG_MS",
136
+ ],
137
+ apiHedgeAfterMs: [
138
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#API_HEDGE_AFTER_MS",
139
+ ],
140
+ authorizationReplayDelaysMs: [
141
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#AUTHORIZATION_REPLAY_DELAYS_MS",
142
+ ],
143
+ claimProbeCount: [
144
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#CLAIM_PROBE_ATTEMPTS",
145
+ ],
146
+ claimReclaimCount: [
147
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#CLAIM_RECLAIM_LIMIT",
148
+ ],
149
+ claimReclaimWindowMs: [
150
+ "packages/postgres-scheduling/src/postgres-timeouts.ts#CLAIM_RECLAIM_WINDOW_MS",
151
+ ],
152
+ controlPlaneBackoffCeilingMs: [
153
+ "packages/postgres-scheduling/src/control-plane-database.ts#CONTROL_PLANE_BACKOFF_CEILING_MS",
154
+ ],
155
+ controlPlaneConnectMs: [
156
+ "packages/postgres-scheduling/src/control-plane-database.ts#CONTROL_PLANE_CONNECT_TIMEOUT_MS",
157
+ ],
158
+ conclusionReplayDelaysMs: [
159
+ "packages/application/src/dialer.ts#DEFAULT_CONCLUSION_RETRY_DELAYS_MS",
160
+ ],
161
+ hostFullRetryMs: [
162
+ "packages/application/src/dialer.ts#DEFAULT_HOST_FULL_RETRY_MS",
163
+ "packages/postgres-scheduling/src/postgres-repository.ts#CLAIM_SEND_HOST_FULL_RETRY_MS",
164
+ ],
165
+ deliveryRetryBaseMs: [
166
+ "packages/application/src/schedule-series.ts#RETRY_BASE_MS",
167
+ ],
168
+ deliveryRetryAfterMaximumMs: [
169
+ "packages/application/src/schedule-series.ts#MAX_RETRY_AFTER_MS",
170
+ ],
171
+ wakeReceiptRetryMs: [
172
+ "packages/application/src/timer-bucket.ts#WAKE_RECEIPT_RETRY_MS",
173
+ ],
174
+ wakeReceiptRecoveryLifetimeMs: [
175
+ "packages/application/src/timer-bucket.ts#WAKE_RECEIPT_RECOVERY_LIFETIME_MS",
176
+ ],
177
+ repairOverdueGraceSeconds: [
178
+ "packages/application/src/timer-bucket-repair.ts#REPAIR_OVERDUE_GRACE_SECONDS",
179
+ ],
180
+ admissionWindowMs: [
181
+ "packages/application/src/admission-window.ts#ADMISSION_WINDOW_MS",
182
+ ],
183
+ admissionLookaheadMs: [
184
+ "packages/application/src/admission-window.ts#ADMISSION_WINDOW_MAX_LOOKAHEAD_MS",
185
+ ],
186
+ admissionHedgeAfterMs: [
187
+ "packages/delivery-runtime/src/admission-hedge.ts#ADMISSION_HEDGE_AFTER_MS",
188
+ ],
189
+ admissionRpcBudgetMs: [
190
+ "packages/delivery-runtime/src/admission-hedge.ts#ADMISSION_RPC_BUDGET_MS",
191
+ ],
192
+ unreachableRetryMs: [
193
+ "packages/delivery-runtime/src/dispatch-admission.ts#UNREACHABLE_RETRY_MS",
194
+ ],
195
+ heldResponseStepMarginMs: [
196
+ "packages/delivery-runtime/src/held-response-carrier.ts#HELD_RESPONSE_STEP_MARGIN_MS",
197
+ ],
198
+ sendLeaseMarginSeconds: [
199
+ "packages/delivery-runtime/src/held-response-carrier.ts#SEND_LEASE_MARGIN_SECONDS",
200
+ ],
201
+ sendSettlementReserveMs: [
202
+ "packages/delivery-runtime/src/held-response-carrier.ts#SEND_SETTLEMENT_RESERVE_MS",
203
+ ],
204
+ exhaustedClaimRetryMs: [
205
+ "packages/timer-bucket/src/durable-object.ts#EXHAUSTED_CLAIM_RETRY_MS",
206
+ ],
207
+ retentionCadenceMs: [
208
+ "packages/retention-worker/src/worker.ts#RETENTION_CADENCE_MS",
209
+ ],
210
+ retentionBacklogCadenceMs: [
211
+ "packages/retention-worker/src/worker.ts#RETENTION_BACKLOG_CADENCE_MS",
212
+ ],
213
+ retentionRetryHandoffCount: [
214
+ "packages/retention-worker/src/worker.ts#RETENTION_RETRY_HANDOFF_COUNT",
215
+ ],
216
+ timerSignalRetryDelaysMs: [
217
+ "apps/api/src/detached-signal.ts#TIMER_SIGNAL_RETRY_DELAYS_MS",
218
+ ],
219
+ dispatchWarmHorizonMs: ["apps/api/src/worker.ts#DISPATCH_WARM_HORIZON_MS"],
220
+ sdkAutoRetryCount: ["packages/api-client/src/client.ts#SDK_AUTO_RETRY_LIMIT"],
221
+ sdkAutoRetryBaseMs: [
222
+ "packages/api-client/src/client.ts#SDK_AUTO_RETRY_BASE_DELAY_MS",
223
+ ],
224
+ sdkAutoRetryMaximumWaitMs: [
225
+ "packages/api-client/src/client.ts#SDK_AUTO_RETRY_MAX_WAIT_MS",
226
+ ],
227
+ callbackMiddlewareLeaseMs: [
228
+ "packages/api-client/src/callback-middleware.ts#DEFAULT_LEASE_MS",
229
+ ],
230
+ automaticFundingSuccessCooldownMs: [
231
+ "packages/postgres-scheduling/src/automatic-funding.ts#AUTOMATIC_FUNDING_SUCCESS_COOLDOWN_MS",
232
+ ],
233
+ automaticFundingClaimLeaseMs: [
234
+ "packages/postgres-scheduling/src/automatic-funding.ts#CLAIM_LEASE_MS",
235
+ ],
236
+ automaticFundingBackoffMaximumMs: [
237
+ "packages/postgres-scheduling/src/automatic-funding.ts#MAX_BACKOFF_MS",
238
+ ],
239
+ providerCreateFenceMs: [
240
+ "packages/postgres-scheduling/src/automatic-funding.ts#PROVIDER_CREATE_FENCE_MS",
241
+ "packages/application/src/execution-funding-provider.ts#EXECUTION_FUNDING_CREATE_FENCE_MS",
242
+ "apps/api/src/billing/stripe-provider.ts#MAXIMUM_CREATE_AGE_MS",
243
+ ],
244
+ fundingUnresolvedAfterMs: [
245
+ "packages/postgres-scheduling/src/funding.ts#FIFTEEN_MINUTES_MS",
246
+ "packages/application/src/execution-funding-provider.ts#EXECUTION_FUNDING_UNRESOLVED_AFTER_MS",
247
+ ],
248
+ fundingRepairMs: [
249
+ "packages/postgres-scheduling/src/funding.ts#REPAIR_DELAY_MS",
250
+ ],
251
+ fundingActionRequiredRepairMs: [
252
+ "packages/postgres-scheduling/src/funding.ts#ACTION_REQUIRED_REPAIR_DELAY_MS",
253
+ ],
254
+ fundingDisputeRepairMs: [
255
+ "packages/postgres-scheduling/src/funding.ts#DISPUTE_REPAIR_DELAY_MS",
256
+ ],
257
+ billingNoticeBackoffMaximumMs: [
258
+ "packages/postgres-scheduling/src/billing-notifications.ts#MAX_BACKOFF_MS",
259
+ ],
260
+ billingNoticeClaimMaximumMs: [
261
+ "apps/api/src/billing/billing-notification-store.ts#MAX_CLAIM_MS",
262
+ ],
263
+ billingNoticeRetryMaximumMs: [
264
+ "apps/api/src/billing/billing-notification-store.ts#MAX_RETRY_MS",
265
+ ],
266
+ billingNoticeCatchUpRetryCount: [
267
+ "apps/api/src/billing/billing-notice-catch-up.ts#RETRY_LIMIT",
268
+ ],
269
+ billingNoticeClaimSeconds: [
270
+ "apps/api/src/billing/billing-notification-runtime.ts#CLAIM_SECONDS",
271
+ ],
272
+ fundingDiscoveryClaimMs: [
273
+ "apps/api/src/billing/execution-funding-runtime.ts#DISCOVERY_CLAIM_MS",
274
+ ],
275
+ fundingDiscoveryRetryMaximumMs: [
276
+ "apps/api/src/billing/execution-funding-runtime.ts#DISCOVERY_MAX_RETRY_MS",
277
+ "apps/api/src/billing/execution-funding-store.ts#MAX_DISCOVERY_RETRY_MS",
278
+ ],
279
+ fundingDiscoveryClaimMaximumMs: [
280
+ "apps/api/src/billing/execution-funding-store.ts#MAX_DISCOVERY_CLAIM_MS",
281
+ ],
282
+ fundingAbandonedAfterMs: [
283
+ "packages/application/src/execution-funding-provider.ts#EXECUTION_FUNDING_ABANDONED_AFTER_MS",
284
+ ],
285
+ checkoutDiscoverySkewSeconds: [
286
+ "apps/api/src/billing/stripe-provider.ts#CHECKOUT_DISCOVERY_SKEW_SECONDS",
287
+ "apps/api/src/billing/stripe-execution-funding.ts#CHECKOUT_DISCOVERY_SKEW_SECONDS",
288
+ ],
289
+ checkoutDiscoveryWindowSeconds: [
290
+ "apps/api/src/billing/stripe-provider.ts#CHECKOUT_DISCOVERY_WINDOW_SECONDS",
291
+ "apps/api/src/billing/stripe-execution-funding.ts#CHECKOUT_DISCOVERY_WINDOW_SECONDS",
292
+ ],
293
+ fundingQuoteLifetimeMs: [
294
+ "packages/application/src/execution-funding.ts#QUOTE_LIFETIME_MS",
295
+ ],
296
+ automaticFundingPreviewLifetimeMs: [
297
+ "packages/application/src/automatic-funding.ts#PREVIEW_LIFETIME_MS",
298
+ ],
299
+ testSinkRefreshMs: [
300
+ "apps/dashboard/src/sink-surfaces.tsx#DELIVERIES_REFRESH_MS",
301
+ ],
302
+ payloadLintDelayMs: ["apps/dashboard/src/payload-editor.tsx#LINT_DELAY_MS"],
303
+ payloadParseBudgetMs: [
304
+ "apps/dashboard/src/payload-editor.tsx#PARSE_BUDGET_MS",
305
+ ],
306
+ dashboardQueryStaleMs: [
307
+ "apps/dashboard/src/main.tsx#STALE_MS",
308
+ "apps/dashboard/src/schedule-editor.tsx#OPERATIONAL_TIMING.dashboardQueryStaleMs",
309
+ ],
310
+ controlPlaneBackoffBaseMs: [
311
+ "packages/postgres-scheduling/src/control-plane-database.ts#OPERATIONAL_TIMING.controlPlaneBackoffBaseMs",
312
+ ],
313
+ automaticFundingBackoffBaseMs: [
314
+ "packages/postgres-scheduling/src/automatic-funding.ts#OPERATIONAL_TIMING.automaticFundingBackoffBaseMs",
315
+ ],
316
+ billingNoticeBackoffBaseMs: [
317
+ "packages/postgres-scheduling/src/billing-notifications.ts#OPERATIONAL_TIMING.billingNoticeBackoffBaseMs",
318
+ ],
319
+ projectBillingConflictRetryBaseMs: [
320
+ "packages/application/src/project-billing.ts#OPERATIONAL_TIMING.projectBillingConflictRetryBaseMs",
321
+ ],
322
+ projectBillingConflictRetryCount: [
323
+ "packages/application/src/project-billing.ts#OPERATIONAL_TIMING.projectBillingConflictRetryCount",
324
+ ],
325
+ });
326
+ /** Catalog metadata derives its defaults from the numeric owner above. */
327
+ export const OPERATIONAL_TIMING_CATALOG = Object.freeze(Object.keys(OPERATIONAL_TIMING).map((key) => Object.freeze({
328
+ key: `operational.${key}`,
329
+ default: OPERATIONAL_TIMING[key],
330
+ unit: key.endsWith("Seconds")
331
+ ? "seconds"
332
+ : key.endsWith("Count")
333
+ ? "count"
334
+ : "milliseconds",
335
+ scope: "deployment",
336
+ permittedLayers: ["deployment"],
337
+ visibility: "operator",
338
+ changeProcedure: "Reviewed deployment; preserve callback, retry, funding and receipt compatibility",
339
+ rationale: "Retain the existing measured or copied operating policy; the enforcement owner documents its evidence",
340
+ enforcement: OPERATIONAL_TIMING_ENFORCEMENT[key],
341
+ })));